You can increase a VMware Ubuntu Server disk size without rebooting the guest OS, but there are important caveats:
- You can expand the virtual disk (.vmdk) while the VM is running (if VMware supports hot-extend).
- But to make Ubuntu recognize and use the new space, you’ll need to rescan the disk and resize partitions/filesystems manually — all without rebooting.
Here’s the complete guide 👇
-
Open VMware vSphere / Workstation / Fusion.
-
Select your Ubuntu VM → Settings → Hard Disk.
-
Increase the size (e.g., from 20 GB → 40 GB).
- In vSphere, this can be done live (hot-extend) if the VM hardware supports it.
- In Workstation, you might need to power off; check your VMware version.
SSH or open console to Ubuntu, then run:
sudo apt install -y parted
sudo parted -lFind your main disk (example: /dev/sda).
Now rescan the disk:
echo 1 | sudo tee /sys/class/block/sda/device/rescanOr more universally (using rescan-scsi-bus):
sudo apt install -y scsitools
sudo rescan-scsi-busCheck the new size recognized:
lsblkYou should now see the updated disk size (but the partition may still be smaller).
If your root partition is on /dev/sda3, for example:
sudo growpart /dev/sda 3Then verify:
lsblkFor ext4:
sudo resize2fs /dev/sda3For xfs:
sudo xfs_growfs /df -hYou should now see the extra space added to /.
If you use LVM (common in Ubuntu Server), do this instead of growpart:
sudo pvresize /dev/sda3
sudo lvextend -r -l +100%FREE /dev/ubuntu-vg/ubuntu-lvThe -r option automatically resizes the filesystem too.
| Task | Command | |
|---|---|---|
| Rescan disk | `echo 1 | sudo tee /sys/class/block/sda/device/rescan` |
| Grow partition | sudo growpart /dev/sda 3 |
|
| Resize ext4 | sudo resize2fs /dev/sda3 |
|
| Resize xfs | sudo xfs_growfs / |
|
| Resize LVM | sudo lvextend -r -l +100%FREE /dev/ubuntu-vg/ubuntu-lv |