Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packer-plugin-proxmox missing cd_content and other cd options mentioned in docs #12919

Closed
ektropy opened this issue Apr 12, 2024 · 2 comments
Closed
Labels

Comments

@ektropy
Copy link

ektropy commented Apr 12, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

Overview of the Issue

Current packer binary could not recognize cd_content, cd_files, and cd_label in Proxmox builder

2024/04/12 09:40:04 packer-plugin-proxmox_v1.1.7_x5.0_darwin_arm64 plugin: 2024/04/12 09:40:04 [TRACE] starting builder iso

Error: Unsupported argument

  on base-almalinux-9-proxmox.pkr.hcl line 27:
  (source code not available)

An argument named "cd_content" is not expected here.

Here is a screenshot of the Proxmox builder document:

image

Reproduction Steps

Try to build an image using Packer version v1.10.2 with the packer-plugin-proxmox v1.1.7 using the cd_content option

Packer version

packer v1.10.2

❯ packer version
Packer v1.10.2

packer-plugin-proxmox v1.1.7

/opt/homebrew/bin/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.7_x5.0_darwin_arm64

Simplified Packer Template

# Build source for AlmaLinux 9 x86_64 for Proxmox VE
source "proxmox-iso" "almalinux-9-proxmox-x86_64" {
  proxmox_url                  = var.proxmox_url
  username                     = var.proxmox_username
  token                        = var.proxmox_token
  insecure_skip_tls_verify     = var.proxmox_insecure_skip_tls_verify
  node                         = var.proxmox_node

  vm_name                 = "almalinux-9-${local.build_timestamp}"
  cores                   = var.cpus
  memory                  = var.memory
  cpu_type                = var.proxmox_cpu_type
  os                      = var.proxmox_os
  serials                 = var.proxmox_serials
  cloud_init              = var.proxmox_cloud_init
  cloud_init_storage_pool = var.proxmox_cloud_init_storage_pool
  iso_urls                = var.alma_iso_urls_9_x86_64
  iso_storage_pool        = var.proxmox_iso_storage_pool
  iso_checksum            = var.alma_iso_checksum_9_x86_64

  cd_files = ["vendor-data"]
  cd_content = { "/almalinux-9-x86_64.ks" = templatefile("${abspath(path.cwd)}/templates/almalinux-9-x86_64-ks.pkrtpl.hcl", local.kickstart_template_vars) }
  cd_label = "cidata"
}

Operating system and Environment details

The workstation I am trying this on is currently macOS Sonoma 14.4. I have also tried building on AlmaLinux 9 x86_64, and Debian 12 x86_64.

Log Fragments and crash.log files

2024/04/12 09:58:14 Received unix RPC address for /opt/homebrew/bin/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.7_x5.0_darwin_arm64: addr is /var/folders/r8/sp1z8dc509v3hn0dtcgj2y0m0000gn/T/packer-plugin453018163
2024/04/12 09:58:14 packer-plugin-proxmox_v1.1.7_x5.0_darwin_arm64 plugin: 2024/04/12 09:58:14 Serving a plugin connection...
2024/04/12 09:58:14 packer-plugin-proxmox_v1.1.7_x5.0_darwin_arm64 plugin: 2024/04/12 09:58:14 [TRACE] starting builder iso

  on base-almalinux-9-proxmox.pkr.hcl line 27:
Error: Unsupported argument
  (source code not available)


An argument named "cd_content" is not expected here.

Error: Unsupported argument

  on base-almalinux-9-proxmox.pkr.hcl line 26:
  (source code not available)

An argument named "cd_files" is not expected here.
  on base-almalinux-9-proxmox.pkr.hcl line 27:

Error: Unsupported argument

  on base-almalinux-9-proxmox.pkr.hcl line 28:
  (source code not available)

An argument named "cd_label" is not expected here.

2024/04/12 09:58:14 [INFO] (telemetry) Finalizing.
  (source code not available)

An argument named "cd_content" is not expected here.

Error: Unsupported argument

  on base-almalinux-9-proxmox.pkr.hcl line 26:
  (source code not available)

An argument named "cd_files" is not expected here.

Error: Unsupported argument

  on base-almalinux-9-proxmox.pkr.hcl line 28:
  (source code not available)

An argument named "cd_label" is not expected here.


2024/04/12 09:58:15 waiting for all plugin processes to complete...
2024/04/12 09:58:15 /opt/homebrew/bin/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.1.7_x5.0_darwin_arm64: plugin process exited
@ektropy ektropy added the bug label Apr 12, 2024
@ektropy
Copy link
Author

ektropy commented Apr 15, 2024

Closing this ticket as there is no bug. The issue with me not reading the documentation correctly. The correct syntax is:

additional_iso_files {
  cd_files = ["vendor-data"]
  cd_content = { "/almalinux-9-x86_64.ks" = templatefile("${abspath(path.cwd)}/templates/almalinux-9-x86_64-ks.pkrtpl.hcl", local.kickstart_template_vars) }
  cd_label = "cidata"
 }

@ektropy ektropy closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant