1

After an automatic update of CentOS to version 7.7 on Sep 17 2019 my QEMU/KVM virtual machines do not start when I reboot the hypervisor server.

Trying to start the VM by hand gives this error:

# virsh start mygreatvm
error: failed to connect to the hypervisor
error: no connection driver available for <null>

Trying to list currently defined VMs (the VMs in questions are set to start by default (autostart) on every boot so they should at least appear here):

# virsh list
error: failed to connect to the hypervisor
error: no connection driver available for <null>

There are no error messages in system logs and neither in /var/log/libvirt/qemu/*.log. The libvirt daemon seems to run fine and does not complain about the non-started servers in /etc/libvirt/qemu/autostart/*xml:

# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-09-18 16:42:30 UTC; 2min 49s ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 1817 (libvirtd)
    Tasks: 16 (limit: 32768)
   CGroup: /system.slice/libvirtd.service
           └─1817 /usr/sbin/libvirtd
Sep 18 16:42:30 server systemd[1]: Starting Virtualization daemon...
Sep 18 16:42:30 server systemd[1]: Started Virtualization daemon.
2

The updates in CentOS 7.7 include an update to QEMU which needs a new package to be able to start QEMU/KVM virtual machines.

# yum install libvirt-daemon-driver-qemu

Then the virtual machines can be started right away (no reboot necessary):

# systemctl restart libvirtd
# virsh list
 Id    Name                           State
----------------------------------------------------
 1     mygreatvm                      running
 2     mygreatvm2                     running
 3     mygreatvm3                     running

Some CentOS hypervisors might have this package already installed; there will be no failures on these machines but the package was not necessary in the past.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.