VBoxManage clonehd fails

Discussions related to using VirtualBox on Windows hosts.

VBoxManage clonehd fails

Postby JustSomeUser » 22. Apr 2009, 21:49

Code: Select all   Expand viewCollapse view
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)
Code: Select all   Expand viewCollapse view
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.
JustSomeUser
 
Posts: 10
Joined: 8. Feb 2009, 21:07

Re: VBoxManage clonehd fails

Postby Sasquatch » 22. Apr 2009, 22:12

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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: VBoxManage clonehd fails

Postby JustSomeUser » 23. Apr 2009, 12:56

Code: Select all   Expand viewCollapse view
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.
JustSomeUser
 
Posts: 10
Joined: 8. Feb 2009, 21:07

Re: VBoxManage clonehd fails

Postby vbox4me2 » 23. Apr 2009, 14:44

Can you actually write to K: ? Try -format (1 dash).
vbox4me2
Volunteer
 
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam

Re: VBoxManage clonehd fails

Postby JustSomeUser » 23. Apr 2009, 19:20

Code: Select all   Expand viewCollapse view
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.
JustSomeUser
 
Posts: 10
Joined: 8. Feb 2009, 21:07

Re: VBoxManage clonehd fails

Postby JustSomeUser » 25. Apr 2009, 20:31

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.
JustSomeUser
 
Posts: 10
Joined: 8. Feb 2009, 21:07

Re: VBoxManage clonehd fails

Postby gcstang » 7. Dec 2009, 15:20

Looks like with 3.1 this is failing again?

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.

Windows 7 Pro 64bit
gcstang
 
Posts: 28
Joined: 17. Jan 2008, 15:11

Re: VBoxManage clonehd fails

Postby MarkCranness » 8. Dec 2009, 10:13

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

Command 2:
D:\VirtualMachines\Fedora12_x64\Fedora12x64New.vdi

... neither of which are valid.
MarkCranness
Volunteer
 
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: VBoxManage clonehd fails

Postby mpack » 8. Dec 2009, 11:47

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.
mpack
Site Moderator
 
Posts: 28164
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VBoxManage clonehd fails

Postby gcstang » 8. Dec 2009, 15:25

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.
gcstang
 
Posts: 28
Joined: 17. Jan 2008, 15:11

Re: VBoxManage clonehd fails

Postby mpack » 8. Dec 2009, 16:01

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.
mpack
Site Moderator
 
Posts: 28164
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VBoxManage clonehd fails

Postby MarkCranness » 8. Dec 2009, 22:45

VirtualBox may need the parameters in same order as the manual says, so try:
VBoxManage.exe clonehd D:\VirtualMachines\Fedora12_x64\Fedora12x64.vmdk D:\VirtualMachines\Fedora12_x64\Fedora12x64New.vdi --format VDI

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.
MarkCranness
Volunteer
 
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: VBoxManage clonehd fails

Postby wwilliam » 13. Jun 2010, 07:50

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.
wwilliam
 
Posts: 1
Joined: 13. Jun 2010, 07:45
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP

Re: VBoxManage clonehd fails

Postby mpack » 13. Jun 2010, 11:34

wwilliam wrote:Your source virtual disk is damaged

No, that was not his problem. That produces a very different error message.
mpack
Site Moderator
 
Posts: 28164
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 57 guests