Initial commit

This commit is contained in:
2023-10-12 10:51:18 +02:00
commit 5368205cb8
8 changed files with 403 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
# Resource Definiation for the VM Template
source "proxmox-iso" "debian-12-bookworm-cloudinit-template" {
# Proxmox Connection Settings
proxmox_url = var.proxmox_api_url
username = var.proxmox_api_token_id
token = var.proxmox_api_token_secret
insecure_skip_tls_verify = true
# VM General Settings
node = "proxmox" # add your proxmox node
vm_id = "9999"
vm_name = "debian-12-bookworm-cloudinit-template"
template_description = "Debian 12 Bookworm cloudinit template"
# iso_url = "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso"
# iso_checksum = "23ab444503069d9ef681e3028016250289a33cc7bab079259b73100daee0af66"
iso_file = "local:iso/debian-12.2.0-amd64-netinst.iso"
iso_storage_pool = "local"
unmount_iso = true
# VM Settings
machine = "q35"
# bios = "ovmf"
os = "l26"
qemu_agent = true
cores = "1"
cpu_type = "host"
memory = "2048"
cloud_init = true
cloud_init_storage_pool = "local"
scsi_controller = "virtio-scsi-pci"
disks {
disk_size = "8G"
format = "qcow2"
storage_pool = "local"
type = "virtio"
}
network_adapters {
model = "virtio"
bridge = "vmbr0"
firewall = "false"
}
# PACKER Boot Commands
# boot_command = ["<wait><esc><wait>auto url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<enter>"]
boot_command = ["<esc><wait>auto url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<enter>"]
boot_wait = "15s"
# PACKER Autoinstall Settings
http_directory = "http"
http_port_min = 8802
http_port_max = 8802
ssh_username = "root"
ssh_password = "debian"
ssh_timeout = "20m"
}