File tree Expand file tree Collapse file tree
pkg/provision/providers/qemu Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,14 +277,17 @@ func launchVM(config *LaunchConfig) error {
277277 return err
278278 }
279279
280- if ! diskBootable {
280+ if ! diskBootable && config . TPMConfig . NodeName == "" {
281281 // When the guest disk has been wiped externally we will re-attach
282282 // boot media (ISO/USB/UKI/kernel) below - but UEFI keeps the
283283 // previous Talos install's Boot#### entries in the variable store
284284 // (flash1.img), and they point at the now-erased ESP. Without a
285285 // reset, UEFI tries those entries first, fails, and never falls
286286 // through to the freshly-attached boot media. Convention: pflash
287287 // index 1 is the variable store, index 0 is the firmware code.
288+ //
289+ // Skip wiping if TPM is enabled - vars contain SecureBoot state,
290+ // so we can't wipe them without losing SecureBoot state.
288291 if len (config .PFlashSpec ) >= 2 && len (config .PFlashImages ) >= 2 {
289292 if err := writePFlashImage (config .PFlashImages [1 ], config .PFlashSpec [1 ]); err != nil {
290293 return fmt .Errorf ("reset UEFI variable store: %w" , err )
You can’t perform that action at this time.
0 commit comments