VMware Communities
blipton
Contributor
Contributor

How do I resize the disk from within the guest vm (Linux)

From the Windows host operating system (VM Workstation 12 Player), I've expanded the virtual disk of a linux vm from 20GB to 40GB, but I don't know how to repartition/expand the drive from within the vm (debian) in order to use it!

I don't have any room left to install utilities in the vm,

  /dev/sda1 ext4 19620732 18419436 181548 100% / 

so wondering if there's any built-in tools that would allow me to resize without losing the existing data?

0 Kudos
1 Reply
wila
Immortal
Immortal

Hello,

No need to install any utilities in the guest.

Yes you can do this via the command line if you insist, but much easier is to just download the system rescue cd then shut down your VM, take a snapshot, attach the iso and boot from it.

You can start the GUI (by typing startx+<enter>) and then resize the partition using gparted.

Shutdown the live CD, remove it, boot the VM to check if it is OK and if so, commit the snapshot.

Added bonus is that any next time you bump into a similar problem you have a live CD iso for maintenance that has a bunch of other tools preloaded as well.

edit: Sorry missed that this is the VMware Player forum, so no snapshots, but you can always make a copy with the VM shut down for a good backup.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos