Shrinking a VM within Zpool

seithan

New Member
May 17, 2021
5
0
1
45
Hello, i'd like to know if its possible and more importantly *how* to shrink a VM while nesting inside zpool.

The VM has been allocated unneeded space and i would like to return it back to the node.

Inside the VM they appear as /dev/sdb1 (1.12 TiB) and unallocated (781.25 GiB)
/dev/sdc1 (1.12 TiB) and unallocated (782.25 GiB)


On the Node they appear as this: vm-208-disk0 and vm-208-disk2 i think.
disk5.jpg

really need help from the big boys guys, much appreciated.
 
Sadly i still havent solved the issue, but seeing nobody came with the reply, looks like its not possible :/

Thankx anyway
 
to make it easier and safer add new disk/s on same or different storage backend add those to the VM, boot with live iso (hbcd, ubcd etc) and clone everything to new drives while resizing the partitions. then you can delete old and boot from new drives. longer process but safer imho.
edit: only if you used fixed size disks
 
Last edited:
if you created the virtual disk on a storage with thin provisioning then only the actual occupied data is allocated to the disk (plus "garbage")
to "garbage collect" use (cron based or from time to time) fstrim -av in the vm (and make sure that discard option is checked on the virtual disk)
 

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!