Ubuntu – Ubuntu 16.04 libvirt-guests.sh [6917] – running guests on default URI: no running guests

16.04

enter image description hereI have upgraded from Ubuntu 15.04 Vivid to 16.04.02 LTS Xenial and everytime I shutdown the system, the system hangs at the screen saying: "libvirt-guests.sh [6917] – running guests under URI address default: no running guests" and never shuts down. I have to manually shut it down everytime, which obviously is a pain. How can I fix this?

UPDATE:
I have done some investigation and here's what I've found.

I have uninstalled libvirt, kvm and qemu:

sudo apt-get purge libvirt* kvm qemu*

Reboot the computer and the error message is no longer there, however I noticed some error messages at boot saying something that "FAILED Qemu …. It flashes so quickly and I am not able to read what exactly it says. I installed libvirt again to get rid of the errors at boot:

sudo apt install qemu-kvm libvirt-bin

and the problem is back!

So is this script trying to shutdown my virtual machines? It looks like it does but since it does not find any it hangs? I don't have any virtual machines, though. I used to have one, but I removed it. What is interesting, my PC hangs at shutdown randomly, that is sometimes it hangs for like 15 seconds and it shuts down but in most cases it hangs forever. So this happens randomly.

Best Answer

I unexpectedly received a reply from virsh support saying that I could actually disable libvirt-guests, which I didn't realize was possible.

systemctl disable libvirt-guests

​Works like a charm!!!

I still however do not know the root cause but at least I can now reboot/shutdown without any issues.

Related Question