]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
CP-1801: modify VM import/export to wipe the policy pointer field information
authorMarcus Granado <marcus.granado@eu.citrix.com>
Mon, 23 Aug 2010 14:54:36 +0000 (15:54 +0100)
committerMarcus Granado <marcus.granado@eu.citrix.com>
Mon, 23 Aug 2010 14:54:36 +0000 (15:54 +0100)
Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
ocaml/xapi/export.ml
ocaml/xapi/import.ml

index 259056d26f19f8d01241d2e821e6dd1d6dfd5031..2ac6560804b253ea9d1e7860dc349e721f92f5d1 100644 (file)
@@ -170,6 +170,7 @@ let make_vm ?(with_snapshot_metadata=false) ~preserve_power_state table __contex
                API.vM_consoles = [];
                API.vM_metrics = Ref.null;
                API.vM_guest_metrics = lookup table (Ref.string_of vm.API.vM_guest_metrics);
+               API.vM_protection_policy = Ref.null;
                API.vM_bios_strings = vm.API.vM_bios_strings } in
   { cls = Datamodel._vm; 
     id = Ref.string_of (lookup table (Ref.string_of self)); 
index bc47e3257fb356cb545763fd8e26a47d8b86da9d..60d41c55a6d6c065e4bf19da9c4c4d09b6d7dbfe 100644 (file)
@@ -192,6 +192,7 @@ let handle_vm __context config rpc session_id (state: state) (x: obj) : unit =
        let vm_record = {vm_record with API.
                vM_memory_overhead = Memory_check.vm_compute_memory_overhead vm_record
        } in
+       let vm_record = {vm_record with API.vM_protection_policy = Ref.null} in
 
   let vm = log_reraise
     ("failed to create VM with name-label " ^ vm_record.API.vM_name_label)