Home
> ubuntu, virtual box, windows > How to resize a disk in VirtualBox (ubuntu host/windows XP guest)
How to resize a disk in VirtualBox (ubuntu host/windows XP guest)
I have Virtual Box 3.2.12 installed on ubuntu 10.10. I have several guest OSes, and one of them is a Windows XP installed on a 8 GB virtual hard disk. This size has become too small and I want to resize it (I created dinamically but I need now more space than it’s 8GB).
This are the steps to resize it. I’ll try to make a complete guide with screenshots to be as clear as possible:
- Create a new virtual disk (dinamically expanding storage). In my case 20GB would be ok.
- Set your windows virtual machine to have the new disk image as it’s second hard disk (Settings -> Storage)
- Get a bootable linux CD and boot the virtual machine from the CD
- Open GParted
- Select the first partition (the one which has data): /dev/sda1
- Select Partition -> Copy
- Select the second disk (/dev/sdb) that still is unformatted, and click to select the unallocated partition.
- Select Partition -> Paste and this dialog appears. Choose Advanced to create an msdos partition table:
- This seems to do nothing, but it creates the partition table to the new disk. So repeat the copy-paste and you’ll get this dialog:
- Resize the size slider to its maximum size and click Paste.
- Apply the pending operations:
- When all operations are completed this dialog appears:
- Assign the boot flag to this new partition (/dev/sdb1): Partition -> Manage flags:
- Exit GParted and poweroff the VM
- Go to Settings -> Storage again and remove the old (smaller) disk (right click on the disk)
- Assign the big disk to the IDE Primary Master (right pane)
- Power on the VM, a checkdisk is performed because of the new disk assignment, and finally you have the new disk on your Windows guest machine.
Categories: ubuntu, virtual box, windows
guest, host, howto, linux, resize disk, tutorial, ubuntu, virtual box, windows
Thanks, it worked great for me with a PC-BSD 9.0 64 bit host and a Windows 7 64 bit guest.
LikeLike
You’re welcome!
It’s easier with newer versions of VirtualBox, as posted in https://myotragusbalearicus.wordpress.com/2011/10/03/how-to-resize-a-disk-in-virtualbox-4-1-ubuntu-hostwindows-xp-guest/
LikeLike