Page 1 of 1

Cannot resize or clone hard disk

Posted: 28. Apr 2020, 18:07
by Baxio
Hi,

I have a .VDI disk on a VM that I need to extend. I have tried to do this in the GUI and VBox manager but I get the error VBOX_E_NOT_SUPPORTED

Apparently this is because it is a fixed disk, and this is not supported. The workaround is to clone the disk (which will be dynamic be default) then attach it and expand it. But I get errors when trying to do that too :evil:

Using Vbox manager and the syntax

Code: Select all

VBoxManage clonehd “C:\Backup\WorkVM\WorkVM.vdi” “C:\VMs\CloneWorkVM.vdi”
However, I get the following error:

Code: Select all

Syntax error: Invalid parameter '"C:\VMs\CloneWorkVM.vdi"'

C:\Program Files\Oracle\VirtualBox>VBoxManage clonehd "C:\Backup\WorkVM\WorkVM.v
di" "C:\VMs\CloneWorkVM.vdi"
VBoxManage.exe: error: Could not get the storage format of the medium 'C:\Progra
m Files\Oracle\VirtualBox\"C:\Backup\WorkVM\WorkVM.vdi"' (VERR_INVALID_NAME)
VBoxManage.exe: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component M
ediumWrap, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDe
vType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 191 of
 file VBoxManageDisk.cpp
I am unsure what this means, I would be grateful for help

Running virtual box 6.1.6 on Windows 8 64 bit host

Thanks,

Dan

Re: Cannot resize or clone hard disk

Posted: 29. Apr 2020, 01:03
by scottgus1
'clonehd' is an old deprecated command. The new command is 'vboxmanage clonemedium'. Try that.
Baxio wrote:“C:\Backup\WorkVM\WorkVM.vdi” “C:\VMs\CloneWorkVM.vdi”
Looks like you are using open and close quotes, which are special characters as opposed to typical double-quotes ".

You could also try Mpack's CloneVDI.

Re: Cannot resize or clone hard disk

Posted: 30. Apr 2020, 09:43
by Baxio
When I run

Code: Select all

VBoxManage clonemedium "C:\Backup\WorkVM\WorkVM.vdi" "C:\VMs\CloneWorkVM.vdi"
I get the error

Code: Select all

VM.vdi" "C:\VMs\CloneWorkVM.vdi"
VBoxManage.exe: error: Cannot register the hard disk 'C:\Backup\WorkVM\WorkVM.vd
i' {6d580e59-eb6f-412d-b832-0c611db29125} because a hard disk 'C:\VMs\Work VM\Wo
rkVM\WorkVM.vdi' with UUID {6d580e59-eb6f-412d-b832-0c611db29125} already exists

VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component Virtua
lBoxWrap, interface IVirtualBox, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDe
vType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 191 of
 file VBoxManageDisk.cpp
That makes no sense. Of course the hard disk already exists, that's the one it's meant to be copying!

Re: Cannot resize or clone hard disk

Posted: 30. Apr 2020, 11:14
by Baxio
scottgus1 wrote:You could also try Mpack's CloneVDI.
This, however worked!

It threw up an error on first boot but working fine now! Thank you so much! This should be included in virtual box by default as it actually works!