Clone ZFS VM

Pilat

New Member
Aug 21, 2010
29
0
1
Proxmox 4.3

ZFS. The virtual machine is 32 Gb, occupies 5 Gb on disk.
I do a backup.
After restoring from a backup, the virtual machine occupies on the disk 5 Gb.
I do cloning of the same machine. After cloning the disk space occupied by 32 Gb.

That is, restore from backup operation works with sparce files, but the cloning operation - no?

PS

All machines are on ZFS, creation on a SSD drive, and cloned on ZFS on another SSD drive.

The same VM, cloned in a stopped state, takes on the disk 5 Gb, and cloned in running state, takes on the disk 32.
 
Last edited:
it's possible that cloning (qemu mirroring) make no sparse file. It's depend of source && destination storage support to detect zeroes block.

you can use "fstrim" command in your linux guest to sparify the volume.

All machines are on ZFS, creation on a SSD drive, and cloned on ZFS on another SSD drive.

The same VM, cloned in a stopped state, takes on the disk 5 Gb, and cloned in running state, takes on the disk 32.


The only difference - the machine in the started state cloned without "sparify", the machine in stopped state - with "sparify".