22

I powered off the VM and on the VMware side increased the allocated disk space. I did this by Edit Virtual Machine Settings -> Hard Disk -> Utilities and so forth. It then warned me that I should increase the partition size within the guest VM. and i dont know how to make the machine know it and i dont know where my CD is..

4 Answers 4

17

You don't need an actual CD. Just get the .iso image from http://www.ubuntu.com/download.

  1. Mount the .iso in the virtual machine.
  2. Start the virtual machine and make sure to boot from the CD.
  3. Select "Try Ubuntu".
  4. Open the Unity dash and launch "GParted". It can be used to resize the partition.
2
  • Happy to help. Would you consider accepting this answer so make this question "complete"? Nov 23, 2012 at 12:08
  • How can we mount the .iso in the virtual machine?
    – alper
    Jun 26, 2023 at 20:37
12
  1. Use VM Workstation to expand the VMs disk: Settings > Hard Disk > Utilities > Expand (Disk Capacity) Start VM

  2. On linux

    sudo df -h
    sudo fdisk -l
    
  3. 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.

  4. 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

  5. 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.

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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.

  11. Shutdown GParted

  12. Select you VM > Power> Power On to Bios, move CD/DVD down below HD

  13. Now your VM is up and running with more space

  14. Eject GParted DVD and/or Removeable Devices> Disconnect CD/DVD

  15. You should be good to go!

2
  • (2) the GUI changed a lot in the latest VMware workstation v11
    – user280121
    May 30, 2015 at 4:40
  • 1
    (2) the GUI changed a lot in the latest VMware workstation v11. (3)only sudo df -h reports the total capacity. (6) It suffices to download only the GParted iso file, and add a CD/DVD device from the iso. No need to burn a physical CD. (7) You can not do (6) when a VM is running. You have to power it off. (8) Like (2), the GUI of the latest version changed a lot, but the (+) and (-) key in BIOS now work just fine. (10) Good note. That's the key.
    – user280121
    May 30, 2015 at 4:49
0

If you happen to be running this on an M1 mac in a virtual machine of some kind, you are essentially out of luck. The current iso file for gparted does not support this instruction set (arm64), so you'll be forced to make a new partition and remount various directories.

I know it sucks.

0
0

For ARM architecture VMs you aren't totally out of luck, especially if you have set up your VM with LVM. Even though there isn't a gparted bootable ISO for arm64 architectures, it has been ported to arm64 architectures and should be available in your distro.

Expand your hard drive using your hypervisor's virtual disk resizing process. Then boot your VM and make sure you have gparted installed. Use gparted to resize the LVM pv. Then use LVM commands to expand the lv you want.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .