[virt-tools-list] Storage image files and permissions

Vincenzo Romano vincenzo.romano at notorand.it
Wed Nov 28 08:29:26 UTC 2018


Il giorno mar 27 nov 2018 alle ore 18:45 Eric Blake
<eblake at redhat.com> ha scritto:
>
> On 11/27/18 9:23 AM, Joachim Wagner wrote:
> >>>> Moreover, I created a QCOW3 disk image. I asked for a maximum capacity
> >>>> of 6GB and initial allocation of 0GB (zero).
> >>>> I got a 6GB image file. Is this a bug or am I missing something?
> >>
> >> Any hint on this?
> >> With QCOW2 I used to get a 200KB file as initial image, no matter it's
> >> maximum size.
> >
> > Have you checked the space used on disk or the file size? Possibly, the
> > default on your system is to use sparse pre-allocation when supported by the
> > filesystem. Also, did you try preallocation=off or metadata (see man page)?
> >
> > How do you request qcow3? According to the edit history of https://
> > wiki.qemu.org/Features/Qcow3 , qcow3 should be many years old but the manpage
> > of qemu-img on my current system does not mention qcow3.
>
> You probably mean qcow2v3. It is also spelled as 'qemu-img create -o
> compat=1.1' (newer qemu-img also recognizes the spelling compat=v3), as
> opposed to the older 'qemu-img create -o compat=0.10' or v2 images.  But
> if the virt-manager gui is specifically calling it qcow3, rather than
> qcow2v3, then that's a needless confusion that we should fix in the gui.

Hi.
I relied on the "file" tool provided by Archlinux. It says "QCOW3" as
the file type by its contents.
So I have manually created another storage image file by command line with:

qemu-img create -f qcow2 ./windows2008-d1.qcow 250G

The other image file (the sparse one) has been created by virt-manager/libvirt.

Then I have run these commands:

~ ls -l
total 2,9G
drwxrwx--- 2 vmanager     vmanager   62 2018-11-27 13:14:36 .
drwxr-xr-x 7 vmanager     vmanager  152 2018-11-26 12:47:06 ..
-rw-rw---- 1 libvirt-qemu kvm      6,1G 2018-11-28 09:19:22 ubuntu18.04
-rw-rw---- 1 libvirt-qemu kvm      196K 2018-11-27 13:14:36 windows2008-d1.qcow
[root at host01 /home/vmanager/storage] file *
ubuntu18.04:         QEMU QCOW Image (v3), 6442450944 bytes
windows2008-d1.qcow: QEMU QCOW Image (v3), 268435456000 bytes
~ du *
3015704 ubuntu18.04
196     windows2008-d1.qcow

Both files have the same type but while "ubuntu18.04" is clearly a
sparse file, "windows2008-d1.qcow" is not.
I doesn't make any real difference. It just puzzles me.

-- 
Vincenzo Romano - NotOrAnd.IT
Information Technologies
--
NON QVIETIS MARIBVS NAVTA PERITVS




More information about the virt-tools-list mailing list