How to Increase VirtualBox Hard Drive Size
Oracle VM VirtualBox does not have an option that allows you to increase the size of a virtual machine's hard drive through the graphical interface, which may cause a challenge for you if you have no more storage space on the virtual machine and do not want to create a new one. VirtualBox includes a utility called VBoxManage that allows you to perform many functions not displayed in the graphical interface. Create a new, larger virtual hard drive and use VBoxManage to copy the content on the original hard drive over to the larger one.
Instructions
-
Create a New Virtual Hard Drive
-
1
Launch Oracle VM VirtualBox. Right-click the virtual machine attached to the virtual hard drive that you want to expand, and select "Settings."
-
2
Click to select the "Storage" heading on the left side of the menu.
-
-
3
Click the icon that looks like a spindle of discs with a green plus sign next to "IDE Controller." When you over the mouse pointer over the correct icon, VirtualBox displays the words "Add Hard Disk."
-
4
Click the "Create New Disk" button.
-
5
Select the "VDI (VirtualBox Disk Image" radio button and click "Next."
-
6
Click the "Dynamically Allocated" radio button and then click "Next."
-
7
Click the folder button in the upper-right corner of the window and select the location for the new virtual hard drive image. The location should be the same as that of the virtual machine's current virtual hard drive.
-
8
Drag the slider at the bottom of the window to select the desired size of the new virtual hard drive, and then click "Next."
-
9
Click the "Create" button.
-
10
Click the original virtual hard drive, and then click the "Remove Attachment" button at the bottom of the window.
-
11
Click the new virtual hard drive. Click the "Hard Disk" drop-down in the upper-right corner of the window and select "IDE Primary Master."
-
12
Click "OK."
Clone the Original Virtual Hard Drive
-
13
Open the Start menu and click "Computer." Open the "C:" hard drive, and then open the "Program Files," "Oracle" and "VirtualBox" folders.
-
14
Click the address bar at the top of the Windows Explorer window. Type "cmd" and press "Enter" to open a command prompt window starting in the present location.
-
15
Type the following command:
vboxmanage clonehd "full path to old virtual hard drive" "full path to new virtual hard drive" --existing
Note that you must type two "-" symbols before the word "existing." A valid example of this command follows:
vboxmanage clonehd "C:\Virtual Machines\Disk1.vdi" "C:\Virtual Machines\Disk2.vdi" --existing
-
16
Press "Enter." Upon completing the hard drive clone operation, the utility displays the message "Clone hard disk created in format VDI." Close the Command Prompt window.
-
17
Double-click the virtual machine in VirtualBox to turn it on.
-
1
Tips & Warnings
The guest operating system will not be able to utilize the full space available on the new virtual hard drive immediately; you must use the disk management software of the guest operating system to expand the disk partition. For example, in Windows 7, open the Start menu and type "Computer Management" in the search box. Click "Disk Management" on the left side of the window to access the Disk Management utility. For a non-Windows operating system, consult the included help files.
References
- Photo Credit Jupiterimages/Photos.com/Getty Images