Proxmox

Cloud Init Template - Debian VM

Dette er en vejledning der vil gennemgå steps til opsætning af en Debian VM til Cloning via Cloud Init med SSH key.

Guide: https://static.xtremeownage.com/blog/2024/proxmox---debian-cloud-init-templates/#ceph-space-usage-of-linked-clone-vs-full-clone

Hent Cloud Image ned fra Debian Hjemmeside https://cdimage.debian.org/images/cloud/bookworm/latest/

wget https://cdimage.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2

Installer libguestfs tool til at installere Qemu efter

sudo apt update -y && sudo apt install libguestfs-tools -y

Virt-customize Debian image med div. pakker, Samt sletning af dhcp-client identifier til dhcp og machine id delete.

virt-customize -a debian-12-genericcloud-amd64.qcow2 --install qemu-guest-agent,curl,wget,nano,rsync,htop

virt-customize -a debian-12-genericcloud-amd64.qcow2 --run-command "sed -i 's|send host-name = gethostname();|send dhcp-client-identifier = hardware;|' /etc/dhcp/dhclient.conf"

virt-customize -a debian-12-genericcloud-amd64.qcow2 --run-command "echo -n > /etc/machine-id"

Oprettelse af VM Template og opsætning af nødvendige parametre, Der skal ændres “Storage aka. Local-lvm og Netbridge”

...

Miljø

Proxmox Diagram #

Proxmox Cluster Overview

IP PLAN #

Hostnavn IP Prefix Gateway Kommentar
AH-PROX01
10.222.20.11 /24 10.222.20.1 WebGUI
10.222.30.11 /24 Ceph Public
10.222.40.11 /24 Ceph Private
AH-PROX02
10.222.20.12 /24 10.222.20.1 WebGUI
10.222.30.12 Ceph Public
10.222.40.12 Ceph Private
AH-PROX03
10.222.20.13 /24 10.222.20.1 WebGUI
10.222.30.13 Ceph Public
10.222.40.13 Ceph Private

DNS Records #

Type Name Content
A AH-PROX01.myrouter.local 10.222.20.11
A AH-PROX02.myrouter.local 10.222.20.12
A AH-PROX03.myrouter.local 10.222.20.13