Increasing virtual HD size in a proxmox VM

Within the proxmox webui select the vm the drive is attached to. Highlight the hard disk. Select Disk Action – Resize disk adjust by the amount you want to increase it by in GiB. Inside the console of the VM:
sudo parted /dev/sdX
resizepart
type in the partition number
(it will ask if you want to continue with it mounted. If uncomfortable unmount the drive first otherwise say yes)

next issue the command to check the file system (the -y flag is optional otherwise you have to approve each inode modification by hand which is tedious):
sudo e2fsck -fy /dev/sdX

Finally expand out the file system onto the rest of the partition:
sudo resize2fs /dev/sdX

To check and make sure the filesystem has increased in size:
df -h

Leave a comment

Your email address will not be published. Required fields are marked *