From: Vincent Hanquez Date: Mon, 17 Aug 2009 12:11:34 +0000 (+0100) Subject: use the new check function to check for xenvm X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8c7dd043923224d26701fc867a848dbdb80a4bfa;p=xenclient%2Ftoolstack.git use the new check function to check for xenvm --- diff --git a/xenvm/xenvm.ml b/xenvm/xenvm.ml index d912e31..38e4400 100644 --- a/xenvm/xenvm.ml +++ b/xenvm/xenvm.ml @@ -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;