Shrinking disks is not supported by the PVE API and has to be done manually.Īnother page (deleted) with overlapping content was Resizing disks | Archive qm command SystemRescueCD comes very handy for it, just add its iso as cdrom of your VM and set boot priority to CD-ROM. If you reduce (shrink) the hard disk, of course removing the last disk plate will probably destroy your file system and remove the data in it! So in this case it is paramount to act in the VM in advance, reducing the file system and the partition size.
If you enlarge the hard disk, once you have added the disk plate, your partition table and file system knows nothing about the new size, so you have to act inside the VM to fix it.
When you resize the disk of a VM, to avoid confusion and disasters think the process like adding or removing a disk platter. Resizing guest disk General considerations Enlarge the filesystem(s) in the partitions on the virtual disk Enlarge the partition(s) in the virtual disk