[libvirt-users] snapshot-create error

Eric Blake eblake at redhat.com
Thu Jul 10 13:10:03 UTC 2014


On 07/10/2014 01:15 AM, Hong-Hua.Yin at freescale.com wrote:
> Hi,
> 
> What's the difference between QEMU snapshot and libvirt snapshot? 
> 
> # qemu-img create -f qcow2 disk.img 512
> Formatting 'disk.img', fmt=qcow2 size=512 encryption=off cluster_size=65536 lazy_refcounts=off

This created an offline internal snapshot.  You can do the same with
libvirt (which basically calls qemu-img under the hood for an offline
guest).

> 
> Is there any special qemu command options or kernel configurations to allow libvirt create snapshot?

No, if you are using libvirt to create the snapshot, then it should just
work, provided you used libvirt correctly.

> 
> I got the error as below:
> 
> virsh # snapshot-create snap
> error: unsupported configuration: internal snapshots and checkpoints require all disks to be selected for snapshot

This says to create a default snapshot of the domain named 'snap'; since
you didn't specify any xml file, that default implies an internal
snapshot.  Is your guest running or offline at the time you attempted this?

> # cat sdk.xml
> <domain type='kvm'>
...

>     <devices>
>       <emulator>/usr/bin/qemu-system-ppc</emulator>
>       <controller type='usb' index='0'/>
>       <controller type='pci' index='0' model='pci-root'/>

What? No <disk> element?  You have to have a qcow2 disk associated with
your domain before you can create an internal snapshot, regardless of
whether the guest is online or offline.

-- 
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: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140710/32145df3/attachment.sig>


More information about the libvirt-users mailing list