You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ qemu-system-x86_64 \
69
69
70
70
_Note:_ If you are not running Fedora, your distribution may put the UEFI OVMF image in a different location. You may need to update this before the command will work.
71
71
72
-
### Testing: Local (With Secure Boot)
72
+
### Testing: Local (With Secure Boot and traditional UEFI VARS store)
73
73
See the "Generating Secure Boot / Measured Boot keys" section further down if you want to make use of this approach.
74
74
75
75
Install `virt-firmware`:
@@ -89,7 +89,7 @@ virt-fw-vars \
89
89
--secure-boot
90
90
```
91
91
92
-
Note that we use `OVMF_VARS_4M.qcow2` as the source for the VARS file in the command above. This is a default (empty) VARS store, unlike `OVMF_VARS_4M.secboot.qcow2` which already has a number of Microsoft, Red Hat, etc keys enrolled in it. Using the blank store and the `none` arguments for the Microsoft keys means we can be sure that only **our** key is being used to validate the signed OS image.
92
+
Note that we use `OVMF_VARS_4M.qcow2` as the source for the VARS file in the command above. This is a default (empty) VARS store, unlike `OVMF_VARS_4M.secboot.qcow2` which already has a number of Microsoft, Red Hat, etc keys enrolled in it. Using the blank store and the `none` arguments for the Microsoft keys means we can be sure that only **our** key is being used to validate the signed OS image. This means we don't need to worry about maintaining up-to-date DBX (revocation) lists.
93
93
94
94
Boot the image directly like this:
95
95
```sh
@@ -103,6 +103,35 @@ qemu-system-x86_64 \
103
103
-kernel images/<imagename>.efi.img
104
104
```
105
105
106
+
### Testing: Local (With Secure Boot and JSON-based UEFI VARS store)
107
+
> [!WARNING]
108
+
> This is an experimental feature that was introduced in QEMU 10.0. The OVMF_CODE build being used must be built with `QEMU_PV_VARS=TRUE` otherwise it will just hang. The current Fedora builds of `OVMF_CODE_4M.secboot.qcow2` are built to expect a pflash-backed variable store rather than a JSON-backed one.
109
+
110
+
This method makes use of the [Host UEFI variable service](https://www.qemu.org/docs/master/devel/uefi-vars.html#host-uefi-variable-service) available in more recent versions of QEMU to provide the Secure Boot keys to the VM as a JSON object.
(Yes, there are private keys already in the `keys/` directory in this repo. Maybe you're here because your repo scanning tool found them. No, they're never used for any prod systems. They're mostly just here as an example so the scheduled GitHub Actions pipeline.)
215
+
(Yes, there are private keys already in the `keys/` directory in this repo. Maybe you're here because your repo scanning tool found them. No, they're never used for any prod systems. They're mostly just here as an example so the scheduled GitHub Actions pipeline actually works.)
0 commit comments