Resize Windows disk partition in Proxmox
I have a Windows 10 template that I use in Proxmox when I have the need to actually use Windows 10.
It has a 50Gb hard drive configured, which most of the time, is more than enough drive space.
However, I did run into an instance where I needed to expand the hard drive from 50Gb --> 100Gb for a test I was running.
There are two ways of expanding the hard drive in Proxmox:
- Using the command line
- Using the web interface
Both are pretty simple.
Expand the hard drive using the command line
Expanding the hard drive from the command line is actually just a single command, but verifying the before and after hard drive size adds two additional commands.
Check the current hard drive size
Note the 50Gb size of scsi0
tom@proxmox1:~$ sudo qm config 132
bios: ovmf
boot: order=scsi0;net0
cores: 2
cpu: x86-64-v2-AES
efidisk0: Storage:132/vm-132-disk-0.qcow2,efitype=4m,pre-enrolled-keys=1,size=528K
machine: pc-q35-9.0
memory: 16384
meta: creation-qemu=9.0.2,ctime=1733358878
name: Win10-HD-expand-HD
net0: e1000=BC:24:11:4B:28:34,bridge=vmbr0
numa: 0
ostype: win11
scsi0: Storage:132/vm-132-disk-1.qcow2,iothread=1,size=50G
scsihw: virtio-scsi-single
smbios1: uuid=1b22570f-47ca-4f6e-968d-449a469158fd
sockets: 1
tpmstate0: Storage:132/vm-132-disk-2.raw,size=4M,version=v2.0
vmgenid: 5eee602e-a2eb-42dd-85d4-9322d88b551a
Expand the hard drive
tom@proxmox1:~$ sudo qm resize 132 scsi0 +50G
Image resized.
Verify the new hard drive space
Now scsi0 shows up as 100Gb
tom@proxmox1:~$ sudo qm config 132
bios: ovmf
boot: order=scsi0;net0
cores: 2
cpu: x86-64-v2-AES
efidisk0: Storage:132/vm-132-disk-0.qcow2,efitype=4m,pre-enrolled-keys=1,size=528K
machine: pc-q35-9.0
memory: 16384
meta: creation-qemu=9.0.2,ctime=1733358878
name: Win10-HD-expand-HD
net0: e1000=BC:24:11:4B:28:34,bridge=vmbr0
numa: 0
ostype: win11
scsi0: Storage:132/vm-132-disk-1.qcow2,iothread=1,size=100G
scsihw: virtio-scsi-single
smbios1: uuid=1b22570f-47ca-4f6e-968d-449a469158fd
sockets: 1
tpmstate0: Storage:132/vm-132-disk-2.raw,size=4M,version=v2.0
vmgenid: 5eee602e-a2eb-42dd-85d4-9322d88b551a
Expand the hard drive using the web interface
Expanding the hard drive using the web interface is just as easy as using the command line.
- Select the Windows virtual machine
- Click ont the Hardware tab of the virtual machine
- Select the hard drive to be expanded.
- In the Disk Action select +Resize
- Enter the amount of space you want to add to the hard drive space
Now the Windows VM shows a 100Gb hard drive: