Cloning a hd with VBoxManage

This is for discussing general topics about how to use VirtualBox.
Post Reply
smt3mm
Posts: 2
Joined: 14. Jun 2009, 14:13
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, UBuntu

Cloning a hd with VBoxManage

Post by smt3mm »

Guys

I'm having trouble cloning an image. The way I want to use virtual box is to have several images based on the same base (XP in this case) I'm running virtual Box on Vista. According to the documentation I need to run vBoxManage clonehd <file1> <file2>

However I find myself having to type the following command which in itself seems excessive

vBoxManage clonehd "\Documents and Settings\Stuart\.VirtualBox\HardDisks\XP Base.vdi" "\Documents and Settings\.VirtualBox\HardDisks\New.vdi"

The error I get is "Cannot register the hard disk "...XP Base" because a hard disk "...XP Base" already exists in the media registry

Any ideas what I am doing wrong?

Thanks

Stuart
eFloh
Posts: 45
Joined: 18. Jan 2009, 17:42
Primary OS: MS Windows Vista
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Debian Linux, LiveCd-Tests

Re: Cloning a hd with VBoxManage

Post by eFloh »

You are totally right with your command. after the cloning, you can add the "New.vdi" file, not the old one unsing the media manager.
Have a look at http://www.die-rooter.de/ITworks/archiv ... neVDI.html for a GUI application to clone your VDIs...
smt3mm
Posts: 2
Joined: 14. Jun 2009, 14:13
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, UBuntu

Re: Cloning a hd with VBoxManage

Post by smt3mm »

I actually managed it this morning. I typed the same command and it worked. I think it had something to do with using 'Documents and Settings' rather than 'users' but can't be sure. After that, I worked out that using the --remember option made it all work pretty seamlessly. I them created a whole new VM with the cloned image. I'll have a look at that app and thanks for the help.

Regards

Stuart
Post Reply