qm-disk-resize: Resize a VM disk in Proxmox


qm-disk-resize: Resize a VM disk in Proxmox

Resize a virtual disk for a Proxmox VM using qm disk resize. The command can often resize the disk while the VM is running, but you may still need to resize the filesystem inside the guest.

Quick start

  • Resize a disk by adding space: replace VMID, DISKNAME, and N with your values.
qm disk resize VMID DISKNAME +N G

Common disk names you might see: scsi0, sata0, virtio0, ide0. Example:

qm disk resize 101 virtio0 +20G

Note: The exact disk name depends on how the VM was configured. You can list disks with: qm config VMID.

Resize inside the guest filesystem

Resizing the virtual disk only increases the partition/volume size in the VM. Inside the guest you must resize the filesystem (and possibly the partition).

Steps by filesystem

  • For ext4 (common on many Linux distros):
# Inside the VM (you may need root)
sudo resize2fs /dev/sdXn
  • For XFS (common on newer Linux):
sudo xfs_growfs /
  • If the root partition was expanded, you might need to extend the partition first (tools vary: growpart, parted, or GUI-tools).
# Example with growpart (cloud-init tools often provide this):
sudo growpart /dev/vda 1

When you might need downtime

  • If the target disk cannot be online-resized for your setup, stop the VM before resizing. Always check the Proxmox documentation for your Proxmox version and the disk type in use.
  • After resizing partitions/filesystems, verify free space inside the guest with:
# Inside the VM
df -h

Common pitfalls

  • Wrong disk name: Mixing up scsi0 vs virtio0 leads to no effect or data loss risk. Always confirm with qm config VMID.
  • Resizing a non-maximal filesystem: You can resize the virtual disk but must also grow the filesystem inside the guest; otherwise you won’t see new space.
  • Not resizing the partition: If the partition size remains unchanged, the OS won’t use the extra space. Resize the partition first, then the filesystem.
  • Unsupported combination: Some older disk types or certain guest OS combinations may not support online resizing. If in doubt, stop the VM and retry.

Quick verification

  • After resizing, confirm the disk size at host level:
# On the Proxmox host
qm config VMID
  • Inside the guest, confirm the filesystem reports the new size:
df -h

If you run into issues, check Proxmox forums or the qm(1) page for your version:

See Also