File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -998,6 +998,8 @@ let prefer_nbd_attach = ref false
998
998
(* * 1 MiB *)
999
999
let max_observer_file_size = ref (1 lsl 20 )
1000
1000
1001
+ let secureboot_enforce = ref false
1002
+
1001
1003
let xapi_globs_spec =
1002
1004
[
1003
1005
( " master_connection_reset_timeout"
@@ -1470,6 +1472,11 @@ let other_options =
1470
1472
, (fun () -> string_of_int ! max_observer_file_size)
1471
1473
, " The maximum size of log files for saving spans"
1472
1474
)
1475
+ ; ( " secureboot-enforce"
1476
+ , Arg. Set secureboot_enforce
1477
+ , (fun () -> string_of_bool ! secureboot_enforce)
1478
+ , " Do not start a VM with no SB certificates if secureboot is set to on"
1479
+ )
1473
1480
]
1474
1481
1475
1482
(* The options can be set with the variable xapiflags in /etc/sysconfig/xapi.
Original file line number Diff line number Diff line change @@ -605,6 +605,10 @@ let create ~__context ~name_label ~name_description ~power_state ~user_version
605
605
else
606
606
other_config
607
607
in
608
+ let _platform = if ! Xapi_globs. secureboot_enforce
609
+ then (" secureboot-enforce" , " true" ) :: platform
610
+ else platform
611
+ in
608
612
(* NB apart from the above, parameter validation is delayed until VM.start *)
609
613
let uuid = Uuidx. make () in
610
614
let vm_ref = Ref. make () in
@@ -664,7 +668,7 @@ let create ~__context ~name_label ~name_description ~power_state ~user_version
664
668
~memory_static_min ~v CPUs_params ~v CPUs_at_startup ~v CPUs_max
665
669
~actions_after_softreboot ~actions_after_shutdown ~actions_after_reboot
666
670
~actions_after_crash ~h VM_boot_policy ~h VM_boot_params
667
- ~h VM_shadow_multiplier ~suspend_ VDI:_suspend_VDI ~platform ~n VRAM ~p V_kernel
671
+ ~h VM_shadow_multiplier ~suspend_ VDI:_suspend_VDI ~platform: _platform ~n VRAM ~p V_kernel
668
672
~p V_ramdisk ~p V_args ~p V_bootloader ~p V_bootloader_args ~p V_legacy_args
669
673
~p CI_bus ~other_config ~domid: (- 1L ) ~domarch: " "
670
674
~last_boot_ CPU_flags:_last_boot_CPU_flags ~is_control_domain: false ~metrics
You can’t perform that action at this time.
0 commit comments