unallocated space after vm disk shrunk

Dec 17, 2023
15
1
3
Hello,

I want to shrink the size of a vm from 100G to 30G.
  • I booted the vm into gparted and resized the partition to 29G
  • I shutdown the vm
  • ran "zfs set volsize=30G rpool/data/vm-201-disk-0" to leave a little overhead
  • ran "qm rescan" and got the message that the disk-0 has no 30G instead of 100G

The vm boots (grub is waiting a very long time before letting me login) normal.
Screenshot 2024-05-20 210534.png
Screenshot 2024-05-20 211243.png
When I boot into gparted again I get a few messages that there are no partitions outside of a disk allowed and it displayes me 70G unallocated (the size I want to shrink).



Can you help me with this problem?

Thanks
Chris
 
Last edited:
It looks like the swap partition is not being found. Make sure that you have a swap partition on the resized disk. You can create one with gparted.
In your VM check the new UUID of the swap partition with blkid
Then replace the old swap UUID in /etc/fstab with the new one.
Finally run update-initramfs -u

This should resolve the problems.
 

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!