Understanding "vboxmanage clonehd" syntax

This is for discussing general topics about how to use VirtualBox.
Locked
cat2005
Posts: 52
Joined: 11. Aug 2009, 03:45
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Linux & Windows
Location: Kansas City, MO

Understanding "vboxmanage clonehd" syntax

Post by cat2005 »

Hi,

I have an XP vdi I would like to clone. I am looking at the 3.0.2 (pages 80 and 118) for instructions. However, I do not full understand the syntax. Are there any "samples" floating around which I could use to help understand it?

This is what page 118 shows:

VBoxManage clonehd <uuid>|<filename> <outputfile>
[--format VDI|VMDK|VHD|RAW|<other>]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--type normal|writethrough|immutable]
[--remember]


So, I assume I would go into terminal and type: VBoxManage clonehd

But then what? The instruction manual really doesn't go into much detail.

I want to fully understand the process before I attempt it, so any input or learning resources would be appreciated.

Thank you.
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: Understanding "vboxmanage clonehd" syntax

Post by MarkCranness »

'|' means either/or, so the VBoxManage clonehd <uuid>|<filename> <outputfile> part could be entered as either:
VBoxManage 1e3a17a7-c01d-4d90-8fe6-9da72556995b New.vdi
or
VBoxManage Old.vdi New.vdi

'[]' means optional, and can be left out.

'<stuff>' means type in the filename or UUID of your choosing : user supplied data, but remove the <> characters.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Understanding "vboxmanage clonehd" syntax

Post by mpack »

cat2005 wrote:However, I do not full understand the syntax
Alternatively, non-masochists could try my CloneVDI tool, which lets you clone using an easy to understand GUI. This tool is designed for Windows hosts, but works on Linux hosts under Wine.
JshWright
Volunteer
Posts: 119
Joined: 13. Sep 2007, 00:33
Primary OS: Debian Lenny
VBox Version: OSE self-compiled
Guest OSses: Many...

Re: Understanding "vboxmanage clonehd" syntax

Post by JshWright »

"non-masochists"? "Wine"?

Really?

;)
Join us in the VirtualBox IRC channel: #vbox on FreeNode
http://www.virtualbox.org/wiki/IRC
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Understanding "vboxmanage clonehd" syntax

Post by mpack »

Well, if you're a Linux user you're a masochist by definition... :D
cat2005
Posts: 52
Joined: 11. Aug 2009, 03:45
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Linux & Windows
Location: Kansas City, MO

Re: Understanding "vboxmanage clonehd" syntax

Post by cat2005 »

mpack wrote:
cat2005 wrote:However, I do not full understand the syntax
Alternatively, non-masochists could try my CloneVDI tool, which lets you clone using an easy to understand GUI. This tool is designed for Windows hosts, but works on Linux hosts under Wine.

Is there a program that will do so natively in Linux? I do not like wine (the software - love the drink!)
Bernd Hohmann
Posts: 22
Joined: 16. Apr 2009, 10:09
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: XP

Re: Understanding "vboxmanage clonehd" syntax

Post by Bernd Hohmann »

cat2005 wrote:I have an XP vdi I would like to clone. I am looking at the 3.0.2 (pages 80 and 118) for instructions. However, I do not full understand the syntax. Are there any "samples" floating around which I could use to help understand it?
Quite simple, but remember either to go into the VDI-Directory or use full pathes when cloning.

cd ~/.VirtualBox/HardDisks
VBoxManage clonehd oldxp.vdi newxp.vdi

or

VBoxManage clonehd ~/.VirtualBox/HardDisks/oldxp.vdi ~/.VirtualBox/HardDisks/newxp.vdi

(assuming you're using Linux).

Then use the GUI to register the disk (File -> virtual media manager - or what ever it reads in the english frontend) and after this create a new VM "XP New" with the same settings of the old VM.

Bernd
cat2005
Posts: 52
Joined: 11. Aug 2009, 03:45
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Linux & Windows
Location: Kansas City, MO

Re: Understanding "vboxmanage clonehd" syntax

Post by cat2005 »

Hmmm....I think I understand. I will try that when I have some free time and post results.

Thank you!
cat2005
Posts: 52
Joined: 11. Aug 2009, 03:45
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Linux & Windows
Location: Kansas City, MO

Re: Understanding "vboxmanage clonehd" syntax

Post by cat2005 »

Ooopppsss.....I forgot to ask:

Before I clone the vdi, should I detach the vdi from its machine? Or is it safe to clone the vdi while still attached to its machine?

Thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Understanding "vboxmanage clonehd" syntax

Post by Perryg »

First you don't need to detach it just make sure that the Guest is shutdown.
If you have snapshots and you detach the drive you will loose the snapshots.
kebabbert
Volunteer
Posts: 321
Joined: 31. May 2008, 10:00
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: WinXP, RedHat, Ubuntu

Re: Understanding "vboxmanage clonehd" syntax

Post by kebabbert »

When I clone a WinXP machine, and I boot the original and the copy, the last booted machine says "error, there is already a duplicate name on the network" or something similar. Both VMs have the same name. How to circumvent this problem?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Understanding "vboxmanage clonehd" syntax

Post by Perryg »

Sound like you need to change the Windows guests name. (start the guest one at a time) Right click on computer then properties and you should see where to change the name. You only need to do this to one.
cSheldon
Posts: 2
Joined: 18. Jan 2014, 05:55

Re: Understanding "vboxmanage clonehd" syntax

Post by cSheldon »

so to clone a vm hd for iso creation i would use : ?

vboxmanage clonehd Fedbox.vdi Fedbox2.vdi --format RAW

then use a iso converter for iso generation?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Understanding "vboxmanage clonehd" syntax

Post by mpack »

A raw hard disk image can't usefully be converted into an ISO, which by definition uses the ISO-9660 filesystem or derivative. You also shouldn't give the target file a ".vdi" extension if it's actually a raw hd image. I would ask why you want to do any of this, but any such discussion would be off-topic in this 5 year old thread. Please start a new topic - and describe what your goal is, rather than your proposed solution.
Locked