[libvirt] RFCv2: virDomainSnapshotCreateXML enhancements
Eric Blake
eblake at redhat.com
Sat Aug 13 20:34:29 UTC 2011
On 08/10/2011 04:08 PM, Eric Blake wrote:
> Next, we need a way to control which subset of disks is involved in a
> snapshot command. Previous mail has documented that for ESX, the
> decision can only be made at boot time - a disk can be persistent
> (involved in snapshots, and saves changes across domain boots);
> independent-persistent (is not involved in snapshots, but saves changes
> across domain boots); or independent-nonpersistent (is not involved in
> snapshots, and all changes during a domain run are discarded when the
> domain quits). In <domain> xml, I will represent this by two new
> optional attributes:
>
> <disk snapshot='no|external|internal' persistent='yes|no'>...</disk>
As I'm starting to code this, it looks more and more like persistent
will always be a binary property. Also, it doesn't appear in
<domainsnapshot>, just in <domain>. In that case, it would be nicer to
represent it similar to other binary properties (readonly, sharable) -
that is, as a sub-element that is omitted for the default, and present
as <transient/> when overriding the default.
But making snapshot an attribute was definitely the right thing - since
discussion certainly pointed out that we may eventually want more than
one type of external snapshot ('external' means the original name
becomes the snapshot while the new name is active, but we may come up
with a good term and implementation where the original name remains
active and creates a new file as the snapshot). So I'm revising this
implementation to be:
<disk snapshot='no|external|internal'>
[<transient/>]
...
</disk>
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list