- Timestamp:
- Oct 19, 2010, 11:14:46 AM (14 years ago)
- Location:
- drbl-virt/sbin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/drbl_kvm_patch.sh
r214 r215 16 16 # = 1. Patch DRBL xen env for client = 17 17 # == Shutdown all drbl client == 18 echo "" 19 echo "Please check all client are shutdown !!!" 20 echo "you can use /opt/drbl/sbin/dcs to shutdown." 18 echo -e "\nPlease shutdown all drbl client !!!" 19 echo "You can use /opt/drbl/sbin/dcs to shutdown." 21 20 read -p "Push [Enter] to continue......" 22 21 … … 71 70 fi 72 71 # for CentOS & Fedora 73 elif [ -e /etc/sysconfig/modules ] 72 elif [ -e /etc/sysconfig/modules ]; then 74 73 grep -r "modprobe kvm" /etc/sysconfig/modules/ 75 74 if [ $? -eq 1 ]; then … … 84 83 fi 85 84 EOF 86 87 85 chmod +x /etc/sysconfig/modules/kvm.modules 88 86 fi -
drbl-virt/sbin/drbl_virt.sh
r213 r215 30 30 $Work_Path/kvm_install.sh 31 31 # patch drbl to suuport KVM environment 32 $Work_Path/drbl_ xen_patch.sh32 $Work_Path/drbl_kvm_patch.sh 33 33 # drbl re-push KVM environment 34 34 fi -
drbl-virt/sbin/drbl_xen_patch.sh
r213 r215 17 17 # = 1. Patch DRBL xen env for client = 18 18 # == Shutdown all drbl client == 19 echo "" 20 echo "Please check all client are shutdown !!!" 21 echo "you can use /opt/drbl/sbin/dcs to shutdown." 19 echo -e "\nPlease shutdown all drbl client !!!" 20 echo "You can use /opt/drbl/sbin/dcs to shutdown." 22 21 read -p "Push [Enter] to continue......" 23 22 -
drbl-virt/sbin/functions_drbl_virt
r213 r215 2 2 # Program: 3 3 # DRBL virt module 4 # Author: 4 # Author: 5 5 # Jazz, Rock {jazz, rock}@nchc.org.tw 6 6 # Version: … … 18 18 19 19 # [Check Root] 20 function check_root(){ 20 function check_root(){ 21 21 if [ $USER != "root" ]; then 22 22 echo -e "Please change root to run it!" 23 23 exit 24 24 fi 25 } 25 } 26 26 27 27 # [Change root to run] … … 71 71 VMM_select=1 72 72 echo "Xen" > $Work_Home/etc/hypervisior 73 fi 74 } 73 fi 74 } 75 75 76 76 77 77 # [Check Hypervisior] 78 78 function check_hypervisior(){ 79 hypervisior=$(cat $Work_Home/etc/hypervisior) 79 hypervisior=$(cat $Work_Home/etc/hypervisior) 80 80 } 81 81 … … 116 116 for Kernel in $Kernels 117 117 do 118 echo "($i) $Kernel" 118 echo "($i) $Kernel" 119 119 i=i+1 120 120 done … … 207 207 echo "Input VM number/IP range for $eth (ex. 40)." 208 208 echo "default is the same numbers of drbl clients" 209 209 210 210 211 211 jude_2="no" … … 233 233 234 234 # [Get VM prefix name] 235 #function get_VM_prefix_name(){ 235 #function get_VM_prefix_name(){ 236 236 #jude="no" 237 237 #while [ $jude != "yes" -a $jude != "y" ]; … … 357 357 function delete_duplicating_MAC(){ 358 358 drbl_mac_file="/etc/drbl/macadr-$eth.txt" 359 # if macadr-ethX.txt.drbl-virt_bak already have, backup it 359 # if macadr-ethX.txt.drbl-virt_bak already have, backup it 360 360 # else cp default backup 361 361 if [ -e $drbl_mac_file.drbl-virt_bak ]; then 362 362 cp $drbl_mac_file $drbl_mac_file.$(date +%Y-%m-%d-%H-%M-%S).drbl-virt_bak 363 363 cp -f $drbl_mac_file.drbl-virt_bak $drbl_mac_file 364 else 364 else 365 365 cp $drbl_mac_file $drbl_mac_file.drbl-virt_bak 366 366 fi … … 380 380 fi 381 381 done 382 } 382 } 383 383 384 384 … … 424 424 425 425 426 # [Download tomcat and mv drbl-virt.wat to wepapps] 426 # [Download tomcat and mv drbl-virt.wat to wepapps] 427 427 function install_tomcat_and_mv_drbl-virt(){ 428 428 if [ ! -e $Work_Home/tomcat-7.0.2.tar.gz ]; then 429 429 wget http://drbl-virt.googlecode.com/files/tomcat-7.0.2.tar.gz -P $Work_Home 430 fi 430 fi 431 431 tar zxvf $Work_Home/tomcat-7.0.2.tar.gz -C $Work_Home/ 432 432 mv $Work_Home/drbl-virt.war $Work_Home/tomcat-7.0.2/webapps/ … … 440 440 # [Cehck KVM kernel & version] 441 441 function check_kvm(){ 442 echo -e "\nCheck this kernel..." 442 443 KVM_Kernel=$(uname -r) 443 } 444 445 444 445 grep -E '(CONFIG_KVM=m|CONFIG_KVM=y)' /boot/config-${KVM_Kernel} >> /dev/null 446 if [ $? -eq 0 ]; then 447 echo "This Kernel supportes KVM !!!" 448 else 449 echo "This Kernel doesn't support KVM !!!" 450 echo "Please change Kernel." 451 exit 452 fi 453 } 454 -
drbl-virt/sbin/kvm_install.sh
r213 r215 12 12 source $Work_Path/functions_drbl_virt 13 13 14 # [ Intall ] 14 # [ Main ] 15 check_systemInfo 16 17 # = 1. Intall KVM = 15 18 case $Linux_Distribution in 16 19 # for Ubuntu
Note: See TracChangeset
for help on using the changeset viewer.