Skip to content

Instantly share code, notes, and snippets.

@racerxdl
Forked from Informatic/domain.xml
Created April 8, 2021 17:53
Show Gist options
  • Save racerxdl/25b55c3964117d0e4ebda3717a1cb538 to your computer and use it in GitHub Desktop.
Save racerxdl/25b55c3964117d0e4ebda3717a1cb538 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)
<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
@racerxdl
Copy link
Author

racerxdl commented Aug 17, 2022

Or

    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=0,vendor='Dell Inc.',version='1.14.0',date='10/20/2020',release=1.14.0"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=1,manufacturer='Dell Inc.',product='G5 5590',serial=xxxxxxxx,uuid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,sku=xxxxx,family=GSeries"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment