source: drbl-virt/sbin/drbl_PXE_PV-VM_deploy.sh @ 183

Last change on this file since 183 was 183, checked in by rock, 14 years ago

Add Function Code: generate Xen MAC address

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/bash                                                                                                         
2# Program:
3#   Path DRBL evironment to support Xen/KVM
4# Author:
5#   Jazz, Rock {jazz, rock}@nchc.org.tw
6# Version:
7#    1.0
8# History:                                                                                         
9#   2010/08/13  Rock    First release (1.0)
10 
11# [Source]
12source /opt/drbl-virt/conf/drbl-virt.conf
13source $Work_Path/functions_drbl_virt
14source ./functions_drbl_virt
15# [Main]
16# = 0. Variables setup =
17# == Get DRBL eth ==
18eths=""
19declare -i eth_nu=""
20get_DRBL_eth
21
22if [ $eth_nu -gt "1" ]; then
23    echo ""
24    echo "DRBL environment has muiltpule netwrok card(NIC)."
25fi
26
27for eth in $eths
28do
29
30    # == Get Host IP range/number  ==
31    Host_first_IP=""
32    Host_last_IP=""
33    get_Host_IP_range
34
35    # == Get VM number, IP range & prefix name ==
36    declare -i VM_IP_range=""
37    declare -i Host_last_IP_4=""
38    declare -i VM_Host_totoal_nu=""
39    VM_first_IP=""
40    VM_last_IP=""
41    VM_prefix_name=""
42    get_VM_IP_range_and_prefix_name
43    create_VM_IP_table
44
45    # == Generate MAC address  ==
46    # MAC address [00:16:3e:xx:xx:xx] is for Xen use
47    generate_Xen_MAC_address
48   
49
50
51done
52
53# = 1. Copy VM fs =
54# Kernel & initrd -> /home/domains
55
56
57# = 2. Add NFS config =
58
59# = 3. Add DHCP config =
60
61# = 4. Add hosts and cp it to all drbl client =
62
63# = 5. generate guest config file =
Note: See TracBrowser for help on using the repository browser.