How to define location of remote packer_cache when using vsphere-iso plugin

Have been experimenting with deploying a rhel 8 VM to vSphere 7 using the vsphere-iso builder plugin

Have succeeded using an iso that already exists on a datastore in vSphere

But when trying to push up an iso from my local client to vSphere it fails due to permissions

Debug mode enabled. Builds will not be parallelized.
vsphere-iso.rhel8: output will be in this color.
 
==> vsphere-iso.rhel8: Pausing after run of step 'StepConnect'. Press enter to continue.
==> vsphere-iso.rhel8: Retrieving ISO
==> vsphere-iso.rhel8: Trying file:///C:/isos/rhel-8.3-x86_64-dvd.iso
==> vsphere-iso.rhel8: Trying file://C:/isos/rhel-8.3-x86_64-dvd.iso?checksum=sha256%3A30fd8dff2d29a384bd97886fa826fa5be872213c81e853eae3f9d9674f720ad0
==> vsphere-iso.rhel8: file://C:/isos/rhel-8.3-x86_64-dvd.iso?checksum=sha256%3A30fd8dff2d29a384bd97886fa826fa5be872213c81e853eae3f9d9674f720ad0 => C:/isos/rhel-8.3-x86_64-dvd.iso
==> vsphere-iso.rhel8: Pausing after run of step 'StepDownload'. Press enter to continue.
==> vsphere-iso.rhel8: Pausing after run of step 'StepCreateCD'. Press enter to continue.
==> vsphere-iso.rhel8: Uploading rhel-8.3-x86_64-dvd.iso to packer_cache/rhel-8.3-x86_64-dvd.iso
==> vsphere-iso.rhel8: ServerFaultCode: Permission to perform this operation was denied.
==> vsphere-iso.rhel8: Step "StepRemoteUpload" failed

I believe this is due to it trying to create a directory called packer_cache at the root of the datastore to upload the iso into, we don’t have create permissions at the root of the datastore, is there a way of defining the path to use for the remote packer_cache ?

1 Like

I don’t think this is currently possible, but it definitely should be. Can you open a feature request on GitHub - hashicorp/packer-plugin-vsphere: Packer plugin for VMware vSphere Builder?

Raised Allow location of packer_cache to be defined · Issue #88 · hashicorp/packer-plugin-vsphere · GitHub