Virtual machines that do not have a valid Platform Key (PK) fail to complete automated updates to Secure Boot databases, including DB, DBX, and KEK.
The Platform Key (PK) on virtual machines has an invalid signature, which causes updates to the KEK database to fail. As a result, the automated Secure Boot update process fails and reports error events/logs.
Update the Platform Key that has an invalid signature by replacing it with the Windows OEM Device Key before performing any automated updates to the Secure Boot databases.
Caution: If a vTPM is present and disk encryption software (such as BitLocker on Windows or LUKS on Linux) is sealed to specific TPM PCR registers, preparatory steps are required before performing the key update. These steps include creating a VM snapshot, saving the recovery key (for BitLocker-type solutions), or temporarily disabling TPM-sealed disk encryption.
uefi.allowAuthBypass = "TRUE"uefi.allowAuthBypass = "TRUE"
mokutil --pk$pk = Get-SecureBootUEFI -Name PK$bytes = $pk.Bytes$cert = $bytes[44..($bytes.Length-1)][IO.File]::WriteAllBytes("PK.der", $cert)certutil -dump PK.derA temporary FAT32 disk is required to stage the Platform Key (PK) and related certificates for the Secure Boot update process.
lsblk
Note: Assuming the newly added disk is detected as /dev/sdb.sudo mkfs.vfat -F 32 -n KEYUPDATE /dev/sdbsudo mkdir -p /mnt/keys
sudo mount /dev/sdb /mnt/keysmount | grep keyssudo cp WindowsOEMDevicesPK.der /mnt/keyssudo umount /mnt/keysformat /FS:FAT32 XTo manually update the KEK certificate on the virtual machine, follow instructions below:
openssl x509 -inform der -in KEK.cer -outform der -out KEK-2023.derKEK-2023.der) to the disk mentioned in Disk Preparation for Platform Key Update step under Resolution section above.KEK-2023.der".Only DER encoded certificate file (*.cer/der/crt) is supportedopenssl x509 -inform der -in PK.cer -outform der -out PK.der