1

I was reading another post here Use Thin LVM Volume for KVM VM trying to understand whether or not KVM is capable of creating thin provisioned VMs. The post from about 8 months ago has both the OP and responder mentioning not supported to thin provision with KVM. Doing more research on the internet there are a lot of older posts from 5-6 years ago(2015 or so) indicating the same. However, looking at one of my own images I would say it is thin provisioned. Is it? Do I misunderstand the terminology here? Basically, before I start down the path of using KVM/libvirt I want to make sure I'll have enough disk space and thin provisioning is the key.

[root@xeon33 images]# ls -lh  vm1.qcow2 
-rw-------. 1 qemu qemu 241G Nov  2 14:53 vm1.qcow2

[root@xeon33 images]# du -h vm1.qcow2 
1.4G    vm1.qcow2

Thank-you.

Gary
  • 123
  • 1
  • 4
  • The term *thin provisioning* is not specific to one method.. it really just means pretending to provide more resources than actually reserved. qemu can be used with various methods of achieving that, including sparse files/volumes, COW & compression. – anx Nov 03 '20 at 00:06

1 Answers1

2

Yes, that image is thin provisioned. It's qcow2, which only supports thin provisioning.

You can tell, because the file claims to be 241G, yet only has 1.4G allocated. This file has a maximum capacity of 241G.

Spooler
  • 7,016
  • 16
  • 29