Hi,
I'm trying to convert a virtual box VM to vmware fusion.
So I read that I must use the VBoxManage utility. When I enter this:
VBoxManage clonehd --format VMDK /Volumes/Data/V11/v11_drive_c.vdi /Volumes/GoFlex_HFS/v11.vmdk
I get this error:
VBoxManage: error: Cannot register the hard disk '/Volumes/Data/V11/v11_drive_c.vdi' {78480d09-3487-44b6-83c7-62c408fd90c5} because a hard disk '/Volumes/Data/Siebel 8.1.1 Demo Platform v11/v11_drive_c.vdi' with UUID {78480d09-3487-44b6-83c7-62c408fd90c5} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
mbpro:vbox MatUser$ VBoxManage clonehd --format VMDK /Volumes/Data/V11/v11_drive_c.vdi /Volumes/GoFlex_HFS/v11.vmdk
that's a rather strange message, of course the v11_drive_c.vdi already exist, but I'm converting it here.
Can anyone help me?
BigMat
NS_ERROR_INVALID_ARG when converting from vdi to vmdk
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: NS_ERROR_INVALID_ARG when converting from vdi to vmdk
I would try putting the "--format VMDK" bit after the filenames, like it shows in the syntax spec. Also I would wrap the filenames in quotes just to be safe.
-
- Site Moderator
- Posts: 5229
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: NS_ERROR_INVALID_ARG when converting from vdi to vmdk
The disk was registred at some point in Virtualbox, then you renamed the directory without informing Virtualbox about it, so it still thinks the harddisk is where it shouldn't be, and it triggers an error about trying to open a disk that already exists.
Slightly ill-placed check (that check shouldn't be there really...) but is in line with the Virtualbox inner workings.
What is relevant is we just need to make Virtualbox forget about the old location, then run the command.
Run the following command (it might complain, but still work), then your command again, and it should work :
Slightly ill-placed check (that check shouldn't be there really...) but is in line with the Virtualbox inner workings.
What is relevant is we just need to make Virtualbox forget about the old location, then run the command.
Run the following command (it might complain, but still work), then your command again, and it should work :
Code: Select all
vboxmanage closemedium disk 78480d09-3487-44b6-83c7-62c408fd90c5
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
Re: NS_ERROR_INVALID_ARG when converting from vdi to vmdk
Hi, thank you both for the reply. I think both answers helps to resolve the issue.
I have indeed renamed the folder where the source vdi was located because that folder name contained space
I put back the original name and then use the double quote to wrap the path/file name and it seems to work now as I see some % numbers (0%...10%...)
the correct path/syntax has to be:
VBoxManage clonehd --format VMDK "/Volumes/Data/Siebel 8.1.1 Demo Platform v11/v11_drive_c.vdi" "/Volumes/GoFlex_HFS/v11.vmdk"
I have indeed renamed the folder where the source vdi was located because that folder name contained space
I put back the original name and then use the double quote to wrap the path/file name and it seems to work now as I see some % numbers (0%...10%...)
the correct path/syntax has to be:
VBoxManage clonehd --format VMDK "/Volumes/Data/Siebel 8.1.1 Demo Platform v11/v11_drive_c.vdi" "/Volumes/GoFlex_HFS/v11.vmdk"
-
- Posts: 9
- Joined: 1. Jan 2011, 06:50
- Primary OS: MS Windows 7
- VBox Version: OSE other
- Guest OSses: FreeBSD, Arch, BackTrack, WeakNet, CentOS
Re: NS_ERROR_INVALID_ARG when converting from vdi to vmdk
Super old post, but ran into this problem today running Windows Virtualbox with mounted VDIs over samba.
These are some of the things that didn't work and the one thing that did:
- Converting VDI to VMDK via the mounted smb share: Did not work
- Converting VDI to VMDK via the mounted smb share in elevated console: Did not work
- Converting VDI to VMDK via locally copied VDI to local VMDK: Did not work
+ Converting VDI to VMDK via locally copied VDI to local VMDK in elevated console: WORKED
For reference, here are some error messages that were ran into during this testing.
Error message when converting directly from and to smb mount:
Error message when converting with an elevated console directly from and to the smb mount (this I expected to fail because the elevated console wouldn't see the mount points):
The successful attempt on converting the VDI to VMDK:
These are some of the things that didn't work and the one thing that did:
- Converting VDI to VMDK via the mounted smb share: Did not work
- Converting VDI to VMDK via the mounted smb share in elevated console: Did not work
- Converting VDI to VMDK via locally copied VDI to local VMDK: Did not work
+ Converting VDI to VMDK via locally copied VDI to local VMDK in elevated console: WORKED
For reference, here are some error messages that were ran into during this testing.
Error message when converting directly from and to smb mount:
Code: Select all
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonehd C:\Users\user\Download
s\SSH.vdi C:\Users\user\Downloads\SSH.vmdk --format VMDK
VBoxManage.exe: error: Cannot register the hard disk 'C:\Users\user\Downloads\SS
H.vdi' {e4f5d896-a7b5-48f3-b1e7-349383bd14c7} because a hard disk 'V:\SSH
\SSH.vdi' with UUID {e4f5d896-a7b5-48f3-b1e7-349383bd14c7} already exists
VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component Virtua
lBox, interface IVirtualBox, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDe
vType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of
file VBoxManageDisk.cpp
Error message when converting with an elevated console directly from and to the smb mount (this I expected to fail because the elevated console wouldn't see the mount points):
Code: Select all
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonehd V:\SSH.vdi V:\SSH.vmdk
--format VMDK
VBoxManage.exe: error: Could not find file for the medium 'V:\SSH.vdi' (VERR_PAT
H_NOT_FOUND)
VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component M
edium, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDe
vType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of
file VBoxManageDisk.cpp
Code: Select all
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonehd C:\Users\user\Download
s\SSH.vdi C:\Users\user\Downloads\SSH.vmdk --format VMDK
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VMDK'. UUID: 047bdc5d-65ca-4975-bc0f-ca8cba3b
cb6b
Re: NS_ERROR_INVALID_ARG when converting from vdi to vmdk
noteirak wrote:The disk was registred at some point in Virtualbox, then you renamed the directory without informing Virtualbox about it, so it still thinks the harddisk is where it shouldn't be, and it triggers an error about trying to open a disk that already exists.
Slightly ill-placed check (that check shouldn't be there really...) but is in line with the Virtualbox inner workings.
What is relevant is we just need to make Virtualbox forget about the old location, then run the command.
Run the following command (it might complain, but still work), then your command again, and it should work :Code: Select all
vboxmanage closemedium disk 78480d09-3487-44b6-83c7-62c408fd90c5
This works indeed , many many thanks for you valuable hint !!
Yves Haegeman
Last edited by noteirak on 26. Aug 2015, 17:07, edited 1 time in total.
Reason: Mod edit: Removed e-mail address to avoid spammers feasting on it.
Reason: Mod edit: Removed e-mail address to avoid spammers feasting on it.