Changeset 216 for drbl-virt/sbin
- Timestamp:
- Oct 19, 2010, 11:50:04 AM (14 years ago)
- Location:
- drbl-virt/sbin
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/drbl_kvm_patch.sh
r215 r216 22 22 # == check KVM Kernel version 23 23 check_kvm 24 echo $KVM_Kernel > $Work_Home/etc/KVM_Kernel 24 25 25 26 # == Modify PXE booting menu == -
drbl-virt/sbin/drbl_virt.sh
r215 r216 32 32 $Work_Path/drbl_kvm_patch.sh 33 33 # drbl re-push KVM environment 34 $Work_Path/drbl_kvm_repush.sh 34 35 fi 35 36 -
drbl-virt/sbin/drbl_xen_repush.sh
r201 r216 1 1 #!/bin/bash 2 2 # Program: 3 # Path DRBL evironment to support Xen/KVM4 # Author: 3 # Repush DRBL evironment (Xen environment) 4 # Author: 5 5 # Jazz, Rock {jazz, rock}@nchc.org.tw 6 6 # Version: 7 7 # 1.0 8 # History: 9 # 2010/07/20 Rock First release (1.0) 8 # History: 9 # 2010/07/20 Rock First release (1.0) 10 10 11 11 # [Source] … … 19 19 eths="" 20 20 declare -i eth_nu="" 21 get_DRBL_eth 22 21 get_DRBL_eth 22 23 23 if [ $eth_nu -gt "1" ]; then 24 24 echo "" 25 25 echo "DRBL environment has muiltpule netwrok card(NIC)." 26 fi 27 26 fi 27 28 28 # backup IP_HOST_TABLE 29 29 if [ -e /etc/drbl/IP_HOST_TABLE.drbl-virt_bak ]; then … … 34 34 cp /etc/drbl/IP_HOST_TABLE /etc/drbl/IP_HOST_TABLE.drbl-virt_bak 35 35 cp /etc/drbl/IP_HOST_TABLE /opt/drbl-virt/etc/IP_HOST_TABLE 36 fi 36 fi 37 37 38 38 # backup mac address file … … 40 40 41 41 for eth in $eths 42 do 43 42 do 43 44 44 # == Get Host IP range/number == 45 45 Host_first_IP="" … … 50 50 eth_network=$(/opt/drbl/bin/drbl-get-network $eth_address $eth_netmask) 51 51 get_Host_IP_range 52 52 53 53 # == Get VM number, IP range & prefix name == 54 54 declare -i VM_IP_range="" … … 61 61 get_VM_IP_range_and_prefix_name 62 62 create_VM_IP_table 63 63 64 64 # == Generate MAC address == 65 65 # MAC address [00:16:3e:xx:xx:xx] is for Xen use 66 66 generate_Xen_MAC_address 67 67 68 68 # == Add VM IP to /etc/drbl/IP_HOST_TABLE == 69 69 VM_IPs=$(cat /opt/drbl-virt/etc/IP_VM_$eth | awk '{print $1}') … … 71 71 VM_hosts=$(cat /opt/drbl-virt/etc/IP_VM_$eth | awk '{print $2}') 72 72 VM_MACs=$(cat /opt/drbl-virt/etc/macadr-VM-$eth.txt) 73 73 74 74 # == Add Mac address to macadr-ethX.txt == 75 75 if [ -e /etc/drbl/macadr-$eth.txt ]; then … … 77 77 fi 78 78 cat /opt/drbl-virt/etc/macadr-VM-$eth.txt >> /etc/drbl/macadr-$eth.txt 79 done 80 79 done 80 81 81 82 82 # = 2. Re-deploy drbl client = 83 # == Ch eange Xen Kernel ==83 # == Change Xen Kernel == 84 84 Xen_Kernel=$(cat $Work_Home/etc/Xen_Kernel) 85 85 #read -p "Xen_Kernel=$Xen_Kernel" 86 echo "/opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel" 87 /opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel 88 echo "" 86 echo "/opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel" 87 /opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel 89 88 # == Re-delpoy drbl client == 90 echo "Re-delpoy drbl client"89 echo -e "\nRe-delpoy drbl client" 91 90 echo "/opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf" 92 91 /opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf
Note: See TracChangeset
for help on using the changeset viewer.