James Ray Anderson

James Ray Anderson
James Ray Anderson
0 comments

Expand Virtual Disk on Oracle VirtualBox

7:39 PM
Disk too small?  It happens.  There is an easy fix, well mostly for Windows.

Assumptions

  • You have the latest Oracle VirtualBox
  • You have enough space on your drive to support a larger virtual disk.  This includes the temporary disk space that is equivalent to the original disk size during the clone process.

Part I - Create Virtual Hard Drive

  1. Open the VirtualBox Manager.
  2. Select the non-running virtual machine and select Settings.
  3. Select Storage.
  4. Click on the SATA controller and add another hard drive.
    • Select (.VDI) and select Next.
    • Give it a name and select Next.
    • Choose the size you want (or expanding).
    • Select Create.  
      • This will create the VDI.  
      • This could take up to 20-30 minutes for a physical fixed size.
Part II - Clone the Old Drive
  1. Open a command prompt and go to where VirtualBox is installed.  For windows this is under C:\Program Files\Oracle\VirtualBox\
  2. At the command prompt, type the following and hit enter:
    vboxmanage clonehd "<path>OldHDFile.vdi" "<path>NewHDFile.vdi" --existing
  3. This can take 20-30 minutes to accomplish.  Depends on the size of your virtual drive, disk speed, etc.  

Part III - Remove the Old Drive
  1. Go back into VirtualBox Manager.
  2. Select the drive you don't want to keep and right-click and select Remove Attachment.
Part IV - Utilize the Partition
  1. Go into the Disk Manager for your OS.
    1. MAC:  See these instructions - as you will have some problems with the partitions and this goes through how to handle with GParted.  Scroll-down about half-way.  I was unable to get the instructions to work for the particular VM for the Mac OS X - so I rebuilt the VM instead since I was using a fixed drive.
    2. Windows OS:  Go into Disk Management.

You are now ready to use the cloned, larger, virtual drive.

Happy computing!

0 comments:

 
Toggle Footer
Top