qcow2 + snapshots over NFS

tlaramie

New Member
Nov 12, 2025
1
0
1
I'm using shared storage backed by NFS with VMs using qcow2 and I'm hitting wall trying to track the size of a given snapshot. Using qemu-img I can see the snapshot but the VM_SIZE all show as 0B. I can definitely see the size of the disk growing from my tests ( writing mutliple 1GB files from /dev/urandom). Am I missing something or is just the way it is with qcow2 + NFS?
As a bonus question, once a snapshot is deleted I don't see the space released. Example being in my above tests, after creating a snapshot, writing 10GB in files then rolling back, the vm disk size remains the same.
 
Hi,
VM_SIZE is the size of the VM state/RAM included in the snapshot. In Proxmox VE, the state/RAM is saved to a dedicated volume, so that value will always be 0B in the qcow2-inernal snapshot. I don't know a command to query the exact size for a qcow2 snapshot, but maybe somebody else does. It's not a cheap operation, as all clusters in the image would need to be iterated AFAIK and it's not a static value, because it will grow the more new data you write after taking the snapshot.

There's also the snapshot-as-volume-chain technology preview feature, where each snapshot has a separate volume associated with it. There, one can more easily check the space usage. But one needs to look at the image on top of the snapshot in the chain, which contains the delta. And again, it will grow the more new data is written afterwards.

Regarding the bonus question: QEMU should be smart enough to re-use the space next time it's needed. If the image does grow too large, see: https://pve.proxmox.com/wiki/Shrink_Qcow2_Disk_Files