Posts Tagged ‘Disk Size VDI’

How to increase the disk size of a ubuntu vdi on Mac

I have spent an hour to figure out how to increase the disk size of my ubuntu virtual machine running on Mac OSX, and decided to write this  🙂

Special thanks to for the tutorial,  and the steps are: (please refer to that website for some screenshots).

  1. Create a new virtual disk
  2. Clone the old disk to this newly created virtual disk
  3. Disconnect the old disk via storage settings in Virtual Box
  4. Connect/Attach the new disk to the Virtual Machine
  5. Boot up using the new disk
  6. Finally, boot using a Ubuntu live cd, and use gparted tool to extend your volume. Use the following steps for extending the volume in Ubuntu VDI. (Here is a video tutorial:
    1. Open Gparted. You should be able to see the unallocated space.
    2. Right click on swap (/dev/sda5) and select swap off.
    3. Click on the extended volume (/dev/sda2), and select resize/move  to increase the partition to cover all the unallocated spaces.
    4. then select swap, and move it to the right based on.
    5. After that, resize/move the extended volume to shrink to the previous size (to cover swap).
    6. Now, for the final step, select /dev/sda1, and use select/resize to allocate the unallocated space. You will get some warnings regarding data loss, however if you follow all the steps carefully, then you will not lose any data. But, it is important to take backup of your data.

Thanks for reading.