1
0
mirror of https://github.com/rancher/os.git synced 2025-09-06 01:01:43 +00:00

Add TPM and MachineRegister support

This commit is contained in:
Darren Shepherd
2021-10-29 12:20:35 -07:00
parent db84312450
commit 901973e5f6
40 changed files with 3390 additions and 291 deletions

13
scripts/qemu-in-container Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
if [ "$#" = 0 ]; then
exec bash
fi
if [ -e /dev/tpm0 ]; then
mkdir /tmp/emulated_tpm
swtpm socket --tpmstate dir=/tmp/emulated_tpm --ctrl type=unixio,path=/tmp/emulated_tpm/swtpm-sock --log level=1 --tpm2 &
exec "$@" -chardev socket,id=chrtpm,path=/tmp/emulated_tpm/swtpm-sock \
-tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0
fi