From 8c7dd043923224d26701fc867a848dbdb80a4bfa Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Mon, 17 Aug 2009 13:11:34 +0100 Subject: [PATCH] use the new check function to check for xenvm --- xenvm/xenvm.ml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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; -- 2.39.5