How to use VBoxManage?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
chuckbo
Posts: 9
Joined: 18. Jun 2009, 17:26
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Windows Vista

How to use VBoxManage?

Post by chuckbo »

I'm trying to clone an image of Vista so I can load some software to test on that image and not have to worry about it messing up my real version.

I found in the manual that says I have to use the VBoxManage command. I searched on this forum and found VBoxManage in the VirtualBox package (actually, I found 3 of them). But I'm not sure what to do next. In terminal, I gave it the command vboxmanage clonehd "vista - clean.vdi" TestVista.vdi

But I'm confused by the error message
ERROR: Cannot register the hard disk '/Users/Main/Windows/vista - clean.vdi' with UUID {076ded28-9a5e-474e-ba72-44a6fa4a92e0} because a hard disk '/Users/Main/Windows/vista - clean.vdi' with UUID {076ded28-9a5e-474e-ba72-44a6fa4a92e0} already exists in the media registry ('/Users/Main/Library/VirtualBox/VirtualBox.xml')
Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox, callee nsISupports
Context: "OpenHardDisk(Bstr(szFilenameAbs), AccessMode_ReadWrite, srcDisk.asOutParam())" at line 603 of file VBoxManageDisk.cpp


Any idea where I got offtrack?
Did I misread the format: vboxmanage clonehd <sourcefile> <newfile>
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to use VBoxManage?

Post by Perryg »

What version of VirtualBox are you using?
If it is new enough you can in fact export the image in the VBox GUI (which does create a new ID) and then import it back in using the import function. For me the CLI will not work unless I totally close the VM and the VBox program. Complains about the virtualbox.xml file being used and throws a protection error.
chuckbo
Posts: 9
Joined: 18. Jun 2009, 17:26
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Windows Vista

Re: How to use VBoxManage?

Post by chuckbo »

Perryg,
thanks for the help & advice. I was able to successfully export and import into a second machine.
What I had lots of trouble with and finally gave up on was trying to reconnect to my shared drive. I think I figured out that I can't have two virtual machines with the same shared drive -- which really makes it hard for me, but maybe they'll work around that limitation in a future release.
Thanks again.
Chuck
maxvb
Posts: 1
Joined: 14. Nov 2010, 08:22
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: win XP

Re: How to use VBoxManage?

Post by maxvb »

Hello everybody.

I know it is an old post, but I had the same problem and find a solution via vboxmanage :

you must use complete path of the source and destination :
BAD : vboxmanage clonehd virtu_source.vdi virtu_dest.vdi
GOOD : vboxmanage clonehd E:\vbox_rep\virtu_source.vdi E:\vbox_rep\virtu_dest.vdi

thanks to :
http://muffinresearch.co.uk/archives/20 ... -hard-disk
Post Reply