{ "variables": { "proxmox_username": "", "proxmox_password": "", "proxmox_url": "", "proxmox_node": "", "proxmox_storage_pool": "local-lvm", "proxmox_storage_pool_type": "lvm-thin", "proxmox_storage_format": "raw", "proxmox_iso_pool": "local:iso", "ubuntu_image": "ubuntu-22.04.1-live-server-amd64.iso", "template_name": "Ubuntu-22.04-Template", "template_description": "Ubuntu 22.04 Template", "version": "" }, "builders": [ { "type": "proxmox", "username": "{{user `proxmox_username`}}", "password": "{{user `proxmox_password`}}", "proxmox_url": "{{ user `proxmox_url`}}", "insecure_skip_tls_verify": true, "node": "{{user `proxmox_node`}}", "os": "l26", "boot_command": [ "c", "linux /casper/vmlinuz -- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/'", "", "initrd /casper/initrd", "", "boot" ], "network_adapters": [ { "bridge": "vmbr0" } ], "disks": [ { "type": "scsi", "disk_size": "8G", "storage_pool": "{{user `proxmox_storage_pool`}}", "storage_pool_type": "{{user `proxmox_storage_pool_type`}}", "format": "{{user `proxmox_storage_format`}}" } ], "scsi_controller": "virtio-scsi-single", "iso_file": "{{user `proxmox_iso_pool`}}/{{user `ubuntu_image`}}", "boot_wait": "10s", "cores": "2", "memory": "2048", "http_directory": "ubuntu2204/http", "ssh_username": "ubuntu", "ssh_password": "ubuntu", "ssh_port": 22, "ssh_timeout": "30m", "unmount_iso": true, "template_name": "{{user `template_name`}}", "template_description": "{{user `template_description`}}" } ], "provisioners": [ { "type": "shell", "inline": [ "while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done", "sudo rm -f /etc/cloud/cloud.cfg.d/99-installer.cfg", "sudo cloud-init clean", "sudo passwd -d ubuntu" ], "only": ["proxmox"] } ] }