Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

VirtualBox sets the BIOS serial number of every VM instance to 0. It seems to be possible to change some BIOS settings, but I haven't seen anything that directly references the serial number.

Can anyone suggest a way to do this?

share|improve this question
Any particular reason you want to do this? – Jared Harley Oct 15 '09 at 0:15
Yes. I have a PC inventory software tool that uses the BIOS serial number to uniquely identify computers. It works fine for physical hardware and for VMs from other vendors, but doesn't know how to handle multiple VirtualBox VMs. – Roger Oct 15 '09 at 0:52
edited my answer to reflect the error you caught. – A Dwarf Oct 15 '09 at 2:08
You have any news on this, Roger? Would love to know how it turned out. – A Dwarf Oct 31 '09 at 3:51
I never determined how to do it. I got a few responses on the VirtualBox forums, but found nothing that worked. If I run across the answer, I'll be sure to add an update here. – Roger Nov 4 '09 at 23:42
up vote 13 down vote accepted

Really has detailed answer for this.

You can set the bios serial number by doing this:

VBoxManage setextradata "VM name" 
"VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "System Serial"

The error you were getting is caused by the serial not being set as a string value, if you have a pure number you should prepend it with string: like so:

VBoxManage setextradata "VM name" 
"VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "string:1234"
share|improve this answer

Not from any external settings. But you can from the code and then build it yourself:

Source file: DevPcBios.cpp
Line: 1014 READCFGSTR("DmiSystemSerial", pszDmiSystemSerial, "0");

Change "0" to whatever value you need.

EDIT: You can apparently use VBoxManage setextradata. I have used it in the past for other type of configurations (not bios related) and didn't test this particular setting. Give it a go:

$ VBoxManage setextradata YourVMName VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial "yourserial"

Otherwise... revert back to source code editing and building.

Best of luck.

share|improve this answer
Hmm. Thanks - so close, but not there yet. I tried this: "c:\Program Files\Sun\VirtualBox\VBoxManage.exe" setextradata "Demo Server" VBoxInternal/Devices/pcbios/0/Config /DmiSerial "123" It seemed to work, but when I launched the VM I got this error message: Failed to start the virtual machine Demo Server. Invalid configuration for device pcbios device (VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES). Unknown error creating VM (VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES). Deleting and recreating the machine definition fixed it, so no harm done. I think you're really close - any other suggestions? – Roger Oct 15 '09 at 1:22
hmm... did you make a verbatim copy/paste of your command to the comment box? Because there's no spave between /Config and /DmiSerial. Regardless I'll explore this further. Guess I will have to install VirtualBox. So far was relying only on my notes :) – A Dwarf Oct 15 '09 at 1:45
Bah! This head of mine. I post the relevant code line and then don't even check it against my much older notes. It's not /DmiSerial. It has been renamed sometime between version 1.5 and now. It is now /DmiSystemSerial – A Dwarf Oct 15 '09 at 1:53
Thanks, A Dwarf, for all your help. I tried replacing DmiSerial with DmiSystemSerial, reran the command line (without the space, which was a typo), and got the same error. – Roger Oct 15 '09 at 12:06
To my knowledge it can only mean this isn't fully implemented yet and you can't do it this way. At this point I'm afraid I cease to be useful. You should go to the VirtualBox forums and try from there. They are excellent folks and you'll get a more informed answer. I would however love to know the end result, if you would be so kind and post an answer to your own question when that happens. All the best. – A Dwarf Oct 15 '09 at 17:52

If you run that command, and get the error referenced by Roger, you need to back out the command by running the command without the last parameter (VALUE).

This removes the entry causing the error.

If you are unsure of what the last offending command was, open the ~~~.vbox (XML) file in the root of the VirtualMachines folder of the specific VM and review the EXTRADATA section.

Running the command-line call to vboxmanage is the best way to modify these. Editing the xml file does not stick 100% of the time.

share|improve this answer

Try using a serial number that contains 20 byte hexadecimal string:

VBoxManage setextradata "VM name" "VBoxInternal/Devices/ahci/0/Config/Port0/SerialNumber" "serial"


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.