[libvirt-users] import qcow with snapshots

Peter Krempa pkrempa at redhat.com
Mon Dec 10 13:23:39 UTC 2018


On Sat, Dec 08, 2018 at 08:59:31 +0100, Chris wrote:
> All,
> 
> is it possible to create a new KVM machine from an existing qcow (v3)
> image with snapshots? snapshot-list doesn't show them, when using
> virt-manager 1:1.5.1-0ubuntu1.1 to create the machine. 
> 
> * t-ad5.img: QEMU QCOW Image (v3), 42949672960 bytes
> 
> chris at cd:/data/md0$ qemu-img snapshot -l t-ad5.img 
> Snapshot list:
> ID        TAG                 VM SIZE                DATE       VM CLOCK
> 1         pre-domain                0 2018-05-08 21:27:40   00:00:00.000
> 
> chris at cd:~$ virsh snapshot-list t-ad5
>  Name                 Creation Time             State
> ------------------------------------------------------------

Currently we don't support so-called 'snapshots without (libvirt)
metadata'. We do support though creation of the metadata in libvirt
without actually invoking any qemu command.

You can use virsh snapshot-create --redefine flag for it. The snapshot
XML needs to have the same name as the qcow2 image's name.

Note that some stuff might not work properly if you don't add a domain
state XML which describes the hardware at the time the snapshot was
taken. (A workaround would be to create a snapshot with the desired
configuration with libvirt, then dump it and modify the name).

Peter
-------------- 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/20181210/3143b46d/attachment.sig>


More information about the libvirt-users mailing list