]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
CA-40610: Fix lvhdrt/tc8713 vm cleanup path.
authorDaniel Stodden <daniel.stodden@citrix.com>
Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)
committerDaniel Stodden <daniel.stodden@citrix.com>
Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
ocaml/lvhdrt/utils.ml

index c1e44439db1f55c3159fd575da6d5124aa879a7c..fdec789ee45c5d843f777f4833155ca9a02f425b 100644 (file)
@@ -232,6 +232,8 @@ let with_sacrificial_vm rpc session f =
     Pervasiveext.finally 
       (fun () -> f vm')
       (fun () ->
+        if Client.VM.get_power_state rpc session vm' <> `Halted then
+          Client.VM.hard_shutdown rpc session vm';
         List.iter 
           (fun vbd ->
              let vdi = Client.VBD.get_VDI rpc session vbd in