xentaur
changeset 11:1ede117a35ec
mini changes
author | igor |
---|---|
date | Fri Sep 14 10:36:14 2007 +0300 (2007-09-14) |
parents | f7fa09a390ed |
children | 54c51dea92a2 |
files | build-xenomips-image xentaur.py |
line diff
1.1 --- a/build-xenomips-image Thu Aug 30 14:45:50 2007 +0300 1.2 +++ b/build-xenomips-image Fri Sep 14 10:36:14 2007 +0300 1.3 @@ -66,6 +66,9 @@ 1.4 apt-get -y --force-yes install ${PACKAGES} 1.5 /etc/init.d/ssh stop 1.6 cat <<FSTAB > /etc/fstab 1.7 +proc /proc proc defaults 0 0 1.8 +tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0 1.9 + 1.10 /dev/hda1 / ext3 ro 0 0 1.11 /dev/hda2 /xenomips/ios ext3 ro 0 0 1.12 /dev/hda3 /xenomips/config ext3 rw 0 0 1.13 @@ -97,7 +100,10 @@ 1.14 PROFILE 1.15 SCRIPT 1.16 1.17 -cp -R /lib/modules/${KERNEL_VERSION} ${WORK_DIR}/lib/modules 1.18 +for kernel_version in ${KERNEL_VERSION} 2.6.18-without-PAE-4-xen-686 1.19 +do 1.20 + cp -R /lib/modules/${KERNEL_VERSION} ${WORK_DIR}/lib/modules 1.21 +done 1.22 1.23 cp ${XENOMIPS_DIR}/xenomips-init ${WORK_DIR}/etc/init.d/ 1.24 cp ${XENOMIPS_DIR}/xenomips.sh ${WORK_DIR}/usr/local/bin 1.25 @@ -109,6 +115,8 @@ 1.26 build_and_install_dynamips 1.27 1.28 mv ${WORK_DIR}/etc/quagga.ORIG ${WORK_DIR2}/quagga 1.29 +perl -i -p -e 's/=no/=yes/' ${WORK_DIR2}/quagga/daemons 1.30 +touch ${WORK_DIR2}/quagga/{zebra,bgpd,ospfd,ripd,ripngd,ospf6d,isisd}.conf 1.31 umount ${WORK_DIR} 1.32 1.33 if echo $CONFIG_FS_BUILD | grep -qi ^y
2.1 --- a/xentaur.py Thu Aug 30 14:45:50 2007 +0300 2.2 +++ b/xentaur.py Fri Sep 14 10:36:14 2007 +0300 2.3 @@ -5,7 +5,10 @@ 2.4 import xenomips_vars 2.5 xenomips_vars.N='1' 2.6 sys.path.append('/etc/xen') 2.7 -from xenomipsN import bridges,vbridges_table, hidden_bridges, domains, broken_links, temporary_links, domain_types 2.8 + 2.9 +xen_config_name='fabergeN' 2.10 +from fabergeN import bridges,vbridges_table, hidden_bridges, domains, broken_links, temporary_links, domain_types 2.11 + 2.12 from IPython.Shell import IPShellEmbed 2.13 2.14 2.15 @@ -35,7 +38,7 @@ 2.16 2.17 def create_domains_script(): 2.18 for N in range(len(domains)): 2.19 - print "sudo /usr/sbin/xm create xenomipsN N="+str(N)+" && sleep 1 && sudo /usr/sbin/xm sched-credit -d $(sudo /usr/sbin/xm list | grep "+domains[N]+" | awk '{print $2}') -c 10 && sleep 1" 2.20 + print "sudo /usr/sbin/xm create "+xen_config_name+" N="+str(N)+" && sleep 1 && sudo /usr/sbin/xm sched-credit -d $(sudo /usr/sbin/xm list | grep "+domains[N]+" | awk '{print $2}') -c 10 && sleep 1" 2.21 2.22 def destroy_domains_script(): 2.23 for N in range(len(domains)): 2.24 @@ -46,15 +49,19 @@ 2.25 N=1 2.26 screens=[] 2.27 for domain in domains: 2.28 - screens.append("screen -t "+domain+" "+str(N)+" xm console "+domain) 2.29 -# ip="192.168.80."+str(200+N) 2.30 -# screens.append("screen -t "+domain+" "+str(N)+" sh -c 'while true; do ssh root@"+ip+" ; done'") 2.31 + screens.append("screen -t "+domain+" "+str(N)+" sh -c 'while true; do sudo xm console "+domain+" ; echo Retrying in 5 seconds...; sleep 5; done'") 2.32 N+=1 2.33 screenlist="\n".join(screens) 2.34 2.35 +# 2.36 +# Previous terminal acccess commands: 2.37 +# ip="192.168.80."+str(200+N) 2.38 +# screens.append("screen -t "+domain+" "+str(N)+" sh -c 'while true; do ssh root@"+ip+" ; done'") 2.39 +# 2.40 + 2.41 #hardstatus string "\%{gk}\%c \%{yk}\%M\%d \%{wk}\%?\%-Lw\%?\%{bw}\%n*\%f\%t\%?(\%u)\%?\%{wk}\%?\%+Lw\%?" 2.42 2.43 - f=open("screenrc", "w"); 2.44 + f=open(screenrc, "w"); 2.45 f.write(""" 2.46 hardstatus on 2.47 hardstatus alwayslastline