I am using various KVM domains on a Ubuntu server. Both the host and guests run 10.04.1, 2.6.32-24 kernel, virsh reports version 0.7.5, KVM 0.12.3. The guests boot automatically when the host boots and they have <features><acpi/><features> in their configuration.

I could never manage to make virsh shutdown MyDomain on the host to have any effect. It responds with Domain MyDomain is being shutdown and the domain keeps happily running. virsh list still lists them in the state running.

virsh destroy MyDomain works fine, but of course that's not really what I want, so most of the time I log into each one and shut them down manually, which is pretty annoying.

I couldn't really find any information on how virsh shutdown tries to shut the domain down. Pointers to useful bits of documentation are welcome.

What could cause this? How is it supposed to work?

2 Answers 2


Check to see if you have the package acpid installed on each of the guests.

I generally create new virtual machines using VMBuilder with the parameter --addpkg acpid and the only time I've had trouble shutting down Ubuntu guests using virsh was when the guest vm had crashed in some way.

  • Awesome, that's all it took! I added that to my VMBuilder script as well now. Did I miss an important piece of documentation here, or are you just magically assumed to know that? In retrospect, it makes sense to me, I guess virsh shutdown is just the equivalent to pressing the power button on a physical box. But that I haven't seen mentioned anywhere either, or I might have connected the dots and investigated more in that direction... Either way, thanks a lot! (Will upvote when I get the necessary rep.) Aug 22, 2010 at 13:33
  • I know that it is mentioned in the Server Guide section on vmbuilder very close to the end of the article. I'm not aware if it is mentioned elsewhere. help.ubuntu.com/10.04/serverguide/C/jeos-and-vmbuilder.html
    – moberley
    Aug 22, 2010 at 17:03
  • I must have not read it to the end. blush Or maybe I'll just pretend it wasn't there when I originally set most of these VMs up (8.04 or so). :P Aug 22, 2010 at 19:37
  • 1
    Note for Debian: if you disabled installation of Recommended packages, then acpid alone does not much because it only contains the binaries. You need to install acpi-support-base package to handle power button ACPI events. For Ubuntu, acpid contains both binaries and base event handlers and is sufficient.
    – cbliard
    Jul 31, 2013 at 9:28

If you don't have that option, there are 'shutdown modes' you can utilize to trigger a shutdown

$ sudo virsh shutdown --help
[--domain] <string>  domain name, id or uuid
--mode <string>  shutdown mode: acpi|agent|initctl|signal|paravirt


sudo virsh shutdown domain1 --mode acpi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .