- Timestamp:
- Aug 13, 2010, 3:37:28 PM (14 years ago)
- Location:
- drbl-virt/sbin
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/drbl_kvm_patch.sh
r171 r178 10 10 11 11 # [Source] 12 source functions_drbl_virt13 12 source /opt/drbl-virt/conf/drbl-virt.conf 13 source $Work_Path/functions_drbl_virt 14 14 15 # [Main] 16 15 17 16 18 -
drbl-virt/sbin/drbl_virt.sh
r175 r178 21 21 # [Install VMM/Hypervisior] 1=Xen, 2=KVM 22 22 if [ $VMM_select == 1 ]; then 23 source xen_install.sh23 bash "xen_install.sh start" 24 24 else 25 source kvm_install.sh25 bash "kvm_install.sh" 26 26 fi 27 27 -
drbl-virt/sbin/drbl_xen_patch.sh
r177 r178 39 39 declare -i modify_line=$(cat -n $generate_PXE_menu | grep 'label drbl' | awk 'NR==1 {print $1}') 40 40 # delete default 41 sed -i ' /^MENU DEFAULT/d' $generate_PXE_menu41 sed -i 's/^ MENU DEFAULT/ # MENU DEFAULT/d' $generate_PXE_menu 42 42 # modify menu 43 43 sed -i "${modify_line}i\label drbl-virt" $generate_PXE_menu 44 44 modify_line=$modify_line+1 45 45 sed -i "${modify_line}i\ MENU DEFAULT" $generate_PXE_menu 46 modify_line=$modify_line+1 47 sed -i "${modify_line}i\ # MENU HIDE" $generate_PXE_menu 46 48 modify_line=$modify_line+1 47 49 sed -i "${modify_line}i\ MENU LABEL DRBL-Virtualization ($Xen, $Xen_Kernel)" $generate_PXE_menu … … 87 89 NIC="" 88 90 89 if [ \$NICs_nu -lt 1 ]; 91 if [ \$NICs_nu -lt 1 ]; then 90 92 for (( i=0 ; i<\$NICs_nu ; i++ )) 91 93 do … … 111 113 sed -i "${modify_line}ibash /bin/start_xen_bridge.sh" $modify_file 112 114 115 # = 3. enable xend xendomains daemon in DRBL Client = 116 if [ -e /opt/drbl/conf/client-extra-service ]; then 117 echo 'service_extra_added="xend xendomains"' >> /opt/drbl/conf/client-extra-service 118 else 119 echo 'service_extra_added="xend xendomains"' > /opt/drbl/conf/client-extra-service 120 fi 113 121 114 # = 3. Re-deploy drbl client =122 # = 4. Re-deploy drbl client = 115 123 # == Cheange Xen Kernel == 116 124 echo "/opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel" … … 123 131 echo "" 124 132 133 # = 5. enable xend xendomains daemon afterr drblpush = 134 # /opt/drbl/sbin/drbl-client-service xend on 135 -
drbl-virt/sbin/functions_drbl_virt
r172 r178 142 142 done 143 143 144 #echo "debug: Xen_Kernel=$Xen_Kernel" 145 } 144 146 145 #echo "debug: Xen_Kernel=$Xen_Kernel" 147 148 function get_Host_IP_range(){ 149 cat /etc/drbl/IP_HOST_TABLE | sed "${Host_first_Line}p" 150 cat /etc/drbl/IP_HOST_TABLE | sed "${Host_final_Line}p" 151 declare -i Host_first_Line=$(cat -n /etc/drbl/IP_HOST_TABLE | grep "# Created by DRBL (drblpush), begin" | awk '{print $1}') 152 Host_first_Line=$((${Host_first_Line}+1)) 153 154 declare -i Host_final_Line=$(cat -n /etc/drbl/IP_HOST_TABLE | grep "# Created by DRBL (drblpush), end" | awk '{print $1}') 155 Host_final_Line=$((${Host_final_Line}-1)) 156 #echo "$Host_first_Line" 157 #echo "$Host_final_Line" 158 159 Host_first_IP=$(cat /etc/drbl/IP_HOST_TABLE | sed -n "${Host_first_Line}p"| awk '{print $1}') 160 Host_final_IP=$(cat /etc/drbl/IP_HOST_TABLE | sed -n "${Host_final_Line}p"| awk '{print $1}') 161 #echo $Host_first_IP 162 #echo $Host_final_IP 163 } 164 165 function get_VM_IP_range(){ 166 echo "" 167 echo "Your drbl client IP range $Host_first_IP ~ $Host_final_IP" 168 declare -i Host_final_IP_4=$(echo $Host_final_IP | cut -d "." -f4) 169 Host_final_IP_4=$(($Host_final_IP_4+1)) 170 VM_first_IP=$(echo $Host_final_IP | cut -d "." -f 1-3) 171 VM_first_IP="${VM_first_IP}.${Host_final_IP_4}" 172 echo "The VM IP Range will start from $VM_first_IP" 173 while [ $jude != "yes" -a $jude != "y" ]; 174 do 175 read "Input your IP range for VM: " VM_IP_range 176 done 177 echo "VM_first_IP=$VM_first_IP" > $Work_Home/.tmp/IP_VM_TABLE 178 echo "VM_IP_range=$VM_IP_range" >> $Work_Home/.tmp/IP_VM_TABLE 179 146 180 } 147 181 -
drbl-virt/sbin/xen_install.sh
r175 r178 50 50 if [ $hypervisior == "Xen" ]; then 51 51 aptitude install xen-linux-system-2.6.26-2-xen-${Linux_bit} xen-tools bridge-utils 52 if [ $1 == "stop" ]; then 53 update-rc.d xend remove 54 update-rc.d xendomains remove 55 elif [ $1 == "start" ]; then 56 update-rc.d xend defaults 57 update-rc.d xendomains defaults 58 fi 59 52 60 else 53 61 aptitude install kvm 54 62 fi 63 55 64 fi 56 65 ;;
Note: See TracChangeset
for help on using the changeset viewer.