Page 1 of 1

[SOLVED] Problems with ModifyHD

Posted: 17. Sep 2011, 19:49
by o1sowise
Before I ask my question, let me just say that VirtualBox is FANTASTIC!!! :D
THANK YOU for such a wonderful, easy, efficient, intuitive product!!! Image

I've just been using VirtualBox for a little over a week. When I set up a VDI for WinXP, I made my C: drive only 10GB. I need to increase that. If I read the documentation correctly, I should be able to do:
vboxmanage modifyhd "VirtualBox VMs/WinXp/WinXP.vdi" --resize 10000
When I do that, I get:
VBoxManage: error: Cannot register the hard disk '/Users/johngreer/VirtualBox VMs/WinXp/WinXP.vdi' {c94d658a-550e-4a42-803e-2b558aabcc9f} because a hard disk '/Users/johngreer/VirtualBox VMs/WinXP/WinXP.vdi' with UUID {c94d658a-550e-4a42-803e-2b558aabcc9f} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox, callee nsISupports
Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 210 of file VBoxManageDisk.cpp
What am I doing wrong? How can I increase the virtual disk size?

Re: Problems with ModifyHD

Posted: 17. Sep 2011, 21:14
by Perryg
The number you are giving is the exact size of what you have
If you want to increase it to 20GB then use 20000 (actually it would be 20480)
Do backup (copy the main VDI) and if this has snapshots you can not increase the base image. You would need to increase the differencing disk instead.

Re: Problems with ModifyHD

Posted: 17. Sep 2011, 21:17
by o1sowise
Perryg wrote:The number you are giving is the exact size of what you have
If you want to increase it to 20GB then use 20000 (actually it would be 20480)
Right you are! :oops:

I just tried:
vboxmanage modifyhd "VirtualBox VMs/WinXp/WinXP.vdi" --resize 102400
and got:
VBoxManage: error: Cannot register the hard disk '/Users/johngreer/VirtualBox VMs/WinXp/WinXP.vdi' {c94d658a-550e-4a42-803e-2b558aabcc9f} because a hard disk '/Users/johngreer/VirtualBox VMs/WinXP/WinXP.vdi' with UUID {c94d658a-550e-4a42-803e-2b558aabcc9f} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox, callee nsISupports
Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 210 of file VBoxManageDisk.cpp
Also
Perryg wrote: Do backup (copy the main VDI) and if this has snapshots you can not increase the base image. You would need to increase the differencing disk instead.
I no longer have any snapshots. Thanks!

Re: Problems with ModifyHD

Posted: 17. Sep 2011, 21:26
by o1sowise
:idea: SUCCESS! :idea:

If I use the UUID and not the filename:
vboxmanage modifyhd c94d658a-550e-4a42-803e-2b558aabcc9f --resize 102400
it worked!

Now I have the C: drive at 10GB and another 90GB empty partition next to it.
I'm going to CLONE the VDI, install PartitionMagic and if I can expand the 10GB into the full 100GB.