C:\Program Files\Sun\xVM VirtualBox>VBoxManage clonehd K:\tmp\000.vhd K:\tmp\001
.vhd
VirtualBox Command Line Management Interface Version 2.2.0
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
0%...FAILED
Error: failed to clone hard disk. Error message: Could not create the clone hard
disk 'K:\tmp\001.vhd' (VERR_INVALID_PARAMETER)
C:\Program Files\Sun\xVM VirtualBox>VBoxManage clonehd K:\tmp\000.vhd K:\tmp\001
.vdi --format vdi
VirtualBox Command Line Management Interface Version 2.2.0
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
0%...FAILED
Error: failed to clone hard disk. Error message: Could not create the clone hard
disk 'K:\tmp\001.vdi' (VERR_INVALID_PARAMETER)
Why can't I clone a VHD file with VBoxManage?
I'm running XP64 SP2.
Truly, if there is evil in this world, it lies within the heart of mankind.
INVALID_PARAMETER means that you forgot a parameter. As it's clonehd and no longer clonevdi, you have to state which format the destination will be. It's in the manual, Chapter 8, VBoxManage reference, and as the help output if you just run VBoxManage. Either end it with, or put between the file names, --format VDI.
C:\Program Files\Sun\xVM VirtualBox>VBoxManage.exe clonehd --format VDI K:\tmp\0
00.vhd K:\tmp\000.vdi
VirtualBox Command Line Management Interface Version 2.2.0
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
0%...FAILED
Error: failed to clone hard disk. Error message: Could not create the clone hard
disk 'K:\tmp\000.vdi' (VERR_INVALID_PARAMETER)
It does not matter where I put --format VDI it just won't work and I also had a look at 8.16 of the manual.
Truly, if there is evil in this world, it lies within the heart of mankind.
C:\Program Files\Sun\xVM VirtualBox>VBoxManage.exe clonehd --format vdi K:\tmp\R
eactOS-0.3.8-VMware\ReactOS.vmdk K:\tmp\ReactOS-0.3.8-VMware\ReactOS.vdi
VirtualBox Command Line Management Interface Version 2.2.0
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'vdi'. UUID: 406119f0-4cf0-4a9d-9c1d-b4274a743
926
I have tried to clone a vmware ReactOS HDD with no problems but the VHD files just won't convert
adding them to VBox and booting is no problem.
Truly, if there is evil in this world, it lies within the heart of mankind.
I have now cloned the VHDs with a linux live cd and dd but I still don't know why it was not possible to clone them with VBoxManage although VBox could boot them.
This can be easily reproduced just create a new dynamic VHD with VirtualPc 2007 (or try this one new_vhd.zip (<1kb)) and try to clone it with VBoxManage then you will get the same error as I got. I have tested it on XP64 and ubuntu 8.10 x64.
Truly, if there is evil in this world, it lies within the heart of mankind.
Commandline:
VBoxManage.exe clonehd -format vdi D:\VirtualMachines\Fedora12_x64\Fedora12x64.vmdk D:\VirtualMachines\Fedora12_x64\Fedora12x64New.vdi
I get this error:
Syntax error: Mandatory output file parameter missing
'D:\VirtualMachines\Fedora12_x64\Fedora12x64New.vdi' is not recognized as an internal or external command, operable program or batch file.
Paste your command into notepad and make sure there is no newline between the vmdk and the vdi parameters.
Because of how you are creating the command, it has been split into two separate commands:
Command 1:
VBoxManage.exe clonehd -format vdi D:\VirtualMachines\Fedora12_x64\Fedora12x64.vmdk
Also, there should be two minus signs in front of the format argument, i.e. "--format". Oh, and put the word "VDI" in upper case. I've not checked that the latter is required, but it's best to do exactly what the user manual tells you.
Not sure how you got it in two sep lines, I am editing it in Notepad and it's all on one line.
(I've been using Notepad the whole time to modify this bat file I created and I've also tried pasting the command to the command line to run it directly)
I've also tried with --format vs. -format
and vdi vs. VDI
I get the same error no matter what I've tried.
Incidentally, the message "xxx is not recognized as an internal or external command, operable program or batch file" is an error message from the command prompt, not VirtualBox, and could only happen if you typed the unrecognized command "xxx" at the command prompt. In your case "xxx" was the destination filename, hence Mark's (IMHO completely correct) assumption that you must have typed this on a separate line. Notice you actually got two errors, one from VBox complaining that the output filename was missing, the second from the command prompt complaining that <output filename> is not a recognized command.
Your original error message (invalid parameter) comes from VBoxManage, and is due to the missing "--format VDI" argument.
If you still can't get this right then please show us your command again.
gcstang wrote:I am editing it in Notepad and it's all on one line.
I should have remembered: Sometimes I've had notepad insert newlines at the Word Wrap point, and turn one line into two. I tried just now and couldn't reproduce it, but it has happened to me.
Your source virtual disk is damaged. This happened with me and I solve choosing another source disk to clone. Dont use clodevdi, you may use clonehd in vboxmanage
I'm posting this only for future references.