How to increase the disk space of an Ubuntu VMWare guest, without the cd?
Solution 1:
You don't need an actual CD. Just get the .iso image from http://www.ubuntu.com/download.
- Mount the .iso in the virtual machine.
- Start the virtual machine and make sure to boot from the CD.
- Select "Try Ubuntu".
- Open the Unity dash and launch "GParted". It can be used to resize the partition.
Solution 2:
Use VM Workstation to expand the VMs disk: Settings > Hard Disk > Utilities > Expand (Disk Capacity) Start VM
-
On linux
sudo df -h sudo fdisk -l
From the above you should see the Disk size has increased to the value you chose in VM Workstation, but the linux VM does not know how to use it yet.
Download GParted (linux gui disk utility) download the iso (for me gparted-live-0.19.1-4-amd64.iso) burn a bootable disk from this iso
Make sure your VM connects to the CD/DVD you are going to place the bootable dvd back into your drive bay, but you need the VM to connect to it. In Workstation right click on a running VM and you will see removeable devices. Unfortunately, the VM needs to be running before you can see the removeable
devices option. your-vm > removeable devices > CD/DVD > connect now your vm connects to the dvd, but you still have to boot from it.Use VM Workstation to boot to bios Select your VM (NOT running) > Power On > Power On to Bios When bios menu comes up go over to Boot option Select the CD/DVD drive and hit (+) to move it up, but (+) doesn’t work!! Use the (-) on the other options to move them down below CD/DVD F10 save/quit
Now you are booting from GParted I picked defaults, but still had to pick a keyboard, US English We are now at the GUI for GParted You should see your current drive on the left, followed by Extended>Swap, followed by the expanded-unallocated disk space you added
Using GParted Expand the Extended>Swap First Select which ever partition is adjacent to the unallocated portion. In my case this was the Extended>Swap Partition. NOTE: Make sure you selected the Extended, NOT the Swap! Swap is inside the Extended. Hit Move/Resize You should see the Extended partition with unallocated space to the right. Expand the partition to consume all / most of the unallocated space. Apply the change ( you probably can do multiple operations at once, i did not) after a bit gparted shows the changed
Move the Swap to the far right of Extended Partition You can see where this is going... Select the swap, move to the right, now unallocated is on the left of it. again I applied this now select Extended and shrink it now unallocated is between the partition you want to increase and extended
Increase your Partition Unfortunately, its like one of those puzzles you have to slide all the parts until you get to the one you want.
Shutdown GParted
Select you VM > Power> Power On to Bios, move CD/DVD down below HD
Now your VM is up and running with more space
Eject GParted DVD and/or Removeable Devices> Disconnect CD/DVD
You should be good to go!