Page 1 of 1

[Solved] How to change the virtualbox harddisk ID?

Posted: 18. Jun 2009, 14:58
by william
Hi,all
I have created a virtualbox and run guest os ,windows xp system base on windows xp.
That is OK. I use a software to check the guest os harddisk ID ,and get the follow message:

disk vendor:
VBOX HARDDISK
hardisk ID:
VBb3f79cfe-09f99f69

I want to change this message and I don't know how to do it.
Need your strong support Urgently.

Thanks.

Re: how to change the virtualbox harddisk ID?

Posted: 21. Jun 2009, 12:43
by TerryE
At the moment you can't change the HDD vendor. Sorry.

VBox is designed to allow you virtualise OSs and systems to run in VMs, not to frustrate 3rd party licence schemes.

Re: how to change the virtualbox harddisk ID?

Posted: 22. Jun 2009, 04:06
by william
Hi,TerryE
I don't want to change the HDD vendor. I just want to change the HDD ID.
can I have any way to do that ?

Thanks!

Re: how to change the virtualbox harddisk ID?

Posted: 22. Jun 2009, 11:57
by abcuser
Hi,
why would you like to change this ID? Would you like to have two images - if so use clonehd command to clone images.
Regards

Re: how to change the virtualbox harddisk ID?

Posted: 22. Jun 2009, 13:58
by TerryE
The code for how the Serial Number is assigned is in DevATA.cpp. You can pull this from svn. Look for szSerialNumber

Re: how to change the virtualbox harddisk ID?

Posted: 24. Jun 2009, 05:12
by william
Hi,TerryE
I have downloaded the code and read it.
I know the Harddisk ID is created by the virtualbox.
Could you tell me that which is the dll file that include the DevATA.cpp.

Thanks!


The code for how the Serial Number is assigned is in DevATA.cpp. You can pull this from svn. Look for szSerialNumber

Re: how to change the virtualbox harddisk ID?

Posted: 24. Jun 2009, 14:29
by TerryE
The PDM components are loaded into VBoxDD.dll and VBoxDD2.dll. IIRC, the ATA bits are in the former, though I'm not sure how that can help.

Re: how to change the virtualbox harddisk ID?

Posted: 25. Jun 2009, 09:52
by william
Hi,TerryE
That's right;I can change the virtualbox hardisk vendor now with your help.
But I don't know how to change Harddisk ID yet?
Isn't different from verndor? Why?

Thank!

Re: how to change the virtualbox harddisk ID?

Posted: 25. Jun 2009, 11:20
by TerryE
You haven't read the code. It looks to me that you can set the SerialNumber and ModelNumber parameters.

The routine ataConstruct reads the relevant node of the CFGM tree (that's what you see enumerated in the CFGM dump in your VBox.log file . They are sub-keys to one of PrimaryMaster, PrimarySlave, SecondaryMaster, SecondarySlave so as far as I can see you can set these as follows

VBoxManage setextradata VMNAME VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber <SerialNumer>

etc.

But you really need to go through the code in depth.

Re: how to change the virtualbox harddisk ID?

Posted: 26. Jun 2009, 20:26
by TerryE
I tried this on one of my VMs also setting the model name
  • VBoxManage setextradata jeosLAMP VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber "TERRYS-DISK"
and doing a hdisk -I /dev/sda confirms that this works :-)

Re: [Solved] How to change the virtualbox harddisk ID?

Posted: 29. Jun 2009, 07:01
by william
Hi,TerryE

VBoxManage setextradata jeosLAMP VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber "TERRYS-DISK"

I don't know what is the meaning of this words?

Is VBoxManage a tool of virtualbox that can change the virtual Harddisk ID?
If so, could tell me how to use it? Thanks!

Re: [Solved] How to change the virtualbox harddisk ID?

Posted: 29. Jun 2009, 10:25
by TerryE
Yes by all means:
  1. Open the VirtualBox User guide. That's the useful document that the VBox people include with the product to tell users how to use it.
  2. Select the search function and type in VBoxManage or setextradata.
  3. Now read.

Re: [Solved] How to change the virtualbox harddisk ID?

Posted: 3. Jul 2009, 11:53
by TerryE
See also post http://forums.virtualbox.org/viewtopic. ... 185#p84185 where I discuss this further.

Re: [Solved] How to change the virtualbox harddisk ID?

Posted: 26. Sep 2009, 12:44
by abonino
Hi
i try to duplicate a appliance and on Mac i have no 'clonehd'.
How to make this on a Mac?

- export
- import with conflict 'UUID'

regards
Arthur, Bern