Cloud-Image

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”

...