Proxmox Rookie - How to Thin Provision VM Hard Disk

xcj

Member
Jul 6, 2021
34
7
13
47
Hi everyone!

I am taking my first steps with Proxmox, after finding that what i wanted to do in VMWare wasn't feasible.

I migrated sucessfully 4 VM's from ESXi to my Proxmox Host , SCP'ing the Disks to the Proxmox host, converting the ESXi file system to QCOW2 (ex:
qemu-img convert -f vmdk Ansible.vmdk -O qcow2 ansible.qcow2 -p ) , creating the VM's on Proxmox, detaching and removing the created hard disk, and then importing the QCOW2 image to the created VM (ex: qm importdisk 104 ansible.qcow2 ZFS_SSD ), attaching the imported disk, and inserting it on the boot order.

I noticed the QCOW2 appear to be something like thin provisioning, since the VM's are 100GB and the QCOW2 takes only the space that is really being used by the guest.

I have 480GB SSD with ZFS, and all the imports i made converted the disk images to RAW, i read that you could move the disk to the same location choosing QCOW2 instead of RAW, but when i try to do that the option to change the FORMAT is greyed out.

These hard disks are filling the SSD and the only way forward for me is to find how to store the hard disks in THIN provisioning (QCOW2 on Proxmox?) , i am already getting "out of space" on further migrations.

Thanks in advance for any help.
 
Proxmox VE supports only raw images for VMs on ZFS storages. This is why the disk images get converted and the format is greyed out. Nonetheless, you should set the sprase flag (thin provisioning) in the configuration of your ZFS storage in Proxmox VE.


See also https://pve.proxmox.com/wiki/Storage:_ZFS
 
  • Like
Reactions: jalle_h
Thanks! I just edited it:

zfspool: ZFS_SSD
pool ZFS_SSD
content images,rootdir
sparse
mountpoint /ZFS_SSD
nodes proxmox

What should i do next? The storage still reports the allocated full size? Should i reboot the node or re-import the disks to the VM's?

Thanks again!
 
  • Like
Reactions: jalle_h
Moving the disk to another PVE storage and back to the ZFS can be done in the GUI and should be the "easiest" solution. If this takes too long, you can also set the attribute in ZFS via command-line interface.
 
Hi, just to report back and thank you!

After mooving the VM disks to another storage and then moving them back, i went from 480Gb ocupancy on the storage to 31Gb ;)

Thin provisioning works!

Thanks again!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!