Bugzilla – Bug 1137883
libvirt can't autostart the default network because of missing resolv.conf
Last modified: 2019-06-11 15:25:52 UTC
I have a `default` network with the following definition: mrostecki ~ sudo virsh net-dumpxml default <network> <name>default</name> <uuid>427c041e-0ede-4d0a-abd9-0bf104eefdbd</uuid> <forward mode='nat'/> <bridge name='virbr0' stp='on' delay='0'/> <mac address='52:54:00:f2:2f:d7'/> <ip address='192.168.122.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.122.2' end='192.168.122.254'/> </dhcp> </ip> </network> It's supposed to autostart: mrostecki ~ sudo virsh net-list --all Name State Autostart Persistent ---------------------------------------------- default inactive yes yes Every time when libvird starts on the system boot, it fails with the following eror mrostecki ~ sudo journalctl -u libvirtd -- Logs begin at Tue 2019-06-11 15:26:47 CEST, end at Tue 2019-06-11 17:06:30 CEST. -- Jun 11 15:27:06 linux-27vc systemd[1]: Starting Virtualization daemon... Jun 11 15:27:06 linux-27vc libvirtd[2148]: 2019-06-11 13:27:06.362+0000: 2148: info : libvirt version: 5.3.0 Jun 11 15:27:06 linux-27vc libvirtd[2148]: 2019-06-11 13:27:06.362+0000: 2148: info : hostname: linux-27vc Jun 11 15:27:06 linux-27vc libvirtd[2148]: 2019-06-11 13:27:06.362+0000: 2148: warning : virGetHostnameImpl:540 : getaddrinfo failed for 'linux-27vc': Name or service not known Jun 11 15:27:06 linux-27vc libvirtd[2148]: libvirt version: 5.3.0 Jun 11 15:27:06 linux-27vc libvirtd[2148]: hostname: linux-27vc Jun 11 15:27:06 linux-27vc libvirtd[2148]: Failed to intialize libnetcontrol. Management of interface devices is disabled Jun 11 15:27:06 linux-27vc systemd[1]: Started Virtualization daemon. Jun 11 15:27:07 linux-27vc dnsmasq[3015]: directory /etc/resolv.conf for resolv-file is missing, cannot poll Jun 11 15:27:07 linux-27vc dnsmasq[3015]: FAILED to start up Jun 11 15:27:07 linux-27vc libvirtd[2148]: internal error: Child process (VIR_BRIDGE_NAME=virbr0 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper) une> dnsmasq: directory /etc/resolv.conf for resolv-file is missing, cannot poll Jun 11 15:27:17 linux-27vc libvirtd[2148]: Device 0000:03:00.0 not found: could not access /sys/bus/pci/devices/0000:03:00.0/config: No such file or directory Jun 11 16:51:23 linux-27vc libvirtd[2148]: this function is not supported by the connection driver: virConnectNumOfInterfaces Jun 11 16:54:17 linux-27vc libvirtd[2148]: End of file while reading data: Input/output error However, restarting the unit on booted system works: mrostecki ~ sudo systemctl restart libvirtd mrostecki ~ sudo journalctl -u libvirtd -- Logs begin at Tue 2019-06-11 15:26:47 CEST, end at Tue 2019-06-11 17:14:51 CEST. -- [...] Jun 11 17:14:46 linux-27vc systemd[1]: Starting Virtualization daemon... Jun 11 17:14:46 linux-27vc libvirtd[13689]: 2019-06-11 15:14:46.642+0000: 13689: info : libvirt version: 5.3.0 Jun 11 17:14:46 linux-27vc libvirtd[13689]: 2019-06-11 15:14:46.642+0000: 13689: info : hostname: linux-27vc Jun 11 17:14:46 linux-27vc libvirtd[13689]: 2019-06-11 15:14:46.642+0000: 13689: warning : virGetHostnameImpl:540 : getaddrinfo failed for 'linux-27vc': Name or service not known Jun 11 17:14:46 linux-27vc libvirtd[13689]: libvirt version: 5.3.0 Jun 11 17:14:46 linux-27vc libvirtd[13689]: hostname: linux-27vc Jun 11 17:14:46 linux-27vc libvirtd[13689]: Failed to intialize libnetcontrol. Management of interface devices is disabled Jun 11 17:14:46 linux-27vc systemd[1]: Started Virtualization daemon. Jun 11 17:14:46 linux-27vc dnsmasq[13763]: started, version 2.80 cachesize 2000 Jun 11 17:14:46 linux-27vc dnsmasq[13763]: compile time options: IPv6 GNU-getopt DBus i18n IDN2 DHCP DHCPv6 Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile Jun 11 17:14:46 linux-27vc dnsmasq-dhcp[13763]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h Jun 11 17:14:46 linux-27vc dnsmasq-dhcp[13763]: DHCP, sockets bound exclusively to interface virbr0 Jun 11 17:14:46 linux-27vc dnsmasq[13763]: reading /etc/resolv.conf Jun 11 17:14:46 linux-27vc dnsmasq[13763]: using nameserver 10.100.2.10#53 Jun 11 17:14:46 linux-27vc dnsmasq[13763]: using nameserver 10.100.2.8#53 Jun 11 17:14:46 linux-27vc dnsmasq[13763]: using nameserver 192.168.84.1#53 Jun 11 17:14:46 linux-27vc dnsmasq[13763]: read /etc/hosts - 8 addresses Jun 11 17:14:46 linux-27vc dnsmasq[13763]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses Jun 11 17:14:46 linux-27vc dnsmasq-dhcp[13763]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Duplicate of bug#1123699. *** This bug has been marked as a duplicate of bug 1123699 ***