On 07/21/2014 08:08 AM, Peter Krempa wrote: > Qemu doesn't currently support them and behaves strangely. Just forbid > them. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1079162 > --- > src/qemu/qemu_driver.c | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index 91baa7d..eae23d3 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -13401,9 +13401,14 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain, > case VIR_DOMAIN_SHUTDOWN: > case VIR_DOMAIN_SHUTOFF: > case VIR_DOMAIN_CRASHED: > - case VIR_DOMAIN_PMSUSPENDED: > break; > > + case VIR_DOMAIN_PMSUSPENDED: > + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", > + _("qemu doesn't support taking snapshots of " > + "PMSUSPENDED guests")); > + goto cleanup; > + This is a bit harsh; a bit nicer might be to take the snapshot anyways but to have the snapshot be in the running state (as if the act of taking the snapshot caused a pmwakeup event). But that's more complicated, and changes domain state implicitly, while this approach is vocal to the user why we can't do it (and if qemu ever DOES add support, we just gate this code by a capability detection bit). ACK. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list