2
votes

I have been trying to convert the Dynamically sized hard drive to a fixed size to increase the VM box performance. I tried to follow the instruction on Convert Dynamically Sized VirtualBox VDI Hard Drive to Fixed Size

But I keep running into an issue when trying to manually remove the old drive Here is the command that I am trying to use

vboxmanage closemedium disk "3f883a9e-037a-4f67-8ed4-f82ea2c7a84b" –delete

Which gives me this error

c:\Program Files\Oracle\VirtualBox>vboxmanage closemedium disk "3f883a9e-037a-4f 67-8ed4-f82ea2c7a84b" VBoxManage.exe: error: Medium 'C:\Users\malhayek\VirtualBox VMs\settler_default_ 1434987271004_24349_1438813340021_48330\box-disk1.vmdk' cannot be closed because it is still attached to 1 virtual machines VBoxManage.exe: error: Details: code VBOX_E_OBJECT_IN_USE (0x80bb000c), componen t MediumWrap, interface IMedium, callee IUnknown VBoxManage.exe: error: Context: "Close()" at line 1551 of file VBoxManageDisk.cpp

What can I do to correctly set the hard drive size to Fixed?

1
Did you turn the VM off before removing the drive?BrokenBinary

1 Answers

1
votes

You need to remove-detach it from the virtual machine before you can convert it then attach the newly created one.

The conversion occurs as part of a copy so you would want to detach it anyway.

In the latest VirtualBox (5.0.20 ->) you can do this from the File>>Virtual Media Manager which makes things a bit easier.