Discussion:
[libvirt-users] import qcow with snapshots
Chris
2018-12-08 07:59:31 UTC
Permalink
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

***@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

***@cd:~$ virsh snapshot-list t-ad5
Name Creation Time State
------------------------------------------------------------


- Chris
Peter Krempa
2018-12-10 13:23:39 UTC
Permalink
Post by Chris
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
ID TAG VM SIZE DATE VM CLOCK
1 pre-domain 0 2018-05-08 21:27:40 00:00:00.000
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

Loading...