Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_1.bin'/>
</qemu:commandline>
</domain>
#!/bin/bash
set -e
cat /sys/firmware/acpi/tables/SLIC > slic.bin
cat /sys/firmware/acpi/tables/MSDM > msdm.bin
dmidecode -t 0 -u | grep $'^\t\t[^"]' | xargs -n1 | perl -lne 'printf "%c", hex($_)' > smbios_type_0.bin
dmidecode -t 1 -u | grep $'^\t\t[^"]' | xargs -n1 | perl -lne 'printf "%c", hex($_)' > smbios_type_1.bin
@slaveriq

This comment has been minimized.

Copy link

slaveriq commented Oct 10, 2019

Thank you so much! This worked like a charm.

@nimatrueway

This comment has been minimized.

Copy link

nimatrueway commented Mar 1, 2020

My way was to run this to acquire license key from ACPI tables:

sudo strings /sys/firmware/acpi/tables/MSDM

then activate windows using that.

@Informatic

This comment has been minimized.

Copy link
Owner Author

Informatic commented Mar 1, 2020

Yeah, that might work. On some devices though that is not enough to activate the system. (at least that was the case on my Thinkpad x260)

@dadevel

This comment has been minimized.

Copy link

dadevel commented Mar 8, 2020

Thanks! Initially my Windows 10 installation told me that it wasn't licensed. But running the Windows Activation Troubleshooter (Settings/Update & Security/Activation) fixed the issue somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.