How to Enlarge a Virtualbox Disk Using Windows

</TECHNOLOGY.MADE.EASY>

How to Enlarge a Virtualbox Disk Using Windows

virtualbox storage

When you create a virtual hard disk in VirtualBox or VMware, you specify a maximum disk size. If you want more space on your virtual machine’s hard disk later, you’ll have to enlarge the virtual hard disk and partition.

You may want to back up your virtual hard disk file before performing these operations – there’s always a chance something can go wrong, so it’s always good to have backups. However, the process worked fine for me.


Step 1

To enlarge a virtual disk in VirtualBox, you’ll need to use the VBoxManage command from a Command Prompt window. First, shut down the virtual machine – ensure its state is set to Powered Off, not Saved.

Step 2

Open a Command Prompt window from your Start menu and change to VirtualBox’s program files folder so you can run the command:

cd “C:\Program Files\Oracle\VirtualBox”

Step 3

The following command will operate on the VirtualBox virtual disk located at “C:\Users\CDizzie\VirtualBox VMs\Windows 7\Windows 7.vdi”. It will resize the virtual disk to 81920 MB (80 GB).

VBoxManage modifyhd “C:\Users\CDizzie\VirtualBox VMs\Windows 7\Windows 7.vdi” –resize 81920

Use two dashes before resize in the command above.

Step 4

Replace the file path in the command above with the location of the VirtualBox disk you want to resize and the number with the size you want to enlarge the image to (in MB).


This process does not enlarge the partition on the virtual hard disk, so you won’t have access to the new space yet – see the Enlarge the Virtual Machine’s Partition section below for more information.

Step 5

You now have a larger virtual hard disk. However, the operating system’s partition on your virtual hard disk is the same size, so you won’t be able to access any of this space yet.

You’ll now need to extend the guest operating system’s partition as if you were enlarging a partition on a real hard disk in a physical computer. Luckily, Windows 7 and above have the Disk Management utility to do this.

In Windows 7, choose System and Security and then choose Administrative Tools.

In Windows 8, use the search bar.

In Windows 10, use the search bar.

Step 6

After opening the Disk Management utility you should see your current volume and the new unallocated space. Right-click your current volume and select Extend Volume.

Step 7

Follow the steps, assuring you selected the unallocated space before completing the merge.

Step 8

Finally, click the Apply button to apply your changes and enlarge the partition. You are done.


Fixed Size Drive

Step 1

To enlarge a virtual disk in VirtualBox, you’ll need to use the VBoxManage command from a Command Prompt window. First, shut down the virtual machine – ensure its state is set to Powered Off, not Saved.

Step 2

Open a Command Prompt window from your Start menu and change to VirtualBox’s program files folder so you can run the command:

cd “C:\Program Files\Oracle\VirtualBox”

Step 3

The command clonehd or clonemedium does not support fixed drives so you will have to clone the fixed drive using VBoxManage. Using —variant Standard we are able to convert this copy to dynamic.

C:\Program Files\Oracle\VirtualBox>VBoxManage clonehd “C:\Users\CDizzie\VirtualBox VMs\Windows 7\Windows 7.vdi” “C:\Users\CDizzie\VirtualBox VMs\Windows 7 Copy.vdi” –format VDI –variant Standard

Step 4

Now that you have cloned the VDI it is time to make it the default disk for the VirtualBox. Open VirtualBox and head to Settings>Storage.

Step 5

Click the hard disk platter icon to add a virtual disk. Select “Choose existing disk” and use the copy you just created. Your VDI has now been set to a dynamic size and you can continue with the normal process. Head to Step 3 of the “Dynamic Drive” section at the top of the page and continue.

 

Leave a Reply

avatar
  Subscribe  
Notify of