Re: [Question] Which qcow2 options could be inherited to snapshot/blockcopy?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 11, 2022 at 20:36:26 +0100, Gionatan Danti wrote:
> Il 2022-11-26 10:36 Gionatan Danti ha scritto:
> > Il 2022-11-21 10:30 Peter Krempa ha scritto:
> > > In regards to the 'compat' option in terms of snapshots/blockcopy, we
> > > don't set it and thus use the qemu default. Since both operations
> > > create
> > > a new image with an existing qemu instance, the default new qemu
> > > format
> > > is okay.
> > 
> > Hi, some idea on why creating a qcow2 volume and snapshotting it via a
> > backing file results in two qcow2 files with different format (v2 vs
> > v3)? Example below:
> > 
> > # volume creation
> > [root@whitehole ~]# virsh vol-create-as default zzz.qcow2 1G --format
> > qcow2
> > Vol zzz.qcow2 created
> > 
> > [root@whitehole ~]# qemu-img info /var/lib/libvirt/images/zzz.qcow2
> > image: /var/lib/libvirt/images/zzz.qcow2
> > file format: qcow2
> > virtual size: 1 GiB (1073741824 bytes)
> > disk size: 16.5 KiB
> > cluster_size: 65536
> > Format specific information:
> >     compat: 0.10
> >     compression type: zlib
> >     refcount bits: 16
> > 
> > [root@whitehole ~]# file /var/lib/libvirt/images/zzz.qcow2
> > /var/lib/libvirt/images/zzz.qcow2: QEMU QCOW2 Image (v2), 1073741824
> > bytes
> > 
> > # snapshot creation
> > [root@whitehole ~]# virsh snapshot-create-as zzz --name zsnap1
> > --disk-only
> > Domain snapshot zsnap1 created
> > 
> > [root@whitehole ~]# qemu-img info /var/lib/libvirt/images/zzz.zsnap1
> > image: /var/lib/libvirt/images/zzz.zsnap1
> > file format: qcow2
> > virtual size: 1 GiB (1073741824 bytes)
> > disk size: 16.5 KiB
> > cluster_size: 65536
> > backing file: /var/lib/libvirt/images/zzz.qcow2
> > backing file format: qcow2
> > Format specific information:
> >     compat: 1.1
> >     compression type: zlib
> >     lazy refcounts: false
> >     refcount bits: 16
> >     corrupt: false
> >     extended l2: false
> > 
> > [root@whitehole ~]# file /var/lib/libvirt/images/zzz.zsnap1
> > /var/lib/libvirt/images/zzz.zsnap1: QEMU QCOW2 Image (v3), has backing
> > file (path /var/lib/libvirt/images/zzz.qcow2), 1073741824 bytes
> > 
> > Regards.
> 
> Hi all,
> anyone with some ideas/suggestions?

Hi,

When creating a snapshot libvirt uses the qemu default for the created
qcow2 image's version which is now v3.

Do you have any specific use case for keeping them in v2 mode?




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux