Scale-in the Linux VMs on the PVE

Smith-haokai

New Member
Jan 16, 2024
13
1
1
proxmox version:8.1.4 ubuntu version:22.04
I'm having a disk issue while using PVE I allocated 200G disk space to the created ubuntu virtual machine in the UI interface, but in the end only 80G was used, although using "du -sh" in pve to see that it is 100G occupied (my pve stores the disk in ext4 format, and the virtual machine is qcow2 format), but there is still 100G of free space that is not used. At present, the UI interface of PVE only needs to resize to increase the capacity of the disk, how can I reduce the capacity of the disk? How do I operate in a virtual machine and on a PVE?
 
QCOW2 is thin provisioned, so only what is actually used (more precisely: has been written to) is allocated. This implied that data that has been removed will not free space.

Reducing the disk space is complex and therefore not part of the gui because you can potentially destroy your VM if you do something wrong. Just search the forums for further information about this.