Posts

Showing posts from October, 2015

DNS for libvirt VMs

Image
As the title says, this post is about setting up a solution for automatically populating DNS entries for libvirt VMs. Update 1: Use localOnly to avoid loops between host dnsmasq and libvirt dnsmasq. This is useful if: You have a requirement that VMs should be able to ping each other by hostname. In case of dhcp clients, if the clients are setup correctly then you don't have to do anything else. However, that is not a solution if you don't want to change anything in the guest. For ease of use, you would want to do a ssh into the VM using the VM name. You have more than one virtual networks and want VMs to communicate across them. On a Fedora 22 installation this is how your network and dns stack would like: Virtual machines which use a NAT interface through a virtual network on the host go through a DNSMASQ service that is setup by libvirt for every virtual network interface that it creates. This dnsmasq service caters as a nameserver as well as a dhcp ser