if (r < 0)
return log_error_errno(r, "Failed to find OVMF config: %m");
+ if (arg_secure_boot > 0 && !ovmf_config->supports_sb) {
+ assert(arg_firmware);
+
+ return log_error_errno(SYNTHETIC_ERRNO(EMEDIUMTYPE),
+ "Secure Boot requested, but supplied OVMF firmware blob doesn't support it.");
+ }
+
+ if (arg_secure_boot < 0)
+ log_debug("Using OVMF firmware %s Secure Boot support.", ovmf_config->supports_sb ? "with" : "without");
+
_cleanup_(machine_bind_user_context_freep) MachineBindUserContext *bind_user_context = NULL;
r = machine_bind_user_prepare(
/* directory= */ NULL,
if (r < 0)
return r;
- /* only warn if the user hasn't disabled secureboot */
- if (!ovmf_config->supports_sb && arg_secure_boot)
- log_warning("Couldn't find OVMF firmware blob with Secure Boot support, "
- "falling back to OVMF firmware blobs without Secure Boot support.");
-
_cleanup_free_ char *machine = NULL;
const char *shm = arg_directory || arg_runtime_mounts.n_mounts != 0 ? ",memory-backend=mem" : "";
const char *hpet = ARCHITECTURE_SUPPORTS_HPET ? ",hpet=off" : "";