Connect across multible libvirt hosts

Issues related to configuring your network
eddie70
Posts: 5
Joined: 2015/05/03 12:42:12

Connect across multible libvirt hosts

Postby eddie70 » 2017/11/13 20:50:01

Hi

I would like to have two KVM servers with the same IP ranges on each. 192.168.100.0/24 and 192.168.122.0/24

For example I would like to have two Hosts 192.168.1.10 and 192.168.1.11 each with a guest(s) as following.
192.168.122.5 on 192.168.1.10
192.168.122.6 on 192.168.1.11

I would like to be able for all 4 to connect to at least the two guests.
i.e. I would like for 192.168.122.5 to have infrastructure services like DNS, squid etc on it and 192.168.122.6 to have temporary LAB VM's on it.

I have been tiring to search for a way to do this however all I seem to be able to find is setting up two VLAN's on a single host and not how to set up a single VLAN across two hosts. I just don't know enough to be able to formulate an effective search.

I have the following setup.
ip r
default via 192.168.1.2 dev enp3s0
169.254.0.0/16 dev enp3s0 scope link metric 1002
192.168.1.0/24 dev enp3s0 proto kernel scope link src 192.168.1.10
192.168.100.0/24 dev virbr1 proto kernel scope link src 192.168.100.1
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1

I am guessing what is happening here is that when I try to connect to 192.168.122.6 that is on the second server, my traffic is been sent to the local virbr0 with no route to the second server. However I do not have the knowledge to fix this.

Any help in this regard would be very much appreciated.