WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH] fix VM power_states on metadata import

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] fix VM power_states on metadata import
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Wed, 17 Mar 2010 17:57:43 +0000
Delivery-date: Wed, 17 Mar 2010 10:48:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# 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 <dave.scott@xxxxxxxxxxxxx>

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 +-


Attachment: xen-api.hg.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] fix VM power_states on metadata import, David Scott <=