Change uuid of harddrive

Discussions related to using VirtualBox on Windows hosts.

Re: Change uuid of harddrive

Postby Frank Mehnert » 24. Aug 2010, 21:49

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.
Frank Mehnert
Oracle Corporation
 
Posts: 2664
Joined: 7. Jun 2007, 09:11
Location: Dresden, Germany
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: Linux, Windows

Re: Found an undocumented command.

Postby mastapat11 » 8. Sep 2010, 14:03

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!
mastapat11
 
Posts: 2
Joined: 8. Sep 2010, 13:59
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: all

Re: Change uuid of harddrive

Postby Sasquatch » 8. Sep 2010, 22:09

Because it's an undocumented parameter and some options can be dangerous. They aren't tested thoroughly either AFAIK. Anyways, undocumented.
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: Change uuid of harddrive

Postby mastapat11 » 9. Sep 2010, 03:10

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.
mastapat11
 
Posts: 2
Joined: 8. Sep 2010, 13:59
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: all

Re: Change uuid of harddrive

Postby Sasquatch » 9. Sep 2010, 19:57

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.
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: Change uuid of harddrive

Postby mpack » 9. Sep 2010, 22:09

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

Re: Change uuid of harddrive

Postby StefQube » 24. Sep 2010, 04:21

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.
StefQube
 
Posts: 2
Joined: 24. Sep 2010, 02:45
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: WinXP

Re: Change uuid of harddrive

Postby Sasquatch » 26. Sep 2010, 13:49

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.
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: Change uuid of harddrive

Postby MichaelXX » 22. May 2014, 17:57

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 :-)
MichaelXX
 
Posts: 1
Joined: 22. May 2014, 17:30

Re: Change uuid of harddrive

Postby terrabinue » 20. Aug 2014, 00:21

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.
terrabinue
 
Posts: 1
Joined: 20. Aug 2014, 00:01

Re: Change uuid of harddrive

Postby AnrDaemon » 20. Aug 2014, 03:45

UUID string is not just a "hexadecimal standard". Please don't do that, ever.
AnrDaemon
 
Posts: 73
Joined: 7. Feb 2010, 23:41
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu Linux

Re: Change uuid of harddrive

Postby mpack » 20. Aug 2014, 12:58

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

Re: Change uuid of harddrive

Postby AnrDaemon » 20. Aug 2014, 17:50

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.
AnrDaemon
 
Posts: 73
Joined: 7. Feb 2010, 23:41
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu Linux

Re: Change uuid of harddrive

Postby mpack » 20. Aug 2014, 18:21

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

Re: Change uuid of harddrive

Postby AnrDaemon » 21. Aug 2014, 02:44

"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.
AnrDaemon
 
Posts: 73
Joined: 7. Feb 2010, 23:41
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu Linux

PreviousNext

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: abhishekpwy, Bing [Bot], Google [Bot] and 34 guests