Changeset 219
- Timestamp:
- Oct 20, 2010, 3:33:09 PM (14 years ago)
- Location:
- drbl-virt/sbin
- Files:
-
- 1 added
- 7 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/check_drbl_total_vm
r208 r219 27 27 # local variables 28 28 vm_IPs=$(cat $vm_IP_file | awk '{print $1}') 29 IP_status="online"30 29 31 30 for vm_IP in $vm_IPs 32 31 do 33 32 # check network status 33 IP_status="online" 34 34 ping -c1 -w1 $vm_IP > /dev/null 2>&1 || IP_status="offline" 35 35 vm_IP_Hostname=$(sed -n "/$vm_IP/p" $vm_IP_file) -
drbl-virt/sbin/drbl_PXE_PV-VM_create
r208 r219 111 111 vm_exist_jude="yes" 112 112 fi 113 114 113 done 115 114 -
drbl-virt/sbin/drbl_PXE_PV-VM_deploy
r208 r219 52 52 fi 53 53 ;; 54 -v|--vm _cfg)54 -v|--vm) 55 55 shift 56 56 if [ -z "$(echo $1 |grep ^-.)" ]; then -
drbl-virt/sbin/drbl_bridge_kvm_patch
r218 r219 17 17 # = 1. Patch DRBL initrd to support bridge = 18 18 # == Patch /usr/bin/mkpxeinitrd-net == 19 # backup mkpxeinitrd-net. if already has "drbl-virt add", do nes't sed19 # backup mkpxeinitrd-net. if already has "drbl-virt add", doesn't sed 20 20 cat /usr/bin/mkpxeinitrd-net | grep "# drbl-virt add" >> /dev/null 21 21 if [ $? != 0 ]; then -
drbl-virt/sbin/drbl_bridge_xen_patch
r218 r219 25 25 cp $Work_Home/conf/initrd_bin/xen-network-common.sh /usr/lib/mkpxeinitrd-net/initrd-skel/bin/ 26 26 cp $Work_Home/conf/initrd_bin/xen-script-common.sh /usr/lib/mkpxeinitrd-net/initrd-skel/bin/ 27 27 28 # patch it to copy command 28 29 declare -i modify_line=$(cat -n /usr/bin/mkpxeinitrd-net | grep 'include_bin_prog_from_server=' | awk '{print $1}') -
drbl-virt/sbin/drbl_kvm_patch.sh
r217 r219 64 64 65 65 # = 3. Load KVM module when booting = 66 if [ -e /opt/drbl/conf/client-extra-service ]; then 67 grep 'service_extra_added="kvm"' /opt/drbl/conf/client-extra-service 68 if [ $? -eq 1 ]; then 69 echo 'service_extra_added="kvm"' >> /opt/drbl/conf/client-extra-service 70 fi 71 else 72 echo 'service_extra_added="kvm"' > /opt/drbl/conf/client-extra-service 73 fi 66 74 # for Debian & Ubuntu 67 if [ -e /etc/modules ]; then68 grep kvm /etc/modules69 if [ $? -eq 1 ]; then70 echo "kvm" >> /etc/modules71 fi75 #if [ -e /etc/modules ]; then 76 # grep kvm /etc/modules 77 # if [ $? -eq 1 ]; then 78 # echo "kvm" >> /etc/modules 79 # fi 72 80 # for CentOS & Fedora 73 elif [ -e /etc/sysconfig/modules ]; then74 grep -r "modprobe kvm" /etc/sysconfig/modules/75 if [ $? -eq 1 ]; then76 cat > /etc/sysconfig/modules/kvm.modules << EOF77 # !/bin/sh78 echo -n "Loading kvm module..."79 if \$(/sbin/modprobe kvm)80 then81 echo "[SUCCESS]:"82 else83 echo "[FAILURE]:"84 fi85 EOF86 chmod +x /etc/sysconfig/modules/kvm.modules87 fi88 fi81 #elif [ -e /etc/sysconfig/modules ]; then 82 # grep -r "modprobe kvm" /etc/sysconfig/modules/ 83 # if [ $? -eq 1 ]; then 84 # cat > /etc/sysconfig/modules/kvm.modules << EOF 85 ##!/bin/sh 86 #echo -n "Loading kvm module..." 87 #if \$(/sbin/modprobe kvm) 88 # then 89 # echo "[SUCCESS]:" 90 # else 91 # echo "[FAILURE]:" 92 #fi 93 #EOF 94 # chmod +x /etc/sysconfig/modules/kvm.modules 95 # fi 96 #fi 89 97 90 98 # = 4. Copy xen kernel & initrd to /home/domains = -
drbl-virt/sbin/drbl_xen_patch.sh
r217 r219 72 72 # = 3. enable xend xendomains daemon in DRBL Client = 73 73 if [ -e /opt/drbl/conf/client-extra-service ]; then 74 echo 'service_extra_added="xend xendomains"' >> /opt/drbl/conf/client-extra-service 74 grep 'service_extra_added="xend xendomains"' /opt/drbl/conf/client-extra-service 75 if [ $? -eq 1 ]; then 76 echo 'service_extra_added="xend xendomains"' >> /opt/drbl/conf/client-extra-service 77 fi 75 78 else 76 79 echo 'service_extra_added="xend xendomains"' > /opt/drbl/conf/client-extra-service
Note: See TracChangeset
for help on using the changeset viewer.