[libvirt-users] Creating a snapshot from a KVM VM fails

Eric Blake eblake at redhat.com
Wed Aug 21 18:56:49 UTC 2013


On 08/20/2013 09:13 AM, Tobias Brunner wrote:
> Hi,
> 
> Thanks a lot for the answer.
> 
>> An internal snapshot of a VM requires that the VM has at least one disk
>> using a QCOW2 volume or similar. The memory state is saved in that
>> image. Your VM has only a RAW disk image and thus it can't be used for
>> internal snapshot.
> 
> Ok, that makes sense...
> 
>> You can either use an external snapshot (the memory image is stored
>> separately), but the support for external snapshots isn't finished yet
>> (they can't be reverted automatically).
> 
> How can I create an external snapshot?

Add '--disk-only' for an offline domain, or use 'virsh
snapshot-create-as --memspec' instead of 'snapshot-create' for an online
guest (you can also use snapshot-create for an external snapshot, but
you have to write appropriate XML for the case, rather than relying on
the no-arg option that provides a default XML for an internal snapshot;
so I find snapshot-create-as a lot easier to work with).

> 
>> The second option is to convert your VM to a qcow2 image file..
> 
> ...
> 
>>>     <disk type='network' device='disk'>
>>>       <driver name='qemu' type='raw' cache='none'/>
>>>       <source protocol='rbd' name='one/one-5-5-0'/>
>>>       <target dev='hda' bus='ide'/>
>>>       <alias name='ide0-0-0'/>
>>>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>>>     </disk>
> 
> As you can see, I'm using RBD as storage backend. So converting to a
> qcow2 is not an option. Any idea how to achieve internal snapshots using
> RBD as storage backend? F.e. attach an additional qcow2 disk just for
> the snapshot?

Internal snapshots require qcow2 (or the less-used qed) file format,
full stop.  If you want your snapshots to live on RBD storage backend,
then you either layer the qcow2 file on top of that backend, or you use
external snapshots.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130821/e772bf9d/attachment.sig>


More information about the libvirt-users mailing list