From 1a190869345b8af5aaa4505bf534ad0b3fe9be5f Mon Sep 17 00:00:00 2001 From: "jostein@valkyrie3.skyfritt.net" Date: Wed, 8 Oct 2025 21:45:36 +0200 Subject: [PATCH] Better structure --- README.md | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 24a69b0..4a077e8 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,34 @@ source: [https://forum.proxmox.com/threads/pve9-create-a-vm-template-for-a-debia +### Tools man-pages + +* virt-customize: [https://manpages.debian.org/trixie/guestfs-tools/virt-customize.1.en.html](https://manpages.debian.org/trixie/guestfs-tools/virt-customize.1.en.html) +* qemu-img: [ ]} + + + +Install mandatory tools for image customization: ``` -apt install libguestfs-tools #needed for the virt-customize tool +apt install libguestfs-tools +``` -wget https://cloud.debian.org/images/cloud/trixie/latest/debian-13-genericcloud-amd64.qcow2 #the current Trixie latest cloud image available +Download the latest cloudinit-image for Trixie: +``` +wget https://cloud.debian.org/images/cloud/trixie/latest/debian-13-genericcloud-amd64.qcow2 +``` + +Verify cheksum against: [https://cloud.debian.org/images/cloud/trixie/latest/SHA512SUM](https://cloud.debian.org/images/cloud/trixie/latest/SHA512SUM) + +``` sha512sum debian-13-genericcloud-amd64.qcow2 #check against https://cloud.debian.org/images/cloud/trixie/latest/SHA512SUMS +``` +customize the image: -#customize the image: - +``` virt-customize -a debian-13-genericcloud-amd64.qcow2 --install qemu-guest-agent,curl,wget,nano,rsync,htop,tmux #tools I like to add virt-customize -a debian-13-genericcloud-amd64.qcow2 --run-command "sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config" #to enable root login which is off by default @@ -22,10 +39,10 @@ virt-customize -a debian-13-genericcloud-amd64.qcow2 --run-command "sed -i 's/#P virt-customize -a debian-13-genericcloud-amd64.qcow2 --run-command "sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config" #to enable SSH authentication by password - my use choice qemu-img convert -O qcow2 -c -o preallocation=off debian-13-genericcloud-amd64.qcow2 debian-13-genericcloud-amd64-shrink.qcow2 #convert & compress qcow2 image - +``` #send image to PVE host: - +``` scp debian-13-genericcloud-amd64-shrink.qcow2 root@........................... #enter desired location on host node ```