The license-related information are now typically stored in ACPI tables, which can be accessed through sysfs. The ones important for Windows are:
These files can be directly copied to a suitable locations to be passed to the virtual machine.
Further, there are various system identification information provided trough SMBIOS, which on Linux can be obtained by the
dmidecode command, like:
dmidecode -t 0
dmidecode -t 1
Potentially relevant are fields of type 0–4.
For the QEMU virtual machine, all this information can be passed like:
With these parameters, Windows can be installed using the official installation media for appropriate version and the license should be automatically recognized and activated.