blob: aad121f7374da6433521e7c566df51cb094c9d03 [file] [log] [blame]
Lorenz Brunf95909d2019-09-11 19:48:26 +02001#!/bin/sh
2
Leopold Schabel67f9d092019-10-22 15:41:42 +02003swtpm socket --tpmstate dir=$PWD/.data/tpm --ctrl type=unixio,path=$PWD/.data/swtpm-sock --tpm2 &
Lorenz Brunf95909d2019-09-11 19:48:26 +02004
Leopold Schabel67f9d092019-10-22 15:41:42 +02005qemu-system-x86_64 \
6 -cpu host -smp sockets=1,cpus=1,cores=2,threads=2,maxcpus=4 -m 1024 -machine q35 -enable-kvm -nographic -nodefaults \
7 -drive if=pflash,format=raw,readonly,file=$PWD/.artifacts/OVMF_CODE.fd \
8 -drive if=pflash,format=raw,snapshot=on,file=$PWD/.artifacts/OVMF_VARS.fd \
9 -drive if=virtio,format=raw,cache=unsafe,file=$PWD/.data/smalltown.img \
Lorenz Brunf95909d2019-09-11 19:48:26 +020010 -netdev user,id=net0,hostfwd=tcp::7833-:7833,hostfwd=tcp::7834-:7834 \
11 -device virtio-net-pci,netdev=net0 \
Leopold Schabel67f9d092019-10-22 15:41:42 +020012 -chardev socket,id=chrtpm,path=$PWD/.data/swtpm-sock \
Lorenz Brunf95909d2019-09-11 19:48:26 +020013 -tpmdev emulator,id=tpm0,chardev=chrtpm \
14 -device tpm-tis,tpmdev=tpm0 \
Leopold Schabel67f9d092019-10-22 15:41:42 +020015 -debugcon file:.data/debug.log \
Lorenz Brunf95909d2019-09-11 19:48:26 +020016 -global isa-debugcon.iobase=0x402 \
17 -device ipmi-bmc-sim,id=ipmi0 \
18 -device virtio-rng-pci \
Leopold Schabel67f9d092019-10-22 15:41:42 +020019 -serial mon:stdio