Cannot resize or clone hard disk

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Baxio
Posts: 3
Joined: 28. Apr 2020, 11:41

Cannot resize or clone hard disk

Post 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
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Cannot resize or clone hard disk

Post 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.
Baxio
Posts: 3
Joined: 28. Apr 2020, 11:41

Re: Cannot resize or clone hard disk

Post 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!
Baxio
Posts: 3
Joined: 28. Apr 2020, 11:41

Re: Cannot resize or clone hard disk

Post 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!
Post Reply