Skip to content

Add support for defining location of remote cache #88

@keelerad

Description

@keelerad

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 "me too" comments, 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.

Description

When using the vsphere-iso plugin with a local iso that you want to upload to vsphere it defaults to a fixed location for the packer_cache at the root of the datastore
If you do not have write perms at the root of the datastore it fails as it cannot create a packer_cache directory to upload the iso to

packer build -debug -on-error=ask .
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.

Use Case(s)

Any relevant use-cases that you see.
Trying to packer build from an iso not already in vsphere, that you wish to upload from your packer local build system

Potential configuration

A value for a root directory where you do have write perms for the packer_cache dir to be created

packer_cache_root = "/Departments/Development"

Potential References

https://discuss.hashicorp.com/t/how-to-define-location-of-remote-packer-cache-when-using-vsphere-iso-plugin/26370

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions