I am working on rebuilding my homelab and I was looking for a way to quickly automate building out my templates onto my VMware environment. I have used Packer in the past for this process but its been so long I had forgot how to do anything. With a quick Google I found this https://github.com/guillermo-musumeci/packer-vsphere-iso-windows-v2 that had everything ready to be customized for my environment. When I ran packer build .\win2019.json I received the following error.
I verified I had all my credentials correct in the credentials.json and I was following all of the instructions. After some troubleshooting I found that I needed to add the variable -var-file. So the completed command was packer build -var-file .\credentials.json .\win2019.base.json.