Red Hat Bugzilla – Bug 746007
After using 'shutdown' on a xen guest, virt-manager still reports guest is running
Last modified: 2012-07-05 19:44:32 EDT
Created attachment 528059 [details]
screenshot of xm, virsh and virt-manager showing status
Description of problem:
When I shutdown a xen guest, vmm still shows it as running even though virsh and xm don't (see attached screenshot).
This means that I can't start the domain from virt-manager again because the only options are shutdown related (pause, force-off etc.)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. start Xen domain
2. stop xen domain
xen domain still shows up as running in virt-manager after it has been stopped and the domain cannot be "powered on" from virt-manager
Xen domain shows up as stopped in virt-manager, able to "power on" domain from virt-manager
This is a libvirt issue, present in f16 and current upstream. The issue is that invoking shutdown() on a xen guest leaves it reporting domain state 0 (unknown) for the vm object that was shut down. However, if you re-fetch the domain object, it reports the correct state of 5 (shutoff). So something is funky in xen or the xen driver.
This doesn't seem to affect the 'destroy'/'force poweroff' command
$ cat test.py
conn = "xen:///"
vmname = "xenlivecd"
conn = libvirt.open(conn)
vm = conn.lookupByName(vmname)
if vm.info() == libvirt.VIR_DOMAIN_SHUTOFF:
print "Starting %s" % vmname
print "Shutting off %s" % vmname
print "Domain state is %s" % vm.info()
print "Refreshed domain state is %s" % conn.lookupByName(vmname).info()
print "Old domain is still %s" % vm.info()
$ sudo python test.py
Shutting off xenlivecd
Domain state is 0
Refreshed domain state is 5
Old domain is still 0
Reassigning to libvirt but this could be a xen issue.
*** Bug 733433 has been marked as a duplicate of this bug. ***
Possible patch upstream:
*** Bug 746503 has been marked as a duplicate of this bug. ***
libvirt-0.9.6.1-1.fc16 has been submitted as an update for Fedora 16.
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-0.9.6.1-1.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
libvirt-0.9.6.1-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.