diff --git a/create-vms.sh b/create-vms.sh old mode 100644 new mode 100755 index 0bccb72..faf9443 --- a/create-vms.sh +++ b/create-vms.sh @@ -2,25 +2,42 @@ set -eu +DIR="$(dirname "$(realpath "$0")")" + NAME="$1" mkdir -p tmp mkdir -p vm-state -IMG=debian-12-genericcloud-amd64.qcow2 +# https://mop.koeln/blog/creating-a-local-debian-vm-using-cloud-init-and-libvirt/ +# > DO NOT DOWNLOAD THE GENERICCLOUD IMAGE +IMG=debian-12-generic-amd64.qcow2 if ! [ -f "tmp/$IMG" ]; then - curl -L -o "tmp/$IMG" https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2 + curl -L -o "tmp/$IMG" https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2 fi DISK="vm-state/$NAME.qcow2" cp "tmp/$IMG" "$DISK" +meta_data=$(mktemp) + +cat >"$meta_data" <