# HG changeset patch # User David Scott # Date 1268848641 0 # Node ID 8b359da7c685ed5deac3390d59ba5947e338cdc7 # Parent 0499cdf381f9c1146d4d3640204a7e264d700730 CA-36410: When importing VM metadata, if the VM is Suspended then preserve this. If the VM was in any other state (eg Running) then it can't be any more: set it to Halted. Signed-off-by: David Scott diff -r 0499cdf381f9 -r 8b359da7c685 ocaml/xapi/import.ml --- a/ocaml/xapi/import.ml Wed Mar 17 17:02:50 2010 +0000 +++ b/ocaml/xapi/import.ml Wed Mar 17 17:57:21 2010 +0000 @@ -226,7 +226,7 @@ raise e end end else - Db.VM.set_power_state ~__context ~self:vm ~value:vm_record.API.vM_power_state; + Db.VM.set_power_state ~__context ~self:vm ~value:`Halted; (* We might want to import a control domain *) Db.VM.set_is_control_domain~__context ~self:vm ~value:vm_record.API.vM_is_control_domain;