Skip to content

Commit bc93544

Browse files
committed
CP-14790: Restrict VM.create of Windows-update VMs
Creation of a VM (even if a template) is now subject to licence check if the VM is to have the PCI device that triggers Windows update. Signed-off-by: Thomas Sanders <[email protected]>
1 parent e2f6ab3 commit bc93544

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ocaml/xapi/xapi_vm_helpers.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ let create ~__context ~name_label ~name_description
107107
~has_vendor_device
108108
: API.ref_VM =
109109

110-
(* NB parameter validation is delayed until VM.start *)
110+
if auto_update_drivers then
111+
Pool_features.assert_enabled ~__context ~f:Features.PCI_device_for_auto_update;
112+
113+
(* NB apart from the above, parameter validation is delayed until VM.start *)
111114

112115
let uuid = Uuid.make_uuid () in
113116
let vm_ref = Ref.make () in

0 commit comments

Comments
 (0)