Steps to Increase .vdi VirtualBox Disk



Share this article :

Method 1

Shutdown the Virtual Machine before proceed to this activity.

Locate the VDI file which you wanted to increase. You can track the location by looking at the Storage > Information area (from the Virtual Machine > Settings).

VM Storage Location

Launch the Windows command prompt and navigate to the below directory (VirtualBox installation path),

cd C:\Program Files\Oracle\VirtualBox

In this example, the current VDI space is 25GB and we want to increase to 30GB – additional 5GB (The size will be in MB, 1024 x 30 = 30720). Execute the following command,

VBoxManage.exe modifyhd "C:\ITsiti\VM\Windows 7.vdi" --resize 30720

The output from the command,

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

You can now start up the Virtual Machine. Once connected, open the Disk Management (diskmgmt.msc). If you notice, the new space is still not added and you will see the additional 5GB (Unallocated). So, to merge the additional 5GB, right on C: drive and select Extend Volume.

Disk Management - Extend Volume

The Extend Volume Wizard will prompt out. Click Next.

Extend Volume Wizard - Welcome

Click Next.

Extend Volume Wizard - Select Disks

The disk increment is now complete.

Extend Volume Wizard - Complete

New disk added from My Computer.

Extend Volume Wizard - New Disk

For UNIX and Linux operating system, you can use GParted.

Method 2

This step is also applicable for Fixed storage type.

Clone the existing VDI disk with the below command,

 VBoxManage.exe clonehd "C:\VM\oldVM.vdi" "C:\VM\newVM.vdi"
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: a2be8981-12bf-43ed-a71b-7d688

Next, resize the new VDI.

VBoxManage.exe modifyhd "C:\VM\newVM.vdi" --resize 32000
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Open the VirtualBox Manager, highlight the Virtual Machine and go to Settings > Storage. Locate and choose the newly created VDI file. You can now start the virtual machine.

VirtualBox - Choose a Virtual HDD File

Related posts

VirtualBox: VT-x features locked or unavailable in MSR
View Virtual Machine Log in VirtualBox
How to Clone Virtual Machine in VirtualBox
Cannot register hdd 'xx' {nn} because a hdd 'yy' UUID {nn} already exists
  • Marco

    You, sire, are a genius!

© 2017 ITsiti. All Rights Reserved
Powered by KEEM