WARNING - OLD ARCHIVES

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

xen-users

Re: [Xen-users] xendomains and xl toolstack question

To: David Gonzalez Herrera <dgonzalezh@xxxxxxxxx>
Subject: Re: [Xen-users] xendomains and xl toolstack question
From: Mark Pryor <tlviewer@xxxxxxxxx>
Date: Fri, 29 Jul 2011 17:04:21 -0700 (PDT)
Cc: "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 29 Jul 2011 17:05:45 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1311984261; bh=2MtB8QFo4ff/+UVpx12ylPctZMehP0cbvZBSexCZSRo=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kel8Nj7dFGHljikw9kYifSEkn+0nD8cvPC0k6wDUWIMWL+QLFJInIh/37QLJGX5FuCYEsNA3hipodLN2y0gcrPXdYKHBCSR4cz/4mGqjxzk5M3F4AgJcpHRtZDtyU/5emccwmIXC5cycZFCegEZhUY/QXtCZcTWxFWibjyzKni0=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=GBJDKKvuS0rQDgxjB/ijJDODT8JgML5SWn7kSQh4MIUVMO0kojD9syq2y4k5xVwMZQGPMGmnsuRQnI2AZfw7Fg6NzPhga4B5Fledc8ZgmHmmyFTHHWjIA408oTGVYV4OMlPZuBiGTyhaFYeIneEgvrhmTQTyaivvAJSAZywlgHo=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CAE0ZZC1cVehU1RZCwDcrepj7ffkLHQ_H+OLOHRH7C4dj87KDYQ@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: <CAE0ZZC1cVehU1RZCwDcrepj7ffkLHQ_H+OLOHRH7C4dj87KDYQ@xxxxxxxxxxxxxx>
Reply-to: Mark Pryor <tlviewer@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx


________________________________
From: David Gonzalez Herrera <dgonzalezh@xxxxxxxxx>
To: xen-users@xxxxxxxxxxxxxxxxxxx
Sent: Friday, July 29, 2011 2:54 PM
Subject: [Xen-users] xendomains and xl toolstack question


Hello all

I've just installed xen 4.1.1 on my server and was tryoing to tweak xendomains 
script to work with new xl schema but I can´t get it to save domains. It does 
start them with some changes I made to it but when I issue service xendomains 
stop I just get [  OK  ]  but domains stay running.

Has xendomains script been ported to work with 4.1.1 or is there another 
alternative to it.

Thank you very much.

----------------

I see you want to use xl and xendomains together. I believe that xendomains 
service still needs xend service running.

If you check your
/etc/rc2.d
/etc/rc6.d

xencommons, xend, xendomains needs to start in this order in rc2 and shutdown 
opposite in rc6.

When you have multiple guests running it can be risky to shutdown when you 
aren't sure that guest will shutdown too.
For this reason I use the script below to shutdown guests that show in `xm 
list`. If you use xl, you might need to modify down_xm.sh

--------------------------- script ------------
>cat >>down_xm.sh<<EOL
#!/bin/bash
#
# script to take down Xen guests before xendomains goes down
# Last created guests shutdown first (LIFO)
# author: ChmEarl on ##xen on Freenode
#

PATH=$PATH:/sbin:/usr/sbin

TP=$(xm list| gawk  '{if ( FNR>2) print $2 }'|sort -rn)

TP=$(echo $TP|sed "s/\n/ /g")
# sortspaces() { tr ' ' '\n' <<< "$@" | sort | tr '\n' ' '; }
echo "TP=$TP"

echo "len=${#TP}"
#exit 0

if [ ${#TP} -gt 0 ]; then

echo "its executable"

for i in $TP ; do ( xm shutdown $i; echo "stop guest $i"; sleep 3 );  done
sleep 3
/etc/init.d/xendomains stop

fi

exit 0
EOL

----------- example use -------------
> sudo ./down_xm.sh
TP= 12 11 10 9
len=11
its executable
stop guest 12
stop guest 11
stop guest 10
stop guest 9
Shutting down Xen domains            done

-- 
Mark


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>