How to expand Ubuntu Virtual Machine storage size on VMWare?

Ubuntu wallpaper.png

Hey. During the creation process of a virtual machine(VM), I didn't change the default size allocated to the Virtual Machine by VMWare. When the default storage was full it was becoming more and more difficult for me to work. I didn't know how to really solve this problem. I post this solution so that someone else may be looking for it; here it!!!

Note that, this answer is made of two parts :

I. On the VMWare side :

  1. Shutdown the Guest machine
  2. Once the guest machine has shutdown, on the screen within VMWare appear multiple information. Locate the one with this label : Edit virtual machine settings.
  3. Click on Edit virtual machine settings
  4. The Virtual Machine Settings window opens
  5. Locate where the hard disc is. This is where there is this label: Hard Disk(SCSI). Here you are going to see how many Gigabytes your VM has.
  6. Click on Hard Disk(SCSI)
  7. On the left side, appear some information. Focus on the Disk utilities section
  8. Click on Expand
  9. There you are!!! A popup window opens with fields where you can type the size you want.
  10. After typing the size you want then click on : Expand.

Note that, as you chose to expand the storage size of your VM, if you enter a value inferior to the current size, the expand button is going to remain disabled.

That's all for this step. Continue to the next one.

II. Within the Ubuntu machine when logged in:

Now, as we have already expanded the storage size, this operation will not be directly known buy the VM. Then, we have to do it by ourselves. This is where I had the greatest problem. But, don't worry, the solution is easy.

I made some researches and finally I found out how to do so from a Stackoverflow answer.

The solution is only to install (if you have not yet installed it) and use gparted , in order to expand the size of partitions. No other more things to do.

This was the asked question : stackoverflow.com/questions/26471342/how-to..

The answer is here

Here I explain the steps :

  1. Start the Ubuntu VM
  2. Open the Terminal
  3. Type this in the Terminal : sudo apt-get install gparted
  4. Run it by pressing this key combination : Alt+F2
  5. Type : gparted
  6. Follow the steps and be careful
  7. At the end a window with all the partions will appear
  8. Pay your all attention on the unallocated . This means that the unallocated space is the one you are going to use.
  9. Right click the partition whose size you want to expand.
  10. Choose Resize or move
  11. The resize window appears. Then type in the size you wish. Then click on : Resize. And follow the other steps you are asked.
  12. Locate the green button with the validation icon which has the tooltip labeled : Apply All Operations. Click on this button to apply. And follow the other steps you are asked. For example, to save the details.
  13. That's all.

Thank you.