Ignore:
Timestamp:
Aug 30, 2010, 11:11:57 AM (14 years ago)
Author:
rock
Message:

Bugfix: var error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • drbl-virt/sbin/drbl_PXE_PV-VM_create.sh

    r199 r200  
    107107# check null value
    108108[ -z $vm_name ] && echo "[Error] no VM name" && Usage && exit 2
     109# check vm_name exist
     110vm_IP_files=$(ls $Work_Home/etc/IP_VM_eth*)
     111vm_exist_jude="no"
     112for vm_IP_file in $vm_IP_files
     113do
     114    if [ -n "$(grep "$vm_name" $vm_IP_file)" ]; then
     115        vm_exist_jude="yes"
     116    fi
     117   
     118done
     119
     120if [ $vm_exist_jude == "no" ]; then
     121    echo "[Error] This VM name isn't DRBL PXE VM"
     122    exit 2
     123fi
     124
    109125
    110126# = 2. Get VM MAC address =
     
    149165echo "kernel      = '/home/domains/vmlinuz-pxe'" > $vm_cfg
    150166echo "ramdisk     = '/home/domains/initrd-pxe.img'" >> $vm_cfg
    151 echo "memory      = '512'" >> $vm_cfg
     167echo "memory      = '$vm_ram'" >> $vm_cfg
    152168echo "name        = '$vm_name'" >> $vm_cfg
    153169echo "vcpus        = '$vm_cpu'" >> $vm_cfg
Note: See TracChangeset for help on using the changeset viewer.