Home
> Uncategorized > How to increase the disk size of a ubuntu vdi on Mac
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 http://tips.kaali.co.uk/2012/03/16/expand-or-increase-the-size-of-virtual-box-vdi-dis/ for the tutorial, and the steps are: (please refer to that website for some screenshots).
- Create a new virtual disk
- Clone the old disk to this newly created virtual disk
- Disconnect the old disk via storage settings in Virtual Box
- Connect/Attach the new disk to the Virtual Machine
- Boot up using the new disk
- 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: http://www.youtube.com/watch?v=cDgUwWkvuIY)
- Open Gparted. You should be able to see the unallocated space.
- Right click on swap (/dev/sda5) and select swap off.
- Click on the extended volume (/dev/sda2), and select resize/move to increase the partition to cover all the unallocated spaces.
- then select swap, and move it to the right based on.
- After that, resize/move the extended volume to shrink to the previous size (to cover swap).
- 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.
Categories: Uncategorized
Disk Size VDI, extend volume ubuntu, ubuntu vdi, VirtualBox
This is a very good tip especially to those fresh to the blogosphere.
Short but very precise information… Thanks for sharing this one.
A must read article!
There’s actually an even easier way:
VBoxManage modifyhd [myvm.vdi] –resize 50000
See here for details:
http://www.dracata.net/2013/04/resizing-a-virtualbox-vhd-or-vdi-file-on-mac-os-x/