Change uuid of harddrive

Discussions related to using VirtualBox on Windows hosts.

Change uuid of harddrive

Postby daverage » 25. Feb 2008, 18:13

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?
daverage
 
Posts: 4
Joined: 22. Feb 2008, 11:01

Postby JshWright » 25. Feb 2008, 19:17

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
JshWright
Volunteer
 
Posts: 119
Joined: 13. Sep 2007, 00:33
Primary OS: Debian Lenny
VBox Version: OSE self-compiled
Guest OSses: Many...

Found an undocumented command.

Postby tadak » 12. Jun 2008, 01:26

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
tadak
 
Posts: 2
Joined: 12. Jun 2008, 01:24

Postby torentash » 25. Jul 2008, 12:23

Tadak,

THANKS A LOT!!! It works flawlessly.
torentash
 
Posts: 51
Joined: 19. Apr 2008, 10:21

Re: Found an undocumented command.

Postby Murz » 24. Aug 2008, 17:54

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?
Murz
 
Posts: 16
Joined: 20. Aug 2008, 13:36

Re: Found an undocumented command.

Postby Sasquatch » 24. Aug 2008, 21:26

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.
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: Found an undocumented command.

Postby Murz » 25. Aug 2008, 07:19

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   Expand viewCollapse view
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
Murz
 
Posts: 16
Joined: 20. Aug 2008, 13:36

Re: Change uuid of harddrive

Postby terran.priest » 25. Mar 2009, 20:21

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!
Terran Priest
terran.priest
 
Posts: 11
Joined: 25. Aug 2007, 13:00
Location: Ogden, UT

Re: Change uuid of harddrive

Postby MarkWagner » 9. Jun 2010, 16:20

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.
MarkWagner
 
Posts: 1
Joined: 9. Jun 2010, 16:13
Primary OS: MS Windows 2008
VBox Version: OSE other
Guest OSses: Windows Server 2008, Windows Server 2008 R2

Re: Change uuid of harddrive

Postby Frank Mehnert » 9. Jun 2010, 17:52

Code: Select all   Expand viewCollapse view
VBoxManage internalcommands sethduuid


is perhaps what you are searching for.
Frank Mehnert
Oracle Corporation
 
Posts: 2523
Joined: 7. Jun 2007, 09:11
Location: Dresden, Germany
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: Linux, Windows

Re: Change uuid of harddrive

Postby demosthenesk » 24. Aug 2010, 09:03

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
demosthenesk
 
Posts: 3
Joined: 24. Aug 2010, 08:52
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: WinXP

Re: Change uuid of harddrive

Postby Frank Mehnert » 24. Aug 2010, 10:52

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

Re: Change uuid of harddrive

Postby mpack » 24. Aug 2010, 11:15

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

Re: Change uuid of harddrive

Postby demosthenesk » 24. Aug 2010, 11:21

oh! now i saw where i post it!

sorry.

anyway thanks for the help i ll try your advices.
demosthenesk
 
Posts: 3
Joined: 24. Aug 2010, 08:52
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: WinXP

Re: Change uuid of harddrive

Postby demosthenesk » 24. Aug 2010, 13:06

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!
demosthenesk
 
Posts: 3
Joined: 24. Aug 2010, 08:52
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: WinXP

Next

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: beto and 56 guests