Ignore:
Timestamp:
Aug 13, 2010, 3:37:28 PM (15 years ago)
Author:
rock
Message:

Add: (1)client xend enabled (2)setup VM IP range

File:
1 edited

Legend:

Unmodified
Added
Removed
  • drbl-virt/sbin/functions_drbl_virt

    r172 r178  
    142142done
    143143
     144#echo "debug: Xen_Kernel=$Xen_Kernel"
     145}
    144146
    145 #echo "debug: Xen_Kernel=$Xen_Kernel"
     147
     148function get_Host_IP_range(){
     149cat /etc/drbl/IP_HOST_TABLE | sed "${Host_first_Line}p"
     150cat /etc/drbl/IP_HOST_TABLE | sed "${Host_final_Line}p"                   
     151declare -i Host_first_Line=$(cat -n /etc/drbl/IP_HOST_TABLE  | grep "# Created by DRBL (drblpush), begin" | awk '{print $1}')
     152Host_first_Line=$((${Host_first_Line}+1))
     153                       
     154declare -i Host_final_Line=$(cat -n /etc/drbl/IP_HOST_TABLE  | grep "# Created by DRBL (drblpush), end" | awk '{print $1}')
     155Host_final_Line=$((${Host_final_Line}-1))
     156#echo "$Host_first_Line"
     157#echo "$Host_final_Line"
     158                                                                           
     159Host_first_IP=$(cat /etc/drbl/IP_HOST_TABLE | sed -n "${Host_first_Line}p"| awk '{print $1}')
     160Host_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
     165function get_VM_IP_range(){
     166echo ""       
     167echo "Your drbl client IP range $Host_first_IP ~ $Host_final_IP"
     168declare -i Host_final_IP_4=$(echo $Host_final_IP | cut -d "." -f4)
     169Host_final_IP_4=$(($Host_final_IP_4+1))                       
     170VM_first_IP=$(echo $Host_final_IP | cut -d "." -f 1-3)
     171VM_first_IP="${VM_first_IP}.${Host_final_IP_4}"       
     172echo "The VM IP Range will start from $VM_first_IP"   
     173while [ $jude != "yes" -a $jude != "y" ];             
     174do             
     175    read "Input your IP range for VM: " VM_IP_range   
     176done           
     177echo "VM_first_IP=$VM_first_IP" > $Work_Home/.tmp/IP_VM_TABLE
     178echo "VM_IP_range=$VM_IP_range" >> $Work_Home/.tmp/IP_VM_TABLE
     179
    146180}
    147181
Note: See TracChangeset for help on using the changeset viewer.