On Wed, Feb 28, 2024 at 11:17:37AM +0100, Kevin Wolf wrote:
> Until now, @size has been mandatory for creating images with every
> driver. Maybe we should even have put it into BlockdevCreateOptions's
> base, because without a size, you're not really creating an image.

NB, @size isn't mandatory for creating images. It isn't required
when creating qcow2 files with backing stores, as the size is
acquired from the backing file instead.

$ qemu-img create demo.raw 1g
Formatting 'demo.raw', fmt=raw size=1073741824
$ qemu-img create -o backing_file=demo.raw -o backing_fmt=raw -f qcow2 
Formatting 'demo.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off 
compression_type=zlib size=1073741824 backing_file=demo.raw backing_fmt=raw 
lazy_refcounts=off refcount_bits=16

With regards,
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Reply via email to