Med: VirtualDomain: honor virsh "in shutdown" state
Using libvirt 0.9.8 / qemu 1.0 / kvm from kernel 3.2.0,
"virsh list" briefly shows the virtual maschine in a
"in shutdown" state during a regular "virsh shutdown"
operation:
Id Name State
5 testvm1 running 6 testvm2 running ... 5 testvm1 running 5 testvm1 running ... 5 testvm1 in shutdown 5 testvm1 in shutdown ... - testvm1 shut off - testvm1 shut off ...
The VirtualDomain resource agent does not recognize this
state and thus issues a "virsh destroy" command.
This patch correctly handles "in shutdown" as a "this virtual
machine is still running" state.
See also: libvirt's tools/virsh.c:
static const char * vshDomainStateToString(int state)