Skip to content

Commit ec76c6c

Browse files
committed
CP-14790: Restrict migrate-copy of Windows-update VMs
Licensing restriction Signed-off-by: Thomas Sanders <[email protected]>
1 parent eb04691 commit ec76c6c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ocaml/xapi/xapi_vm_migrate.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,8 @@ let assert_can_migrate ~__context ~vm ~dest ~live ~vdi_map ~vif_map ~options =
804804
let dest_host_ref = Ref.of_string dest_host in
805805
let force = try bool_of_string (List.assoc "force" options) with _ -> false in
806806
let copy = try bool_of_string (List.assoc "copy" options) with _ -> false in
807+
if copy && (Db.VM.get_auto_update_drivers ~__context ~self:vm) then
808+
Pool_features.assert_enabled ~__context ~f:Features.PCI_device_for_auto_update;
807809

808810
let source_host_ref =
809811
let host = Db.VM.get_resident_on ~__context ~self:vm in

0 commit comments

Comments
 (0)