Page 1 of 1

Problem with clonehd and absolute paths in mac terminal

Posted: 22. Nov 2015, 09:19
by oneK
I am trying to clone my current windows 7 VM, which is a fixed drive, in order to convert it to a variable size drive which I can then expand.

As the clone GUI command doesn't allow you to clone a drive and change the disk type, I am attempting to do this via the mac terminal using VboxManage clonehd using:

VboxManage clonehd '/Volumes/ELEMENTS/VirtualBox\ VMs/Windows\ 7/Windows\ 7.vdi' '/Volumes/ELEMENTS/VirtualBox\ VMs/Windows\ 7\ clone/Windows\ 7\ clone.vdi' --variant Standard

The problem is I keep getting the "VERR_FILE_NOT_FOUND", despite multiple attempts to get the file path correct. I have:
1)Dragged the file into the terminal window
2)Used single quotes (') and double quotes ('')
3)Used and removed the leading backslash that mac uses prior to spaces:
4)Used cd to navigate to the folder where the .vdi is located and run VboxManage from that directory.

More info:
latest version of virtual box
El capitan on MacAir
VM located on external HD

I know I must be missing something really simple but I have searched for hours in this forum and hope someone out there can be of assistance.

Many thanks,

Re: Problem with clonehd and absolute paths in mac terminal

Posted: 23. Nov 2015, 20:50
by socratis
Number 1 is the proper way to do it if you're not familiar (or you're simply lazy, like me). The single quotes and the double quotes do not need the backslashes. Copy and paste the exact output from the terminal, especially the error. Use the "code" or "pre" tags instead of italic, it makes it easier to read ;). Example:

Code: Select all

SGK-MB2300:~ socratis$ VBoxManage clonehd /Users/Shared/VirtualBox/Original.vdi /Users/Shared/VirtualBox/Clone\ of\ original.vdi  
VBoxManage: error: Could not find file for the medium '/Users/Shared/VirtualBox/Original.vdi' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
SGK-MB2300:~ socratis$