Windows Product Key in VirtualBox BIOS

As many who use virtual machines for testing, I often need to reinstall the same. One thing that annoys me when getting Windows reinstalled is the prompt for the product key. Yes, you can bypass it temporarily but you still need to enter it when you go and activate the Windows. My laptop has product key embedded in BIOs. Why cannot I do the same with virtual machine? Well, maybe I can.

Investigation started by looking into where exactly the key is located on physical hardware. It was relatively easy to discover this was in ACPI MSDM table. Microsoft even has instructions on how to create the table. If you look a bit further, you can even find description on the MSDM fields.

Offset Length Name Value
0 4 Signature Always MSDM.
4 4 Length Total length is always 0x55.
8 1 Revision Always 3.
9 1 Checksum Checksum over the whole table.
10 6 OEM ID Anything goes; pad with spaces.
16 8 OEM Table ID Anything goes albeit ASCII text is customary.
24 4 OEM Revision Any number will do but keep it positive (little-endian).
28 4 Creator ID Anything goes; pad with spaces.
32 4 Creator Revision Any number will do but keep it positive (little-endian).
36 4 MSDM Version Always 1.
40 4 Reserved Always 0.
44 4 Data type Always 1.
48 4 Reserved Always 0.
52 4 Key length Always 0x1D.
56 29 Product key Product key with dashes included.

It was relatively easy to figure what goes in which field except for the checksum. I didn't find which checksum method it uses but realistically there are only two when you have a 8-bit checksum. Either it's CRC or a simple sum of all fields. Well, it was a sum for this one. No matter what, sum of all fields has to be 0. If all fields except for checksum would count up to 250, the checksum would need to be 6 in order to overflow to 0. Actually a trivial thing to calculate.

With the file generated, it's easy to add it to the VirtualBox VM.

Terminal
vboxmanage setextradata "VM" "VBoxInternal/Devices/acpi/0/Config/CustomTable" /msdm_table.dat

Now your Windows 10 installation can proceed with the product key pre-entered and only activation pending.


PS: This just automatically fills product key during install. You still need to do the activation. This will NOT work with the pirated key.

PPS: Yes, this is essentially the same thing as adding PID.txt to the installation media. The same result but without media modification.

PPPS: And yes, of course I made a generator.


Product Key:

2 thoughts to “Windows Product Key in VirtualBox BIOS”

  1. Interesting article. However, if your PC has a product key / ACPI MSDM table embedded in the BIOS, there is a much more straightforward method.
    Starting the PC from a Live USB/CD Linux distro, or simply starting Linux if it’s installed, you can run this command from a terminal:
    sudo cat /sys/firmware/acpi/tables/MSDM > msdm_table.dat
    and et voilĂ  you’ve got the file you need for the VM configuration.

Leave a Reply

Your email address will not be published. Required fields are marked *