Skip to content

Commit 3300fd5

Browse files
committed
Add Secure Boot variable change announcement and instructions
Signed-off-by: Tu Dinh <[email protected]>
1 parent ca2fcb7 commit 3300fd5

File tree

1 file changed

+56
-5
lines changed

1 file changed

+56
-5
lines changed

docs/guides/guest-UEFI-Secure-Boot.md

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,49 @@ How to configure UEFI Secure boot?
44

55
Enabling UEFI Secure Boot for guests ensures that XCP-ng VMs will only execute trusted binaries at boot. In practice, these are the binaries released by the operating system (OS) vendor for the OS running in the VM (Microsoft Windows, Debian, RHEL, Alpine, etc.).
66

7+
## Upcoming changes in Secure Boot
8+
9+
The default Secure Boot keys in XCP-ng are changing.
10+
11+
Previously, XCP-ng only shipped with the PK included by default; Secure Boot variables had to be installed using `secureboot-certs`.
12+
New versions of XCP-ng `varstored` (from version 1.2.0-2.4 and newer) now comes with a complete set of Secure Boot variables (PK/KEK/db/dbx) by default, meaning that guest Secure Boot will now work without needing further pool configuration.
13+
14+
Our defaults now include the 2023 Microsoft `KEK` and `db` certificates, ensuring Windows compatibility beyond 2026 (which is when the previous 2011 certificates expire).
15+
16+
### What this change means for you
17+
18+
You will not be affected in most cases.
19+
20+
* Existing VMs will not be affected unless you use the ["Propagate certificates"](#propagate-pool-certificates-to-a-vm) feature in Xen Orchestra (which has always had the effect of resetting VM Secure Boot variables to that of the pool).
21+
* If you followed our previous guides and used `secureboot-certs install` to install the default Secure Boot variables into your pool, these variables will not be changed.
22+
23+
The only VMs affected by these changes are **newly created VMs** with Secure Boot enabled, running on pools where `secureboot-certs install` have not been executed.
24+
Previously, these VMs will execute all UEFI binaries even with Secure Boot enabled (due to an empty dbx variable); however, going forward, revoked UEFI binaries (e.g. from an outdated media) will no longer boot on such VMs with Secure Boot enabled.
25+
26+
To continue booting outdated media on these VMs, you can either:
27+
28+
- Disable Secure Boot;
29+
- Or erase the VM's dbx variable with the command `varstore-rm <vm uuid> d719b2cb-3d3a-4596-a3bc-dad00e67656f dbx`
30+
31+
Once your VM has completed installing, it should be able to manage its own Secure Boot variables (db/dbx) via its update mechanism.
32+
733
## Requirements
834

935
* XCP-ng >= 8.2.1.
1036
* UEFI Secure Boot Certificates installed on the pool (this is detailed below).
1137
* A UEFI guest VM.
12-
* For Windows, ensure the VM has at least 2 vCPUs.
1338

1439
:::warning
1540
Until we can re-sign XCP-ng's PV drivers for Windows, you will need the PV drivers from XenServer before enabling Secure Boot for a Windows VM. See [Setup Secure Boot for Windows VMs](#setup-secure-boot-for-windows-vms).
1641
:::
1742

1843
Note: it's not necessary that the XCP-ng host boots in UEFI mode for Secure Boot to be enabled on VMs.
1944

20-
## Quick Start
45+
## 8.3 with varstored >= 1.2.0-2.4
46+
47+
Secure Boot is ready to use without extra configuration. Simply activate Secure Boot on your VMs, and they will be provided with an appropriate set of default Secure Boot variables.
48+
49+
## Quick Start (8.2.1 and 8.3 with varstored < 1.2.0-2.4)
2150

2251
We believe that reading this guide will provide you with useful knowledge about the way Guest Secure Boot is handled in XCP-ng, and let you avoid mistakes.
2352

@@ -91,24 +120,46 @@ For custom certificates (advanced use), see [Install Custom UEFI Certificates](#
91120

92121
### Install the Default UEFI Certificates
93122

123+
:::info
124+
This procedure is not necessary if you're using varstored 1.2.0-2.4 and newer. However, the
125+
:::
126+
94127
`secureboot-certs` supports installing a default set of certificates across the pool.
95128

96129
Except the `PK` key which is already provided by XCP-ng, all certificates are downloaded from official sources (`microsoft.com` and `uefi.org`).
97130

98131
The default certificates are sourced as follows:
99132

133+
**With varstored < 1.2.0-2.4:**
134+
100135
| Certificate | Source | CLI Arg |
101136
|-------------|-------------------------------------------------------------------------------------------------------------------|-----------|
102137
| PK | Provided by XCP-ng, already present on disk. | `default` |
103-
| KEK | [Microsoft Corporation UEFI KEK CA 2011](https://www.microsoft.com/pkiops/certs/MicCorKEKCA2011_2011-06-24.crt) | `default` |
138+
| KEK | [Microsoft Corporation KEK CA 2011](https://www.microsoft.com/pkiops/certs/MicCorKEKCA2011_2011-06-24.crt) | `default` |
104139
| db | [Microsoft Corporation UEFI CA 2011](https://www.microsoft.com/pkiops/certs/MicCorUEFCA2011_2011-06-27.crt) and [Microsoft Windows Production PCA 2011](https://www.microsoft.com/pkiops/certs/MicWinProPCA2011_2011-10-19.crt) | `default` |
105140
| dbx | [UEFI Revocation List](https://uefi.org/sites/default/files/resources/dbxupdate_x64.bin) | `latest` |
106141

107-
To install these certificates from the command line interface:
142+
**With varstored >= 1.2.0-2.4:**
143+
144+
All keys are built into varstored-tools and present on disk. There's no need to configure them except for custom Secure Boot scenarios.
145+
146+
Certificate and revocation lists provided by [microsoft/secureboot_objects](https://github.com/microsoft/secureboot_objects).
147+
148+
| Certificate | Source | CLI Arg |
149+
|-------------|-------------------------------------------------------------------------------------------------------------------|-----------|
150+
| PK | Provided by XCP-ng. | `default` |
151+
| KEK | Microsoft Corporation KEK CA 2011 and Microsoft Corporation KEK 2K CA 2023 | `default` |
152+
| db | Microsoft Windows Production PCA 2011, Windows UEFI CA 2023, Microsoft Corporation UEFI CA 2011, Microsoft UEFI CA 2023 and Microsoft Option ROM UEFI CA 2023 | `default` |
153+
| dbx | Image hashes provided by microsoft/secureboot_objects (can specify `latest` to download latest dbx instead) | `default` |
154+
155+
To install these variables from the command line interface:
108156

109157
```
110-
# Download and install PK/KEK/db/dbx certificates
158+
# Download and install PK/KEK/db/dbx certificates (varstored < 1.2.0-2.4)
111159
secureboot-certs install default default default latest
160+
161+
# Reinstall built-in PK/KEK/db/dbx variables (varstored >= 1.2.0-2.4)
162+
secureboot-certs install default default default default
112163
```
113164

114165
This can be shortened to:

0 commit comments

Comments
 (0)