Hi Libvirt, Does libvirt-python currently support the creation of external snapshots? I ran domain.snapshotCreateXML(xml) where xml is <domainsnapshot> <name>snap1</name> <description>Snapshot of OS install and updates</description> <disks> <disk name='vda'> <source file='/home/potato/libvirt/backups/test-snap1.qcow2'/> </disk> </disks> </domainsnapshot> And got the following error: if ret is None:raise libvirtError('virDomainSnapshotCreateXML() failed', dom=self) libvirt.libvirtError: unsupported configuration: disk 'vda' must use snapshot mode 'internal' Is this expected? Thanks! Sincerely, Roger Jin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20190703/b0e19584/attachment.htm>
Peter Krempa
2019-Jul-04 17:18 UTC
[libvirt-users] libvirt-python Create External Snapshot
On Wed, Jul 03, 2019 at 15:10:42 -0400, Roger Jin wrote:> Hi Libvirt, > Does libvirt-python currently support the creation of external snapshots? > I ran > > domain.snapshotCreateXML(xml) > > where xml is > > <domainsnapshot> > <name>snap1</name> > <description>Snapshot of OS install and updates</description> > <disks> > <disk name='vda'> > <source file='/home/potato/libvirt/backups/test-snap1.qcow2'/> > </disk> > </disks> > </domainsnapshot> > > And got the following error: > if ret is None:raise libvirtError('virDomainSnapshotCreateXML() > failed', dom=self) > libvirt.libvirtError: unsupported configuration: disk 'vda' must use > snapshot mode 'internal'You must use the libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY flag if you don't want to include the memory state of the VM or include the <memory> element in the above XML. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20190704/0ee55f2e/attachment.sig>