Lorenz Brun | f95909d | 2019-09-11 19:48:26 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Leopold Schabel | 67f9d09 | 2019-10-22 15:41:42 +0200 | [diff] [blame^] | 3 | swtpm socket --tpmstate dir=$PWD/.data/tpm --ctrl type=unixio,path=$PWD/.data/swtpm-sock --tpm2 & |
Lorenz Brun | f95909d | 2019-09-11 19:48:26 +0200 | [diff] [blame] | 4 | |
Leopold Schabel | 67f9d09 | 2019-10-22 15:41:42 +0200 | [diff] [blame^] | 5 | qemu-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 Brun | f95909d | 2019-09-11 19:48:26 +0200 | [diff] [blame] | 10 | -netdev user,id=net0,hostfwd=tcp::7833-:7833,hostfwd=tcp::7834-:7834 \ |
| 11 | -device virtio-net-pci,netdev=net0 \ |
Leopold Schabel | 67f9d09 | 2019-10-22 15:41:42 +0200 | [diff] [blame^] | 12 | -chardev socket,id=chrtpm,path=$PWD/.data/swtpm-sock \ |
Lorenz Brun | f95909d | 2019-09-11 19:48:26 +0200 | [diff] [blame] | 13 | -tpmdev emulator,id=tpm0,chardev=chrtpm \ |
| 14 | -device tpm-tis,tpmdev=tpm0 \ |
Leopold Schabel | 67f9d09 | 2019-10-22 15:41:42 +0200 | [diff] [blame^] | 15 | -debugcon file:.data/debug.log \ |
Lorenz Brun | f95909d | 2019-09-11 19:48:26 +0200 | [diff] [blame] | 16 | -global isa-debugcon.iobase=0x402 \ |
| 17 | -device ipmi-bmc-sim,id=ipmi0 \ |
| 18 | -device virtio-rng-pci \ |
Leopold Schabel | 67f9d09 | 2019-10-22 15:41:42 +0200 | [diff] [blame^] | 19 | -serial mon:stdio |