Commit 945a6a24 authored by Server Team's avatar Server Team
Browse files

[FEATURE] use network=bridged and dynamic values

- add some custom variables that can be set on top of script
- use bridge=br0 instead of network=default
parent de43dce0
......@@ -38,7 +38,7 @@ d-i keyboard-configuration/xkb-keymap select de
# If you prefer to configure the network manually, uncomment this line and
# the static network configuration below.
#d-i netcfg/disable_autoconfig boolean true
d-i netcfg/disable_autoconfig boolean true
# If you want the preconfiguration file to work on systems both with and
# without a dhcp server, uncomment these lines and the static network
......@@ -65,13 +65,13 @@ d-i keyboard-configuration/xkb-keymap select de
# Any hostname and domain names assigned from dhcp take precedence over
# values set here. However, setting the values still prevents the questions
# from being shown, even if values come from dhcp.
d-i netcfg/get_hostname string template
#d-i netcfg/get_hostname string template
d-i netcfg/get_domain string typo3.org
# If you want to force a hostname, regardless of what either the DHCP
# server returns or what the reverse DNS entry for the IP is, uncomment
# and adjust the following line.
d-i netcfg/hostname string template
#d-i netcfg/hostname string template
# Disable that annoying WEP key dialog.
d-i netcfg/wireless_wep string
......
#!/bin/bash
SERVER_NAME="dummy"
SERVER_NAME="srv168"
PASSWORD=$(echo xxxx)
NET_IPV4_MAC="00:50:56:00:59:07"
NET_IPV4_ADDRESS="46.4.110.203"
NET_IPV4_GATEWAY="46.4.110.201"
NET_IPV4_BROADCAST="46.4.110.207"
NET_IPV4_NETMASK="255.255.255.248"
HOST_NAME=$SERVER_NAME
######################################
# no customisation below this point
#######################################
# note on preseeding
# file must be injected in the root/intrd filesysetm
......@@ -21,9 +32,9 @@ virt-install \
--vcpus 2 \
--os-type linux \
--os-variant generic \
--network network=default \
--network bridge=br0,mac=$NET_IPV4_MAC \
--graphics none \
--console pty,target_type=serial \
--location 'http://ftp.de.debian.org/debian/dists/jessie/main/installer-amd64/' \
--initrd-inject '/usr/local/bin/preseed.cfg' \
--extra-args 'auto=true console=ttyS0,115200n8 serial'
--extra-args "auto=true hostname=$HOST_NAME passwd/root-password=$PASSWORD passwd/root-password-again=$PASSWORD netcfg/get_ipaddress=$NET_IPV4_ADDRESS netcfg/get_netmask=$NET_IPV4_NETMASK netcfg/get_gateway=$NET_IPV4_GATEWAY console=ttyS0,115200n8 serial"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment