Changeset 217 for drbl-virt


Ignore:
Timestamp:
Oct 19, 2010, 5:13:45 PM (14 years ago)
Author:
rock
Message:

Add: KVM support (bridge to eth for KVM env)

Location:
drbl-virt
Files:
1 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • drbl-virt/install.sh

    r207 r217  
    2424jude="no"
    2525if [ -e $Work_Home ]; then
    26     echo "This system already has drbl-virt."
     26    echo -e "\nThis system already has drbl-virt."
    2727    read -p "Do you want to install, again (yes/no): " jude
    2828
  • drbl-virt/sbin/drbl_bridge_xen_patch

    r215 r217  
    11#!/bin/bash
    22# Program:
    3 #   Patch DRBL to bridge eth in booting
     3#   Patch DRBL to bridge eth in booting (Xen)
    44# Author:
    55#   Jazz, Rock {jazz, rock}@nchc.org.tw
     
    1717# = 1. Patch DRBL initrd to support bridge =
    1818# == Patch /usr/bin/mkpxeinitrd-net (1)Xen network scripts (2)command (3)modules ==
    19 # backup mkpxeinitrd-net. if already has "drbl-virt add", dones't sed
     19# backup mkpxeinitrd-net. if already has "drbl-virt add", doesn't sed
    2020cat /usr/bin/mkpxeinitrd-net | grep "# drbl-virt add" >> /dev/null
    2121if [ $? != 0 ]; then
     
    4343# drbl-virt add
    4444NICs=\$(/sbin/ifconfig | grep eth | awk '{print \$1}')
    45 declare -i NICs_nu=\$(echo \$NICs |wc -l)
     45declare -i NICs_nu=\$(echo \$NICs |wc -w)
    4646NIC=""
    4747
     
    4949    for (( i=0 ; i<\$NICs_nu ; i++ ))
    5050    do
    51         NIC_IP=\$(ifconfig eth\${i} | grep "inet addr" | sed 's/inet addr://g' | sed 's/Bcast.*$//g')
     51        NIC_IP=\$(ifconfig eth\${i} | grep "inet addr" | sed 's/inet addr://g' | sed 's/Bcast.*$//g' | sed 's/^[ ]*//')
    5252        if [ -n \$NIC_IP ]; then
    5353            NIC="eth\${i}"
  • drbl-virt/sbin/drbl_kvm_patch.sh

    r216 r217  
    4343sed -i "${modify_line}i\  # MENU HIDE" $generate_PXE_menu
    4444modify_line=$modify_line+1
    45 sed -i "${modify_line}i\  MENU LABEL DRBL-Virtualization ($KVM_Kernel)" $generate_PXE_menu
     45sed -i "${modify_line}i\  MENU LABEL DRBL-Virtualization (KVM $KVM_Kernel)" $generate_PXE_menu
    4646modify_line=$modify_line+1
    4747sed -i "${modify_line}i\  kernel vmlinuz-pxe" $generate_PXE_menu
    4848modify_line=$modify_line+1
    49 sed -i "${modify_line}i\  append  initrd=initrd-pxe.img devfs=nomount drblthincli=off selinux=0 nomodeset"
     49sed -i "${modify_line}i\  append  initrd=initrd-pxe.img devfs=nomount drblthincli=off selinux=0 nomodeset" $generate_PXE_menu
    5050modify_line=$modify_line+1
    5151sed -i "${modify_line}i\  TEXT HELP" $generate_PXE_menu
     
    5959# = 2. Patch DRBL initrd to support bridge =
    6060# == Patch /usr/bin/mkpxeinitrd-net (1)Xen network scripts (2)command (3)modules ==
    61 # backup mkpxeinitrd-net. if already has "drbl-virt add", dones't sed
    62 source $Work_Path/drbl_bridge_patch.sh
     61# backup mkpxeinitrd-net. if already has "drbl-virt add", doesn't sed
     62source $Work_Path/drbl_bridge_kvm_patch
    6363
    6464
     
    7777#!/bin/sh                 
    7878echo -n "Loading kvm module..."
    79 if $(/sbin/modprobe kvm)
     79if \$(/sbin/modprobe kvm)
    8080    then
    8181        echo "[SUCCESS]:"
  • drbl-virt/sbin/drbl_xen_patch.sh

    r215 r217  
    6868# == Patch /usr/bin/mkpxeinitrd-net (1)Xen network scripts (2)command (3)modules ==
    6969# backup mkpxeinitrd-net. if already has "drbl-virt add", dones't sed
    70 source $Work_Path/drbl_bridge_patch.sh
     70source $Work_Path/drbl_bridge_xen_patch
    7171
    7272# = 3. enable xend xendomains daemon in DRBL Client =
  • drbl-virt/tar_drbl-virt.sh

    r203 r217  
     1#!/bin/bash
     2
     3# [Version Setup]
     4version="0.1"
     5
     6# [Main]
    17cd ../
    2 tar zcvf drbl-virt-0.1$(date +%Y-%m-%d-%H-%M-%S).tar.gz drbl-virt
     8tar zcvf drbl-virt-${version}_$(date +%Y-%m-%d-%H-%M-%S).tar.gz drbl-virt
Note: See TracChangeset for help on using the changeset viewer.