Changeset 216 for drbl-virt/sbin


Ignore:
Timestamp:
Oct 19, 2010, 11:50:04 AM (14 years ago)
Author:
rock
Message:

Add: KVM support (KVM env repush)

Location:
drbl-virt/sbin
Files:
1 added
3 edited

Legend:

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

    r215 r216  
    2222# == check KVM Kernel version
    2323check_kvm
     24echo $KVM_Kernel > $Work_Home/etc/KVM_Kernel
    2425
    2526# == Modify PXE booting menu ==
  • drbl-virt/sbin/drbl_virt.sh

    r215 r216  
    3232    $Work_Path/drbl_kvm_patch.sh
    3333    # drbl re-push KVM environment
     34    $Work_Path/drbl_kvm_repush.sh
    3435fi
    3536
  • drbl-virt/sbin/drbl_xen_repush.sh

    r201 r216  
    11#!/bin/bash
    22# Program:
    3 #   Path DRBL evironment to support Xen/KVM
    4 # Author: 
     3#   Repush DRBL evironment (Xen environment)
     4# Author:
    55#   Jazz, Rock {jazz, rock}@nchc.org.tw
    66# Version:
    77#    1.0
    8 # History:                                                                                         
    9 #   2010/07/20  Rock    First release (1.0) 
     8# History:
     9#   2010/07/20  Rock    First release (1.0)
    1010
    1111# [Source]
     
    1919eths=""
    2020declare -i eth_nu=""
    21 get_DRBL_eth                                                                                                                                                                           
    22      
     21get_DRBL_eth
     22
    2323if [ $eth_nu -gt "1" ]; then
    2424    echo ""
    2525    echo "DRBL environment has muiltpule netwrok card(NIC)."
    26 fi   
    27    
     26fi
     27
    2828# backup IP_HOST_TABLE
    2929if [ -e /etc/drbl/IP_HOST_TABLE.drbl-virt_bak ]; then
     
    3434    cp /etc/drbl/IP_HOST_TABLE /etc/drbl/IP_HOST_TABLE.drbl-virt_bak
    3535    cp /etc/drbl/IP_HOST_TABLE /opt/drbl-virt/etc/IP_HOST_TABLE
    36 fi 
     36fi
    3737
    3838# backup mac address file
     
    4040
    4141for eth in $eths
    42 do   
    43      
     42do
     43
    4444    # == Get Host IP range/number  ==
    4545    Host_first_IP=""
     
    5050    eth_network=$(/opt/drbl/bin/drbl-get-network $eth_address $eth_netmask)
    5151    get_Host_IP_range
    52      
     52
    5353    # == Get VM number, IP range & prefix name ==
    5454    declare -i VM_IP_range=""
     
    6161    get_VM_IP_range_and_prefix_name
    6262    create_VM_IP_table
    63      
     63
    6464    # == Generate MAC address  ==
    6565    # MAC address [00:16:3e:xx:xx:xx] is for Xen use
    6666    generate_Xen_MAC_address
    67      
     67
    6868    # == Add VM IP to /etc/drbl/IP_HOST_TABLE  ==
    6969    VM_IPs=$(cat /opt/drbl-virt/etc/IP_VM_$eth | awk '{print $1}')
     
    7171    VM_hosts=$(cat /opt/drbl-virt/etc/IP_VM_$eth | awk '{print $2}')
    7272    VM_MACs=$(cat /opt/drbl-virt/etc/macadr-VM-$eth.txt)
    73    
     73
    7474    # == Add Mac address to macadr-ethX.txt ==
    7575    if [ -e /etc/drbl/macadr-$eth.txt ]; then
     
    7777    fi
    7878    cat /opt/drbl-virt/etc/macadr-VM-$eth.txt >> /etc/drbl/macadr-$eth.txt
    79 done 
    80      
     79done
     80
    8181
    8282# = 2. Re-deploy drbl client =
    83 # == Cheange Xen Kernel ==   
     83# == Change Xen Kernel ==
    8484Xen_Kernel=$(cat $Work_Home/etc/Xen_Kernel)
    8585#read -p "Xen_Kernel=$Xen_Kernel"
    86 echo "/opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel"
    87 /opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel                                                                                                                       
    88 echo ""
     86echo  "/opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel"
     87/opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel
    8988# == Re-delpoy drbl client ==
    90 echo "Re-delpoy drbl client"           
     89echo -e "\nRe-delpoy drbl client"
    9190echo "/opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf"
    9291/opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf
Note: See TracChangeset for help on using the changeset viewer.