Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 11 down vote accepted

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.

share|improve this answer
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.) – hheimbuerger Aug 22 '10 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. – moberley Aug 22 '10 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 – hheimbuerger Aug 22 '10 at 19:37
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 '13 at 9:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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