Open daniel-weisse opened 1 year ago
@daniel-weisse I'd really like to see this in the next release. Could you update the branch?
Updated the branch, but considering no-one seems to have looked at this PR for the last 2 years, I think its somewhat unlikely this will get into the next release. I would suggest using the xslt workaround for now.
Since this enables the <os firmware='efi'>
part, would it be too hard to also add support for toggling the secure-boot
and enrolled-keys
options as well? https://libvirt.org/kbase/secureboot.html
<firmware>
<feature enabled='yes' name='secure-boot'/>
<feature enabled='yes' name='enrolled-keys'/>
</firmware>
I could probably figure out the xslt part, but I wasn't sure if you think that should also go with this change or in a separate change?
This PR comes in 2 parts
Allow setting the active PCR banks of a domain's TPM This setting is currently missing from the TPM definition and causes some issues when using the TPM attestation functionality. This PR expands the TPM definition to allow users the choice of which PCR banks to set active.
Allow choosing a domain's firmware type To make proper use of the TPM, e.g. measured-boot/secure-boot, we need EFI firmware. Correctly setting up EFI is currently a bit messy using the terraform provider since simply setting
OS.Firmware
is not supported. Using libvirt directly, one would simply define the following to achieve a functional efi setup:See the libvirt bootloader XML definition for more details.
With this PR users can set a new option,
firmware_type
, toefi
to achieve the same behavior.Personally, I would prefer renaming the current
firmware
option to the more appropriateloader
, so we can simply name the newfirmware_type
optionfirmware
. But I am not sure if such a thing should be done in this PR as this will likely break existing configurations relying on it.I am also open to splitting this PR in two parts if so desired.
Example definition:
For reference, this is the xslt I am currently using as a workaround to achieve the functionality of this PR.