From 6bcc1fad4291b3c10371571a1f902ad4b4ed8279 Mon Sep 17 00:00:00 2001 From: Tyler Ault Date: Wed, 22 Jan 2025 22:04:54 -0500 Subject: [PATCH 1/6] chore(packer): updated the packer boilerplates to use new boot conf --- packer/proxmox/README.md | 25 +++++++ .../ubuntu-server-focal-docker.pkr.hcl | 61 ++++++++++------- .../ubuntu-server-focal.pkr.hcl | 65 +++++++++++-------- .../ubuntu-server-jammy-docker.pkr.hcl | 63 +++++++++++------- .../ubuntu-server-jammy.pkr.hcl | 63 +++++++++++------- .../ubuntu-server-noble.pkr.hcl | 65 +++++++++++-------- 6 files changed, 216 insertions(+), 126 deletions(-) diff --git a/packer/proxmox/README.md b/packer/proxmox/README.md index 13929dd0..27d543cf 100644 --- a/packer/proxmox/README.md +++ b/packer/proxmox/README.md @@ -1,3 +1,28 @@ # Packer Proxmox You can add an additional description here. + +## Installing Proxmox plugin +You have two options: +- You can add this config block to your pkr.hcl file and run ```packer init```. + +``` +packer { + required_plugins { + name = { + version = "~> 1" + source = "github.com/hashicorp/proxmox" + } + } +} +``` + +- Run ```packer plugins install github.com/hashicorp/proxmox``` to install the plugin globally in packer. + +## Running Packer + +```packer build -var-file ..\\credentials.pkr.hcl ubuntu-server-noble.pkr.hcl``` + +## Troubleshooting +- If you have tailscale installed, be aware that packer could grab the IP of your tailscale adapter rather than your LAN. You can either hard code the IP in the boot command or try setting the ```http_interface``` option +- Sometimes the boot command is typed too fast and can cause issues. You can increase the time between types by using the ```boot_key_interval``` option. \ No newline at end of file diff --git a/packer/proxmox/ubuntu-server-focal-docker/ubuntu-server-focal-docker.pkr.hcl b/packer/proxmox/ubuntu-server-focal-docker/ubuntu-server-focal-docker.pkr.hcl index 9c4ea549..dbdf67ab 100644 --- a/packer/proxmox/ubuntu-server-focal-docker/ubuntu-server-focal-docker.pkr.hcl +++ b/packer/proxmox/ubuntu-server-focal-docker/ubuntu-server-focal-docker.pkr.hcl @@ -16,31 +16,42 @@ variable "proxmox_api_token_secret" { sensitive = true } +locals { + disk_storage = "local-lvm" +} + # Resource Definiation for the VM Template source "proxmox" "ubuntu-server-focal-docker" { # Proxmox Connection Settings proxmox_url = "${var.proxmox_api_url}" - username = "${var.proxmox_api_token_id}" - token = "${var.proxmox_api_token_secret}" + username = "${var.proxmox_api_token_id}" + token = "${var.proxmox_api_token_secret}" # (Optional) Skip TLS Verification # insecure_skip_tls_verify = true # VM General Settings - node = "your-proxmox-node" - vm_id = "100" - vm_name = "ubuntu-server-focal-docker" + node = "your-proxmox-node" + vm_id = "100" + vm_name = "ubuntu-server-focal-docker" template_description = "Ubuntu Server Focal Image with Docker pre-installed" # VM OS Settings # (Option 1) Local ISO File - # iso_file = "local:iso/ubuntu-20.04.2-live-server-amd64.iso" - # - or - + # boot_iso { + # type = "scsi" + # iso_file = "local:iso/ubuntu-20.04.2-live-server-amd64.iso" + # unmount = true + # iso_checksum = "f8e3086f3cea0fb3fefb29937ab5ed9d19e767079633960ccb50e76153effc98" + # } # (Option 2) Download ISO - # iso_url = "https://releases.ubuntu.com/20.04/ubuntu-20.04.3-live-server-amd64.iso" - # iso_checksum = "f8e3086f3cea0fb3fefb29937ab5ed9d19e767079633960ccb50e76153effc98" - iso_storage_pool = "local" - unmount_iso = true + # boot_iso { + # type = "scsi" + # iso_url = "https://releases.ubuntu.com/20.04/ubuntu-20.04.3-live-server-amd64.iso" + # unmount = true + # iso_storage_pool = "local" + # iso_checksum = "file:https://releases.ubuntu.com/focal/SHA256SUMS" + # } # VM System Settings qemu_agent = true @@ -49,11 +60,10 @@ source "proxmox" "ubuntu-server-focal-docker" { scsi_controller = "virtio-scsi-pci" disks { - disk_size = "20G" - format = "qcow2" - storage_pool = "local-lvm" - storage_pool_type = "lvm" - type = "virtio" + disk_size = "25G" + format = "qcow2" + storage_pool = ${local.disk_storage} + type = "virtio" } # VM CPU Settings @@ -64,16 +74,18 @@ source "proxmox" "ubuntu-server-focal-docker" { # VM Network Settings network_adapters { - model = "virtio" - bridge = "vmbr0" + model = "virtio" + bridge = "vmbr0" firewall = "false" } # VM Cloud-Init Settings - cloud_init = true - cloud_init_storage_pool = "local-lvm" + cloud_init = true + cloud_init_storage_pool = ${local.disk_storage} # PACKER Boot Commands + boot = "c" + boot_wait = "5s" boot_command = [ "", "", @@ -81,15 +93,16 @@ source "proxmox" "ubuntu-server-focal-docker" { "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ", "--- " ] - boot = "c" - boot_wait = "5s" + # Useful for debugging + # Sometimes lag will require this + # boot_key_interval = "500ms" # PACKER Autoinstall Settings http_directory = "http" # (Optional) Bind IP Address and Port # http_bind_address = "0.0.0.0" - # http_port_min = 8802 - # http_port_max = 8802 + # http_port_min = 8802 + # http_port_max = 8802 ssh_username = "your-user-name" diff --git a/packer/proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl b/packer/proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl index 9dd66fe4..07d8438f 100644 --- a/packer/proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl +++ b/packer/proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl @@ -12,35 +12,46 @@ variable "proxmox_api_token_id" { } variable "proxmox_api_token_secret" { - type = string + type = string sensitive = true } +locals { + disk_storage = "local-lvm" +} + # Resource Definiation for the VM Template source "proxmox" "ubuntu-server-focal" { # Proxmox Connection Settings proxmox_url = "${var.proxmox_api_url}" - username = "${var.proxmox_api_token_id}" - token = "${var.proxmox_api_token_secret}" + username = "${var.proxmox_api_token_id}" + token = "${var.proxmox_api_token_secret}" # (Optional) Skip TLS Verification # insecure_skip_tls_verify = true # VM General Settings - node = "your-proxmox-node" - vm_id = "100" - vm_name = "ubuntu-server-focal" + node = "your-proxmox-node" + vm_id = "100" + vm_name = "ubuntu-server-focal" template_description = "Ubuntu Server Focal Image" # VM OS Settings # (Option 1) Local ISO File - # iso_file = "local:iso/ubuntu-20.04.2-live-server-amd64.iso" - # - or - + # boot_iso { + # type = "scsi" + # iso_file = "local:iso/ubuntu-20.04.2-live-server-amd64.iso" + # unmount = true + # iso_checksum = "f8e3086f3cea0fb3fefb29937ab5ed9d19e767079633960ccb50e76153effc98" + # } # (Option 2) Download ISO - # iso_url = "https://releases.ubuntu.com/20.04/ubuntu-20.04.3-live-server-amd64.iso" - # iso_checksum = "f8e3086f3cea0fb3fefb29937ab5ed9d19e767079633960ccb50e76153effc98" - iso_storage_pool = "local" - unmount_iso = true + # boot_iso { + # type = "scsi" + # iso_url = "https://releases.ubuntu.com/20.04/ubuntu-20.04.3-live-server-amd64.iso" + # unmount = true + # iso_storage_pool = "local" + # iso_checksum = "file:https://releases.ubuntu.com/focal/SHA256SUMS" + # } # VM System Settings qemu_agent = true @@ -49,11 +60,10 @@ source "proxmox" "ubuntu-server-focal" { scsi_controller = "virtio-scsi-pci" disks { - disk_size = "20G" - format = "qcow2" - storage_pool = "local-lvm" - storage_pool_type = "lvm" - type = "virtio" + disk_size = "25G" + format = "qcow2" + storage_pool = ${local.disk_storage} + type = "virtio" } # VM CPU Settings @@ -64,16 +74,18 @@ source "proxmox" "ubuntu-server-focal" { # VM Network Settings network_adapters { - model = "virtio" - bridge = "vmbr0" + model = "virtio" + bridge = "vmbr0" firewall = "false" } # VM Cloud-Init Settings cloud_init = true - cloud_init_storage_pool = "local-lvm" + cloud_init_storage_pool = ${local.disk_storage} # PACKER Boot Commands + boot = "c" + boot_wait = "5s" boot_command = [ "", "", @@ -81,15 +93,16 @@ source "proxmox" "ubuntu-server-focal" { "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ", "--- " ] - boot = "c" - boot_wait = "5s" + # Useful for debugging + # Sometimes lag will require this + # boot_key_interval = "500ms" # PACKER Autoinstall Settings http_directory = "http" # (Optional) Bind IP Address and Port # http_bind_address = "0.0.0.0" - # http_port_min = 8802 - # http_port_max = 8802 + # http_port_min = 8802 + # http_port_max = 8802 ssh_username = "your-user-name" @@ -106,7 +119,7 @@ source "proxmox" "ubuntu-server-focal" { # Build Definition to create the VM Template build { - name = "ubuntu-server-focal" + name = "ubuntu-server-focal" sources = ["source.proxmox.ubuntu-server-focal"] # Provisioning the VM Template for Cloud-Init Integration in Proxmox #1 @@ -126,7 +139,7 @@ build { # Provisioning the VM Template for Cloud-Init Integration in Proxmox #2 provisioner "file" { - source = "files/99-pve.cfg" + source = "files/99-pve.cfg" destination = "/tmp/99-pve.cfg" } diff --git a/packer/proxmox/ubuntu-server-jammy-docker/ubuntu-server-jammy-docker.pkr.hcl b/packer/proxmox/ubuntu-server-jammy-docker/ubuntu-server-jammy-docker.pkr.hcl index 400ff05c..9c8dd1d5 100644 --- a/packer/proxmox/ubuntu-server-jammy-docker/ubuntu-server-jammy-docker.pkr.hcl +++ b/packer/proxmox/ubuntu-server-jammy-docker/ubuntu-server-jammy-docker.pkr.hcl @@ -16,31 +16,42 @@ variable "proxmox_api_token_secret" { sensitive = true } +locals { + disk_storage = "local-lvm" +} + # Resource Definiation for the VM Template source "proxmox" "ubuntu-server-jammy" { # Proxmox Connection Settings proxmox_url = "${var.proxmox_api_url}" - username = "${var.proxmox_api_token_id}" - token = "${var.proxmox_api_token_secret}" + username = "${var.proxmox_api_token_id}" + token = "${var.proxmox_api_token_secret}" # (Optional) Skip TLS Verification # insecure_skip_tls_verify = true # VM General Settings - node = "your-proxmox-node" - vm_id = "100" - vm_name = "ubuntu-server-jammy" + node = "your-proxmox-node" + vm_id = "100" + vm_name = "ubuntu-server-jammy" template_description = "Ubuntu Server jammy Image" # VM OS Settings # (Option 1) Local ISO File - # iso_file = "local:iso/ubuntu-22.04-live-server-amd64.iso" - # - or - + # boot_iso { + # type = "scsi" + # iso_file = "local:iso/ubuntu-22.04-live-server-amd64.iso" + # unmount = true + # iso_checksum = "84aeaf7823c8c61baa0ae862d0a06b03409394800000b3235854a6b38eb4856f" + # } # (Option 2) Download ISO - # iso_url = "https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso" - # iso_checksum = "84aeaf7823c8c61baa0ae862d0a06b03409394800000b3235854a6b38eb4856f" - iso_storage_pool = "local" - unmount_iso = true + # boot_iso { + # type = "scsi" + # iso_url = "https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso" + # unmount = true + # iso_storage_pool = "local" + # iso_checksum = "file:https://releases.ubuntu.com/jammy/SHA256SUMS" + # } # VM System Settings qemu_agent = true @@ -49,11 +60,10 @@ source "proxmox" "ubuntu-server-jammy" { scsi_controller = "virtio-scsi-pci" disks { - disk_size = "20G" - format = "qcow2" - storage_pool = "local-lvm" - storage_pool_type = "lvm" - type = "virtio" + disk_size = "20G" + format = "qcow2" + storage_pool = ${local.disk_storage} + type = "virtio" } # VM CPU Settings @@ -64,16 +74,18 @@ source "proxmox" "ubuntu-server-jammy" { # VM Network Settings network_adapters { - model = "virtio" - bridge = "vmbr0" + model = "virtio" + bridge = "vmbr0" firewall = "false" } # VM Cloud-Init Settings - cloud_init = true - cloud_init_storage_pool = "local-lvm" + cloud_init = true + cloud_init_storage_pool = ${local.disk_storage} # PACKER Boot Commands + boot = "c" + boot_wait = "5s" boot_command = [ "", "e", @@ -82,15 +94,16 @@ source "proxmox" "ubuntu-server-jammy" { "autoinstall ds=nocloud-net\\;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ---", "" ] - boot = "c" - boot_wait = "5s" + # Useful for debugging + # Sometimes lag will require this + # boot_key_interval = "500ms" # PACKER Autoinstall Settings http_directory = "http" # (Optional) Bind IP Address and Port # http_bind_address = "0.0.0.0" - # http_port_min = 8802 - # http_port_max = 8802 + # http_port_min = 8802 + # http_port_max = 8802 ssh_username = "your-user-name" @@ -128,7 +141,7 @@ build { # Provisioning the VM Template for Cloud-Init Integration in Proxmox #2 provisioner "file" { - source = "files/99-pve.cfg" + source = "files/99-pve.cfg" destination = "/tmp/99-pve.cfg" } diff --git a/packer/proxmox/ubuntu-server-jammy/ubuntu-server-jammy.pkr.hcl b/packer/proxmox/ubuntu-server-jammy/ubuntu-server-jammy.pkr.hcl index ae3fcea5..ea3b3b06 100644 --- a/packer/proxmox/ubuntu-server-jammy/ubuntu-server-jammy.pkr.hcl +++ b/packer/proxmox/ubuntu-server-jammy/ubuntu-server-jammy.pkr.hcl @@ -16,31 +16,42 @@ variable "proxmox_api_token_secret" { sensitive = true } +locals { + disk_storage = "local-lvm" +} + # Resource Definiation for the VM Template source "proxmox-iso" "ubuntu-server-jammy" { # Proxmox Connection Settings proxmox_url = "${var.proxmox_api_url}" - username = "${var.proxmox_api_token_id}" - token = "${var.proxmox_api_token_secret}" + username = "${var.proxmox_api_token_id}" + token = "${var.proxmox_api_token_secret}" # (Optional) Skip TLS Verification # insecure_skip_tls_verify = true # VM General Settings - node = "your-proxmox-node" - vm_id = "100" - vm_name = "ubuntu-server-jammy" + node = "your-proxmox-node" + vm_id = "100" + vm_name = "ubuntu-server-jammy" template_description = "Ubuntu Server jammy Image" # VM OS Settings # (Option 1) Local ISO File - # iso_file = "local:iso/ubuntu-22.04-live-server-amd64.iso" - # - or - + # boot_iso { + # type = "scsi" + # iso_file = "local:iso/ubuntu-22.04-live-server-amd64.iso" + # unmount = true + # iso_checksum = "84aeaf7823c8c61baa0ae862d0a06b03409394800000b3235854a6b38eb4856f" + # } # (Option 2) Download ISO - # iso_url = "https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso" - # iso_checksum = "84aeaf7823c8c61baa0ae862d0a06b03409394800000b3235854a6b38eb4856f" - iso_storage_pool = "local" - unmount_iso = true + # boot_iso { + # type = "scsi" + # iso_url = "https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso" + # unmount = true + # iso_storage_pool = "local" + # iso_checksum = "file:https://releases.ubuntu.com/jammy/SHA256SUMS" + # } # VM System Settings qemu_agent = true @@ -49,11 +60,10 @@ source "proxmox-iso" "ubuntu-server-jammy" { scsi_controller = "virtio-scsi-pci" disks { - disk_size = "20G" - format = "qcow2" - storage_pool = "local-lvm" - storage_pool_type = "lvm" - type = "virtio" + disk_size = "20G" + format = "qcow2" + storage_pool = ${local.disk_storage} + type = "virtio" } # VM CPU Settings @@ -64,16 +74,18 @@ source "proxmox-iso" "ubuntu-server-jammy" { # VM Network Settings network_adapters { - model = "virtio" - bridge = "vmbr0" + model = "virtio" + bridge = "vmbr0" firewall = "false" } # VM Cloud-Init Settings - cloud_init = true - cloud_init_storage_pool = "local-lvm" + cloud_init = true + cloud_init_storage_pool = ${local.disk_storage} # PACKER Boot Commands + boot = "c" + boot_wait = "5s" boot_command = [ "", "e", @@ -82,15 +94,16 @@ source "proxmox-iso" "ubuntu-server-jammy" { "autoinstall ds=nocloud-net\\;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ---", "" ] - boot = "c" - boot_wait = "5s" + # Useful for debugging + # Sometimes lag will require this + # boot_key_interval = "500ms" # PACKER Autoinstall Settings http_directory = "http" # (Optional) Bind IP Address and Port # http_bind_address = "0.0.0.0" - # http_port_min = 8802 - # http_port_max = 8802 + # http_port_min = 8802 + # http_port_max = 8802 ssh_username = "your-user-name" @@ -128,7 +141,7 @@ build { # Provisioning the VM Template for Cloud-Init Integration in Proxmox #2 provisioner "file" { - source = "files/99-pve.cfg" + source = "files/99-pve.cfg" destination = "/tmp/99-pve.cfg" } diff --git a/packer/proxmox/ubuntu-server-noble/ubuntu-server-noble.pkr.hcl b/packer/proxmox/ubuntu-server-noble/ubuntu-server-noble.pkr.hcl index 86fa28c8..22e201c1 100644 --- a/packer/proxmox/ubuntu-server-noble/ubuntu-server-noble.pkr.hcl +++ b/packer/proxmox/ubuntu-server-noble/ubuntu-server-noble.pkr.hcl @@ -16,31 +16,42 @@ variable "proxmox_api_token_secret" { sensitive = true } +locals { + disk_storage = "local-lvm" +} + # Resource Definiation for the VM Template source "proxmox-iso" "ubuntu-server-noble" { # Proxmox Connection Settings proxmox_url = "${var.proxmox_api_url}" - username = "${var.proxmox_api_token_id}" - token = "${var.proxmox_api_token_secret}" + username = "${var.proxmox_api_token_id}" + token = "${var.proxmox_api_token_secret}" # (Optional) Skip TLS Verification # insecure_skip_tls_verify = true # VM General Settings - node = "your-proxmox-node" - vm_id = "100" - vm_name = "ubuntu-server-noble" + node = "your-proxmox-node" + vm_id = "100" + vm_name = "ubuntu-server-noble" template_description = "Ubuntu Server Noble Image" # VM OS Settings # (Option 1) Local ISO File - # iso_file = "local:iso/ubuntu-24.04-live-server-amd64.iso" - # - or - + # boot_iso { + # type = "scsi" + # iso_file = "local:iso/ubuntu-24.04-live-server-amd64.iso" + # unmount = true + # iso_checksum = "e240e4b801f7bb68c20d1356b60968ad0c33a41d00d828e74ceb3364a0317be9" + # } # (Option 2) Download ISO - # iso_url = "https://releases.ubuntu.com/24.04/ubuntu-24.04-live-server-amd64.iso" - # iso_checksum = "8762f7e74e4d64d72fceb5f70682e6b069932deedb4949c6975d0f0fe0a91be3" - iso_storage_pool = "local" - unmount_iso = true + # boot_iso { + # type = "scsi" + # iso_url = "https://releases.ubuntu.com/24.04/ubuntu-24.04-live-server-amd64.iso" + # unmount = true + # iso_storage_pool = "local" + # iso_checksum = "file:https://releases.ubuntu.com/noble/SHA256SUMS" + # } # VM System Settings qemu_agent = true @@ -49,11 +60,10 @@ source "proxmox-iso" "ubuntu-server-noble" { scsi_controller = "virtio-scsi-pci" disks { - disk_size = "20G" - format = "raw" - storage_pool = "local-lvm" - storage_pool_type = "lvm" - type = "virtio" + disk_size = "25G" + format = "qcow2" + storage_pool = ${local.disk_storage} + type = "virtio" } # VM CPU Settings @@ -64,16 +74,19 @@ source "proxmox-iso" "ubuntu-server-noble" { # VM Network Settings network_adapters { - model = "virtio" - bridge = "vmbr0" + model = "virtio" + bridge = "vmbr0" firewall = "false" } # VM Cloud-Init Settings - cloud_init = true - cloud_init_storage_pool = "local-lvm" + cloud_init = true + cloud_init_storage_pool = ${local.disk_storage} # PACKER Boot Commands + boot = "c" + boot_wait = "10s" + communicator = "ssh" boot_command = [ "", "e", @@ -82,13 +95,13 @@ source "proxmox-iso" "ubuntu-server-noble" { "autoinstall ds=nocloud-net\\;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ---", "" ] + # Useful for debugging + # Sometimes lag will require this + # boot_key_interval = "500ms" - boot = "c" - boot_wait = "10s" - communicator = "ssh" # PACKER Autoinstall Settings - http_directory = "http" + http_directory = "http" # (Optional) Bind IP Address and Port # http_bind_address = "0.0.0.0" # http_port_min = 8802 @@ -110,7 +123,7 @@ source "proxmox-iso" "ubuntu-server-noble" { # Build Definition to create the VM Template build { - name = "ubuntu-server-noble" + name = "ubuntu-server-noble" sources = ["source.proxmox-iso.ubuntu-server-noble"] # Provisioning the VM Template for Cloud-Init Integration in Proxmox #1 @@ -131,7 +144,7 @@ build { # Provisioning the VM Template for Cloud-Init Integration in Proxmox #2 provisioner "file" { - source = "files/99-pve.cfg" + source = "files/99-pve.cfg" destination = "/tmp/99-pve.cfg" } From a2ba95679726aa18efb437b1babc3b01f29f6d56 Mon Sep 17 00:00:00 2001 From: Tyler Ault Date: Wed, 22 Jan 2025 23:16:21 -0500 Subject: [PATCH 2/6] chore(packer): Fixed readme --- packer/proxmox/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packer/proxmox/README.md b/packer/proxmox/README.md index 27d543cf..89aeb6d3 100644 --- a/packer/proxmox/README.md +++ b/packer/proxmox/README.md @@ -21,7 +21,9 @@ packer { ## Running Packer -```packer build -var-file ..\\credentials.pkr.hcl ubuntu-server-noble.pkr.hcl``` +1. Navigate into the folder you want to create a template with +2. Run ```packer build -var-file ../credentials.pkr.hcl .``` + ## Troubleshooting - If you have tailscale installed, be aware that packer could grab the IP of your tailscale adapter rather than your LAN. You can either hard code the IP in the boot command or try setting the ```http_interface``` option From 67933517d508f0bb2383517e24b23e77934dbe82 Mon Sep 17 00:00:00 2001 From: Tyler Ault Date: Thu, 23 Jan 2025 19:07:45 -0500 Subject: [PATCH 3/6] Fixing new line at the end of the file --- packer/proxmox/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/proxmox/README.md b/packer/proxmox/README.md index 89aeb6d3..8599d6d6 100644 --- a/packer/proxmox/README.md +++ b/packer/proxmox/README.md @@ -27,4 +27,4 @@ packer { ## Troubleshooting - If you have tailscale installed, be aware that packer could grab the IP of your tailscale adapter rather than your LAN. You can either hard code the IP in the boot command or try setting the ```http_interface``` option -- Sometimes the boot command is typed too fast and can cause issues. You can increase the time between types by using the ```boot_key_interval``` option. \ No newline at end of file +- Sometimes the boot command is typed too fast and can cause issues. You can increase the time between types by using the ```boot_key_interval``` option. From e959768e5892a7a543a5634866330598d04bf629 Mon Sep 17 00:00:00 2001 From: Tyler Ault Date: Thu, 23 Jan 2025 19:10:06 -0500 Subject: [PATCH 4/6] Fixing some HCL formatting --- packer/proxmox/ubuntu-server-noble/ubuntu-server-noble.pkr.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/proxmox/ubuntu-server-noble/ubuntu-server-noble.pkr.hcl b/packer/proxmox/ubuntu-server-noble/ubuntu-server-noble.pkr.hcl index 22e201c1..2296814e 100644 --- a/packer/proxmox/ubuntu-server-noble/ubuntu-server-noble.pkr.hcl +++ b/packer/proxmox/ubuntu-server-noble/ubuntu-server-noble.pkr.hcl @@ -12,7 +12,7 @@ variable "proxmox_api_token_id" { } variable "proxmox_api_token_secret" { - type = string + type = string sensitive = true } From f9be1483618ae68cad9099257f8e7ab8d4fee7a1 Mon Sep 17 00:00:00 2001 From: Tyler Ault Date: Thu, 23 Jan 2025 21:56:19 -0500 Subject: [PATCH 5/6] Fixed some formatting I missed earlier --- .../ubuntu-server-focal-docker.pkr.hcl | 4 ++-- .../proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl | 2 +- .../ubuntu-server-jammy-docker.pkr.hcl | 2 +- .../proxmox/ubuntu-server-jammy/ubuntu-server-jammy.pkr.hcl | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packer/proxmox/ubuntu-server-focal-docker/ubuntu-server-focal-docker.pkr.hcl b/packer/proxmox/ubuntu-server-focal-docker/ubuntu-server-focal-docker.pkr.hcl index dbdf67ab..fb362dc6 100644 --- a/packer/proxmox/ubuntu-server-focal-docker/ubuntu-server-focal-docker.pkr.hcl +++ b/packer/proxmox/ubuntu-server-focal-docker/ubuntu-server-focal-docker.pkr.hcl @@ -12,7 +12,7 @@ variable "proxmox_api_token_id" { } variable "proxmox_api_token_secret" { - type = string + type = string sensitive = true } @@ -139,7 +139,7 @@ build { # Provisioning the VM Template for Cloud-Init Integration in Proxmox #2 provisioner "file" { - source = "files/99-pve.cfg" + source = "files/99-pve.cfg" destination = "/tmp/99-pve.cfg" } diff --git a/packer/proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl b/packer/proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl index 07d8438f..2c6f05f8 100644 --- a/packer/proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl +++ b/packer/proxmox/ubuntu-server-focal/ubuntu-server-focal.pkr.hcl @@ -80,7 +80,7 @@ source "proxmox" "ubuntu-server-focal" { } # VM Cloud-Init Settings - cloud_init = true + cloud_init = true cloud_init_storage_pool = ${local.disk_storage} # PACKER Boot Commands diff --git a/packer/proxmox/ubuntu-server-jammy-docker/ubuntu-server-jammy-docker.pkr.hcl b/packer/proxmox/ubuntu-server-jammy-docker/ubuntu-server-jammy-docker.pkr.hcl index 9c8dd1d5..f4120951 100644 --- a/packer/proxmox/ubuntu-server-jammy-docker/ubuntu-server-jammy-docker.pkr.hcl +++ b/packer/proxmox/ubuntu-server-jammy-docker/ubuntu-server-jammy-docker.pkr.hcl @@ -12,7 +12,7 @@ variable "proxmox_api_token_id" { } variable "proxmox_api_token_secret" { - type = string + type = string sensitive = true } diff --git a/packer/proxmox/ubuntu-server-jammy/ubuntu-server-jammy.pkr.hcl b/packer/proxmox/ubuntu-server-jammy/ubuntu-server-jammy.pkr.hcl index ea3b3b06..afda0c8b 100644 --- a/packer/proxmox/ubuntu-server-jammy/ubuntu-server-jammy.pkr.hcl +++ b/packer/proxmox/ubuntu-server-jammy/ubuntu-server-jammy.pkr.hcl @@ -12,7 +12,7 @@ variable "proxmox_api_token_id" { } variable "proxmox_api_token_secret" { - type = string + type = string sensitive = true } @@ -84,8 +84,8 @@ source "proxmox-iso" "ubuntu-server-jammy" { cloud_init_storage_pool = ${local.disk_storage} # PACKER Boot Commands - boot = "c" - boot_wait = "5s" + boot = "c" + boot_wait = "5s" boot_command = [ "", "e", From fb3c23f811f616fad394e50ed826d16fbc161e61 Mon Sep 17 00:00:00 2001 From: Tyler Ault Date: Thu, 23 Jan 2025 21:58:18 -0500 Subject: [PATCH 6/6] Forcing newline on last line of the readme --- packer/proxmox/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packer/proxmox/README.md b/packer/proxmox/README.md index 8599d6d6..26dd2b5e 100644 --- a/packer/proxmox/README.md +++ b/packer/proxmox/README.md @@ -28,3 +28,4 @@ packer { ## Troubleshooting - If you have tailscale installed, be aware that packer could grab the IP of your tailscale adapter rather than your LAN. You can either hard code the IP in the boot command or try setting the ```http_interface``` option - Sometimes the boot command is typed too fast and can cause issues. You can increase the time between types by using the ```boot_key_interval``` option. +