Code: Select all
qemu-system-x86_64 \
-machine q35,smm=on,accel=kvm \
-cpu host \
-monitor stdio \
-smp 2 \
-m 4G \
-vga virtio \
-rtc base=localtime \
-chardev socket,id=chrtpm,path=$(pwd)/tpm/swtpm-sock \
-tpmdev emulator,id=tpm0,chardev=chrtpm \
-device tpm-tis,tpmdev=tpm0 \
-global driver=cfi.pflash01,property=secure,value=on \
-global ICH9-LPC.disable_s3=1 \
-drive if=pflash,format=raw,unit=0,file=OVMF_CODE.secboot.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=OVMF_VARS.fd \
-drive file="system.qcow2",if=virtio \
-device virtio-net-pci,mac="00:11:22:33:44:55",netdev=net0 \
-netdev id=net0,type=tap,ifname=tap0,script=no,downscript=no \
-device qemu-xhci \
-device usb-tabletCode: Select all
mbr2gpt /allowfullOS /validate
mbr2gpt /allowfullOS /convertCode: Select all
#!/bin/bash
swtpm socket --tpm2 --tpmstate dir=$(pwd)/tpm \
--ctrl type=unixio,path=$(pwd)/tpm/swtpm-sock \
--log level=20Code: Select all
#!/bin/bash
swtpm socket -d -t --tpm2 --tpmstate dir=$(pwd)/tpm --ctrl type=unixio,path=$(pwd)/tpm/swtpm-sock
qemu-system-x86_64 \
-machine q35,smm=on,accel=kvm \
-cpu host \
-monitor stdio \
-smp 2 \
-m 4G \
-vga virtio \
-rtc base=localtime \
-chardev socket,id=chrtpm,path=$(pwd)/tpm/swtpm-sock \
-tpmdev emulator,id=tpm0,chardev=chrtpm \
-device tpm-tis,tpmdev=tpm0 \
-global driver=cfi.pflash01,property=secure,value=on \
-global ICH9-LPC.disable_s3=1 \
-drive if=pflash,format=raw,unit=0,file=/usr/share/edk2-ovmf/OVMF_CODE.secboot.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=OVMF_VARS.fd \
-drive file="system.qcow2",if=virtio \
-device virtio-net-pci,mac="00:11:22:33:44:55",netdev=net0 \
-netdev id=net0,type=tap,ifname=tap0,script=no,downscript=no \
-device qemu-xhci \
-device usb-tablet \
$@
echoCode: Select all
-drive file="Win11_German_x64v1.iso",index=2,media=cdrom \
-drive file="virtio-win-0.1.215.iso",index=3,media=cdrom \Code: Select all
if ! test -f "$(pwd)/tpm/swtpm-sock"
then
swtpm socket -d -t --tpm2 --tpmstate dir="$(pwd)/tpm" --ctrl type=unixio,path="$(pwd)/tpm/swtpm-sock"
fiDen Check braucht es nicht, wenn man swtpm mit dem Parameter -t startet, dann wird der daemonisierte Prozess automatisch beendet, wenn man die VM herunterfährt (aus der manpage):mike155 wrote:In Deinem Script könntest Du noch eine if-Abfrage um den setpm-Befehl hinzufügen. Sonst wird das Programm swtpm bei mehrfachem Aufruf des Scripts mehrfach gestartet und läuft dann auch mehrfach parallel auf Deinem Rechner:Code: Select all
if ! test -f "$(pwd)/tpm/swtpm-sock" then swtpm socket -d -t --tpm2 --tpmstate dir="$(pwd)/tpm" --ctrl type=unixio,path="$(pwd)/tpm/swtpm-sock" fi
Code: Select all
-t|--terminate
Terminate the TPM after the client has closed the connection.Wobei das ja tatsächlich überhaupt kein Problem ist. Man muss ja nur swtpm installieren und qemu die passenden Optionen mitgeben. Das lief bei mir sozusagen "out of the box".firefly wrote:Mit ein paar tricks kann ma WIn11 auch ohne TPM installieren. Nur Microsoft behält sich vor, für solche systemen, welche nicht den offiziellen mindestanforderungen entsprechen, zukünftig von (sicherheits-)updates auszuschließen.
Code: Select all
swtpm socket -d -t --tpm2 --tpmstate dir=$(pwd)/tpm --ctrl type=unixio,path=$(pwd)/tpm/swtpm-sockCode: Select all
-machine pc-q35-7.2,smm=on,accel=kvm \Code: Select all
-chardev socket,id=chrtpm,path=$(pwd)/tpm/swtpm-sock \
-tpmdev emulator,id=tpm0,chardev=chrtpm \
-device tpm-tis,tpmdev=tpm0 \
-global driver=cfi.pflash01,property=secure,value=on \
-global ICH9-LPC.disable_s3=1 \
-drive if=pflash,format=raw,unit=0,file=/usr/share/edk2-ovmf/OVMF_CODE.secboot.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=OVMF_VARS.fd \Code: Select all
-cpu host \Code: Select all
1920 x 1200
1920 x 1080
1680 x 1050
1600 x 1200
1440 x 900
1280 x 900
1280 x 1024
1280 x 960
1280 x 800
1024 x 768
800 x 600Code: Select all
1280 x 800
Code: Select all
2560 x 1600
1920 x 1080
1280 x 1024
1024 x 768
800 x 600
