- Timestamp:
- Oct 3, 2010, 1:19:59 PM (14 years ago)
- Location:
- drbl-virt/sbin
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/check_drbl_total_vm
r207 r208 15 15 # [Varliables] 16 16 vm_total_status_file=/tmp/vm_totoal_status.$$ 17 vm_IP_files=$(ls $Work_Home/etc/IP_VM_eth[0-9] *)17 vm_IP_files=$(ls $Work_Home/etc/IP_VM_eth[0-9]) 18 18 19 19 # [Main] -
drbl-virt/sbin/drbl_PXE_PV-VM_create
r207 r208 26 26 # = 2. Functions declation = 27 27 Usage(){ 28 echo "Usage: drbl_PXE_PV-VM_create .sh options"28 echo "Usage: drbl_PXE_PV-VM_create [options]" 29 29 echo "Options: " 30 30 echo "-v|--vm vm name" … … 32 32 echo "-r|--ram ram size(M) (default: 128)" 33 33 echo "Examples: " 34 echo "drbl_PXE_PV-VM_create .sh options-v drbl131 -c 2 -r 512"34 echo "drbl_PXE_PV-VM_create -v drbl131 -c 2 -r 512" 35 35 } 36 36 … … 39 39 check_root 40 40 # = 1. Parse parameters = 41 if [ $# -eq 0 ]; then42 Usage && exit43 fi44 45 41 while [ $# -gt 0 ]; do 46 42 case "$1" in … … 108 104 [ -z $vm_name ] && echo "[Error] no VM name" && Usage && exit 2 109 105 # check vm_name exist 110 vm_IP_files=$(ls $Work_Home/etc/IP_VM_eth*)106 IP_VM_files=$(ls $Work_Home/etc | grep 'IP_VM_eth[0-9]$') 111 107 vm_exist_jude="no" 112 for vm_IP_file in $ vm_IP_files108 for vm_IP_file in $IP_VM_files 113 109 do 114 if [ -n "$(grep "$vm_name" $ vm_IP_file)" ]; then110 if [ -n "$(grep "$vm_name" $Work_Home/etc/$vm_IP_file)" ]; then 115 111 vm_exist_jude="yes" 116 112 fi … … 126 122 # = 2. Get VM MAC address = 127 123 #IP_MAC_files=$(ls $Work_Home/etc | grep 'macadr-VM-eth[0-9]*.txt') 128 129 IP_VM_files=$(ls $Work_Home/etc | grep 'IP_VM_eth[0-9]*')130 124 IP_VM_right_file="" 131 125 IP_VM_right_line="" -
drbl-virt/sbin/drbl_PXE_PV-VM_deploy
r207 r208 17 17 # [Declation] 18 18 # = 1. Varibales declation = 19 #vm_dir="/home/domains"19 vm_dir="/home/domains" 20 20 21 21 22 22 # = 2. Functions declation = 23 23 Usage(){ 24 echo "Usage: drbl_PXE_PV-VM_deploy .sh options"24 echo "Usage: drbl_PXE_PV-VM_deploy [options]" 25 25 echo "Options:" 26 26 echo "-h|--host deploy vm to which host" 27 echo "-v|--vm _cfg vm configuration file"27 echo "-v|--vm vm name" 28 28 echo "Example:" 29 echo "drbl_PXE_PV-VM_ create.sh -h drbl101 -v /home/domains/drbl131_PXE_PV-VM.cfg"29 echo "drbl_PXE_PV-VM_deploy -h drbl101 -v drbl131" 30 30 } 31 31 … … 56 56 if [ -z "$(echo $1 |grep ^-.)" ]; then 57 57 if [ -n "$(echo $1)" ]; then 58 vm_conf_file=$ 158 vm_conf_file=${vm_dir}/${1}_PXE_PV-VM.cfg 59 59 else 60 60 echo "-v vm_name is null" -
drbl-virt/sbin/functions_drbl_virt
r205 r208 214 214 jude_2="yes" 215 215 echo "(If you have 10 PCs(4-core), suggestion is 30): " 216 VM_IP_range=$drbl_original_clients_nu 216 217 read -p "[$drbl_original_clients_nu] " VM_IP_range 217 218 if [ $((${VM_IP_range}+${Host_last_IP_4})) -ge 254 ]; then
Note: See TracChangeset
for help on using the changeset viewer.