Replies: 1 comment
|
You are not missing a persistence switch for the TPM or firmware state in With the QEMU backend, mkosi creates the swtpm state in a The disk itself is different. With If all three pieces need to survive the second boot, build the image with mkosi and run the resulting disk with mkdir -p "$PWD/.vm-state/tpm"
systemd-vmspawn \
--image="$PWD/image.raw" \
--tpm=yes \
--tpm-state="$PWD/.vm-state/tpm" \
--efi-nvram-state="$PWD/.vm-state/efivars"
|
Uh oh!
There was an error while loading. Please reload this page.
I’m using mkosi vm with a ParticleOS image. On first boot, systemd-repart creates an encrypted root filesystem and enrolls it with the TPM.
I’d like to shut down the VM and boot the same machine again.
However, each mkosi vm invocation seems to create a new expanded disk image, a new swtpm state directory, and a new OVMF variable store.
Is there a supported way to make mkosi vm preserve the disk, TPM, and UEFI state across runs, so I can simulate a second boot of the same machine?
Or is systemd-vmspawn better suited for this?
All reactions