0

From my reading of the libvirt documentation and the examples here libvirt uses a Linux bridge to provide routing between VM's on the same host.

It also starts a dnsmasq process attached to the bridge which supplies DHCP addresses to the VMs.

I'm wondering if anyone could point me to good articles or examples on routing between VM's across hosts ideally without having to split an IP range across multiple DHCP servers on each box.

Unless my reading of the docs is incorrect (why it may well be) static IP's for VM's seems to involve a DHCP server hackery. KVM/libvirt: How to configure static guest IP addresses on the virtualisation host

Alexis Wilke
  • 2,496

2 Answers2

1

I found this resource to be helpful in your line of questions.

https://wiki.libvirt.org/VirtualNetworking.html#virtual-network-switches

Also "static IP's for VM's seems to involve a DHCP server" <- this is wrong. Static IPs are fine without DHCP. You will just need to setup static routes from your host to your VMs if you plan on going this way. Static IPs initially seem easier but very quickly become an issue with libvirt which is why dnsmasq is the recommended solution here.

0

One straightforward way is to connect all the VMs to a bridge, where one member is the physical interface on the host.

That way VMs are hosts in the Ethernet network. Then these hosts use the DHCP server that is set up for the physical network.

This approach has certain limit on scalability though.

Tero Kilkanen
  • 38,887