0

I currently have two XEN-Hosts running a set of virtual machines. These machines can communicate with each other via a host-only network. I want to be able to move virtual machines between both servers without the VMs even noticing they have been moved. As an example, consider the following setup: I have a webserver, that communicates with a database server via host-only networking on a 10.42.254.0 subnet. I want to be able to move the webserver to the other host (host2) and still be able to access the database running on host1, without changing the configuration.

My idea was to bridge the host-only bridge-adapters on both dedicated hosts in order to share the same subnet. Is this at all possible? Both Dom0s are located in the same data center and in the same subnet.

Somehow that solution does sound a bit dirty but I'm not sure how to maintain transparency between both systems in any other way.

1 Answers1

0

You can establish a tunnel between the two Xen hosts with OpenVPN or similar tunneling software using TAP mode, which makes a virtual Ethernet adapter at both hosts.

Then you can bridge the TAP interface and host-only network adapter in both Xen hosts, and then you have a single IP subnet for your virtual hosts.

I prefer using an encrypted tunnel in this kind of situation, since you cannot be sure who / what is listening to the network.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63
  • I was hoping to avoid OpenVPN but I can see that this would be necessary. I'm not that familiar with network bridging. Am I right in assuming that every packet on the subnet will be transfered to the other host, regardless off where the virtual machines are running? If not I can minimize inter-host communication and keep the overhead to a minimum. – Christopher Thonfeld-Guckes Jul 19 '16 at 12:33
  • The bridge is actually a switch. It learns which layer 2 MAC addresses are behind which interfaces, and only sends packets via the interface where the MAC address is. So, if VM #1 on Xen host #1 communicates with VM #2 on Xen host #1, the bridge knows that the MAC address of VM #2 is behind the host-only adapter, and sends the data via that adapter. The communication doesn't go through the tunnel. – Tero Kilkanen Jul 19 '16 at 12:36