[libvirt] Createion of external snapshot qcow2

Hi all, I have a query regarding the external snapshot in qcow2 also known as backing file. In qemu I created a external snapshot and then create its xml in order to boot it from VIRSH. But that is complex process. I want to know whether there is any command in LIBVIRT which can create external snapshot(Backing file) and also we can boot from it? DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or NECHCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of NECHCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. . -----------------------------------------------------------------------------------------------------------------------

On 03/25/2012 11:18 PM, Pankaj Rawat wrote:
Hi all,
[your mailer uses lots of spurious whitespace]
I have a query regarding the external snapshot in qcow2 also known as backing file.
In qemu I created a external snapshot and then create its xml in order to boot it from VIRSH. But that is complex process.
I want to know whether there is any command in LIBVIRT which can create external snapshot(Backing file) and also we can boot from it?
The virDomainSnapshotCreateXML is designed to help you create external snapshots, but I have not yet had the time to write the patches to wire up the qemu support for creation of external snapshots of offline domains (right now, you have to use 'virsh snapshot-create --disk-only' on a running domain). Patches are welcome to help libvirt use qemu-img under the hood for offline external snapshot creation. Meanwhile, the <volume> XML for use in virStorageVolCreateXML supports the <backingStore> sub-element which maps to qemu-img, so it _is_ possible to use libvirt to create external snapshots, but you have to then hand-edit the <domain> XML to change the <disk> elements to point to those just-created qcow2 files.
The contents of this e-mail and any attachment(s) are confidential and intended
This legalese is unenforceable on publicly-archived mailing lists. If your company insists on tacking on such disclaimers, then good netiquette would be to send from an alternate email address not owned by your employer. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Pankaj Rawat