Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qemu environment #42

Open
osresearch opened this issue Jun 1, 2020 · 3 comments
Open

Qemu environment #42

osresearch opened this issue Jun 1, 2020 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@osresearch
Copy link
Owner

For ease of setup and testing it would be helpful to have instructions for booting in qemu.

@osresearch osresearch added the documentation Improvements or additions to documentation label Jun 1, 2020
@osresearch
Copy link
Owner Author

osresearch commented Oct 21, 2020

swtpm works with some effort to provide an emulated tpm2. It has to be run before qemu (and exits when qemu shutsdown):

swtpm socket \
  --tpm2 \
  --tpmstate dir=/tmp/vtpm \
  --ctrl type=unixio,path=/tmp/vtpm/sock \
  --flags startup-clear

Qemu needs some extra arguments:

qemu-system-x86_64 \
                -M q35,accel=kvm \
                -m 4G \
                -bios /usr/share/ovmf/OVMF.fd \
                -nographic \
                -chardev socket,id=chrtpm,path=/tmp/vtpm/sock \
                -tpmdev emulator,id=tpm0,chardev=chrtpm \
                -device tpm-tis,tpmdev=tpm0 \
                -drive "file=hda.bin,format=raw" \

The vtpm does not have an EK. It is necessary to export it and sign it, as described in #83

@osresearch
Copy link
Owner Author

Qemu support (including swtpm) will be merged in as part of #86

@osresearch
Copy link
Owner Author

swtpm is now built as part of the make qemu target and a new vTPM is created. Need to streamline the EK signing process. 6d60eef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant