hashicorp / packer-plugin-vsphere

Packer plugin for VMware vSphere Builder
https://www.packer.io/docs/builders/vsphere
Mozilla Public License 2.0
100 stars 95 forks source link

Build fails when there are no additional configuration parameters to process #482

Closed jhennessey closed 1 month ago

jhennessey commented 1 month ago

Overview of the Issue

Build fails when there are no additional configuration parameters to process

This PR seemingly caused the issue: #468 This line would appear to be the culprit: https://github.com/hashicorp/packer-plugin-vsphere/commit/5e944bc027af0a1120ec81a9643c5f90e3f5341b#diff-f81447593c9b389c1718a91e14307807b280b36f7c76f64a150637d6faba312bR1340

Reproduction Steps

Attempt to build using the vsphere-clone builder with none of the optional configuration options. This will result in a failure (see message below)

Packer Version

Plugin Version and Builders

Please select the builder.

VMware vSphere Version

Guest Operating System

Simplified Packer Buildfile

source "vsphere-clone" "test-agent" {
  vcenter_server          = "${var.vcenter_server}"
  username                = "${var.vsphere_username}"
  password                = "${var.vsphere_password}"
  datacenter              = "${var.vsphere_datacenter}"
  cluster                 = "${var.vsphere_cluster}"
  datastore               = "${var.vsphere_datastore}"
  folder                  = "${var.vsphere_folder}"
  template                = "${var.vsphere_template}"

  vm_name                 = "${var.vm_name_prefix}:provisioning"
  create_snapshot         = true
  linked_clone            = false
  NestedHV                = true

  communicator            = "ssh"
  ssh_username            = "${var.admin_username}"
  ssh_password            = "${var.admin_password}"
}

build {
  sources = [
    "source.vsphere-clone.test-agent"
    ]
...

Operating System and Environment Details

Please add any information you can provide about the environment.

Log Fragments and crash.log Files

error adding configuration parameters: no changes to apply
Step "StepConfigParams" failed, aborting...
tenthirtyam commented 1 month ago

Looking into it - related to #468.

@lbajolet-hashicorp 0 we might need to revert this change and issue a v1.4.2 and take it up again.

tenthirtyam commented 1 month ago

Duplicate of #481

tenthirtyam commented 1 month ago

Pushing out v1.4.2 shortly.

tenthirtyam commented 1 month ago

[!IMPORTANT]

COMMUNITY NOTE

Patch release v1.4.2 is now available.

Ryan and Lucas