Created
August 9, 2025 21:14
-
-
Save kholisrag/4242821fbf236db51cb38f98c930ecfb to your computer and use it in GitHub Desktop.
Personal Proxmox VM Template Creation with Cloud Init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
qm create 9999 --name "ubuntu24lts-template" --memory 1024 --cores 1 --net0 virtio,bridge=vmbr1 | |
qm importdisk 9999 /mnt/pve/local-sas/template/iso/noble-server-cloudimg-amd64.img local-zfs | |
qm set 9999 --ide2 local-zfs:cloudinit | |
qm set 9999 --scsihw virtio-scsi-pci --scsi0 local-zfs:vm-9999-disk-0 | |
qm set 9999 --boot order=scsi0 | |
qm set 9000 --serial0 socket | |
qm set 9999 --ipconfig0 ip=dhcp | |
qm set 9999 --ciuser ubuntu --cipassword 'XXXXX' | |
qm set 9999 --sshkey "/root/.ssh/authorized_keys" | |
qm template 9999 | |
qm clone 9999 101 --name "cloudflared" --full --storage local-zfs | |
qm set 101 --memory 2048 --cores 2 | |
qm start 101 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment