Ready with cloud-init images.

main
Ezekiel Grave 2024-05-07 14:46:59 +00:00
parent 804a82d1d3
commit 9ed8f3b146
7 changed files with 42 additions and 4 deletions

6
TODO
View File

@ -6,4 +6,8 @@
* rebooting could * rebooting could
* wipe everything, or * wipe everything, or
* attempt to resurrect (import?) previous * attempt to resurrect (import?) previous
* include a cloud-image or two directly in the ISO
via a hook, have included a cloud-init image, and a container template
from: https://cloud-images.ubuntu.com/jammy/current/
Other Options:
* https://cloud-images.ubuntu.com/minimal/releases/jammy/release/

View File

@ -0,0 +1,9 @@
#!/bin/sh
set -e
IMG_DL_DIR="/var/lib/vz/images/000"
TPL_DL_DIR="/var/lib/vz/template/cache"
mkdir -p "${IMG_DL_DIR}"
mkdir -p "${TPL_DL_DIR}"
curl --progress-bar --fail --retry 3 --output "${IMG_DL_DIR}/jammy-server-cloudimg-amd64-disk-kvm.qcow2" "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-disk-kvm.img"
curl --progress-bar --fail --retry 3 --remote-name --output-dir "${TPL_DL_DIR}" "http://download.proxmox.com/images/system/ubuntu-22.04-standard_22.04-1_amd64.tar.zst"

View File

@ -1,10 +1,25 @@
#!/bin/sh #!/bin/sh
set -e set -e
cat << EOIface > /etc/network/interfaces.d/vmbr0 # For the default networking, Proxmox requires that a bridge device exits, and
# does NOT recognize configuration dropped into /etc/network/interfaces.d/
cat << EOIface0 > /etc/network/interfaces.d/vmbr0
auto vmbr0 auto vmbr0
#iface vmbr0 inet6 auto
iface vmbr0 inet dhcp iface vmbr0 inet dhcp
bridge-ports enp2s0f0 bridge-ports enp2s0f0
bridge-stp off bridge-stp off
bridge-fd 0 bridge-fd 0
EOIface EOIface0
cat << EOIface1 > /etc/network/interfaces.d/vmbr1
auto vmbr1
#iface vmbr1 inet6 auto
iface vmbr1 inet static
address 10.4.0.1
netmask 255.255.0.0
bridge-ports none
bridge-stp off
bridge-fd 0
EOIface1

View File

@ -2,8 +2,13 @@
set -e set -e
if [ -n "${new_host_name}" ]; then if [ -n "${new_host_name}" ]; then
fullname="${new_host_name}"
if [ -n "${new_domain_name}" ]; then
fullname="${fullname}.${new_domain_name}"
fi
cat << EOName > /etc/hostname cat << EOName > /etc/hostname
${new_host_name} ${fullname}
EOName EOName
unset fullname
hostname -F /etc/hostname hostname -F /etc/hostname
fi fi

View File

@ -0,0 +1 @@
python3-proxmoxer

View File

@ -0,0 +1 @@
nfs-kernel-server

View File

@ -0,0 +1,3 @@
cmatrix
tree
tmux