Project

Profile

Help

Libvirt DNS resolving problem quick fix

Vagrant creates 2 networks::
  • vagrant-libvirt
  • vagrant-private-dhcp

Dump network info in xml (files names must be same as network names):

virsh net-dumpxml vagrant-libvirt > vagrant-libvirt.xml
virsh net-dumpxml vagrant-private-dhcp > vagrant-private-dhcp.xml

Edit created files with text editor, add to both files next lines:

<network connections='10' ipv6='yes'>

  [...]

  <dns>
    <forwarder addr='127.0.0.1'/>
  </dns>

  [...]

</network>

Remove old networks

virsh net-destroy vagrant-libvirt
virsh net-destroy vagrant-private-dhcp
virsh net-undefine vagrant-libvirt
virsh net-undefine vagrant-private-dhcp

Define and start network from xmls:

virsh net-define vagrant-libvirt.xml
virsh net-define vagrant-private-dhcp.xml
virsh net-start vagrant-libvirt
virsh net-start vagrant-private-dhcp