Hi, I've noticed that libvirt seems to report crashed domains as
shutoff. Here's an example:
[root@XXXXX ~]# virsh list
Id Name State
----------------------------------
0 Domain-0 running
27 test03 blocked
34 test01 shut off
36 onetwentyeight blocked
[root@XXXXX ~]# xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 356 1 r----- 3655.4
onetwentyeight 36 128 1 -b---- 16.7
test01 34 256 1 ----c- 7.4
test03 27 256 1 -b---- 231.7
The reason is because xen_internal.c does not interpret the additional
shutdown flags when it checks the domain's state. Attached is a patch
which correctly checks these flags and reports the crashed state. I
wasn't sure of the best way to react to the other shutdown flags, so I
just defaulted to "SHUTOFF" for everything else.
Pete