Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong generated provider in metadata.json causing issues using Vagrant boxes. #13306

Open
theJaxon opened this issue Feb 23, 2025 · 0 comments
Open
Labels

Comments

@theJaxon
Copy link

theJaxon commented Feb 23, 2025

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 other comments that do not add relevant new information or questions, 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

Overview of the Issue

I'm using Mac M1 and rely on VMWare Fusion (In Packer I'm using VMWare ISO builder) and vagrant as a post-processor.

Locally when using the generated box, everything works fine, however when I push the box to hashicorp cloud then use that box instead, it throws the following error:

Provider expected: vmware_fusion Provider of box: vmware_desktop (Somehow Packer just throws vmware_desktop all the time instead of vmware_fusion).

I'm unable to find a way to change this, what I tried was in the post-processor to do the following

post-processor "shell-local" {
  inline = [
    "echo '{ \"architecture\": \"arm64\" , \"provider\": \"vmware_fusion\" }' | jq '.' > output-fedora/metadata.json"
  ]
}

And while it modifies the file, still the file that gets placed in the generated vagrant box contains vmware_destkop instead.

What i do as a workaround is very manual, that is to extract the box, modify the file, tar compress the box again then push it but .. isn't there a way to avoid all that ? A way to specify that in the generated metadata.json file I need to use vmware_fusion as the provider ?

Reproduction Steps

Steps to reproduce this issue
On Mac M1 if you use Packer with VMWare Fusion you should be able to reproduce by

  1. Generate a Vagrant box
  2. Push it to Hashicorp cloud
  3. Use that box, it should throw the aforementioned issue.

Packer version v1.11.2

Simplified Packer Template

Operating system and Environment details

Apple M1 Pro
MacOS Sequoia 15.3.1
VMWare Fusion 13.6.2
Packer 1.11.2
Vagrant 2.4.3

@theJaxon theJaxon added the bug label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant