hashicorp / packer-plugin-vsphere

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

`vsphere-iso`: resource rool ignored when resource pool parent is another resource pool #304

Closed adeturner closed 10 months ago

adeturner commented 1 year ago

Overview of the Issue

When there is a resource pool hierarchy such as

Cluster-1 > RP-TEST > RP-TEST-packer

  1. if you specify resource_pool = "RP-TEST" it works
  2. if you specify resource_pool = "RP-TEST-packer" it is ignored and the Cluster level resource pool is used
  3. if you specify resource_pool = "RP-TEST/RP-TEST-packer" it works but is not documented

This Line limits the path

A documentation fix might be sufficient

Reproduction Steps

  1. Create resource pool hierarchy and build the VM

Packer Version

Plugin Version and Builders

Please provide the plugin version.

Latest

packer { required_version = ">= 1.9.1" vsphere = { version = ">= v1.2.0" source = "github.com/hashicorp/vsphere" } }

Please select the builder.

VMware vSphere Version

7..0.3

Guest Operating System

Simplified Packer Buildfile

source "vsphere-iso" "linux-ubuntu" {

  // vCenter Server Endpoint Settings and Credentials
  vcenter_server      = var.vsphere_endpoint
  username            = var.vsphere_username
  password            = var.vsphere_password
  insecure_connection = var.vsphere_insecure_connection

  // vSphere Settings
  datacenter    = var.vsphere_datacenter
  cluster       = var.vsphere_cluster
  datastore     = var.vsphere_datastore
  folder        = var.vsphere_folder
  resource_pool = var.vsphere_resource_pool

  // Virtual Machine Settings
  vm_name              = local.vm_name
  guest_os_type        = local.vm_guest_os_type

Operating System and Environment Details

Log Fragments and crash.log Files

Nothing in log

tenthirtyam commented 10 months ago

Resolved in https://github.com/hashicorp/packer-plugin-vsphere/pull/342 for the next release.