Apart from migrating the VM to a remote host where we can't honour the
VIR_DOMAIN_START_AUTODESTROY flag properly restricting APIs which just
modify the state of the VM does not make much sense.
Change the wording of the documentation for VIR_DOMAIN_START_AUTODESTROY
so that snapshots and saving to a file may be permitted as they
semantically don't clash with the flag itself. Otherwise we'd have to
forbid other APIs, such as virDomainDestroy as well.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
src/libvirt-domain.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index bbd2dc2e6e..e200dcc7d0 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -152,7 +152,8 @@ virDomainGetConnect(virDomainPtr dom)
* object is finally released. This will also happen if the
* client application crashes / loses its connection to the
* libvirtd daemon. Any domains marked for auto destroy will
- * block attempts at migration, save-to-file, or snapshots.
+ * block attempts at migration. Hypervisors may also block save-to-file,
+ * or snapshots.
*
* virDomainFree should be used to free the resources after the
* domain object is no longer needed.
@@ -217,7 +218,8 @@ virDomainCreateXML(virConnectPtr conn, const char *xmlDesc,
* object is finally released. This will also happen if the
* client application crashes / loses its connection to the
* libvirtd daemon. Any domains marked for auto destroy will
- * block attempts at migration, save-to-file, or snapshots.
+ * block attempts at migration. Hypervisors may also block
+ * save-to-file, or snapshots.
*
* virDomainFree should be used to free the resources after the
* domain object is no longer needed.
@@ -6565,7 +6567,8 @@ virDomainCreate(virDomainPtr domain)
* object is finally released. This will also happen if the
* client application crashes / loses its connection to the
* libvirtd daemon. Any domains marked for auto destroy will
- * block attempts at migration, save-to-file, or snapshots.
+ * block attempts at migration. Hypervisors may also block save-to-file,
+ * or snapshots.
*
* If the VIR_DOMAIN_START_BYPASS_CACHE flag is set, and there is a
* managed save file for this domain (created by virDomainManagedSave()),
--
2.21.0
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On 9/24/19 8:17 AM, Peter Krempa wrote: > Apart from migrating the VM to a remote host where we can't honour the > VIR_DOMAIN_START_AUTODESTROY flag properly restricting APIs which just s/properly/properly,/ > modify the state of the VM does not make much sense. > > Change the wording of the documentation for VIR_DOMAIN_START_AUTODESTROY > so that snapshots and saving to a file may be permitted as they > semantically don't clash with the flag itself. Otherwise we'd have to > forbid other APIs, such as virDomainDestroy as well. > > Signed-off-by: Peter Krempa <pkrempa@redhat.com> > --- > src/libvirt-domain.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > Reviewed-by: Eric Blake <eblake@redhat.com> > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c > index bbd2dc2e6e..e200dcc7d0 100644 > --- a/src/libvirt-domain.c > +++ b/src/libvirt-domain.c > @@ -152,7 +152,8 @@ virDomainGetConnect(virDomainPtr dom) > * object is finally released. This will also happen if the > * client application crashes / loses its connection to the > * libvirtd daemon. Any domains marked for auto destroy will > - * block attempts at migration, save-to-file, or snapshots. > + * block attempts at migration. Hypervisors may also block save-to-file, > + * or snapshots. > * > * virDomainFree should be used to free the resources after the > * domain object is no longer needed. > @@ -217,7 +218,8 @@ virDomainCreateXML(virConnectPtr conn, const char *xmlDesc, > * object is finally released. This will also happen if the > * client application crashes / loses its connection to the > * libvirtd daemon. Any domains marked for auto destroy will > - * block attempts at migration, save-to-file, or snapshots. > + * block attempts at migration. Hypervisors may also block > + * save-to-file, or snapshots. > * > * virDomainFree should be used to free the resources after the > * domain object is no longer needed. > @@ -6565,7 +6567,8 @@ virDomainCreate(virDomainPtr domain) > * object is finally released. This will also happen if the > * client application crashes / loses its connection to the > * libvirtd daemon. Any domains marked for auto destroy will > - * block attempts at migration, save-to-file, or snapshots. > + * block attempts at migration. Hypervisors may also block save-to-file, > + * or snapshots. > * > * If the VIR_DOMAIN_START_BYPASS_CACHE flag is set, and there is a > * managed save file for this domain (created by virDomainManagedSave()), > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2026 Red Hat, Inc.