hashicorp / packer-plugin-vsphere

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

Add a check for the existence of files provided in `iso_paths` before starting a build. #453

Open tenthirtyam opened 1 month ago

tenthirtyam commented 1 month ago

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

A .iso file can be provided at an input to iso_paths where the file name may not exist or has been provided with an incorrect case. In such an instance, the CD-ROM will be added but will not connect to the media, resulting in the build failing.

Use Case(s)

Ensure that builds do not proceed if the media can not be found on the data store.

Potential Configuration

Add a check in the Prepare() for step_add_cdrom.go to ensure that the file name provided exists on the datastore before running the build. If the file does not exist, append an error message.

References

452