Uncategorized

Resize Linux VMware partitions

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.

  1. Shutdown the vmware instance that you want to work on
  2. On the vmware server go to the directory where the disk files are stored
  3. run vmware-vdiskmanager -x 10Gb DiskFile.vmdk
  4. run vmware-vdiskmanager -x 512Mb SwapFile.vmdk
  5. boot off the Ubuntu install CD into rescue mode
  6. hit Ctrl-Alt-F2
  7. hit Enter to activate console
  8. run parted
  9. run resize (within parted) and follow the prompts to resize your partition
  10. run fsck on the resized partition
  11. boot from the hard drive
  12. run swapoff /dev/sdb1
  13. run cfdisk /dev/sdb
  14. delete the swap partition and create a new one occupying all of the space on sdb
  15. run mkswap /dev/sdb1
  16. run swapon /dev/sdb1

Done!