]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vbox: handle 'saved' state of VMs
authorRyota Ozaki <ozaki.ryota@gmail.com>
Mon, 14 Oct 2013 16:19:42 +0000 (01:19 +0900)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 15 Oct 2013 11:03:29 +0000 (12:03 +0100)
VirtualBox has 'saved' state for VMs saved by the hypervisor.
However, the state is treated as VIR_DOMAIN_NOSTATE by the vbox
driver, resulting that virsh shows 'no state' for saved VMs.

The fix treats the state as VIR_DOMAIN_SHUTOFF as same as
other domains such as qemu.

Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
src/vbox/vbox_tmpl.c

index 10a3775e333eb5f996e23d7eceb231004544932f..cf34f5c365c8a28d6f67592a817de51f11ac3f09 100644 (file)
@@ -1923,6 +1923,7 @@ static virDomainState vboxConvertState(enum MachineState state) {
         case MachineState_Stopping:
             return VIR_DOMAIN_SHUTDOWN;
         case MachineState_PoweredOff:
+        case MachineState_Saved:
             return VIR_DOMAIN_SHUTOFF;
         case MachineState_Aborted:
             return VIR_DOMAIN_CRASHED;