virtualbox.jpgVirtualBox is a cross platform full virtualizer for x86 hardware. It runs on Windows, Linux, Macintosh and OpenSolaris hosts and supports a large number of guest operating systems such as Windows, Linux and OpenBSD. In a previous guide I have shown you How to install Ubuntu Linux on Windows using VirtualBox . The procedure is the same if you want to install Windows on Linux. The guest operating system is installed on a virtual disk created by VirtualBox which is nothing more than a single .vdi file. When you first create the virtual machine you must set a certain size for this disk. However after playing with VirtualBox you might realize you need more space because your virtual disk is full So, in this tutorial I will explain how to enlarge an existing virtual disk or in other words how to resize your virtualbox vdi. I have a Windows XP installation running on Linux and specifically Archlinux and I am going to create a larger disk for Windows XP.

**Note: The same procedure works for Windows Vista also. The only difference is that you have to use your original Vista installation CD for Bootmgr repair the first time the system is started after the GPARTED steps have been followed. (Thanks to Andrew)

Run VirtualBox and go to File -> Disk Manager.

Here as you can see I have a .vdi disk with a size of 10GB (1) which is almost full. So press the New button (2) to create a new virtual disk.

Click next to go to the next page of the New Virtual Disk Wizard.


Select Dynamically expanding image as Image type and click next.


Select a name for the new image (1), this should be different than the existing one, and also set the size of the new disk (2). Here I've set it to 20GB.


Press Finish to end the wizard.


Now you should have 2 .vdi images in the Virtual Disk Manager. Click Ok to close the wizard.

Here we are gonna need GParted to copy the data of our old disk to the new one. GParted is the Gnome Partition Editor application for creating, destroying, resizing, moving, checking and copying partitions, and the file systems on them. It has a LiveCD which you must download from here . You don't have to burn it on a cd, just store the .iso somewhere in you hard disk.

Now select the existin Windows XP installation (1) and click on the Settings button (2).

In the General -> Advanced tab set CD/DVD Rom as the first boot device.

In the Hard Disks settings double click below your IDE Primary Master and set IDE Primary Slave and the new Virtual Hard Disk image.

In the CD/DVD-ROM settings click on Mount CD/DVD Drive (1), choose ISO Image File (2) and use the folder button to browse to the location you have saved the gparted live cd (3).

Now click the Ok button and start the Windows XP Virtual Machine. Press Enter to boot GParted Live with Default Settings.

Don't touch keymap should be fine. Again press Enter.

Select the Language you prefer. Press Enter for English. And again press Enter for the default video card settings.

GParted will automatically scan your virtual disks. /dev/hda should be the old one and /dev/hdb the new one. Right click on your first disk and select Copy.

Next select /dev/hdb from the drop down menu (1), right click on the unallocated space and select Paste (2).

Drag the right edge (1) like you see in the screenshot so as not to leave any unallocated space in the new disk. Next click the Paste button.

Now press Apply to apply the changes.

When all listed operations are applied click the Close button. Again right click on the new partition /dev/hdb and click Manage flags. Here you should tick the boot flag.

Gparted will scan all devices once more. When it's done close the program and shutdown the live cd from the exit button. It will prompt you to press Enter. Now return to the VirtualBox application, select the Windows XP virtual machine and click the settings button. In the General -> Advanced tab select Hard Disk as the first boot device.

In the Hard Disk settings use the delete button (1) to remove the IDE Primary Slave, leave just IDE Primary Master (2), and select the new .vdi (3).

In the CD/DVD-ROM settings tick the Host CD/DVD Drive.

Press the Ok button and start your Windows XP virtual machine. Windows might ask to check their filesystem. Just let them do it.

After they automatically reboot you will log into your new resized virtualbox disk without having lost any of your data. You can now just delete the old .vdi. Enjoy!

Comments (234)

Subscribe to this comment's feed
Great Help
Thanks !
Everything is fully detailled. No place for any error.
Nassim Bennouna , November 18, 2008
Thank you for the time and effort you put into this - surely saved me hours of trouble...
Joseph , November 19, 2008
I fell in 2 problems:

1. BSOD: due to improper IDE Controller Type ( in Advanced Setup). I don´t know why it changed.

2. not correct NTFS Journal in source system disk.
I recommend to use ntfsfix /dev/sdxx as the first step in the procedure.

Hope it helps
Jin , December 04, 2008
Thank you, thank you and thank you! I started to use virtualbox last week and as everything was finally working, I got a nice message smilies/angry.gif as I was running out of space smilies/sad.gif. I was looking for an answer. Not only you gave the answer I was looking for, but it was so clear and well explained that I could not go wrong. Thank's again for your wisdom. You are a genius.

Have a great day! smilies/cool.gif

I don't have a place to rate my vote, but you got 11 out of 10!
JRP , December 12, 2008
Doesn't work for me....

I'm using VirtualBox on Windows with Fedora 10 as the guest OS.
I have a .vdi file for my virtual machine that is 8gb in size and I want to make it 40gb so I create another vdi file and attach it. I then boot up in gparted live cd and I can see both hda and hdb.

In the Fedora guest OS, if I do fdisk -l /dev/hda I see that I have /dev/hda1 LINUX and /dev/hda2 LINUX LVM partitions. I didn't specifically create it this way, this is the way it came out from the standard Fedora 10 install.

After I copy hda to hdab I end up with /dev/hdb1 and /dev/hdb2. hdb1 is ext3 format boot partition and hdb2 is unknown to gparted. The resize button is greyed out for hdb2 so you cannot resize it no matter what you do. I can resize the /dev/hdb1 partition if I want, but that is the boot partition and I need to resize /dev/hdb2 and it will not. Is this because it is a linux lvm?

Any ideas?

Enzo , December 19, 2008
Yes, this must be because of the LVM (logical Volume Manager) that Fedora uses by default to manage disk drives.

No ideas for now. I will take a look though and get back if I find something.
axel , December 19, 2008
Just used the above procedure to resize a win 2003 server machine. Your solution worked ok for me, however i did have to use the ntfsfix to get it to grow the disk (resize) correctly. , December 27, 2008
That's answer I looking for.
anton nugroho , January 13, 2009
I installed a virtual vista machine on my Ubuntu host and originally set the vista drive too big and not dynamic. I created a dynamic drive, copied everything over and rebooted vista with the second drive. Vista was not happy about it, and demanded that I insert my install disk. After a few hoops and reboots I was back in business! Thanks so much.
2cynykyl , January 19, 2009
Thanks guys for your replies and the feedback! smilies/cheesy.gif
axel , January 19, 2009
Just was i was looking for
Just wanna say thanks. One of the best explained and most detailed responses I have seen. Its in my favorites smilies/wink.gif

Morten , January 22, 2009
You are very welcome! smilies/cheesy.gif
axel , January 23, 2009

your tutorial is amazing ! Thank you very much.

I did the above for a Windows 7 installation. When I booted from the new partition, I got:

Bootmgr missing
Press Ctrl-Alt-Del to reboot

I then restarted from the Windows 7 install ISO and choose
repair. I got a repair message, no options, choosed it.

Still by booting I got the Bootmgr missing message again.

So I rebboted from the install ISO, choose repair and
this time got several repair options.

Choosed 'repair startup'.

And then it worked !

Hope it helps
Mektub , January 25, 2009
Thanks for the info Mektub!

In Windows XP I didn't face any problem with the boot process. But as I can see Windows Server 2003, Windows Vista and Windows 7 have a few problems that can be easily fixed with the repair from their installation cds. Thanks everyone!
axel , January 26, 2009
I am having the problem that despite seemingly following the tutorial closely, the Virtual Machine boots right into Windows rather than opening up gparted. Any ideas about what I might be doing wrong?
Thanks, Annette
Annette , February 13, 2009
Hey Annette,

In Settings -> General tab you haven't selected CD/DVD to be the first boot device.
axel , February 13, 2009
final success
Axel was of course right. I'd done something stupid. But then I ran into another problem. Thought I'd share the solution here, in case others encounter something similar. The resized VDI would not boot (don't have the specific error handy). I found Tha-Dogg's helpful solution here:, which involves a small change to the boot configuration. Now all is peachy. (Just be sure to follow instructions carefully -- attach the new vdi as "primary slave" to the old functioning vdi ("primary master") before doing anything else. Hope this saves someone some extra googling!
Annette , February 19, 2009
Hi Annete,
I am glad you finally made it. Thanks for the extra info. smilies/smiley.gif
axel , February 20, 2009
This was extremely helpful, worked like a charm using VirtualBox 2.1.4 and gparted-live-0.4.1-2.iso. Thanks!!!
nerdyrob , February 20, 2009
Best Walkthrough on this subject anywhere!
So of course I went to the virtualbox site first, yea not alot of help, then I googled it for a few links, and found this one. Hands down the BEST walkthrough on this subject, and I just finished following it and it worked a treat! Windows didn't even ask me to check the disk.

I need my virtualbox to run photoshop in and without it I'd be lost as I do alot of web graphics for clients and well, I ran out of room!

Many Thanks!
XtCrAvE -
XtCrAvE , March 07, 2009
Hehe! You are very welcome XtCrAvE! I was also searching for a way to resize my virtualbox disk but couldn't find something good. So I thought why not writing down my own. smilies/smiley.gif
axel , March 07, 2009
Like others i was delighted i got my Virtualbox up and running but then saw i was running out of space! All other suggestions were not good (starting another partition) untill i cam across this guide! Fantastic mate! Really really appreciate the hard work and effort you put in to helping others! It was so easy to follow your step by step guide and hopefully soon, when it finishes operations, i will have more space on my XP to install Football Manager 2009 lol! Thanks once again mate!!
Ben Westing , March 11, 2009
Thanks Ben Westing! Enjoy Football Manager! smilies/cheesy.gif
axel , March 11, 2009
Thank you!
Great guide--I ran it almost completely without a hitch. The only problem was that my mouse wouldn't work inside the guest gparted, but using alt-key combinations took care of that. Thank you again for your work--it was very helpful!
dirtprof , April 17, 2009
Thank you dirtprof! smilies/cheesy.gif
axel , April 20, 2009
Close disk space
It seens to be a problem for gparted to copy when the 2 disks have similar capacities. Haven't test this to the limit, but maybe someone will have the same problem and i thought of warn.
Btw, ty for the very good guide.
Ricardo , May 07, 2009
Thanks for mentioning this Ricardo. It might be useful for someone. You are very welcome! smilies/cheesy.gif
axel , May 07, 2009
Fantastic guide - worked first time and saved me heaps of time! smilies/grin.gif
Nathan , May 08, 2009
Thank you for this guide... no way anyone can mess this up...
Victor Garcia , May 15, 2009
Thank you guys! smilies/cheesy.gif
axel , May 16, 2009
Thank You
Thank you this solved my problem with my fixed drive running out of space. Other methods were rather complex and this was easy and logical to follow.
Danie , May 19, 2009
Vista Addition Section
You may want to put an asterisk for Vista users - they will have to use their original Vista install CD for Bootmgr repair the first time the system is started after the GPARTED steps have been followed.

Otherwise - a great guide and easy to follow. THanks.
Andrew , May 22, 2009
Thank you for the heads up Andrew! I added your info to the guide. Now its Vista compatible. smilies/cheesy.gif
axel , May 22, 2009
Restore GRUB
Hi, I have Ubuntu as my guest system on a Mac. This tip helped to restore the boot menu back to normal:
(Read section "HOWTO Restore GRUB")
Zettt , May 24, 2009
Thanks for the link Zettt. You are right. If you have a Linux guest system you must restore grub afterwards. smilies/smiley.gif
axel , May 25, 2009
Awesome, thanks very much.
Rich Somerfield , June 11, 2009
Great guide, helpful comments
Thanks a lot for this perfect howto!

Only one problem occured: When booting from the new vdi, I got an error message like "hard disk read error, press ctrl+alt+del to reboot". But this could be fixed with Anettes tip from February 19, 2009 and the link to

Again: thanks a lot!
Robert Seetzen , June 22, 2009
Thanks for the information and the link Robert. smilies/cheesy.gif
axel , June 23, 2009
Just great!!! Thank you~ smilies/grin.gif
cmoh1110 , July 02, 2009
you saved my ass. thanks!
ah , July 08, 2009
xp host with ubuntu guest
I would like to see a similar step-by-step with the host/guest reversed. I too am at the mercy of computationally intensive Windows-only applications.
rsz , July 14, 2009
Wow. Perfect! Thanks so much for taking the time to post this procedure!
Doug Simmons , July 14, 2009
xp host with ubuntu guest
Nevermind. I pieced together this recipe from a VirtualBox forum and it worked great and only took a few minutes. I went from an 8GB ubuntu guest on a XP host to a new 16GB ubuntu vdi guest. Here's what I did (adapted from

1. Create 2nd larger size .vdi hard drive image.
2. Set as slave in specified Virtualbox.
3. Download and mount ISO for Clonezilla.
4. Make sure boot order is set to Cd-Rom before hard drive. Boot Virtualbox.
5. Follow Clonezilla prompts to copy old hard drive (/dev/sda) to new hard drive (/dev/sdb).
Disk-to-disk, local-to-local, expert mode -r, -k1.
6. When done, set new hard drive image as master in Virtualbox.
8. Format, and set as slave or delete 1st hard drive image.
rsz , July 14, 2009
Nice rsz! You found the solution before I even read your first comment. smilies/smiley.gif

Thank you Doug. You are welcome!
axel , July 15, 2009
I get a black screen after booting from the new virtual disk... It does not boot at all.
Jiak , July 16, 2009
gparted live cd
From where i get the gparted live cd
i download it from a site but i dont know how it install or use ?
i dont see any iso file in the downloaded folder
please help
sareesh , July 21, 2009
Jiak I believe you will find the answer you are looking for in the comments above. smilies/wink.gif

sareesh here is a link to download an iso file.
axel , July 24, 2009
Thanks, worked like a charm!
gren , July 29, 2009
Works great!
Thanks much! Works as detailed, no missed steps. Great My-Guide-ster. Delivered as promised. A++++++++.
dpalme , July 30, 2009
Axel, thanks for this information. It acknowledges that the Linux-community is a reliable one and (almost) every problem is solvable.
Nicky , August 11, 2009
Nice guide & comments. For me, the new vdi didn't boot correctly. It hung at the login screen before showing the user accounts. I finally got it to work with the following modifications to axel's guide (VirtualBox version 2.2.4, gparted version 0.4.6):

1) In gparted, copy old vdi partition and paste to new *without resizing* (leaving unallocated space on the new vdi).

2) Boot the new vdi (as IDE Master) to verify that it works.

3) Use gparted to grow the partition to fill the new vdi.

4) Boot the new vdi. XP will do a CHKDSK during the boot process (as described in the guide).

One mystery that may not be a general occurrence: XP "installed new hardware" after booting the new vdi (at both steps 2 and 4).

pnf , August 12, 2009
Thank you very much for the info and the additions pnf. smilies/smiley.gif

At some time I have to recheck this guide to make sure it works with the latest Virtualbox and gparted.

I am glad this guide has helped so many people!
axel , August 12, 2009
Hi I just followed this guide to resize my virtualbox and everything now works fine, except I don't seem to have network connections. Do I just need to configure my ip address once again or should it have worked regardless? Sorry if this is a very basic question..

rjen , August 20, 2009
A disk read error occurred [next line] Press Ctrl+Alt+Del to restart
I've attempted this process numerous times and every time the boot to XP renders the following message on a black screen...

A disk read error occurred
Press Ctrl+Alt+Del to restart

I also noticed that the gparted process ends with errors. It appears to be fixable by running "ntfsfix /dev/" from a the term window. The "check" action says all is good, but XP still does not boot. Yes, it's flagged with "boot". smilies/smiley.gif

Oh well, it'd be faster to just load the OS onto a bigger VDI at this point. What a waste of time. Sadly, you'd thing resizing a disk would be an option in VirtualBox. Once again, nothing's free. Just marketing to get me to put down for the real features. heh.

~ Adam

Adam , August 22, 2009
Excellent howto
I just extended my VDI size by 5GB
Thanks x 1000 !!
Emmanuel , August 22, 2009
I can confirm that your instructions work perfectly for Windows Vista, too.
Thank you very much
Paul , August 26, 2009
worked like a charm smilies/smiley.gif
Thank you so very much..!
Marty , August 28, 2009
yes you have to configure virtualbox settings for your network again.

I'm sorry it didn't work for you. smilies/sad.gif

Thank you guys for your comments. I am glad it is working for you. smilies/smiley.gif

I also expect Virtualbox to add some autoresize feature though.
axel , August 31, 2009
Worked perfect. 5 stars for the faultless explanation too smilies/grin.gif smilies/grin.gif smilies/grin.gif smilies/grin.gif smilies/grin.gif

Wayne , September 12, 2009
It worked like a champ smilies/grin.gif
- Windows 2003 Server virtual instance.
- Created a new vmdk disk with vmware-vdiskmanager -c -s 20Gb -a ide -t 0 'System.vmdk'. Attached via LSILogic driver.
- Used sysrescuecd instead, since Gparted live thought my disk (vmdk format) was 8 Tb when it was only 20 Gb. (sysrescuecd is better on recon scsi maybe?)
- After closing down Gparted, ran ntfsfix /dev/sd[x][n].
- Restarted machine with the newly created hard disk, watched chkdsk run automagically while smilies/grin.gif
- Took a sandwich in the kitchen, and went to bed with a smile!

Thank You!
Tuxor , September 17, 2009
Just want to say thanks as the tutorial together with user remarks made me grow my disk just fine!
King , September 21, 2009
I also want to thank all users for posting here their experience on resizing a VirtualBox disk. Thank you guys!
axel , September 21, 2009
Windows XP Disk Fixed and Now Booting
Annette's tip worked for me as well with a Windows XP SP3 disk. Thanks for saving me a huge headache!!!
Jeff Mo , October 04, 2009
This made it so easy. Nice job! smilies/smiley.gif
Al , October 15, 2009
Thank you all!
axel , October 16, 2009
Nice and thanks
Thank you smilies/wink.gif smilies/smiley.gif
amir , October 17, 2009
Windows is not recognizing the increased space, it still thinks the drive is the original size. What now?
I had to use the Ubuntu LiveDVD for Gparted b/c the Gparted CD wouldn't work. After resizing the disk size in Ubuntu, Windows doesn't recognise the new size. It thinks it's still 10GB, not 50. Any suggestions?

Rob , October 24, 2009
Have you made the necessary changes in the Hard Disk Settings of VirtualBox as I mention in the guide?
axel , October 24, 2009
The disk I'm resizing doesn't have an operating system on it (yet) so I can't boot it up, and the the interface in my version of Virtualbox is different; but excepting for those discrepancies I tried to follow your instructions as closely as possible.
Rob , October 25, 2009
Nice Job!
You did a really nice job of documenting a 'scary' process. It worked perfectly. Well done.
Gary , October 27, 2009
Senior Software Engineer
working like a charm smilies/smiley.gif great post man...
Meena Fawzy , October 28, 2009
mounting an extra hard disk (ubuntu running on windows virtual box)
The steps are pretty much the same up to creating a new vdi hard-disk and clicking on the settings of the VM you want to run to add this new hard-disk. Then log into ubuntu VM and install gparted

> sudo aptitude install gparted

then using gparted, format the new hard disk, close gparted and then mount the new hard disk

> mount /dev/sdb1 /media/disk

and you have more space!
reayn , October 28, 2009
Thank you all for your comments. Thanks reayn for the info as well! smilies/smiley.gif
axel , October 29, 2009
Worked like a charm. Thanks for writing it up!
jay , October 29, 2009
good tutorial, thanx!
kitsos , November 02, 2009
resizing ubuntu on vista64 host
Thank you very much for this incredibly detailed guide smilies/smiley.gif

I used it to resize a virtual hard disk with Ubuntu installed, and VirtualBox running on a Vista-64bit machine.

NOTE: After the steps above, when first running the virtualized Ubuntu, i had to reinstall grub (boot manager) by using the Ubuntu Live CD:
- boot the virtual hard disk with the Ubuntu Live CD
- check (for example with the gparted GUI) the name of the partition which will contain the grub
- reinstall grub on the right partition
- reboot from hard disk

Hope will help smilies/wink.gif
s3agull , November 05, 2009
Thanks for your comment s3agull. It will help for sure anyone trying to resize the virtualbox partition of its Linux distribution! smilies/smiley.gif
axel , November 07, 2009
Thanks for this guide! I encountered a few snags while growing a Windows XP machine, but ultimately got things to work:

At the end of the copy and resize, gparted complained that it couldn't resize the partition, since the filesystem was unclean. But after its display refreshed, it showed the new size anyway (but, as I later found out, this wasn't correct). I think this was because I had used VirtualBox's "Power off the machine" option instead of doing a proper ACPI shutdown.

I tried booting the new drive, but I got the same error as Robert Seetzen ("hard disk read error, press ctrl+alt+del to reboot"). I used Annette's link (February 19, 2009), which let me boot the drive successfully.

Once I had booted the new drive, it still showed the old size, despite gparted's claim to have resized it. This was, of course, because of the "filesystem unclean" error. So I started gparted again and resized the partition to the same size. And Windows finally saw the extra space.

Hope this helps someone else smilies/smiley.gif
Ankur Dave , November 25, 2009
Thank you for sharing this Dave. smilies/smiley.gif I also believe you faced this problem because of the Power off you did. But since you managed to successfully resize the partition everything is ok!
axel , November 26, 2009
One step is missing wit latest Gparted (0.4.8-6)
Hi, thanks a lot for the wonderful and complete setup, it worked like a charm!

One step is missing before copying the content, one has to define a partition type to the new vdi, and then you can paste it. Little correction, but just in case someone would be troubled :-)

cheers !
Dr_ST , December 05, 2009
Resizing an Ubuntu Guest VDI
rsv's post on July 14, 2009 worked perfectly for me. I used it to resize the VDI for an Ubuntu guest running on a Windows XP host. I doubled the size of the VDI, and the really sweet part is that the utilization of my root file system dropped from 95% to just 59%! smilies/wink.gif

Thanks, rsv!
BluesBrother , December 05, 2009
Thanks for the info about the changes on the latest Gparted (0.4.8-6) Dr_ST. smilies/smiley.gif

axel , December 05, 2009
Great piece of writing mate....keep up the good work smilies/smiley.gif
BhakthiL , December 11, 2009
A very informative and detailed howto, thanks very much, helped me!!
Scorn , December 15, 2009
Just like most of those commenting, a big thank you. Pictures tell a lot.

Enlarged a Windows XP guest from 10G to 20G on an OSX Snow Leopard host.
Jim , December 16, 2009
Thank you - worked a treat after a while of trying to achieve this.

A minor thing which might be worth mentioning for others. I don't know if it is always the case, but while carrying out the copy procedure in GParted, I nearly reset the machine thinking it had failed as there was no progress indication - just the bar moving back and forth but nothing else to indicate it was copying my 10GB of HDD...
DP , December 17, 2009
Worked perfectly
Worked like a charm for me with XP Pro... great that you put this out there.
Kenny , December 18, 2009
Thanks so much for your guide, minor differneces (new version of Virtualbox), but no head-scratchers! I didn't think of booting my VM with a liveCD...I should think of it as an actual computer sometimes, that may help smilies/smiley.gif Again, Thanks!
rob haag , December 18, 2009
A simple and effective solution! Thanks a lot!
June , April 17, 2010
OK :-)
Thanks for this detailed howto. Sadly enough there's no easier way to do it.smilies/cool.gif
Nudge , April 19, 2010
Good Work
The solution is simple and whell ilustrated.

Good work again
Silvio Mhula , April 19, 2010
Gparted only detected old HDD
I stuck at
Next select /dev/hdb from the drop down menu (1), right click on the unallocated space and select Paste (2).

My gparted just detected old vdi which the 10GB.

I am using
- gparted-live-0.5.2-8.iso
- virtual box 3.1.6
vzhen , April 21, 2010
Gparted only detected old HDD (FIXED)
In virtualbox 3.1.6 it will not display all the .vdi need to click the + button.

and click it to add your new .vdi

vzhen , April 21, 2010
Very good
Thanks a lot for all the information.
It's work great for me.

Guy , April 22, 2010
Thank all of you for you comments guys! I'm glad you've managed to resize your VirutalBox disks! smilies/cheesy.gif
axel , April 24, 2010
Very, very helpful HowTo!

Thanks alot! smilies/smiley.gif
harry , April 29, 2010
Thank you very much.
Your guide helped me a lot!
Arkadi , May 06, 2010
Had to use ntfsresize --size 10G /dev/sda1 to get WindowsXP Pro guest on Ubuntu 9.10 ...
Had to use ntfsresize --size 10G /dev/sda1 to get WindowsXP Pro guest on Ubuntu 9.10 to get WindowsXP guest to see new disk size. Everything was the same in the procedure though.
madpenguin , May 15, 2010
Resize Fixed Hard drive on Virtualbox
Video tutorial:

A nice vid stands for 10K words and 1K screenshots smilies/wink.gif

Share this link
Patrick , May 17, 2010
I can't thank you enough. Worked like a charm!

I would rather a static step-by-step tutorial like this than a youtube video.
Dogma , May 21, 2010
windows vista as host, Fedora 12 as guest, used the same procedure but stuck with "no partition table found"
Thnaks for this detailed how-to.
I used it on a windows vista host, with fedora core 12 as guest and followed the procedure.but when the Gparted shows my harddisks, there is a !sign next to the new hard disk and when i try to paste from the old hard disk to newer one,it sais that "no partition table was found on the new hard disk and asks me to go to Device->create Partition Table.on that menu the default table type is ms-dos and there are some others. I don't know which one to choose.
and since the "rsz july 14 2009 comment" is not for a newbie like me, i can't follow it.
mitra , May 24, 2010
thank you!!
thank you very much!! it works!!
bululu , May 25, 2010
Good Article
I don't need install system and softwares again. Thanks you very much.smilies/smiley.gif
hsiang , May 27, 2010
Muchisimas gracias
Muchas gracias, excelente tutorial.

Thank you.
Cuitlahuac , May 29, 2010
Paste option is disabled

For me the paste option is disabled why? help me!
Arun S.A.G , May 30, 2010
Worked great. smilies/smiley.gif
Arend , May 31, 2010
Thank you
It worked like a charm. Thank you very much. smilies/wink.gif
Luis Milanese , June 02, 2010
it worked great, thanks for your time and effort.
lautaro , June 02, 2010
How can I share with VB?

My OS (Host) is Windows Vista
and my guest is Windows XP
Fernando FGT , June 06, 2010
It worked just fine!
Thank you very much !!!

Robson , June 14, 2010
Very helpful tutorial
It's very complete and accurate...I followed it and worked perfectly on mi mac with VBox Windows XP.
Alexis , June 14, 2010
Your process is certainly quicker and easier than creating a new Windows VM and installing everything from scratch. I will also note that I used slightly different versions of Virtualbox and Linux than your screen shots show...and even with 'interpretations' for the new versions, it still worked. Last, I will note that I just gave you $5 American. Thanks!
Dances with Microchips , June 27, 2010
Mac/Snow Leopard host, Windows 7 Prof guest?

Well these instructions work with a Mac/Snow Leopard host and Windows 7 Prof guest? I'm using VB 3.2.4.r62467.

Do any of the instructions need changing for this configuration? Any additions or deletions of instructions?

Thought I'd check before I really mess things up....

Thanks everyone!
Eric Kestler , June 27, 2010
Thanks all of you for comments! I'm glad this guide still helps many people! Of course donations are always welcome. Thank you very much. smilies/smiley.gif

Eric, read this comment "Alexis , June 14, 2010". Although I don't have a Mac to test it on my own I believe you shouldn't have any problem.
axel , June 27, 2010
Great instructions
This is awesome! Thanks for the help!
Jonathan , June 30, 2010
Ubuntu guides
Great post. Thanks a lot for the useful guides.

Beach Holiday Guide


Beach Holiday Guide , June 30, 2010
It works on Windows 7
The only difference is that instead of running a chkdsk directly when you reboot from your new Windows 7 disk, you will need to repair it using the windows 7 CD.

To do so, mount the Windows 7 CD and repair the installation. All it does is running a ChkDsk.

if you have got windows 7 on an iso image or alike, mount the image as a CD and make it bootable.

This procedure has been tested by myself on a iMac with Snow Leopard and VBOX release 3.2.6

Best regards for all.
José Luis Casado , July 06, 2010
thanks man
thanks man, it took just 10 min to resize my disk.
toggy , July 11, 2010
Windows 7 recovery CD

Thank you very much for this post. It really saved my life!

Just a little tip:

I was facing the "Bootmgr missing" problem on Windows 7 but I don't have the Windows 7 CD, so I found out that there is a recovery CD, which can be downloaded on this link:

I hope it can save other people's time.

Thanks again!

Rodrigo , July 17, 2010
Seems fine with Mac 10.6.4--moved 10GB XP Pro to 20GB XP Pro
Seems to work fine. A few things were different. Boot CD worked fine (I was a little worried) and it did ask me to partition the new HD within the partitioning software. Copying took about 10 mins or so.

Seems to have booted up fine. I had to repoint shared folders to the Mac side. Networking seems fine with no changes. I hope Windows and Office 2007 reactivation won't be needed (since hardware will have changed, I think, from XP perspective. We will see).

Thanks a lot
NSJF , July 18, 2010
Worked so great, expanded Windows XP from 10GB to 30GB (stupid Visual Studio)
denpanosekai , July 26, 2010
thnx for this. had a few hickups but it worked in the end.
bolletrie , August 03, 2010
Gracias, Thanks
Muchas Gracias por tu aporte, de verdad tu guía me saco de un apuro muy grande.smilies/smiley.gif Thank you very much for your input, your guide really helped me a lot of very big trouble.
Oscar Oviedo , August 03, 2010
resize a VirtualBox disk partition
Useful resource. This is the first feeling after read your article.
I found something useful information related recently about resize partition. And I am looking forward to your helpful guide.smilies/smiley.gif
Jean , August 10, 2010
Replacing partition
Thank you for this guide it was surely a time saver and after I booted my system with my Vista disk and did a boot repair I was up and running! =)
Shane , August 20, 2010
Don't forget the manage flag step like I did
I went through the whole process but somehow missed the one step on manage flag, checking the box next to boot. smilies/sad.gif Took me a while to figure out what I had missed. Redid it and it worked the second time. smilies/smiley.gif
Abby H , August 21, 2010
Too complicated (for me)
I've just resized my Windows Server 2008 R2 C: partition. Host is VirtualBox 3.2.8 on FreeBSD 8.1-RELEASE.

1. Use VirtualBox to create the new hard disk (vdi) with the bigger size.
2. Shutdown your guest (Powered off).
3. Use the command line, cd to your HardDisk folder (~/.VirtualBox/HardDisks in my case) and run "VBoxManage clonehd --existing oldhd.vdi newhd.vid".

You'll see something like this:

Oracle VM VirtualBox Command Line Management Interface Version 3.2.8_OSE
(C) 2005-2010 Oracle Corporation
All rights reserved.

Clone hard disk created in format 'VDI'. UUID:

4. Use VirtualBox to change the settings of your guest to use the new hard disk instead of the old one ("Storage").

5. You can boot your guest now. It will see the hard disk in the new size, but the filesystem will remain the same size as before as expected. At least in W2k8 it is possible to expand with the on board "Disk Management".

Mission completed.
knarf , August 25, 2010
Thank all of you guys for the feedback and your comments!
axel , August 26, 2010
Great Howto
However I haven't gotten a working copy of my XP guest yet. The first time I tried I got an error message: NTLDR is missing
I started studying the my original VDI file and it contained a small partition with MBR and lba. I tried adding a small partition to my sda2 using the method you have suggested but I quickly get an error message. Something about the file system. Any ideas how I can create the MBR?

Tim , August 31, 2010
Hi Tim, boot with a Windows XP cd and choose to repair the installation. It will recreate NTLDR.
axel , August 31, 2010
Vista help
Vista Home Premium

File: Windowssystem32winload.exe
Status: 0xc0000225
Info: The selected entry could not be loaded because the application is missing or corrupt.

With thanks:
mryan321 , September 02, 2010
Works nice, got me out of a bind.
O , September 08, 2010
xp guest on Ubuntu host
Nice article, thank you and useful comments as well!
Szelev71 , September 10, 2010
get error
I did the above too for a Windows 7 63 bits,. When I booted from the new disk, I got:

Bootmgr missing
Press Ctrl-Alt-Del to reboot

Atrax , September 14, 2010
It works fine with Windows 7 Ultimate x86, too.
It is needed to follow the following procedure to repair system partition in W7, but after of that it works fine:

Thank you.
Bol , September 19, 2010
This is very very useful ! Thank you for putting your time on this one...I am gonna try this today. smilies/smiley.gif
Abin , September 21, 2010
VMware Workstation
hello, how do this in VMware Workstation Slave/Master Disk..
Marcos , September 27, 2010
Hi Marcos, I'm sorry but I haven't used VMware for many years now. I can't help you. smilies/sad.gif
axel , October 05, 2010
Don't see /dev/hdb in drop down menu
May prolem is that in the drop down menu is nothing but the /dev/hda (in my case /dev/sda1) and nothing like /dev/hdb (or in my case something like /dev/sda2).
So I can't get an further with the tutorial... smilies/angry.gif

Any ideas?
Would be nice to get help!!!
Thanks for your effort!!

Stephan , October 13, 2010
Initial large virtual drive size...
Maybe a small point, and someone may have stated this already, but if you make the original virtual disk size very large ie a dynamic 200Gb, then you can just use gparted to increase the size of the original partition. Having a dynamic 200GB virtual disk won't actually take up 200 GB on your hard drive, but will save you from having to create a new drive every time your partition fills up and needs resizing.
Nick_L , October 17, 2010
Don't see /dev/hdb in drop down menu
Hey Nick_L,

thanks for the information!
In my case I got an old virtual disk (10GB) and want to create a new one (20GB).
When I try to it's like described on top of your post... smilies/sad.gif
Until now I can't find a solution to go on with the tutorial cause I don't see the new virtual disk...nerve-wercking...

I hope someone can help me...
Stephan , October 17, 2010
props for the knarf method!
Running VB 3.2.6 on OS X host, one XP guest. Needed to grow it from 10GB to 20GB. Initial solutions were all 2-3 years old than I found this thread. The partition copy is a great hack but it seemed like in 2010 there should be a better way since Oracle is still updating it. Used the cmd line tool to clone the old disk into a new one. XP does not do the GUI VLM and the cmd line tool diskpart was bitchy. So I just used the GPartEd ISO to boot off of and grow the partition to the full 20GB disk. Chkdsk ran on first boot then all was well!

Thx knarf!
vboxbud , October 23, 2010
Well Done!
I am impress by the details and how easy it was. Please keep up the good work.
zamorauu , October 29, 2010
Thank you zamorauu and vboxbud! smilies/cheesy.gif
axel , October 30, 2010
resize hard disk
Start off by creating a fresh new drive of the size you’re after using the VirtualBox user interface. Then, locate both the your old, smaller HD and the new, larger one and run the following command:

VBoxManage clonehd --existing oldhd.vdi newhd.vdi

After some progress indicators ahve come and gone your HD should have been cloned to the larger one. You now need to use some software to expand your drive partition into the new space, use something like GParted.
ariej , November 03, 2010
First error I believed was caused by formatting 2nd drive in windows instead of GParted. It would say Error applying change in Gparted after copy of old partition to new bigger one. After allowing Gparted to format new partition I no longer got that error , which caused Windows XP to lock up on boot at WindowsXP screen.
However after allowing Gparted to format new partition and copying applied, I still got Locke up on WindowsXP Boot at Windows XP screen ( no Welcome)
Also , I noticed that I could not get it to boot to new partition at all until old one was deleted as explained in this walk through.

Could not get it to work.smilies/sad.gif
alan , November 17, 2010
ok I think i got it to work. The key is to let Gparted do the partitioning and the formatting and MAKE SURE You choose NTFS because it does not select that by default!
alan , November 17, 2010
This was left out of the guide.
When you tick "BOOT" for new bigger partition, you MUST tick off the "BOOT" of the older smaller drive or you will not get it to boot right.
Of course deleting the old VM in Virtual Box is important to if you want to do it that way but in storage area and media area.
alan , November 17, 2010
Endless login-loop
Followed the guide, but forgot to delete the slave (old) before i restarted. When I now run the vbox-installation I am getting an endless login-loop that I don't know how to fix. Any suggestions are welcome!
Trond , November 23, 2010
Work in the mud for 1 1/2 days and then read this and washed the mud away.
Two things to consider.
1. If the guest is windows and chkdsk was never run on the original drive, Force it to run with auto correction and shut down and boot again before coping to the larger partition.
2. Covered above but, set the boot flag on the new partition as it doesn't copy over.
Nicky , November 23, 2010
Problems with Expanding Disk
I believe I'm running a newer version of Virtualbox than you are here (ver. 3.2). I had several problems with copying the original image into the newly created .vdi until I decided to make the new .vdi a fixed storage device. At which point your tutorial worked perfectly.
sharkllama , December 03, 2010
Another suggestion
Excellent tutorial!!

But, instead of the gparted boot disk, I used the Ubuntu installer CD and achieved the same result...So, if u have any linux distro CD, this would work too...

Munaf , December 04, 2010
What an idea
nice idea
Dormand , December 21, 2010
Any way to make it SMALLER?
Everything I've read so far focuses on how to make a Virtualbox disk larger, but I want to make my Windows XP one smaller. I originally made it 80GB, but found that I actually need only about a fifth of that space, so I want to reduce the size of it. Any way to do this?
BlueSpark , December 24, 2010
Excellent guide... My new partition works fine.
Juan , December 28, 2010
Thank you!
Thank you! This procedure worked great!
Mac OS X host, Win XP guest, VirtualBox 4.0.
Chazman , December 30, 2010
Works flawlessly on an Ubuntu host with XP guest.
sandoz , January 05, 2011
Thank you
This worked flawlessly on my Ubuntu host/Windows XP guest.
dirtprof , January 07, 2011
Thank you. It was the best and worked great!
Mac OS X host, Win XP guest.
Mahdieh , January 09, 2011
Thanks a lot
Great help smilies/smiley.gif
Host: Win 7
Guest: Win XP
Deepak Rai , January 12, 2011
Hi there, thanks so much for this was really easy to follow.

Unfortunately, I'm having a problem that doesn't seem to have been described here yet. I followed the instructions using virtualbox 3.2. Everything went fine and my VM boots but it doesn't recognize the increased size. All the data is there, and it's definitely running off of the larger disk but the guest (XP) doesn't recognize the increase.

Any help? Thanks

Perry , January 15, 2011
same problem as Perry
Went through the process, everything worked great...but as Perry mentioned on the 15th, XP doesn't recognize the increase. I managed to figure it out though. So try this:

-boot back into Gparted with the new .VDI set as IDE Master (no need to added the original back in)

-re-size the partition slightly smaller (-200Mb) and click apply.

-after successful application of the operation re-size the partition to full space, and click apply.

-after successful application of the second re-size operation exit the application and shut down (IMPORTANT: Shut down from within the Guest, not from the Virtual Box menu).

-change your virtual machine settings to boot from har disk per the instructions above.

You should see Windows XP boot the first time and "check disk" then reboot on it's own. Once the second reboot happens and your back at your desktop right click "My computer" and select "Manage". Check the disk properties, it should recognize the full disk space. I'm writing this rather If anything is unclear just ask and I'll do my best to clarify.


Justin , January 16, 2011
Very good guide!!!
The guide is so good, but some pictures are not the same as my virtual Box Version (3.2.12), but it was almost the same.
Jose Luis , January 27, 2011
How to get it to boot!
Alright, so I had some trouble getting the new disk to boot even after the ntfsfix /dev/sdb1 in the terminal (since I had errors in gparted).

What I found is that because I had the disks added as SATA in the settings and not IDE, it wouldnt boot. As soon as I switched it to an IDE drive again and deleted the sata controller in the settings area, it booted just fine!

So for anyone else out there who ran into this (Adam, this may have been you too), this is how I fixed it smilies/smiley.gif.

Great article, thanks!
Ansemx324 , January 28, 2011
Thank You!!
Even though the article references an older version of VirtualBox the information was still relevant and it was easy to figure out where to change the settings. Thank you so much for taking the time to create such a complete guide!
Wesley Jordan , January 31, 2011
I got this to work what a great idea...i just had to run it again to make my image be flagged as, " BOOT " then i reset it and it worked if someone can help me migrate my image to another computer and change the mac address on it..thanks
TONE , February 05, 2011
smilies/grin.gif Obrigado, sua dica resolveu meu problema. Estava com win7 na VM e precisava mais espaço no HD. Reisntalar todos programas novamente seria um pesadelo.

Obrigado, eternamente grato.

Sulivan , February 13, 2011
Works as advertised
Using Mac OS 10.6 host, Windows XP Home Edition guest. The part where I was confused was when I had to mount the Gparted iso as a cd-rom drive in the storage settings. Once I figured it out I did it twice on two macbooks. Thank you!
lseans , February 21, 2011
There is no mistaking the awesomeness of this post.
Just one knit picky thing: why? Why would you want to go through all the trouble to do this when all you should have to do is add another virtual drive to it? Sure, it's tricky in Linux Virtualbox, but nowhere near as tricky as what you're proposing.
Sammy Moshe , February 23, 2011
Thank you!
Thank you so much! Been looking how to do this for ages.

One note, on my version of VirtualBox, I couldn't find a way to change the boot order, but I could just hit F12 within the virtual machine to choose my boot device, chose the CD-Rom and voila was into GParted

Thanks again!
Chappers , February 23, 2011
Thank you!
Thank you so much ! very detailed specification. Great post!
wesley , February 23, 2011
Make sure you select Dynamically expanding image!
I like using fixed-sized disks so the whole thing gets allocated at once. So that's what I tried to use. Every time I tried to copy the contents using gparted to the new image, it would freeze up at some point (around 4-5%) and the vm would abort (crash). I tried 4 different versions of gparted, and tried using the command line ntfscopy and ntfsresize to no avail.

Eventually, I followed the instructions as stated, deleted my new fixed-size vdi image, and created a dynamically resized image, and everything completed flawlessly.

Lesson - if the gparted step keeps aborting, make sure your new image isn't fixed-size. I don't know why it doesn't work (seems like it should), but that minor change allowed me to grow the disk, and that was more important to me than having a fixed-size disk.

Thanks for the guide!
unrtst , March 03, 2011
Ubuntu issue
First of all, this helped tremendously! Thank you!

Second, when I did this with a Ubuntu Desktop 10 64-bit image, it wouldn't boot up after following all the instructions. I suspected that GRUB wasn't happy, so I booted the Ubuntu Live CD, mounted the newly created image on "/mnt" and ran:

sudo grub-install --root-directory=/mnt /dev/sdX

Rebooted, and it worked. Hope this helps others.
Roger , March 03, 2011
Deleting hard disk
I had installed Ubuntu on fixed size 60 gb virtual hard disk image.
Now i'm short withj my 320 gb hard disk on my host os and want to delete VM and get free of 60 gb . I tried to manually delete the image of hard disk...nothing happened it still happened to be occuping 60gb space. Restored my computer and then went to disk manager in SUN Virtual box released hard disk from existing machine and deleted but still my prirmary os had 60gb ocupied!!!!
please tell me how to free my 60 gb
I wanna get rid of it!
rajat , April 13, 2011
Awesome guide dude!
I was struggling with how to expand my partition after screwing up the initial windows install. I couldn't download paragon cause my hd was outta space. Your guide put me onto Gparted. That app is the shiznick!

Thanks man
Toby , April 14, 2011
Everything works fine!Thx man!
sectord , April 18, 2011
Systems Admin
The tutorial is excellent and detailed, I did it for a windows 7 .vdi and I just added a couple of steps to get it to work. After setting the 100mb partition boot flag and rebooting, the computer stops at boot with a 0x00000..... error, then restart from the windows 7 CD, run the automatic startup repair, and after VPC reboots, allow it to run chkdsk! you are done!
David V. , April 20, 2011
many many thanks dude
it is such a helpful and straight forward helper, many many thnx for ur effort and time dude,
good luck in ur personal and work life .
Wasim , April 23, 2011
Windows 7
Thank you for posting detailed step by step explanation. Does it also work on a Version 4.0.4 VM VirtualBox and Windows 7?

Bruk , April 25, 2011
or just use:
VBoxManage modifyhd filename.vdi --resize 46080

That will resize a virtual disk image to 45GB
any , April 29, 2011
Me thinks it would be easier to just delete the VM and create a new one lolz!
Meh , May 12, 2011
Tech architect
Excellent information, This really worked very nice for me, Was struggling with a lower disk space for Ubuntu and your post helped a lot to increase its size.
Gokul Muralidharan , May 17, 2011
Nice articel
I can't find words to thank you. Only i can say is excellent......... article, was looking just for this. thanks a lot...smilies/smiley.gif
Rajkumar Rurhi , May 18, 2011
Worked great with OVB 4.08 !!
Running on Kubuntu Lucid Lynx (10.4). The VB 4.08 menu structure is different from the 3.x version but the instructions were detailed enough to allow one to navigate the new VB menu and achieve the same results.

Good Job! smilies/cool.gif
GreyGeek , May 23, 2011
How can I mount the GParted.iso with VirtualBox 4.0.8?
Hello, thanks for this guide, but I have a different version of VirtualBox and I am lost as to how I could mount the GParted.iso. Please help. The GUI is very different. Please help!
Prescilla , June 18, 2011
builtin You saved my day!
Just wanna thank builtin for sharing that very short but simple command. Very very helpful. Thank you!!!!
Prescilla , June 18, 2011
Or one can use
VboxManage modifyhd –- resize
It is in the UserManual.pdf. Read it!
Gasha , June 24, 2011
very clear explanation. I am success use your method. thank you for sharing this tutorial
toto , June 29, 2011
great guide; yet another easy success. Thanks!
sunmaxx , July 08, 2011
100% easy and quick
This was very helpful. The longest part was down loading the Gparted iso, because everything else was a snap!
Thank you for the screen shots and the simple step by step guid. smilies/smiley.gif
Thank You So ... Much , August 01, 2011
Reinstalling Grub after resize
I followed this guide to create a new 20GB drive to replace an 8GB drive (virtual drive, with VirtualBox) and after booting I got nothing. After a while I realised it was that the grub boot loaded was not on the new drive (especially since it was installed into /dev/sda on the original drive and I only copied /dev/sda1 - there is no option to copy the whole sda device).

Anyway, the steps were:

1. Load the gparted CD with the new drive loaded (the one that won't boot up)
2. Open a terminal.
3. Type "sudo -s" to become root.
4. Issue these commands to reinstall grub, using the content of the new drive itself as the source for configuration.

mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
grub-install /dev/sda

Then, "reboot", remove the CD and off you go.

Worked a treat for me.
GuruBob , August 06, 2011
Worked great! Thanks!
Chuck , August 10, 2011
Thank you very much. You saved my life!
Brian Borneo , August 18, 2011
Great Post - 1 suggestion though
Great post, saved my hiney smilies/smiley.gif
One suggestion though -
The new VDI disk I created in VirtualBox, had no Partition Table for some reason - So the instructions on GPart didn't work smoothly (I got an error message when trying to paste into the 2nd disk).
After clicking "Device>Create Partition Table" like the error msg suggested, everything ran smoothly.

Robot55 , August 21, 2011
Simple. 1 Command almost does the trick.
VBoxManage clonehd --existing xp.vdi XP_10GIG.vdi
>existing< >NEW<

VirtualBox Command Line Management Interface Version 3.0.12
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.


Clone hard disk created in format ‘VDI’. UUID: 1366bb7f-e827-41de-90ce-763e82309f26
necrolord , August 23, 2011
Great how-to!
Gerardo , August 23, 2011
easy use
A lot of partition softwares can resize partitions, among which my favorite one is easeus partition master. Download it to save you problem.
luluwang , September 01, 2011
Nowadays, you would just do:
VBoxManage modifyhd hd.vdi --resize 20000
PePa , September 06, 2011
Thanks, due to that info I saved myself a few hours of time not having to search around on how to accomplish this task...
michael vergallen , September 21, 2011
ZoneAlarm (if installed) kills internet access in new copy
Need to uninstall ZoneAlarm and install again
YLK , September 26, 2011
Excellent How-To
Had a problem installing Office 2007 on Win XP Pro running as a VM on VirtualBox on an Ubuntu 10.04 host. This worked fine. Only differences was I have VBox 4.1, and ran a PartedMagic 6.2 Live CD to do the copying. The host machine is a DELL Inspiron 1521 which I have recycled to be my network troubleshooting machine. MD Turion 64 Dual core with 4Gb DDR2 has allowed me to run the XP VM as if it was a dual core with 2Gb RAM. Apart from the time it took to find this post the whole thing has been quite painless.

Thanks for the really helpfull post. I have sent you a donation as a thank you.
Sadiq Mohamed , October 03, 2011
Quick way...
VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB
James , October 13, 2011
Macintosh version of (now) Oracle VirtualBox 4.x: No "New" disk option
I'm using this on the Macintosh build of Oracle VirtualBox 4.x. For step two they have canted the name to Virtual Media Manager instead of Virtual Disk Manager. But the big problem is there is no option for creating a new disk. They only have the options to copy, modify and remove disks. Any work arounds for this?
dk , October 16, 2011
Amazing Article !!!
Just the post I wanted ...thanks a lot
Rajakumar , November 08, 2011
Thank you
Great work, everything works as explained, Thanks smilies/smiley.gif
Nikolai , November 22, 2011
Really Great
Saved me a ton of time, thanks!
Joe , December 02, 2011
Thank you!
Great guide - spot on - thank you for this - saved me a reinstall.
MG , January 04, 2012
Great guide, thank you! You saved me a lot of time.

Dario from Rome, Italy
Dario , January 11, 2012
Thank you very much!!!
This really works !!!
The fastest method!
Davit , January 22, 2012
And now: How to shrink?
But how do i shrink my vbox? Accidently resized my vbox to 30TB, which is not supported by GParted - so: how to shrink (not compress!)??
Hannes , January 23, 2012
Hannes try this command

VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB

If this doesn't work I think you could use another Live CD which from which you will install the parted utility. I think this will allow you to resize such a big partition. I am not sure it will work though.

Let me know which one worked for you.
axel , January 23, 2012
Thank you
It worked. I stayed 6 hours prior to finding this, to work on a solution to make the partition bigger.

Thank you very much.
Pariaby , January 27, 2012
Windows Server 2008 R2
On a Windows 2008 R2 server image, I was not able to boot,
so I booted from a Windows Server 2008 R2 DVD and choose repair. Then I chose Command Prompt. The command prompt will show you: X:Sources. CD to the Recovery directory and run StartRep.exe. The full path is X:SourcesrecoveryStartRep.exe. Now it boots, and begins to check the disk.
Gary V , February 12, 2012
Best.Install-Upgrade Guide.Ever
Oh hell: my Vitual Box partition is too small! Shouda made it bigger or resizable!
%$#@!! Shared folder won't do what I need.
Arrrgh! VirtualBox config doesn't have the ability to expand itself!!

(sigh) maybe there's something on the web that will get me out of this ...

And here it is. A paragon of its genre.

Many thanks!

Cosmic Wheel , March 07, 2012
Right On
Its been a few years since you posted it, but it was spot on perfect for me.

Running Fedora16 with an XP guest.

Thanks soooooooo much,

Brett , March 23, 2012
In case the above solution do not work (it was my case)
1 - Follow the steps until the one that indicate to boot with gParted (inclusive)
2 - When gParted opens, close it and open the terminal
3 - Type: sudo dd bs=12M if=/dev/sda of=/dev/sdb (where, sda is the source disk - the small one, and sdb is the destination disk, the largest one)
4 - After this use the windows manage disk tool to expand the disk.

Leandro , April 01, 2012
I am glad to hear that this guide has worked for all of you. smilies/cheesy.gif

Leandro thanks for the addition. smilies/smiley.gif
axel , April 01, 2012
Funcionou perfeitamente! Valeu
Eng Bruno Santana , April 10, 2012
Thanks for the tip; however, it seems that the default for VB is the VMDK image. I converted a new drive using this tutorial to a VDI. I will need to shrink it down and will post my results of using the VBoxManage command as soon as I am done building the VBox.


VBoxManage , April 10, 2012
Appreciate so much,great article
tez , April 18, 2012
Used your instructions to copy to a smaller vdi hard disk
Thanks for your instructions with which I was able to downsize from a 40 GB dynamic sized vdi with Windows XP to a 30 GB fixed size storage vdi. I was running out of space on my host partition. The original 40 GB vdi was only using 20 GB, and I knew that 30 GB was sufficient for me to work with. Following these steps:
1) start the original vdi and log into as administrator
2) defragmented the volume (Start > Accessories > System Tools > Disk Defragmenter)
3) note how many GBs are used on the volume (you can use My Computer > Properties)
4) shutdown the VirtualBox session of Windows XP
5) create the new smaller virtual disk and attach it to the session's storage (in the session's setting window). though it is smaller than the original vdi, make sure the smaller vdi isn't too small. If your volume is under 2 GB, Windows will complain and performance will degrade in my experience and things like Windows update could fail because of lack of space. Having a 10 GB buffer was sufficient for my needs.
6) insert the CD containing GParted (I used Puppy Linux)
7) start the session (boots into Puupy Linux). open GParted. (Make sure the virtual disks are not mounted)
smilies/cool.gif using GParted, resize the original vdi to the size of the smaller vdi. commit the changes
9) copy the partition of the original vdi to the partition of the new (smaller) vdi. be patient - this takes time and may look like GParted hangs but it hasn't
10 ) make the new vdi bootable (right click the partition, and check boot under the flag options)
11) shutdown the session
12) remove the CD
13) detach the original vdi and make the new vdi the Primary Master
14) start the VirtualBox session. Windows will run chkdsk but should run fine afterwards

Thanks for guiding me!
11) lo
Karl d , April 26, 2012
works perfectly!
sasa , August 10, 2012
Thank you very very much
Thank you very very much for your help

I was in the need, And actually all work fine

mohamed , August 15, 2012
Thank you very very much
Thank you very very much

I work perfectly very nice

mohamed , August 15, 2012
I just sent a modest donation. Thanks for a slick guide to a process that I assumed was impossible. :-)
Ron Enderland , September 02, 2012
I'm sorry for not replying sooner Ron and all the other folks! I am glad to hear that this guide is still helpful for so many people!

Ron I really appreciate the donation. Thank you very very much. smilies/smiley.gif
axel , September 23, 2012
how do you do this on E drive?
I have Virtual box installed on my C drive. I have C and E drive on my computer. I followed this instructions and the additional disk space was taken out of C drive, but I want it to land on the E drive. How do I do this?
LK , October 22, 2012
Good work!
Well done! Awesome!
Vujke , February 26, 2013
Resize doesn't work
This step "Drag the right edge (1) like you see in the screenshot so as not to leave any unallocated space in the new disk. Next click the Paste button." drove me crazy, because I cannot drag the edge to resize filling the empty space. Even the numeric manipulation on the bottom doesn't work. (with Mac OSX disks, HFS+ filesystem) :-(
tamas , May 30, 2013
Great tutorial! Works fine with .vmdk
I was able increase HDD from 20Gb to 40Gb.
Thank you for the great job!
P.S. You saved my time to reinstall everything!
Gennadiy , August 07, 2013
Very Very helpful
Thank you for a very useful tutorial. Had to use chkdsk:/f to allow gparted to do it's stuff but this was just the Bizz thank you again for a very helpful set of instructions
Regards J
John Stenton , February 15, 2014
Very Very helpful
Thank you for a very useful tutorial. Had to use chkdsk:/f to allow gparted to do it's stuff but this was just the Bizz thank you again for a very helpful set of instructions
Regards J
John Stenton , February 15, 2014
IT Technician
Thank you very much for a very useful tutorial. May God bless ya'
Polar Bear , February 21, 2014
No Partion Table found Error
HI, Great Guide, thanks for taking your time to do this, I'll be sure to make a donation.

I have been very carefully following your instructions, added 2nd IDE Primary Slave 20GB grow by allocation drive, started gparted, copied original drive, but I get the following that is not mentioned in your guide:
I am running virtual box 4.3.8 r92456 latest as at 25th Feb 2014, on OSX 10.8.5 its a windows xp drive I am trying to expand from 10Gb to 20GB so I can upgrade it to Win 8.
I have tried just adding the partition table as the dialog suggests choose msdos:
But then the paste fails with: a hundred and sixty five of the same cluster accounting failures, ending in:
It's suggesting running chkdsk /f but I'm on a mac and don't have any bootable disk images with chkdsk - any suggestions?
Ray , February 27, 2014

Write comment

smaller | bigger
security image
Write the displayed characters


General Software

Login Form

Follow me on...

  • Facebook
  • Twitter
  • Google+: u/0/b/113039112812192417058/
  • Digg
  • Reddit: myguides
  • RSS Feed
  • e-mail

Member Login