qcow2 clone - Skip empty space

PhantexTech

Member
Jun 7, 2020
15
3
23
34
I have noticed that if I try to clone a VM, the clone process will read the entire virtual disk, including empty space, even though it's a qcow2 > qcow2 clone, within the same nfs share. Is there a way to optimize that? When you have virtual disk that span more than 100 gigs, it really becomes a pain point waiting for the clone, even though 90% of the virualdisk is empty space + thin provisioned. Plus it's steals IOPS from the VMs that share the same nfs share. Does anyone has any input on what can be done?
 
The way we currently do clones this is not possible I'm afraid. QEMU (which is doing the cloning) has to read the entire disk to find out where it's allocated and where not. If the qcow2 file is sparsely allocated it shouldn't take IOPS away for the part of the read process though, als reading from an unallocated file sector shouldn't have to go to the disk.