Long time VirtualBox users will know that VirtualBox doesn’t support resizing virtual hard drive via its settings. In one of our earlier posts, we discussed how to increase VirtualBox’s disk size in Windows using Command Prompt. The method is useful if your virtual hard drive is running out of space.
While trying to resize VirtualBox’s disk size via Command Prompt, you might get “Resize hard disk operation for this format is not implemented yet!” error. It turns out that the error appears if the installed version of VirtualBox doesn’t support resizing feature (version 4.0 and above support this feature), or if the VirtualBox’s disk size is fixed (fixed size virtual hard drive).
If you’re getting “Resize hard disk operation for this format is not implemented yet!” error in the latest version of VirtualBox or if the error is appearing even after upgrading to the newest version, you can follow the given below instructions to quickly increase the size of VirtualBox’s disk using Command Prompt.
The guide helps you create a clone of the existing virtual hard drive via Command Prompt, increase the size of the clone drive, and then attach the newly created virtual hard to your virtual machine. When you clone a virtual hard drive using the command line tool, it creates dynamically allocated virtual hard drive, meaning, you can easily increase the size virtual hard drive without any errors.
Step 1: Figure out the exact location of VirtualBox’s virtual hard drive and make sure that the drive where VirtualBox’s virtual hard drive is located has enough free space to create clone of the drive.
For instance, if the current size of virtual hard drive located in “D” drive is 20 GB and you would like to expand it to 30 GB, then you must have at least 30 GB free space (20 GB to create clone drive and another 10 GB to increase the size to 30 GB) on your “D” drive.
Step 2: Open Command Prompt. To do this you can type CMD in Start menu search box or Start screen and press Enter key (you don’t need to open elevated prompt). Command Prompt can also be launched by typing CMD in Run dialog box (use Windows logo + R to open Run dialog) and pressing Enter key.
Step 3: In the Command Prompt, type the following command and press Enter key:
cd C:\Program Files\Oracle\VirtualBox
In the above command, replace “C” with the drive letter of your Windows drive.
Step 4: Enter the following command and press Enter key to create a clone of your existing virtual hard drive:
vboxmanage clonehd “PathAndName.vdi” “PathAndNameofNewDrive.vdi”
For instance, if the old drive titled Windows 7.vdi is located in S:\VirtualBox and you wish create the clone of the drive in the same location, you need to enter the following command:
vboxmanage clonehd “S:\VirtualBox\Windows 7.vdi” “S:\VirtualBox\Windows 7 Clone.vdi”
Step 5: Now that you have created a dynamically allocated virtual hard drive, enter the following command to increase its current size without any errors:
vboxmanage modifyhd –resize sizeinmbs “pathandname”
(Note that there are two hyphens before resize)
For example, if the newly created Windows 7 Clone.vdi is located in S:\VirtualBox, and you would like to expand its size to ~19 GB, then you need to enter the following command:
vboxmanage modifyhd –resize 19000 “S:\VirtualBox\Windows 7 Clone.vdi”
Once you have increased the size of virtual hard drive, you will need to remove the old drive and attach the new one by following the next two steps.
Step 6: Run VirtualBox. Select the virtual machine, click Settings, switch to the Storage tab, select Controller: SATA/IDE (see picture), click on the plus icon (Add Hard Drive option), click Choose existing disk button to browse to the new hard drive and click Open button to add the drive.
Step 7: Finally, click on the old drive, click Remove attachment to remove the virtual hard drive. Run your virtual machine before permanently deleting the old virtual hard drive just to make sure that everything is working fine. Good luck!
How to share folders between VirtualBox and Windows host machine guide might also interest you.
elgina says
As ripper234 said in
https://askubuntu.com/questions/539924/why-cant-i-resize-a-dynamic-vdi-with-modifyhd-command
This workaround also worked for me:
Shutdown the machine
Create a new drive via the admin interface with the size you want
Use VBoxManage clonemedium with the –existing flag
VBoxManage clonemedium –existing
Alan Wang says
It doesn’t seem to work anymore with VirtualBox 5.2. Even the cloned file throws the same error:
C:\Program Files\Oracle\VirtualBox>vboxmanage clonehd “E:\ubuntu16\Alan.vdi” “E:\ubuntu16\Alan_clone.vdi”
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Clone medium created in format ‘VDI’. UUID: 2ea96aad-441a-42b8-bdc2-5564a5fcf06c
C:\Program Files\Oracle\VirtualBox>vboxmanage modifyhd –resize 19000 “E:\ubuntu16\Alan_clone.vdi”
0%…
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Resize medium operation for this format is not implemented yet!
C:\Program Files\Oracle\VirtualBox>vboxmanage modifyhd “E:\ubuntu16\Alan_clone.
vdi” –resize 19000
0%…
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Resize medium operation for this format is not implemented yet!
steve says
worked like champ on my test bench before putting it to production system
Samuel Nittala says
The best guide to increase the VM size. I browsed a lot other and found them to be very complicated and gave up.
Tried increasing my Ubuntu VM and it worked perfectly
Lucky says
Well, didn’t work for me. I’m on VirtualBox 5.2.8 and even the clone kept throwing the same error.
Sven says
You made my day. Great thing to clone and then resize the partition.
Thx a lot.
Sven
fling says
thanks a lot,work for WIN10 VBOX5.2
when i create a fix medium disk ,so i have to change it to dynamic and resize the volume.
Me says
Doesn’t seem to work anymore with VirtualBox 5.2. Even the cloned file throws the same error:
PS C:\Users\me\.vagrant.d\boxes\v0rtex-VAGRANTSLASH-xenial64\20161121.0.0\virtualbox> & ‘C:\Program Files\Oracle\VirtualBox\VBoxManage.exe’ clonehd .\box-disk1.vdi box-clone1.vdi
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Clone medium created in format ‘VMDK’. UUID: 49811696-dadc-492d-bc94-b403d2c2e0eb
— Relative path:
PS C:\Users\me\.vagrant.d\boxes\v0rtex-VAGRANTSLASH-xenial64\20161121.0.0\virtualbox> & ‘C:\Program Files\Oracle\VirtualBox\VBoxManage.exe’ modifyhd –resize 100000 .\box-clone1.vdi
0%…
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Resize medium operation for this format is not implemented yet!
— Absolute path:
PS C:\Users\me\.vagrant.d\boxes\v0rtex-VAGRANTSLASH-xenial64\20161121.0.0\virtualbox> & ‘C:\Program Files\Oracle\VirtualBox\VBoxManage.exe’ modifyhd –resize 100000 ‘C:\Users\me\.vagrant.d\boxes\v0rtex-VAGRANTSLASH-xenial64\20161121.0.0\virtualbox\box-clone1.vdi’
0%…
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Resize medium operation for this format is not implemented yet!
Brody says
Thank you so much! It’s so simple after the fact, but I’ve been wrestling with errors trying to resize a fixed HD in virtualbox. This is the only thing that worked.
Marco says
You, sir, are a genius!