Page 2 of 3

Re: Change uuid of harddrive

Posted: 24. Aug 2010, 21:49
by frank
Ok, sorry, the command I posted works only with the current trunk version. For VBox 3.2.8 this will not work so you have to copy the .vdi file as plain file just as suggested above.

Re: Found an undocumented command.

Posted: 8. Sep 2010, 14:03
by mastapat11
tadak wrote:I am sure you have went passed this issue, but just in case other people may need it.

To set a UUID of a hard drive run this

VBoxManage internalcommands setvdiuuid disk2.vdi

Have a good one
Anybody know why "VBoxManage --help" doesn't show the "internalcommands" list??
thanks for this solution btw, it worked great!

Re: Change uuid of harddrive

Posted: 8. Sep 2010, 22:09
by Sasquatch
Because it's an undocumented parameter and some options can be dangerous. They aren't tested thoroughly either AFAIK. Anyways, undocumented.

Re: Change uuid of harddrive

Posted: 9. Sep 2010, 03:10
by mastapat11
Sasquatch wrote:Because it's an undocumented parameter and some options can be dangerous. They aren't tested thoroughly either AFAIK. Anyways, undocumented.
Ok, that makes sense. But how would 1 go about finding out further info on those undocumented parameters? someone somewhere has to have some documentation on it (even if its not officially supported by oracle). thanks.

Re: Change uuid of harddrive

Posted: 9. Sep 2010, 19:57
by Sasquatch
We either stumble upon them, hear from them from a dev here on the forums or in the bug tracker. You can also learn about the parameters if you download the source code and check the VBoxManage sources.

Re: Change uuid of harddrive

Posted: 9. Sep 2010, 22:09
by mpack
Bear in mind also that undocumented does not simply mean "not written down". In software it can also mean that there is no promise that this feature will not change radically (in a not backwards compatible sense) or even disappear altogether in a future release. In some cases however the feature is so widely known that it would be surprising if it was removed (e.g. "internalcommands sethduuid").

Re: Change uuid of harddrive

Posted: 24. Sep 2010, 04:21
by StefQube
1- Hi demosthenesk,
>>> VBoxManage internalcommands sethduuid WindowsXPHome2.vdi
Really changes the UUID of your "WindowsXPHome2.vdi" vHDD -- from command prompt.

I do not give a UUID with the command ! --As tadak posted on 12. Jun 2008.-- ( & ...I use linux-Ubuntu_10.04-vBow 3-1-6-OSE-r59338)
(...and I also got: "Syntax error..." writing the command the way you did in your 24. Aug 2010 post following the cue from Frank Mehnert as posted 24. Aug 2010. -- well, he also knows his command works only for ?? Trunk..., VBox Version: PUEL...? This goes way over my head. :shock:


2- Documentation -- from command line -- is given by entering:
>>> VBoxManage internalcommands
...for some newbies like me ( and maybe mastapat11, his post was 8. Sep 2010 )
...It gives "Usage" information, more simple, yet less complete than "...and check the VBoxManage sources" !!! from Sasquatch post of 9. Sep 2010.

Re: Change uuid of harddrive

Posted: 26. Sep 2010, 13:49
by Sasquatch
StefQube wrote:well, he also knows his command works only for ?? Trunk..., VBox Version: PUEL...? This goes way over my head.
A trunk version means a development version. In other words, inaccessible for us, as they have their internal SVN as well as the public one. It's quite possible that the internalcommands is only in their private SVN repository. If not, you can grab the latest source code from SVN and compile it to get the new command parameter to work.
StefQube wrote:2- Documentation -- from command line -- is given by entering:>>> VBoxManage internalcommands...for some newbies like me ( and maybe mastapat11, his post was 8. Sep 2010 )...It gives "Usage" information, more simple, yet less complete than "...and check the VBoxManage sources" !!! from Sasquatch post of 9. Sep 2010.
That didn't work in the past. It would appear they have added it in some version have kept it ever since.

Re: Change uuid of harddrive

Posted: 22. May 2014, 17:57
by MichaelXX
Hello all,

Thank you for your help.
I work with Ubuntu 14 LTS and 4 virtual machines (W7-OsX-Redat-Fedora).

1/ I format my Sata hard drive to change the file system RAW to NTFS.

2/ After this I copy my virtual machine backup to the NTFS drive and I have the UUID error message.
Failed to open the hard disk file /mnt/FCE23900E238C0A6/VM/OS.vmdk.
Cannot register the hard disk '/mnt/FCE23900E238C0A6/VM/OS.vmdk' {5222cfc3-8de0-4e8c-8842-af0f7386e151} because a hard disk '/media/500GO/VM/OS.vmdk' with UUID {5222cfc3-8de0-4e8c-8842-af0f7386e151} already exists.

3/ I have an error message when I use the comand sethduuid:
>VBoxManage internalcommands sethduuid disk2.vdi 5222cfc3-8de0-4e8c-8842-af0f7386e151
> VBoxManage: error: Format autodetect failed: VERR_NOT_SUPPORTED

4/ I clone the OS.vmdk like that and the virtual box start correctly:
>VBoxManage clonehd /mnt/FCE23900E238C0A6/VM/OS.vmdk /mnt/FCE23900E238C0A6/VM/OS.vmdk

Thanks all for this very good product and support ...
You are the future, we enjoy :-)

Re: Change uuid of harddrive

Posted: 20. Aug 2014, 00:21
by terrabinue
I know this has been done but may help with some. so with cmd line navigate to wherever it is that you keep your VBox stuff. Mine is C:\Program Files\Oracle\VirtualBox>
once there enter VBOXMANAGE internalcommands sethduuid "B:\VirtualBox VMs\ubuntu\ubuntu.vdi" c35387d5-0b68-4a18-b7de-4568c46adab2

But when you enter it you would want to replace the directory's path (noted in red) to what you have on your machine, also don't remove the quotation marks.
Furthermore, the string of text in bold can be changed by you to make a new uuid so long as it fits with hexadecimal standard and the size and format stay the same.

Re: Change uuid of harddrive

Posted: 20. Aug 2014, 03:45
by AnrDaemon
UUID string is not just a "hexadecimal standard". Please don't do that, ever.

Re: Change uuid of harddrive

Posted: 20. Aug 2014, 12:58
by mpack
AnrDaemon wrote:UUID string is not just a "hexadecimal standard". Please don't do that, ever.
He also said to keep the same format. His instruction seems ok to me - a UUID in conventional written form is indeed just a 128bit hex number with an unusual layout. In some applications certain ranges of bits within the number itself are assigned special meanings, but not in VirtualBox AFAIK. Really all that's required is uniqueness.

Re: Change uuid of harddrive

Posted: 20. Aug 2014, 17:50
by AnrDaemon
While using such UUID's within enclosed area of identifying VirtualBox VM's is fine, in general, using hand-crafted UUID's could lead to all kinds of disasters.
Just to name: a crash in Delphi 4 on machines with S3 ViRGE cards due to a clash of UUID's in D4 ActiveX interfaces with those defined in display drivers.
Please use dedicated tools to generate UUID's. At the very least, it'll significantly reduce probability of a clash.
Some ways to generate UUID can be found in this stackoverflow discussion.

Re: Change uuid of harddrive

Posted: 20. Aug 2014, 18:21
by mpack
I'm afraid I don't recognize StackOverflow's authority in this area. It doesn't really matter what uses other applications put the UUID to, the VirtualBox usage is the only one that concerns us here.

Seriously, a UUID is just a random number, which VirtualBox uses as a label. Saying that some other application uses similar numbers for X, therefore we must cater for that usage... doesn't seem to accord with any real necessity that I know of!

Re: Change uuid of harddrive

Posted: 21. Aug 2014, 02:44
by AnrDaemon
"I'm afraid", you didn't read the link I provided.
The dicussion merely listing different tools to generate UUID's, most of which are part of the system (i.e. VBS interface to system's internal generator) or platform SDK (the uuidgen tool).
Nobody claim any authority.
However, if you insist on trying to pretend, that you know everything, I can point you into a more appropriate direction.