Lorenz Brun | f95909d | 2019-09-11 19:48:26 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | swtpm socket --tpmstate dir=$PWD/vm/tpm --ctrl type=unixio,path=$PWD/vm/tpm/swtpm-sock --tpm2 & |
| 4 | |
| 5 | qemu-system-x86_64 -cpu host -smp sockets=1,cpus=1,cores=2,threads=2,maxcpus=4 -m 1024 -machine q35 -enable-kvm -nographic -nodefaults \ |
| 6 | -drive if=pflash,format=raw,readonly,file=$PWD/third_party/edk2/Build/OvmfX64/RELEASE_GCC5/FV/OVMF_CODE.fd \ |
| 7 | -drive if=pflash,format=raw,snapshot=on,file=$PWD/third_party/edk2/Build/OvmfX64/RELEASE_GCC5/FV/OVMF_VARS.fd \ |
| 8 | -drive if=virtio,format=raw,cache=unsafe,file=$PWD/vm/smalltown.img \ |
| 9 | -netdev user,id=net0,hostfwd=tcp::7833-:7833,hostfwd=tcp::7834-:7834 \ |
| 10 | -device virtio-net-pci,netdev=net0 \ |
| 11 | -chardev socket,id=chrtpm,path=$PWD/vm/tpm/swtpm-sock \ |
| 12 | -tpmdev emulator,id=tpm0,chardev=chrtpm \ |
| 13 | -device tpm-tis,tpmdev=tpm0 \ |
| 14 | -debugcon file:vm/debug.log \ |
| 15 | -global isa-debugcon.iobase=0x402 \ |
| 16 | -device ipmi-bmc-sim,id=ipmi0 \ |
| 17 | -device virtio-rng-pci \ |
| 18 | -serial mon:stdio |