-
-
Save oleduc/a467ec52870f67166ff3383f3aa63ebd to your computer and use it in GitHub Desktop.
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
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> | |
<uuid>YOUR-HARDWARE-UUID</uuid> | |
... | |
<sysinfo type='smbios'> | |
<bios> | |
<entry name='vendor'>....</entry> | |
... | |
</bios> | |
<system> | |
... | |
<entry name='uuid'>YOUR-HARDWARE-UUID</entry> | |
... | |
</system> | |
... | |
</sysinfo> | |
<os> | |
... | |
<smbios mode='sysinfo'/> | |
</os> | |
<devices> | |
... | |
<disk type='block' device='disk'> | |
... | |
<source dev='/dev/disk/by-id/YOUR-DISK-HARDWARE-ID'/> | |
<serial>YOUR-DISK-HARDWARE-SERIAL</serial> | |
... | |
</disk> | |
</devices> | |
<seclabel type='dynamic' model='dac' relabel='yes'/> | |
<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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment