Last change
on this file since 183 was
183,
checked in by rock, 15 years ago
|
Add Function Code: generate Xen MAC address
|
-
Property svn:executable set to
*
|
File size:
1.4 KB
|
Rev | Line | |
---|
[178] | 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] |
---|
| 12 | source /opt/drbl-virt/conf/drbl-virt.conf |
---|
| 13 | source $Work_Path/functions_drbl_virt |
---|
[183] | 14 | source ./functions_drbl_virt |
---|
[178] | 15 | # [Main] |
---|
| 16 | # = 0. Variables setup = |
---|
[180] | 17 | # == Get DRBL eth == |
---|
| 18 | eths="" |
---|
| 19 | declare -i eth_nu="" |
---|
| 20 | get_DRBL_eth |
---|
[178] | 21 | |
---|
[180] | 22 | if [ $eth_nu -gt "1" ]; then |
---|
| 23 | echo "" |
---|
| 24 | echo "DRBL environment has muiltpule netwrok card(NIC)." |
---|
| 25 | fi |
---|
[178] | 26 | |
---|
[180] | 27 | for eth in $eths |
---|
| 28 | do |
---|
| 29 | |
---|
| 30 | # == Get Host IP range/number == |
---|
| 31 | Host_first_IP="" |
---|
| 32 | Host_last_IP="" |
---|
[181] | 33 | get_Host_IP_range |
---|
[183] | 34 | |
---|
[182] | 35 | # == Get VM number, IP range & prefix name == |
---|
[181] | 36 | declare -i VM_IP_range="" |
---|
| 37 | declare -i Host_last_IP_4="" |
---|
[183] | 38 | declare -i VM_Host_totoal_nu="" |
---|
[180] | 39 | VM_first_IP="" |
---|
| 40 | VM_last_IP="" |
---|
| 41 | VM_prefix_name="" |
---|
[182] | 42 | get_VM_IP_range_and_prefix_name |
---|
| 43 | create_VM_IP_table |
---|
[181] | 44 | |
---|
[183] | 45 | # == Generate MAC address == |
---|
| 46 | # MAC address [00:16:3e:xx:xx:xx] is for Xen use |
---|
| 47 | generate_Xen_MAC_address |
---|
| 48 | |
---|
[180] | 49 | |
---|
| 50 | |
---|
[183] | 51 | done |
---|
[181] | 52 | |
---|
[178] | 53 | # = 1. Copy VM fs = |
---|
[180] | 54 | # Kernel & initrd -> /home/domains |
---|
[178] | 55 | |
---|
[180] | 56 | |
---|
[178] | 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.