Add ONE VM networking to netboot image
This commit is contained in:
parent
81df531312
commit
ad3acd5ebe
1 changed files with 15 additions and 2 deletions
|
@ -30,14 +30,17 @@ chroot "$chroot_dir" apt-get install -y firmware-bnx2
|
||||||
# SSH server, DNS updates from RAs, LVM2.
|
# SSH server, DNS updates from RAs, LVM2.
|
||||||
chroot "$chroot_dir" apt-get install -y openssh-server rdnssd lvm2
|
chroot "$chroot_dir" apt-get install -y openssh-server rdnssd lvm2
|
||||||
|
|
||||||
|
# Network tools.
|
||||||
|
chroot "$chroot_dir" apt-get install -y vlan bridge-utils
|
||||||
|
|
||||||
# Useful things for cdist manifests to run properly and humans to be happy.
|
# Useful things for cdist manifests to run properly and humans to be happy.
|
||||||
chroot "$chroot_dir" apt-get install -y lsb-release ca-certificates vim locales bridge-utils
|
chroot "$chroot_dir" apt-get install -y lsb-release ca-certificates vim locales
|
||||||
|
|
||||||
# Install and extract kernel.
|
# Install and extract kernel.
|
||||||
chroot "$chroot_dir" apt-get install -y linux-image-amd64
|
chroot "$chroot_dir" apt-get install -y linux-image-amd64
|
||||||
cp "$chroot_dir"/boot/vmlinuz-* "$output_dir/kernel-$basename"
|
cp "$chroot_dir"/boot/vmlinuz-* "$output_dir/kernel-$basename"
|
||||||
|
|
||||||
# Deploy SSH keys, set default password.
|
# Deploy SSH keys.
|
||||||
mkdir -p "$chroot_dir/root/.ssh"
|
mkdir -p "$chroot_dir/root/.ssh"
|
||||||
for user in tfloure; do
|
for user in tfloure; do
|
||||||
curl "https://meta.recycled.cloud/~$user.keys" >> "$chroot_dir/root/.ssh/authorized_keys"
|
curl "https://meta.recycled.cloud/~$user.keys" >> "$chroot_dir/root/.ssh/authorized_keys"
|
||||||
|
@ -60,6 +63,16 @@ auto eth0
|
||||||
allow-hotplug eth0
|
allow-hotplug eth0
|
||||||
iface eth0 inet dhcp
|
iface eth0 inet dhcp
|
||||||
iface eth0 inet6 auto
|
iface eth0 inet6 auto
|
||||||
|
|
||||||
|
# OpenNebula VM vlan
|
||||||
|
auto eth0.10
|
||||||
|
iface eth0.10 inet6 auto
|
||||||
|
vlan-raw-device eth0
|
||||||
|
|
||||||
|
# OpenNebula VM bridge
|
||||||
|
auto br-vms
|
||||||
|
iface br-vms inet6 auto
|
||||||
|
bridge_ports eth0.10
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Build initramfs from generated installation.
|
# Build initramfs from generated installation.
|
||||||
|
|
Loading…
Reference in a new issue