Page 1 of 1

VPD serial number change for hard disk not working.

Posted: 9. Apr 2018, 18:04
by r00tb33r
Hey all,

For several days I've been struggling with VirtualBox failing to accept configuration as per manual.

Manual page in question: 9.9.2 from Chapter 9
https://www.virtualbox.org/manual/ch09.html#changevpd

The configuration item in question is the SerialNumber of hard disk VPD.

The appropriate command for this configuration per manual is:

Code: Select all

VBoxManage setextradata "VM name" "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber" "serial"
In my case I have only one IDE controller on PIIX3 chipset, 0, and one image on Primary Master.

After running the following command:

Code: Select all

VBoxManage setextradata "MYVM" "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber" "000000000000Z1E6TQQV"
I see the following line added to the .vbox config file for this VM.

Code: Select all

<ExtraDataItem name="VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber" value="000000000000Z1E6TQQV"/>
After starting up the VM I find that the serial number has been ignored, and after shutting down the VM I find that the above XML entry disappeared from the .vbox file. It removes it. Why? I can repeat and reproduce this each and every time.

The command that is used to check with sample output on real hardware is as follows:

Code: Select all

C:\Windows\system32>wmic diskdrive get serialnumber
SerialNumber
WCC6Y6DKY89X
CE8D6B010A0A
AE85HYE1100000002
2012062914345300
Instead, in the VM all I see is:

Code: Select all

C:\Users\USER>wmic diskdrive get serialnumber
SerialNumber
VB2ae94306-8aa3c024
Which is formed by "VB" static prefix and segments of image UUID, with reverse byte order. This is of course not correct as it should show the serial number from the documented VPD setting.

Bug? Has this configuration functionality been deprecated and the manual is out of date?

Any other way to change the disk serial number? (Not the volume serial! Not the UUID!)
 Edit:  Judging by the info posted here:
http://www.outerhost.com/intranet/virtualbox

I am using the right command to change that serial number. It just doesn't work! In fact I tried the example provided at that link, and my disk serial number in VM still did not change! Why?! 

Re: VPD serial number change for hard disk not working.

Posted: 10. Apr 2018, 15:37
by socratis
r00tb33r wrote:Bug? Has this configuration functionality been deprecated and the manual is out of date?
I saw at the source tree that they recently worked on that area, so I'm not sure if/where/when it will make it in a version. But if you use the search functionality, you'll see that other users are having the same problem, so, it's not you.

Re: VPD serial number change for hard disk not working.

Posted: 10. Apr 2018, 19:41
by r00tb33r
Thanks for confirming.

Worked on? As in fixing, or as in removing features?

Do you know what the most recent VirtualBox build is that has this functionality working?

Re: VPD serial number change for hard disk not working.

Posted: 10. Apr 2018, 20:13
by socratis
"Worked on" as in "fixing it". As I said I saw some recent changes in the Timeline, don't know if there is a test or a development build yet, give it a try from https://www.virtualbox.org/wiki/Testbuilds