September 20, 2011

KVM guest not responding to virsh commands

I use KVM (Kernel Virtual Machine) to run tens of virtual machines for a development environment. What makes life easier when it comes to managing all these machines is the virsh tool. It’s a script that runs on the host and lets you easily control your VMs: start, shutdown, destroy, change configurations etc.

But recently one of the VMs I was running was not responding to any of the commands I was sending through virsh. I was trying to run virsh shutdown but the guest kept on running. The fix to this problem was quite easy: the ACPI deamon needs to be running on the guest / VM to be able to receive commands from virsh. For some reason that particular guest didn’t have ACPId running or installed. So just use your package manager of choice and install and start ACPI on the guest and everything should be fine!