How to Increase VM Disk Size in Proxmox

  • Post author:WunderTech
  • Post published:February 17, 2023
  • Post last modified:May 10, 2024
  • Post category:Proxmox
  • Reading time:9 mins read

In this tutorial, we will look at how to increase VM disk size in Proxmox.

As time goes on, you might need more space in a virtual machine than you initially thought. Fortunately, increasing the size of a VM in Proxmox is extremely easy, but reducing the size of a VM disk is not. For that reason, it’s a good idea to err on the side of caution and keep size increases incremental.

I’d also suggest taking a backup of the virtual machine before proceeding as you can restore the disk to a backup and revert the size. With that said, needing to do that is most likely an edge case for most users.

How to Increase VM Disk Size in Proxmox

We will look at how to increase VM disk size in Proxmox below. I will be using a Windows virtual machine, but please keep in mind that the process will be slightly different based on the OS that you’re using. There are changes that must be made on the VM, so keep that in mind as well.

1. Open Proxmox, select the VM that you’d like to resize, then select Hardware.

hardware tab in proxmox

2. Take note of the hard disk name (in the example below, it’s sata0) and the VM ID (101 in the example below).

disk size in proxmox.

3. Open the Shell, then run the command below substituting the disk name, VM ID and how many GB you’d like to increase this VM disk.

qm resize [VM_ID] [DISK_NAME] +[SIZE_INCREASE]G

Using the information above, this is the command that I will be running:

qm resize 101 sata0 +20G
resize command in proxmox. How to Increase VM Disk Size in Proxmox

4. If you navigate to the hardware tab of the VM again, the disk size should be increased.

newly updated size in proxmox.

Virtual Machine Changes

While the command above has technically increased the size of the disk, the guest OS that you’re using must also make changes.

Windows VM Changes

As an example, you’ll see that the disk size above was increased to 120GB but the VM still only has 100GB available.

old disk size in windows VM.

1. After opening Disk Management, you’ll see that the C: drive still only shows 100GB. Restart the VM (if it was still running and you don’t see the newly allocated space).

disk management in Windows.

2. After restarting the VM, you’ll see that there is 20GB of unallocated space.

disk management in Windows after reboot.

3. As soon as you see the unallocated space, right-click the C: drive (or the drive you’re looking to extend), and select Extend Volume.

extending a volume in windows.

4. Select Next to start the Extend Volume Wizard.

volume extension in windows.

5. Move the disk from Available to Selected, then select Next (confirm all other settings as well).

disk extension in windows.

6. Select Finish!

review steps in windows of extension.

7. The disk should now be extended and the disk will be utilizing the full storage space!

C: drive in windows after being extended.

Linux VM Changes

Before proceeding, the main point that I want to make is that using GParted is the easiest way to complete this. GParted provides a GUI very similar to the Disk Management tool in Windows above but works on Linux. This can be done via the CLI, but the process is a little tougher.

Before proceeding, take a backup of your VM! This process will be entirely different for everyone, so use the information below as a guideline rather than a tutorial!

Run the commands below to find the partition you’d like to expand, delete it (yes, it must be deleted using this process), then recreate.

1. Find the disk (/dev/sda3 is the disk I am using, but we will only use /dev/sda in the next step)

sudo fdisk -l

2. Run fdisk.

sudo fdisk [PATH]

3. Run the commands below to delete the partition, set the partition number (3 in my case for /dev/sda3), create a new partition, then write the partition.

d
[PARTITION_NUMBER]
default
default
n (if there's a signature)
w
commands to extend a HDD in a linux VM.

4. After making the changes above, the disk should now be the new size!

Conclusion & Final Thoughts

This tutorial looked at how to increase VM disk size in Proxmox. Overall, the process is simple from a Proxmox perspective but slightly more complicated on the VM side. As mentioned above, it’s easier to expand a disk than it is to shrink a disk. While both are possible, the steps are backward (VM changes after Proxmox changes when extending, VM changes before Proxmox when shrinking). As mentioned above, make sure you take backups before attempting this.

Thanks for checking out the tutorial on how to increase VM disk size in Proxmox. If you have any questions on how to increase VM disk size in Proxmox, please leave them in the comments!

WunderTech

WunderTech is a website that provides tutorials and guides on various NAS, server, networking, and infrastructure-related topics. WunderTech is maintained by Frank Joseph, an IT professional with 14+ years of experience in corporate IT and application management. He focuses on sharing his experience with others on his WunderTech website and YouTube page. Frank holds a Bachelor of Science in Computer Information Systems and a master of Business Administration (MBA).