Sick Series
Sick Series

Reputation: 183

how to increase HD size of Linux running on VMware

I have already increased the size by going into VMWARE Workstation settings ->Hardisk to 34GB. But I cant able to relocate it inside the Ubunto running inside the VMware.

I want to increase the size of /dev/sda1

enter image description here

Upvotes: 5

Views: 23861

Answers (4)

Olie Cape
Olie Cape

Reputation: 1056

I faced the same problem and fixed it using gparted.

After increasing the size by going into VMWARE Workstation settings -> Hardisk,

  • Run your Virtual Machine.
  • Open Terminal
  • Install gparted

sudo apt-get install gparted

  • After installation, open gparted enter image description here

  • You will see the space unallocated(1), this is the space that you indicated in your vmware workstation settings (5GB in my case) enter image description here

  • Select your existing partition(1), then click the Resize/Move icon(2). enter image description here

  • Simply, move the resize handle up to your desired new size(1), click Resize(2). enter image description here

  • Do not forget to click the Check icon to Apply all operation made. enter image description here

  • and that's it! You have expanded your VM HD Size.

Try it out, the app's ui made it easier to use. I used this method in my VMWare Workstation for Ubuntu 18.04. (might work as well with Ubuntu 20.x)

Upvotes: 9

Ramanand Yadav
Ramanand Yadav

Reputation: 329

Use gparted , watch some videos or check some link. And restart the VM

Upvotes: 0

Manyam Nandeesh Reddy
Manyam Nandeesh Reddy

Reputation: 378

Note: To edit the hard disk size we must remove existing snapshots, so be careful

First, remove any existing snapshots and edit the Hard disk size and launch the VM

COMMANDS

Run below commands as ROOT user

$ fdisk -l
$ gparted 

=> Select the File System 'linux-swap' and click on 'Swapoff'

=> Select the File System 'extended' then do right click and select 'resize/move' and drag the right arrow to full-right, then click 'resize/move'

=> Select the File System 'linux-swap' then do right click and select 'resize/move' and drag the left-and-right symbol to full-right, then click 'resize/move' and click 'OK'

=> Select the File System 'extended' then do right click and select 'resize/move' and drag the left arrow to full-right and select Align to 'Cylinder' from drop-down menu, then click 'resize/move'

=> Select the File System 'ext4' then do right click and select 'resize/move' and drag the right arrow to full-right, then click 'Resize'

=> Then either click on 'check symbol' or go to edit and select 'Apply All Operations' then click 'Apply ' and 'Close' (Ignore warnings)

$ reboot
$ fdisk -l

References

https://www.youtube.com/watch?v=NwpzYlfKnrY

https://www.techrepublic.com/article/extending-partitions-on-linux-vmware-virtual-machines/

https://communities.vmware.com/t5/Virtual-Machine-Guest-OS-and-VM/Complete-Guide-How-to-Increase-space-on-Linux-vmware/td-p/388872

Upvotes: 0

Grokking
Grokking

Reputation: 715

How to expand hard disk size using VMware:

To increase the virtual disk from the command line:

  1. Open a command prompt. For more information, see how to open command prompt.
  2. Navigate to the product's installation directory. See how to do that
  3. Type vmware-vdiskmanager -x 100Gb vm.vmdk and press Enter(Replace 100Gb with the actual size of virtual disk that you want. You can also specify Kb and Mb.)
  4. Follow this

And, I guess you've tried this(from GUI):

  1. Select the virtual machine from the Inventory.
  2. Click Edit Virtual Machine Settings.
  3. Click Hard Disk.
  4. Click Utilities > Expand, enter the new size, then click Expand.
  5. Again, follow this one

How to expand hard disk size inside Ubuntu(using gparted tool):

What about expanding inside Ubuntu, I guess you should try gparted or similar tool. How to do that, go here

To open gparted do the following:

  1. Install it by typing sudo apt-get install gparted
  2. Run it by pressing Alt+F2, and type there gparted

Upvotes: 3

Related Questions