# HG changeset patch
# User David Scott <[email protected]>
# 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 <[email protected]>

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;
1 file changed, 1 insertion(+), 1 deletion(-)
ocaml/xapi/import.ml |    2 +-


# HG changeset patch
# User David Scott <[email protected]>
# 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 <[email protected]>

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;
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to