David Gonzalez Herrera
2011-Jul-29 21:54 UTC
[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. --- David Gonzalez H. DGHVoIP - OPEN SOURCE TELEPHONY SOLUTIONS Phone Bogotá: +(57-1)289-1168 Phone Medellin: +(57-4)247-0985 Mobile: +(57)315-838-8326 MSN: david@planetaradio.net Skype: davidgonzalezh WEB: http://www.dghvoip.com/ Proud Linux User #294661 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
________________________________ From: David Gonzalez Herrera <dgonzalezh@gmail.com> To: xen-users@lists.xensource.com 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.shTP= 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@lists.xensource.com http://lists.xensource.com/xen-users
Carsten Schiers
2011-Aug-01 11:59 UTC
AW: [Xen-users] xendomains and xl toolstack question
Some issues got fixed, but I think they are currently only in xen-unstable, although they can be easily backported. BR, Carsten. ----- Originalnachricht ----- Von: Mark Pryor <tlviewer@yahoo.com> Gesendet: Sam, 30.7.2011 02:04 An: David Gonzalez Herrera <dgonzalezh@gmail.com> Cc: xen-users@lists.xensource.com Betreff: Re: [Xen-users] xendomains and xl toolstack question ________________________________ From: David Gonzalez Herrera <dgonzalezh@gmail.com> To: xen-users@lists.xensource.com 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.shTP= 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@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Maybe Matching Threads
- How to auto-start Guests when using 'xl' toolstack? 'old' configs in /etc/xen/auto/ are ignored without xend service active.
- [Patch[ xl problems with xendomains
- Bug#680528: xcp-xapi: /etc/init.d/xendomains cause xapi to hand during boot
- Bug#763102: xen-utils-common: xen-init-list fails to parse xm output -> cannot shutdown domains with service xendomains
- Xen 4.2.2 /etc/init.d/xendomains save and restore of domains does not work