]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
use the new check function to check for xenvm
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Mon, 17 Aug 2009 12:11:34 +0000 (13:11 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Mon, 17 Aug 2009 12:11:34 +0000 (13:11 +0100)
xenvm/xenvm.ml

index d912e311b05a18f7801120386375ee75d348453e..38e440043a5e62b1535d54ea474c273798ed8f65 100644 (file)
@@ -135,17 +135,7 @@ let check_vm_uuid uuid =
        )
 
 let check_vm uuid =
-       let is_running =
-               try
-                       let reply = Xenvmlib.request ~timeout:10. uuid ("status", []) in
-                       begin match reply with
-                       | Xenvmlib.Msg _ -> ()
-                       | _              -> ()
-                       end;
-                       true
-               with Xenvmlib.Connect_refused s ->
-                       false
-               in
+       let is_running = Xenvmlib.check ~timeout:10. uuid in
        if is_running then (
                info "VM is already handled by another xenvm";
                exit 1;