Help with expanding VM disk

dixie2000

Member
May 16, 2023
90
5
8
First, I am relatively new to Linux and Proxmox.

That being said, I have a small VM initially setup with only 8GB of hard drive space. I used the GUI to expand to 16GB as shown:
1705773304283.png

When I shell in to the VM and issue lsblk I get this: sda shows 16GB
1705773415025.png

When I issue df -h I get this: /dev/sda1 about out of space
1705773382861.png

I have followed the Proxmox docs to no avail as well as several hours "googling" with no success - so the question is how can get that new space allocated to sda1 so it is not out of space?
/dev/sda1 3.0G 2.7G 130M 96% /

Thanks in advance for any help, it will be appreciated!

al
 
It depends on the operating system inside the VM and it's the same as a real physical machine when you don't use all space at first (or replace the drive).
Try booting the VM with a GParted Live ISO, it has a nice GUI for moving and resizing partitions for various operating systems and filesystem types: https://gparted.org/livecd.php
 
  • Like
Reactions: Dunuin
Increasing the (virtual) disk size won't give you more space without also expanding the partitions and filesystems. PVE can'T do this for you. You have to do that from inside the VM and how to do it depends on how your guestOS partition/formated the virtual disk.
I would recommend to boot the VM into a gparted ISO and then use its GUI to move the backup partition table header to the new end of the virtual disk, move the second and fifth partitions to the end of the disk , as you need unallocatged space behind partition 1 to extend it. Then extend that first partition with the adjecent unallocated space. Lastly extend your root filesystem on the first partition.
 
Last edited:
thank you,

the VM is running Debian GNU/Linux 12 (bookworm).

Is there a guide on this? booting the "VM with a GParted Live ISO"
 
For the future I would recommend to use a VM storage that supports thin-provisioning (you probably already do). With thin-provisioning there is no need to create small virtual disks to not waste space, as the virtual disk will only consume that amount of space that the data on it requires. With that you can be generous when creating virtual disks so you hopefully won't have to extend virtual disks that often when starting with plenty of space in the first place.
 

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!