Last active
February 24, 2025 21:40
-
-
Save Informatic/49bd034d43e054bd1d8d4fec38c305ec to your computer and use it in GitHub Desktop.
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Thanks. I am wondering if it's possible to write a SLIC file manually based on the infos displayed in UEFI.
Why? If your licence is activated and the file does not exist then it is not used.
OK, I have understood now.
Note that this is a much better (and doesn't accidentally corrupt) way to generate the smbios extracts:
dmidecode -t 0 -u | awk '/^\t\t[0-9A-F][0-9A-F]( |$)/' | xxd -r -p > smbios_type_0.bin
dmidecode -t 1 -u | awk '/^\t\t[0-9A-F][0-9A-F]( |$)/' | xxd -r -p > smbios_type_1.bin
I expanded this to work with Proxmox - https://gist.github.com/xrobau/d98fe46c4677e46577ba2f20f35b783b
slic doesn't exist for me, do I just remove it or is there an alternative?
slic doesn't exist for me, do I just remove it or is there an alternative?
This is expected for newer windows versions. Just skip it and use what you have.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why? If your licence is activated and the file does not exist then it is not used.