Secure Boot – Microsoft UEFI CA 2023 Certificate Not Included in EFI Disk

Hey there,
I am currently running a WIN2019 Server on Proxmox.

On my tasklist is the UEFI certificate stuff ;-)

In one of the previous posts I see, that for new instances the setting is applied.

But for the existing one?
Fiona stated, that there might be a GUI button.

Until that change is implemented there seems to be another way:
Hi @Nerion,
with qemu-server >= 9.1.4, you can set the ms-cert=2023w property for an EFI disk via the API.
For me as complete PM newbie...is
Code:
qm set VMID --efidiskXX ms-cert=2023w
the right way?

I think the "w" is a typo right ?

S.
 
Last edited:
I think the "w" is a typo right ?
Based on this document, it does appear to be a typo.

However, checking the <vmid>.conf file, it appears as:
Code:
efidisk0: Storage:106/vm-106-disk-0.qcow2,efitype=4m,ms-cert=2023w,pre-enrolled-keys=1,size=528K
 
But for the existing one?



I think the "w" is a typo right ?

No:
https://git.proxmox.com/?p=qemu-ser...d06b73036ada9cec7e7bba7d4eca1660562eb2ca#l524
 
It seems that `Microsoft Corporation KEK 2K CA 2023` is missing when adding via the `qm enroll-efi-keys` command.

It is included when adding a new EFI disk (ms-cert=2023w).
 
Last edited:
Hey Neobin,
well as this post you quoted is quite old I am wondering if it is still valid.
In my understanding the 2023 keys were implemented in the qemu-server later and I am wondering if there are additional steps needed.

e.g. the qm set VMID --efidiskXX ms-cert=2023w
 
It seems that `kek` is missing when adding via command.

It is included when adding a new EFI disk.
Hmm confusion grows and grows.....

So I have to replace the existing EFI disk with a new one?
Will this harm/affect the activation status of the Windows OS?

Sorry for the dumb questions but I am new to PVE.

How can I replace the EFI disk?
 
The discussion about missing parts is ‘here’, but you don't need to register them from the BIOS.

We were unable to test ‘qm enroll-efi-keys’ because we lacked a test virtual machine, but at least the ‘ms-cert=2023w’ created on the latest patched PVE9 computer does contain the KEK.

1. Disable BitLocker on the guest OS

manage-bde -protectors -disable <drive>

*I suppose getting a recovery key is fine, but I can't guarantee it.

 manage-bde -protectors -get <drive>

2. Shut down the virtual machine
3. Delete the EFI partition
4. Create the EFI partition
 
Last edited:
When creating a new virtual machine (including ms-cert=2023w) and executing the following command, KEK is displayed. Is this something else...?

*KEK was displayed even when not connected to the network, so it was determined that this was not a patch on the guest OS.

[System.Text.Encoding]::ASCII.GetString((Get-SecureBootUEFI kek).bytes)

Editing: The virtual machine created using the following steps will display the results below. KEK is not manually registered. However, it exists in the results. (It already exists.)

1. Disable BitLocker on the guest OS

manage-bde -protectors -disable <drive>

*I suppose getting a recovery key is fine, but I can't guarantee it.

 manage-bde -protectors -get <drive>

2. Shut down the virtual machine
3. Delete the EFI partition
4. Create the EFI partition

The KEK for ms-cert=2023w appears to include Microsoft Corporation KEK 2K CA 2023.

Code:
PS C:\Windows\system32> [System.Text.Encoding]::ASCII.GetString((Get-SecureBootUEFI kek).bytes)
U0n10?H??+?r???????H???m=0??0???E?9>R)x6??B??{???K70
U05234249Z0n10devel@lists.debian.org0(PK/KEK key)1,0*    *?H??
?0???bian-devel@lists.debian.org0?"0K/KEK key)1,0*    *?H??
???I????T*q?y????Yb?q??l?P????????<I??Q??????Q:?[8S??hR?>????^?0??s??V?J(?3?Ra{??@??x[?mj??D???{-???
g?S???e???Xe?Y?W?3H?l'?????c???R4(????{?w??N?j??+???B?2?4??o???_? ?3??]?ixN.???S0Q0U?       ??*?H????s0U#0?? ???}-]?0g???????s0U?0?0
j??|???m3s???M???Tt??(?oX1?A?%?@?(?69s????>BZ{ x?Mi????????B?w??;??y\]q??h?i-???Q?9?Rp?<?????b?kaK?{???:???y??~E??l?1?
8'?<?D"Nz?r/v\??&??qR_[????S??
??%?Y?????J???\+?r????wY2M?`(???xK0??0???
a
0??10H??   UUS10U
Washington10URedmond10U
260624205129Z0??10tion1UUS10Uft Corporation Third Party Marketplace Root0
Washington10URedmond10U
?0???orporation1*0(U!Microsoft Corporation KEK CA 20110?"0 ★
?J?t*???m????Zc2|O??8?????????,?????     ?????0?H?P?d?Q??O? ???/??????????Sjb:C??%???????#??p??M????????????/???$???????J?C~?G?l?????3?*q???<?%       /hvF??O???q*X???y=??e;?)*??rY??????5????_??v??c???y@?y??R???{i???O0?K0     +?70Ub?C??>??g?[?U?{???_0 +?7
SubCA0U?0U?0?0U#0?EfRC?~X??N?#;:"j?0\UU0S0Q?O?M?Khttp://crl.microsoft.com/pki/crl/products/MicCorThiParMarRoo_2010-10-05.crl0`+T0R0P+0?Dhttp://www.microsoft.com/pki/certs/MicCorThiParMarRoo_20???????*<?*??????Rf????uz??-?vZ?y??7jQ{d??d?g???????Xd?W??_????i?HK2??]?0?????x?+???4V?????A%p?k???????<??????C??-???j+Z|D?R???-??R???=?`??3????e^V????B??w?qV???#?????X~?ig?~???
???O?u;??$?PA@y?-O??B?)??FA;???CYe?
5|?4r??`;?y???]???????%o8?????y??i?? ????????uk4??`?\??WN6?2????Y?????J???\+?r?????wY2M?`(???xK0??0???0Z10?H??   UUS10U
380302203135Z0\10ation1UUS10Uft RSA Devices Root CA 20210
?0???orporation1-0+U$Microsoft Corporation KEK 2K CA 20230?"0 ★
??^??s,?
?????-??&57?ISq?[?R?????9??LeuS??
?)?R&?+????????4?c?t?r?)~?2!Y?w?*?L??7??????H!?a??Q???$c.??????^i?Q
?+???4N??9??1?=??v??????/(?H??????h[?n?z???I??S?M/?{???????pw?EI?????f??}6?
,???!-????\T???m0?i0U??0    +?70U??r??>??f?}ZC>\BT?_0 +?7
SubCA0U?0?0U#0??D???,??????.???    0eU^0\0Z?X?V?Thttp://www.microsoft.com/pkiops/crl/Microsoft%20RSA%20Devices%20Root%20CA%202021.crl0r+f0d0b+0?Vhttp://www.microsoft.com/pkiops/certs/Microsoft%20RSA%20???g?O9??4?]*x{8????<=2
^?X?o???????D&?,?_n#%?[L&.v1C.n??1?J?????u??????xD?3v?+M????;?M)????????F?]??????v?+?????k?>????6/??(?@?&???5??
???!'??B1V.????4?N?p0i????dFo?!???2???E8]N?????s?5O???k>?T4I??z???Y?+*??&??l?????A?o???n????@?8mp????VH????P?nm??k??rdP??U?n?K??2??mez?RW0\?(f?z?qN?a`zmV?[      >??????????xxk??*?xg>?*??]???50???Ek????????
PS C:\Windows\system32>

Of course, the `qm enroll-efi-keys` command does not include the process to register the KEK, so the KEK will not be registered. If you want to register it using the `qm enroll-efi-keys` command, I believe you'll just have to wait for a fix.

If I am mistaken, I am truly sorry.

...

Please refrain from displaying the annoying log prompting for an update to ms-cert=2023k when booting virtual machines with the certificate ms-cert=2023w present on the EFI disk. All virtual machines running on PVE have already completed Microsoft's CVE fixes...

It's ridiculous that such logs persist unless re-run, despite the issue being resolved.
 
Last edited:
Hi @uzumo,
no the issue is only fixed for EFI disks created with pve-edk2-firmware-ovmf >= 4.2025.05-1. For EFI disks that already existed and that have the 2023w marker, the KEK is not yet enrolled. The latest revision of the patch series will make sure that enrollment for such partially enrolled disks can still be done. For disks where the KEK is already enrolled, it's essentially a no-op anyways.
 
Silly question, but how does one check to see what EFI Disk was used for creating a Windows VM? Or if the EFI Disk associated to a VM already has the 2023 CA updates?

I've read through all of these posts and I'm a bit confused on the steps to ensure the 1801 Event is no longer showing that the Secure Boot is not updated.

My PVE hosts show they have the pve-edk2-firmware version 4.2025.02-4~bpo12+1.
I have guests with a mix of OVMF-UEFI or SeaBIOS as their BIOS configuration.

When I look at a VMs with SeaBIOS, under the Hardware list, there is no EFI DISK associated.
When I look at the VMs with OVMF-UEFI, the EFI disk is something like the following example:
ceph-vm-storage:vm-135-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
I didn't build the VMs, but it appears to me that during VM creation (or Import), when you specify the BIOS type as OVMF, the VM gets generated with Proxmox building the EFI disk from the pve-edk2-firmware file and labeling the EFI disk with the VMs VMID.

For a Windows VM with the SeaBIOS option, I see the Event ID 1801 being logged on reboots. That Event entry is the following (shortened for brevity):
"Updated Secure Boot certificates are available on this device but have not yet been applied to the firmware. Review published guidance...
BaseboardManufacturer:;FirmwareManufacturer:SeaBIOS;FirmwareVersion:rel-1.16.3-0-xxxx-prebuilt.qemu.org"

If the VMs with the Default SeaBIOS option don't have an EFI disk, what steps do we need to take to ensure the Secure Boot piece is updated/resolved for the OS?

Do I understand correctly that if a Windows 11 or Server 2019/2022 VM is created choosing the OVMF BIOS option, and the pve-edk2-firmware version is 4.2025.02-4~bpo12+1, then there is nothing needed to be done. BIOS is supposed to have the updated 2023 keys, and Windows Update will eventually align the OS with the BIOS for SecureBoot to function properly?

Thanks in advance for the clarifications.
Regards,
MOdette
 
Hi,

SeaBIOS => not UEFI so it does not apply

If you want to be sure you can run this powershell :
[System.Text.Encoding]::ASCII.GetString((Get-SecureBootUEFI db).bytes) -match 'Windows UEFI CA 2023'
[System.Text.Encoding]::ASCII.GetString((Get-SecureBootUEFI kek).bytes) -match 'Microsoft Corporation KEK 2K CA 2023'

Both should reply "true"

Best regards,