New qcow2 hard allocated size... fixed size ?

P

Pascal.G

Guest
Hi,

I noticed freshly created qcow2 disks (created from web interface) takes really the maximum size expected (all space specified is pre-allocated). While, new created ones (using qemu-img create) are created correctly...(growable)...

Can you please confirm me this ?

Nb : proxmox 2.2 updated ok on 23/11/2012

Best regards
Pascal G.
 
Then what is the difference between qcow2 and sparse .img files?
qcow2 has the big advantage to be easily copied between storage points (e.g. scripts for cloning a KVM template). cp --sparse is not an option, because it "reads" zero-filled block, which takes a lot of time (e.g. 750GB virtual qcow2 disk in template).
 
For big, fast sparse files we have raw .img, which are even faster, being simpler.

Is there any fast method left to transfer a metadata-prealloc'd QCOW2 file from one location to another now?
 
Hi all, thank you for your answers and congratulation for this useful forum.
Regarding qcow2 files with prealocated metadata : I created VM with a 20 GB qcow2 virtual disk. The "ls" command show me that the file is 20GB and the "df" show that these 20GB are not allocated : all right. Now, I backup this VM (stopped VM and gzip format), the backup is about 1.3GB (depends on the OS installed in). When I restore this VM, the qcow2 file is 20GB ("ls" confirmed) BUT the "df" shows me that 20GB are now allocated :(.
So there is a difference between creating a qcow2 VM based (auto-extend qcow2 file) and restoring this VM (qcow2 fixed size file).
Could you please explain me this behavior ? Is there a way to restore a qcow2 based VM with an auto-extend qcow2 file (like the original one before restoration) ?
 
Could you please explain me this behavior?

This will be fixed in 2.3

Is there a way to restore a qcow2 based VM with an auto-extend qcow2 file (like the original one before restoration) ?

Try 'qemu-img convert' to copy data into a new qcow 2 file.
 
When I restore a qcow2 based VM, the qcow2 file size is fully allocated onto the FS whereas the original qcow2 file size is dynamic (auto-extend qcow2). Why ?
 
When I restore a qcow2 based VM, the qcow2 file size is fully allocated onto the FS whereas the original qcow2 file size is dynamic (auto-extend qcow2). Why ?

Maybe restore fill the gap with zero ?

Dietmar is currently working on a new backup solution,which should handle that . (live backup for all storages type without snapshots), It should coming soon.
 
Thanks a lot for your answers ! Sorry for posting the same questions twice, I thought my first question was not published ...
Indeed, I already tryed the "qemu-convert" : the new generated qcow2 file is an auto-extend file but without prealocated metadata; as a result the I/O write on this new virtual HDD are very bad :( (compare to a prealocated metadata qcow2 file).
So, let's wait for 2.3 version ! (this will prevent us to manually convert qcow2 file into a poor I/O qcow2 file after a restoration)

Congratulations for this great product !
 
Hi, do you know when PVE 2.3 will be available ? It is not mentionned within the PVE roadmap.

Thanks in advance for your answer.
 
all releases will be announce in this forum and in the announcement forum.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!