Page 1 of 3

Change uuid of harddrive

Posted: 25. Feb 2008, 18:13
by daverage
I just got the following error when trying to mount a copy ofa vmdk file.
A hard disk with UUID {55b773b8-cbcb-42ea-9a44-1368b30ed823} or with the same properties ('V:\VBOX\VDI\XP_Work_Template_20GB.vmdk') is already registered.

Is it possible to change the uuid of a drive image?

Posted: 25. Feb 2008, 19:17
by JshWright
Dunno how (or even if you can) you would do it with a vmdk, but VBoxManage clonevdi is how you get a copy of a .vdi with a unique UUID.

~JW

Found an undocumented command.

Posted: 12. Jun 2008, 01:26
by tadak
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

Posted: 25. Jul 2008, 12:23
by torentash
Tadak,

THANKS A LOT!!! It works flawlessly.

Re: Found an undocumented command.

Posted: 24. Aug 2008, 17:54
by Murz
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
Can I set with this command UUID for disk manually?
I have several disks (VDI) with different UUID but I mount it from remote machines to host machine only one per session. And want to use one VirtualBox machine configurations for all drives. But each VDI have his own UUID and every time I need to readd VDI drives in Virtual Disk Manager.
I want to set same UUID for all disks.
How I can set UUID for already exists disk manually?

Re: Found an undocumented command.

Posted: 24. Aug 2008, 21:26
by Sasquatch
Murz wrote:
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
Can I set with this command UUID for disk manually?
I have several disks (VDI) with different UUID but I mount it from remote machines to host machine only one per session. And want to use one VirtualBox machine configurations for all drives. But each VDI have his own UUID and every time I need to readd VDI drives in Virtual Disk Manager.
I want to set same UUID for all disks.
How I can set UUID for already exists disk manually?
This is not advised. You will be able to only register one disk at a time. If you want to have all disks in the Disk Manager, they must have a different UUID.

Re: Found an undocumented command.

Posted: 25. Aug 2008, 07:19
by Murz
Sasquatch wrote:
Murz wrote:
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
Can I set with this command UUID for disk manually?
I have several disks (VDI) with different UUID but I mount it from remote machines to host machine only one per session. And want to use one VirtualBox machine configurations for all drives. But each VDI have his own UUID and every time I need to readd VDI drives in Virtual Disk Manager.
I want to set same UUID for all disks.
How I can set UUID for already exists disk manually?
This is not advised. You will be able to only register one disk at a time. If you want to have all disks in the Disk Manager, they must have a different UUID.
I have only one disk at a time, because I mount folders from other computers in local network only one per session to the same path.
Now I solve this problem with VBoxManage scripts (remove and readd the disk):

Code: Select all

VBoxManage modifyvm vmachine -hda none
VBoxManage unregisterimage disk /mnt/drive1/vbox/image.vdi
VBoxManage modifyvm vmachine -hda /mnt/drive1/vbox/image.vdi
VBoxManage startvm vmachine

Re: Change uuid of harddrive

Posted: 25. Mar 2009, 20:21
by terran.priest
AWESOME!

just what i was looking for.

running on a linuxmint 6 host, i wanted to copy my VBOX win2k hdds to another file for use in a 2nd vm for win2k to use limewire in.

hehe, this helped.

Thank you!

Re: Change uuid of harddrive

Posted: 9. Jun 2010, 16:20
by MarkWagner
The command appears to be successful when using it on a VHD formatted disk, but does not actually update the UUID. Running the dumphdinfo still shows the original UUID.

Re: Change uuid of harddrive

Posted: 9. Jun 2010, 17:52
by frank

Code: Select all

VBoxManage internalcommands sethduuid
is perhaps what you are searching for.

Re: Change uuid of harddrive

Posted: 24. Aug 2010, 09:03
by demosthenesk
hi,

i try to find a solution for the following problem:

i have software that needs to work the uuid of hard drive that was activated.

If i clone the vdi disk a new uuid is placed in vdi file and the software needs re-activation.
The solution to this issue is if i could to clone the vdi file but after that to set a specific uuid.

is there any way to set a specific uuid and not a random one with setvdiuuid ?

i would like to do something like that,

VBoxManage internalcommands setvdiuuid 55b773b8-cbcb-42ea-9a44-1368b30ed823 disk2.vdi

Re: Change uuid of harddrive

Posted: 24. Aug 2010, 10:52
by frank
demosthenesk wrote:hi,
i would like to do something like that,

VBoxManage internalcommands setvdiuuid 55b773b8-cbcb-42ea-9a44-1368b30ed823 disk2.vdi
Yes, VBoxManage internalcommands sethduuid disk2.vdi 55b773b8-cbcb-42ea-9a44-1368b30ed823 will work.

Re: Change uuid of harddrive

Posted: 24. Aug 2010, 11:15
by mpack
demosthenesk wrote:The solution to this issue is if i could to clone the vdi file but after that to set a specific uuid.
Surely a simpler solution is to clone the vdi without changing the UUID? Which is what you would get if you simply copied the vdi file using the host OS. You can also clone it using CloneVDI, with the "Keep UUID" option set. CloneVDI is intended for Windows hosts, it will also run on Wine. I notice that your profile says you are using an Ubuntu host, though you are asking this question in the Windows Hosts forum.

Re: Change uuid of harddrive

Posted: 24. Aug 2010, 11:21
by demosthenesk
oh! now i saw where i post it!

sorry.

anyway thanks for the help i ll try your advices.

Re: Change uuid of harddrive

Posted: 24. Aug 2010, 13:06
by demosthenesk
1) well at command line i get
user@ubuntu-laptop:~/.VirtualBox/HardDisks$ VBoxManage internalcommands sethduuid WindowsXPHome2.vdi 1831a6f9-e507-4301-b773-e4b7afd928a4
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
(C) 2005-2010 Oracle Corporation
All rights reserved.

Usage: VBoxManage internalcommands <command> [command arguments]

Commands:

sethduuid <filepath>
Assigns a new UUID to the given image file. This way, multiple copies
of a container can be registered.

WARNING: This is a development tool and shall only be used to analyse
problems. It is completely unsupported and will change in
incompatible ways without warning.

Syntax error: Not enough parameters
2) with CloneVdi all is fine under linux with wine. Works perfectly

this is my feedback from the advices i tried.

Oh! And if any admin could transfer my posts to a linux thread it would be nice, if they bother here...

Thanks a lot for the help!