HomeClusterLabs Projects

Med: VirtualDomain: honor virsh "in shutdown" state

Description

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)

Details

Provenance
Raoul Bhatia <raoul@bhatia.at>Authored on May 10 2012, 8:01 AM
Parents
rR5af0e9209ed8: Merge pull request #82 from raoulbhatia/postfix
Branches
Unknown
Tags
Unknown

Event Timeline