Created
April 7, 2024 23:11
-
-
Save xrobau/d98fe46c4677e46577ba2f20f35b783b to your computer and use it in GitHub Desktop.
Windows 10 SLIC and MSDM into Proxmox KVM
This file contains hidden or 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 | |
# On the 'donor' machine, boot a live linux ISO (Ubuntu or whatever) | |
# and connect it to the internet. Then run these commands, which will | |
# dump the contents to sprunge.us so you can retrieve them easily. Or | |
# copy them manually, whatever. | |
mkdir -p /tmp/MSDM | |
cd /tmp/MSDM | |
for f in SLIC MSDM; do | |
[ -e /sys/firmware/acpi/tables/$f ] && cat /sys/firmware/acpi/tables/$f > $f.bin | |
done | |
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 | |
tar zcf - . | base64 | curl -F 'sprunge=<-' http://sprunge.us |
This file contains hidden or 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
# Pick a directory to store the files. Random one here is /rpool/data/MSDM | |
# but it just needs to be something the VM can access. | |
MDIR=/rpool/data/MSDM | |
mkdir -p $MDIR | |
cd $MDIR | |
# You were given a URL above. Use that. | |
curl https:://WHATEVER.THE.URL.WAS | base64 -d | tar zxvf - | |
# Now you will have those four files. Edit the VM config file - lets | |
# assume it's VM ID 200 | |
QFILE=/etc/pve/qemu-server/200.conf | |
# This adds the correct params to qemu so it uses the extracted files from the donor machine | |
echo "args: -acpitable file=$MDIR/SLIC -acpitable file=$MDIR/MSDM -smbios file=$MDIR/smbios_type_0.bin -smbios file=$MDIR/smbios_type_1.bin' >> $QFILE | |
# This makes sure there's no other smbios params left hanging around. | |
sed -i '/^smbios/d' $QFILE | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment