fix: Do not attempt to modify SecureBootTemplate on a VM with a vTPM initialized#137
fix: Do not attempt to modify SecureBootTemplate on a VM with a vTPM initialized#137bdonaldson77 wants to merge 2 commits intohashicorp:mainfrom
Conversation
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Donaldson, Ben seems not to be a GitHub user. Have you signed the CLA already but the status is still pending? Recheck it. |
|
Hey @lbajolet-hashicorp (sorry for the unprompted direct ping), I expect this may have fallen between the couch cushions, or it's not even on anyone's radar as the CLA check isn't cleared. I think I might have made a mistake in signing it, as I modified the email field, and I can't re-submit it anymore to correct it. CLA shenanigans aside, is it possible to get eyes on this PR? Thanks! |
Hey @lbajolet-hashicorp, again, apologies for an unprompted direct ping. I'm hoping that this could be reviewed soon. Cheers! |
|
I've updated this PR with an additional change that will check if a VM has had a VMKeyProtector initialized, and if so, leaves it alone. This makes it so that if you create a template with a vTPM enabled and then disable the vTPM to do a |
|
this is sorely needed Hashicorp team - please consider merging. Current fix is to compile a custom "dev" plugin, but that is clunky going forward. |
Hello 2026 👋What will it take to get this merged/integrated Hashicorp team? @anurag5sh @trippsc2 @bdonaldson77 , i think at minimum, you will need to sign their Contributor License Agreement for this PR to get a look in. |
|
Yeah, there was a snafu with the CLA in terms of how my enterprise Github account clashes with this personal one - I tried to reach out to get that looked at and got no response. I do want to get it sorted if possible, though. We've been running a private fork of this plugin internally for over a year now. |
When running the
hyperv-vmcxbuilder, the plugin will always attempt to set the-SecureBootTemplateparameter if it is detected as available. However, when the source .vmcx template has a vTPM initialized (e.g. if it is a Windows 11 HyperV VM) then this operation will always fail:This change makes it so that Packer will only attempt to reconfigure the SecureBootTemplate if there is no initialized vTPM. If there is a vTPM, it will simply skip attempting to set the SecureBootTemplate, but continue to configure SecureBoot as desired.
Closes #49