Anyway to Specify the UUID of a Virtual Hard Drive?

This is for discussing general topics about how to use VirtualBox.
Post Reply
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Anyway to Specify the UUID of a Virtual Hard Drive?

Post by saberman »

Given a virtual hard drive with a uuid of xxx... is there anyway to create a copy with a specific uuid (i.e. yyy...)?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Anyway to Specify the UUID of a Virtual Hard Drive?

Post by mpack »

"VBoxManage internalcommands sethduuid" allegedly has that ability, though I don't have the details as I've never needed it.

Why do you think you need this feature? It isn't required for any of the purposes you have given in your other threads.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: Anyway to Specify the UUID of a Virtual Hard Drive?

Post by saberman »

From: http://forums.virtualbox.org/viewtopic. ... &start=690
But yes, the UUID of the drive has to match the UUID for that drive listed in the media registry (whereever the media registry is stored).

I want to maintain a fully patched Virtual Hard Drive as a base that I can clone for my test machines. The process I intend to follow will be:
1. Boot the VM that uses the base vdi and make sure it has the most current patches.
2. Shutdown the VM and make a backup copy of the base vdi.
3. Boot the base machine and run SysPrep.
4. Clone the SysPrep'ed image setting its uuid to that of the vdi in the target test machine.
5. Copy the SysPrep'ed image file over the one in the target test machine
6. Boot the test machine, enter the associated license and activate it.

Please note that steps 4-6 will have to be performed for each test VM that I need.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: Anyway to Specify the UUID of a Virtual Hard Drive?

Post by saberman »

mpack wrote:"VBoxManage internalcommands sethduuid" allegedly has that ability
That generates and assigns a new uuid -- it doesn't let you specify the uuid to be assigned.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Anyway to Specify the UUID of a Virtual Hard Drive?

Post by mpack »

ISTM if you remount the hard disk in each test clone then you don't need to match the UUID of the old drive.

As to sethduuid, a member of the devteam on these forums indicated that this cmd took an additional optional argument which was the replacement UUID. As I already said, I have not needed this feature hence I have not checked if that is true, or recorded the details.
Post Reply