Resize VirtualBox .VDI files to bigger size

18Oct08

A VDI file is an image file used by VirtualBox as the virtual hard disk for guest OS. I was using Windows XP in VirtualBox and then I found out that my disk space inside Windows XP is getting smaller due to software and other stuffs.

What I did to resize it was to clone the disk drive using a software called Acronis True Image Home. You can download a trial. It is still a full working software even though it’s a trial. Here are the steps I did to do it.

Before you start this, please backup the original VDI file. I won’t be responsible if this messes your VDI file.

  1. First we need to create a new hard disk (or vdi file). Open up VirtualBox, and launch the Virtual Disk Manager. Click the New button.
  2. Follow the wizard to create the new hard disk.
  3. After creating the hard disk, we need to assign it to the guest OS. Open the Settings for the guest OS. Go to the Storage tab. Click the add icon to add the new hard disk. Select the new hard disk and set it to IDE Primary Slave.
  4. Next, we need to initialize the new hard disk. Open the Management Console by right clicking on My Computer and select Manage. Now open up Disk Management. The Initialize and Convert Wizard will appear. Follow the wizard to initialize the new hard disk but don’t convert it to a dynamic disk.
  5. Next, install Acronis True Image Home. The trial can be downloaded from here. After install, launch the application. Click on the Utilities tab. There will a Clone Disk menu. Open it. Follow the wizard. The application will reboot Windows and start the operation after that.
  6. After the operation is completed, DO NOT REBOOT the guest OS. Shutdown the OS first. Now open VirtualBox again, and open the Settings for the guest OS. Change the Hard Disk to the new one created. Make sure to change the slot to IDE Primary Master. Click Ok. If everything goes well, the guest OS should boot.
  7. Once boot, you can check in Disk Management, that the hard disk now has the new size. If the guest OS fails to boot, change the guest OS settings to use the old hard disk and boot back to the guest OS. Check the steps again if you’ve missed any.

Thats it! Now whenever your disk space runs out in VirtualBox, you can resize it to a larger size.I’m not sure for Linux or other OS, but I think the concept is the same. For Windows, Acronis took care of all the disk partition including the MBR, so the cloned disk will be able to boot. I’ve tested with other softwares, like DriveImageXML, HDClone, most of them was able to clone the drive but the guest OS couldn’t boot. I guess it didn’t copy the MBR too.

Advertisement


7 Responses to “Resize VirtualBox .VDI files to bigger size”

  1. 1 Carlo

    This was a great how to. I really appreciated it. Thanks for sharing :)

  2. 2 mdonahoe

    Thanks, this worked perfectly! Great job!

  3. 3 Todd

    Best “to the point” tutorial on resizing VDIs for Windows out there (at least as far as quick Google searches go). Much clearer and more helpful than the VirtualBox forums/FAQs/Tutorials. Great job!

    BTW- For others, the Acronis Migrate Easy product is all you need to do disk cloning (about $10 cheaper than True Image). There is also a fully functional 15-day trial, so if you only need this once, the trial is all you need.

    -Todd

  4. 4 JeBS

    Thank you very much for the help. i almost re-do everything from beginning, because i really cannot figure out how to clone the vdi.
    You’re the best!!!

  5. Had a hard drive fail and had to restore which was just before I followed this procedure for the .vdi. So, thanks again! Saved me twice now.

  6. 6 _cs

    Your my man of the month September 2009!! Together with Todd’s (man of the week 36/2009) suggestion to use Acronis Migrate Easy (because Acronis True Image did not work on Windows 2k for me) I could easily resize my HD from 2 to 10 GB.
    Great, thank you!
    Chris

  7. 7 hezral

    Glad everyone find this useful :) thanks


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.