thin provisioning” means “virtually” allocate more harddisk space, than the harddisk (physically) has, then grow the virtual harddisk file according to it’s needs (store more files = size of harddisk.img grows dynamically)

# debian 10; # tested

via bash terminal: to create a thin provisioned harddisk images of capacity of a 32GB capacity via  go:

qemu-img create -f qcow2 name-of-harddisk-image.qcow2 1024G

(as VirtualBox does per default via the gui)

then when creating a new virtual machine with virt-manager, select the just created name-of-harddisk-image.qcow2

the gui way of doing that:

(only possible in newer version of virt-manager)

# real disk size
du -hs /home/user/vms/debian10
81M	

# maximum allowed disk size
ls -lah /home/user/vms/debian10
-rw------- 1 libvirt-qemu libvirt-qemu 513G Aug  1 14:05 /home/user/vms/debian10

compressing qcow2 disk images

disk images can become VERY large especially if that Win 10 vm is downloading HEAPS of updates in the background.

by re-compressing the disk image, it is possible to save up to 50% of disk space 😀 (but it will (of course) need more CPU power to run, as it is decompressing on the fly during vm usage)

# 1 power down vm
# 2 convert disk image

qemu-img convert -O qcow2 -c win10pro64-clone.qcow2 win10pro64-clone.compressed.qcow2

# 3 in virt-manager -> details of vm -> sata disk -> xml -> modify disk image name to compressed.qcow2

# 4 test run the vm, should start normally while using more CPU

WARNING: cloning a vm with image.compressed.qcow2 will UNCOMPRESS it to it’s original size 8-|

creditz:

https://forums.unraid.net/topic/44246-thin-provisioning/

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin