I’m just jotting down some quick notes on how I resized my VMware partitions today (so I don’t have to look far the next time I need to do it.) In this case, I’m running Ubuntu on the virtual machine.
- Shutdown the vmware instance that you want to work on
- On the vmware server go to the directory where the disk files are stored
- run
vmware-vdiskmanager -x 10Gb DiskFile.vmdk
- run
vmware-vdiskmanager -x 512Mb SwapFile.vmdk
- boot off the Ubuntu install CD into rescue mode
- hit
Ctrl-Alt-F2
- hit
Enter
to activate console - run
parted
- run
resize
(within parted) and follow the prompts to resize your partition - run fsck on the resized partition
- boot from the hard drive
- run
swapoff /dev/sdb1
- run
cfdisk /dev/sdb
- delete the swap partition and create a new one occupying all of the space on sdb
- run
mkswap /dev/sdb1
- run
swapon /dev/sdb1
Done!