Changeset 200 for drbl-virt


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

Bugfix: var error

Location:
drbl-virt
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • drbl-virt/sbin/check_drbl_client.sh

    r199 r200  
    4040        client_Ram=$(cat $drbl_client_top_file | grep ^Mem | sed 's/total.*$//' | sed 's/^Mem://' | awk '{print $1}')
    4141        client_unused_Ram=$(cat $drbl_client_top_file | grep ^Mem | sed 's/^.*used,//' | sed 's/free.*$//' | awk '{print $1}')
     42   
    4243    fi
    4344
  • drbl-virt/sbin/check_drbl_vm.sh

    r199 r200  
    1919
    2020# [Main]
     21check_root
    2122for client_IP in $client_IPs
    2223do
     
    4243        declare -i i=1
    4344
    44         vm_numbers=$(echo vm_hostnames | wc -w)
    45        
     45        vm_numbers=$(echo $vm_hostnames | wc -w)
     46
    4647        printf "[Running VM: $vm_numbers]\n" >> $drbl_vm_file
    4748        printf "[Running VM: $vm_numbers]\n"
     
    5354            vm_CPU_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $4}')"
    5455            vm_Ram_loading="$(cat $drbl_vm_xentop_file | grep $vm_hostname | awk '{print $6}')"
    55             printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}M $vm_CPU_loading%% $vm_Ram_loading%%\n" >> $drbl_vm_file
    56             printf "VM$i: $vm_hostname VCPU=$vm_CPU_core Mem=${vm_Ram}M VCPU_loading=$vm_CPU_loading%% Mem_usage=$vm_Ram_loading%%\n"
     56            printf "VM$i: $vm_hostname $vm_CPU_core ${vm_Ram}K $vm_CPU_loading%% $vm_Ram_loading%%\n" >> $drbl_vm_file
     57            printf "VM$i: $vm_hostname VCPU=$vm_CPU_core Mem=${vm_Ram}K VCPU_loading=$vm_CPU_loading%% Mem_usage=$vm_Ram_loading%%\n"
    5758            i=i+1
    5859        done
    5960   
     61    else
     62        echo "[Error] $client_hostname $client_IP is offline !" && exit 2
     63
    6064    fi
     65
    6166done
    6267
  • 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
  • drbl-virt/sbin/drbl_xen_repush.sh

    r195 r200  
    3535    cp /etc/drbl/IP_HOST_TABLE /opt/drbl-virt/etc/IP_HOST_TABLE
    3636fi 
     37
     38# back mac address file
     39cp /etc/drbl/macadr*eth*[0-9].txt /opt/drbl-virt/etc/
    3740
    3841for eth in $eths
  • drbl-virt/uninstall.sh

    r171 r200  
    2121checkroot
    2222
     23# = 1. For linux distribution =
    2324case $Linux_Distribution in
    2425    # for Ubuntu
     
    5758
    5859cd
     60
     61# = 2. Recovery DRBL original file =
     62# patch file
     63mv -f /usr/bin/mkpxeinitrd-net.drbl-virt_bak /usr/bin/mkpxeinitrd-net
     64mv -f /opt/drbl/sbin/generate-pxe-menu.drbl-virt_bak /opt/drbl/sbin/generate-pxe-menu
     65mv -f /usr/lib/mkpxeinitrd-net/initrd-skel/linuxrc-or-init.drbl-virt_bak /usr/lib/mkpxeinitrd-net/initrd-skel/linuxrc-or-init
     66# drbl env file
     67mv -f $Work_Home/etc/IP_HOST_TABLE /etc/drbl/IP_HOST_TABLE
     68mv -f $Work_Home/etc/macadr-eth*[0-9].txt
     69
     70# = 3. Redeploy DRBL original environment =
     71
     72
     73# = 4. Delete path =
    5974rm -fr $Work_Home
     75
     76
  • drbl-virt/web/WebContent/css/jquery-ui.css

    r194 r200  
    88 * http://docs.jquery.com/UI/Theming/API
    99 */
     10
     11/* drbl-virt */
     12#wrapper {
     13background:#cccccc;
     14margin-bottom:7px;
     15border: 4px solid #aaaaaa;
     16}
    1017
    1118/* Layout helpers
  • drbl-virt/web/WebContent/index.html

    r194 r200  
    1818
    1919<body style="font-size:85%;">
     20
     21<div id="wrapper">
     22<img src="image/drbl-virt_logo.png">
     23</div>
    2024
    2125<div id="tabs">
Note: See TracChangeset for help on using the changeset viewer.