Changeset 199
- Timestamp:
- Aug 29, 2010, 9:42:09 PM (14 years ago)
- Location:
- drbl-virt/sbin
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/check_drbl_client.sh
r197 r199 47 47 done 48 48 49 49 # delete tmp file 50 rm -f $drbl_client_top_file -
drbl-virt/sbin/check_drbl_vm.sh
r198 r199 16 16 client_IPs=$(cat $Work_Home/etc/IP_HOST_TABLE | grep -v "#" | awk '{print $1}') 17 17 drbl_vm_file="/tmp/drbl_vm_status.$$" 18 18 drbl_vm_xentop_file="/tmp/drbl_vm_xentop.$$" 19 19 20 20 # [Main] … … 22 22 do 23 23 # local variables 24 drbl_vm_xentop_file="/tmp/drbl_vm_xentop.$client_IP.$$"25 24 IP_status="online" 26 25 client_hostname="$(cat $Work_Home/etc/IP_HOST_TABLE | grep -v "#" | awk '{print $2}')" 26 vm_numbers="" 27 27 vm_hostnames="" 28 28 vm_IP="" … … 38 38 vm_hostnames="$(cat $drbl_vm_xentop_file | sed -n '3,$p' | awk '{print $1}')" 39 39 40 printf "[$client_hostname] \n" >> $drbl_vm_file41 printf "[$client_hostname] \n"40 printf "[$client_hostname] " >> $drbl_vm_file 41 printf "[$client_hostname] " 42 42 declare -i i=1 43 44 vm_numbers=$(echo vm_hostnames | wc -w) 45 46 printf "[Running VM: $vm_numbers]\n" >> $drbl_vm_file 47 printf "[Running VM: $vm_numbers]\n" 43 48 44 49 for vm_hostname in $vm_hostnames … … 56 61 done 57 62 63 # dlete tmp file 64 rm -f $drbl_vm_xentop_file -
drbl-virt/sbin/drbl_PXE_PV-VM_create.sh
r195 r199 18 18 # = 1. Varibales declation = 19 19 vm_name="" 20 vm_cpu=" "21 vm_ram=" "22 vm_host=""20 vm_cpu="1" 21 vm_ram="128" 22 #vm_host="" 23 23 vm_mac="" 24 24 … … 29 29 echo "Options: " 30 30 echo "-v|--vm vm name" 31 echo "-c|--cpu cpu number" 32 echo "-r|--ram ram size" 33 echo "-h|--host deploy vm to which host" 31 echo "-c|--cpu cpu number (default: 1)" 32 echo "-r|--ram ram size(M) (default: 128)" 34 33 echo "Examples: " 35 echo "drbl_PXE_PV-VM_create.sh options -v drbl1 10 -c 2 -r 512 -h drbl101"34 echo "drbl_PXE_PV-VM_create.sh options -v drbl131 -c 2 -r 512" 36 35 } 37 36 … … 82 81 fi 83 82 ;; 84 -h|--host)85 shift86 if [ -z "$(echo $1 |grep ^-.)" ]; then87 if [ -n "$(echo $1)" ]; then88 vm_host=$189 else90 echo "-h host_value is null"91 Usage && exit 292 fi93 shift94 fi95 ;;83 # -h|--host) 84 # shift 85 # if [ -z "$(echo $1 |grep ^-.)" ]; then 86 # if [ -n "$(echo $1)" ]; then 87 # vm_host=$1 88 # else 89 # echo "-h host_value is null" 90 # Usage && exit 2 91 # fi 92 # shift 93 # fi 94 # ;; 96 95 -*) 97 96 echo "$0 $1 invalid option" >&2 … … 105 104 esac 106 105 done 106 107 # check null value 108 [ -z $vm_name ] && echo "[Error] no VM name" && Usage && exit 2 107 109 108 110 # = 2. Get VM MAC address =
Note: See TracChangeset
for help on using the changeset viewer.