1

Sorry for asking this eventually trivial question, but I'm fighting with this for more than a day, and was unable to figure this out by myself so far.

Situation

Proxmox host running a bunch of openvz-nodes.
Each node has a public IP from a /28 subnet, and an internal IP for node<>node & node<>host networking. This is all working perfectly so far.

Now I have to add a KVM-based Windows instance, which should should be accessible from the internal network. I'm looking for advice on how the network-settings should be configured (host & KVM)

Currently /etc/network/interfaces contains:

# loopback
auto lo
iface lo inet loopback

# eth0
auto  eth0
iface eth0 inet static
  address       xxx.xxx.77.119
  broadcast     xxx.xxx.77.127
  netmask       255.255.255.255
  gateway       xxx.xxx.77.97
  pointopoint   xxx.xxx.77.97

# default route subnet access
up route add -net xxx.xxx.77.96 netmask 255.255.255.224 gw xxx.xxx.77.97 eth0 

The internal IPs have been assigned through Proxmox / vzctl, in the 10.0.0.0/24 subnet:

  • nde01 > 10.0.0.1
  • nde02 > 10.0.0.2
  • etc

In my case the KVM instance in question is node12, so it should have the IP 10.0.0.12. And it should be able to communicate with the other nodes & host. As far as I know the solution would be to ad a bridge e.g. vmbr0 on the host, but how should this exactly be configured? And what are the corresponding settings for the KVM node.

I did try with dozens of combinations, but never got it working...

The network interface in the KVM node itself seems to be installed properly, did use the virtio drivers and it is looking fine. (The interface itself, not the TCP/IP configuration)

Any help would be very appreciated!

A bonus-answer would be how to let the KVM instance access the internet through NAT. But I'd bee extremely happy already with internal networking!

2
  • Don't you already have the internal network configured?! Apr 16, 2014 at 12:22
  • Internal network is configured and working for the OpenVZ nodes, but not for the KVM one.
    – ohrstrom
    Apr 16, 2014 at 13:51

2 Answers 2

1

on proxmox one can use dummy interface to make a vlan between VM or container or whatever. it will not get out of the server as there is not physical link for.

just put in your /etc/network/interface something like

auto vmbr2
iface vmbr2 inet manual
    bridge_ports dummy0
    bridge_stp off
    bridge_fd 0
    pre-up modprobe dummy numdummies=4

and use vmbr2 for your internal only needs for all the nodes that need internal network only. by the way, it will be persistent over reboot...

0

IMHO best solution for this task is OpenvSwitch. You can install it with my manual: http://www.stableit.ru/2013/11/openvswitch-19-centos-6.html

You need to create OpenvSwitch bridge: ovs-vsctl add-br private_switch

Connect KVM VM to it using this manual http://libvirt.org/formatnetwork.html (CTRL+F vswitch).

After that you should add veth (not an venet) interface to OpenVZ VE using this command: vzctl set 1111 --netif_add ct1111 --save

And next you need to configure it manually: vzctl exec 1111 "ifconfig ct1111 192.168.1.1/24 up"

And next you should add OpenVZ veth interface to OpenVswitch with this command: ovs-vsctl add-port private_switch veth1111.1111

And this will work. But on every VZ ct reboot you need reconfigure switch and IP addresses. Fox solving this issue you will use my scripts for OpenvSwitch and OpenVZ integration from here: https://bugzilla.openvz.org/show_bug.cgi?id=2896 (if you write some comments with feedback for my scripts it will be fine!).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .