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/
Home Products Support Community News


Re: [Xen-users] How to wait for a destroying domU?

To: Amos Shapira <amos.shapira@xxxxxxxxx>
Subject: Re: [Xen-users] How to wait for a destroying domU?
From: Robert Read <rread@xxxxxxxxxxxxx>
Date: Thu, 17 Jul 2008 14:03:23 -0700
Cc: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 17 Jul 2008 14:04:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9c2cca270807170518u2c633c93r6560262a32ca41e0@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <9c2cca270807170518u2c633c93r6560262a32ca41e0@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx

On Jul 17, 2008, at 05:18 , Amos Shapira wrote:


I have a script for auto-reuild of CentOS 5 DomU's (on top of CentOS 5
Dom0) and basically what it does is:

xm destroy $domain
sleep 2
lvremove ...$domain's LV

Sometimes, the domain doesn't destroy within 2 second and the script fails.
I added tests to check that the domain is destroyed before the
lvremove but was wondering whether there is a more elegant way to just
run a command that will exit when the domain is no longer alive.

Is there?

Well, you easily make a command out of something like this:

   while xenstore-exists /local/domain/$DOMID/vm ; do sleep 1; done


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Xen-users mailing list