[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] xendomains init script
On 26/10/05, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx> wrote: > > I think about adding one more feature to the script: Here's another feature... I'm not sure if anyone else will need this, but we had a requirement to log all console output, and to have console windows available at all time and potentially multiplexed between users. I solved it by having each xen domain start up in a persistent window inside a screen session. My (gentoo) xendomains start() and stop() currently look like: start() { einfo "Starting ${AUTODIR} Xen domains" if [[ ${SCREEN} == "yes" ]]; then screen -d -m -S xen -t xen-cbc0 screen -r xen -X zombie dr logrotate -f /usr/share/xen/xen-consoles-logrotate screen -r xen -X logfile /var/log/xen-consoles/%t screen -r xen -X logfile flush 1 screen -r xen -X deflog on fi # Create all domains with config files in AUTODIR. for dom in $(ls ${AUTODIR}/* 2>/dev/null); do name=$(get_domname ${dom}) if ! is_running ${name} ; then ebegin " Starting domain ${name}" if [[ ${SCREEN} == "yes" ]]; then screen -r xen -X screen -t ${name} xm create ${dom} -c else xm create --quiet ${dom} fi eend $? else einfo " Not Starting domain ${name} - allready running" fi done } stop() { einfo "Shutting down ${AUTODIR} Xen domains" # Stop all domains with config files in AUTODIR. for dom in $(ls ${AUTODIR}/* 2>/dev/null); do name=$(get_domname ${dom}) if is_running ${name} ; then ebegin " Stopping domain ${name}" xm shutdown --wait ${name} >/dev/null eend $? else einfo " Not Stopping domain ${name} - not running" fi done if [[ ${SCREEN} == "yes" ]]; then screen -r xen -X quit fi } It should be easy to adapt this to the generic script if others find it useful. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |