- Timestamp:
- Aug 26, 2010, 3:19:26 PM (14 years ago)
- Location:
- drbl-virt
- Files:
-
- 2 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/install.sh
r171 r185 23 23 24 24 mkdir -p $Work_Home 25 mkdir $Work_Home/etc 26 mkdir $Work_Home/.tmp 25 27 cp -fr $Now_Path/sbin $Work_Home/ 26 28 cp -fr $Now_Path/conf $Work_Home/ -
drbl-virt/sbin/drbl_virt.sh
r178 r185 13 13 source $Work_Path/functions_drbl_virt 14 14 # [Main] 15 install_drbl-virt_dir16 15 cpu_check 17 16 check_systemInfo -
drbl-virt/sbin/drbl_xen_patch.sh
r184 r185 35 35 # == Modify PXE booting menu == 36 36 # if menu doesn't has drbl-virt, then add it 37 cat /opt/drbl/sbin/generate-pxe-menu | grep drbl-virt37 cat /opt/drbl/sbin/generate-pxe-menu | grep "label drbl-virt" 38 38 if [ $? != 0 ]; then 39 39 # backup generate-pxe-menu … … 68 68 # == Patch /usr/bin/mkpxeinitrd-net (1)Xen network scripts (2)command (3)modules == 69 69 # backup mkpxeinitrd-net. if already has "drbl-virt add", dones't sed 70 cat /usr/bin/mkpxeinitrd-net | grep " drbl-virt add"70 cat /usr/bin/mkpxeinitrd-net | grep "# drbl-virt add" 71 71 if [ $? != 0 ]; then 72 72 cp /usr/bin/mkpxeinitrd-net /usr/bin/mkpxeinitrd-net.drbl-virt_bak … … 133 133 fi 134 134 135 # = 4. Re-deploy drbl client = 136 # == Cheange Xen Kernel == 137 echo "/opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel" 138 /opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel 139 echo "" 140 # == Re-delpoy drbl client == 141 echo "Re-delpoy drbl client" 142 echo "/opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf" 143 /opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf 144 echo "" 145 146 # = 5. enable xend xendomains daemon afterr drblpush = 135 # = 4. enable xend xendomains daemon afterr drblpush = 147 136 # /opt/drbl/sbin/drbl-client-service xend on 148 137 138 # = 5. cp xen kernel & initrd to /home/domains = 139 if [ ! -e /home/domains ]; then 140 mkdir /home/domains 141 fi 142 cp /boot/*{Xen_Kernel}* /home/domains 143 -
drbl-virt/sbin/drbl_xen_repush.sh
r184 r185 15 15 # [Main] 16 16 17 # = 0. Variables setup =17 # = 1. Variables setup = 18 18 # == Get DRBL eth == 19 19 eths="" … … 52 52 generate_Xen_MAC_address 53 53 54 # == Add VM IP to dhcpd.conf==54 # == Add VM IP to /etc/drbl/IP_HOST_TABLE == 55 55 VM_IPs=$(cat /opt/drbl-virt/etc/IP_VM_$eth | awk '{print $1}') 56 VM_IPs_nu=$(cat /opt/drbl-virt/etc/IP_VM_eth1 | awk '{print $1}' | wc -w) 56 57 VM_hosts=$(cat /opt/drbl-virt/etc/IP_VM_$eth | awk '{print $2}') 57 58 VM_MACs=$(cat /opt/drbl-virt/etc/macadr-VM-$eth.txt) 58 add_VM_dhcpd_conf 59 60 # == Add VM IP to exports == 61 #add_VM_nfs_exportd 62 63 # == Add VM IP to ypserv.securenets == 64 #add_VM_ypserv_securenets 65 66 59 # delete duplicating value(ip,hostname) in IP_HOST_TABLE 60 if [ -e /etc/drbl/IP_HOST_TABLE ]; then 61 $Work_Path/duplicate_del /etc/drbl/IP_HOST_TABLE 62 fi 63 # add ip & hostname 64 $Work_Path/add_value /opt/drbl-virt/etc/IP_VM_$eth /etc/drbl/IP_HOST_TABLE 65 66 # == Add Mac address to macadr-ethX.txt == 67 if [ -e /etc/drbl/macadr-$eth.txt ]; then 68 $Work_Path/duplicate_del_MAC /etc/drbl/macadr-$eth.txt 69 fi 70 67 71 done 68 72 69 # = 1. Copy VM fs = 70 # Kernel & initrd -> /home/domains71 72 73 # = 2. Add NFS config = 74 75 # = 3. Add DHCP config=76 77 # = 4. Add hosts and cp it to all drbl client = 78 79 # = 5. generate guest config file = 73 74 # = 2. Re-deploy drbl client = 75 # == Cheange Xen Kernel == 76 echo "/opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel" 77 /opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel 78 echo "" 79 # == Re-delpoy drbl client == 80 echo "Re-delpoy drbl client" 81 echo "/opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf" 82 /opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf 83 echo "" -
drbl-virt/sbin/functions_drbl_virt
r184 r185 70 70 } 71 71 72 73 # [Create drbl-virt path]74 function install_drbl-virt_dir(){75 mkdir -p $Work_Home/.tmp76 mkdir -p $Work_Home/etc77 }78 79 80 72 # [Check Hypervisior] 81 73 function check_hypervisior(){ … … 219 211 #echo "VM_IP_range=$VM_IP_range" 220 212 } 213 221 214 222 215 #function get_VM_prefix_name(){ … … 317 310 } 318 311 319 function add_VM_dhcpd_conf(){ 320 # backup dhcpd.conf 321 if [ -e /etc/dhcp3/dhcpd.conf ]; then 322 cp -f /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.drbl-virt_bak 323 fi 324 325 subnet_lines=$(cat -n /etc/dhcp3/dhcpd.conf | grep $eth_network | awk '{print $1}') 326 host_lines=$(cat -n /etc/dhcp3/dhcpd.conf | grep 'host ' | grep '{' | awk '{print $1}') 327 328 for subnet_line in $subnet_lines 329 do 330 host_lines cat -n /etc/dhcp3/dhcpd.conf | sed -n "$subnet_line,\$p" | grep 'host .* {' | awk '{print $1}' 331 332 done 333 334 } 312 #function add_VM_dhcpd_conf(){ 313 ## backup dhcpd.conf 314 #if [ -e /etc/dhcp3/dhcpd.conf ]; then 315 #cp -f /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.drbl-virt_bak 316 #fi 317 #subnet_lines=$(cat -n /etc/dhcp3/dhcpd.conf | grep $eth_network | awk '{print $1}') 318 #host_lines=$(cat -n /etc/dhcp3/dhcpd.conf | grep 'host ' | grep '{' | awk '{print $1}') 319 # 320 #for subnet_line in $subnet_lines 321 #do 322 # host_lines cat -n /etc/dhcp3/dhcpd.conf | sed -n "$subnet_line,\$p" | grep 'host .* {' | awk '{print $1}' 323 #done 324 #}
Note: See TracChangeset
for help on using the changeset viewer.