Re: RFCv2: virDomainSnapshotCreateXML enhancements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/11/2011 08:36 PM, Eric Blake wrote:
In implementing this in virsh, I found that for backwards compatibility
reasons, it would be easier to two flags instead of one, since both use
cases seem plausible (do the bare minimum to remove my domain, but
wihtout losing snapshot data, vs. nuke everything including my snapshot
data that was associated with the domain). Hence I'm modifying this
slightly to be:

VIR_DOMAIN_UNDEFINE_SNAPSHOTS_FULL -> maps to
virDomainSnapshotDelete(,0), can be emulated on older servers
VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA -> maps to
virDomainSnapshotDelete(,VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY),
cannot be simulated with server older than 0.9.5

And to make it easier to detect whether a domain has libvirt snapshot metadata, I need to add:

virDomainSnapshotNum(,VIR_DOMAIN_SNAPSHOT_NUM_METADATA)

For ESX and Vbox, where snapshot relationships are reconstructed on the fly from information always available outside of libvirt, there is no libvirt metadata to delete, and the presence of snapshots does not interfere with domain undefines, so the new flag will return 0. But for qemu, where libvirt stores the relationships, the new flag will return the same as passing flags=0.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]