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

Can't use the "-only=foo" switch on Windows with named builds #954

Closed
jonathanbiard opened this issue Mar 14, 2014 · 3 comments
Closed

Can't use the "-only=foo" switch on Windows with named builds #954

jonathanbiard opened this issue Mar 14, 2014 · 3 comments

Comments

@jonathanbiard
Copy link

I have 3 builders in one JSON file. One virtualbox-iso, one virtualbox-ovf, and one vmware-iso.

I was able to build them perfectly using the -only=virtualbox-iso, for example, but after specifying the "name" and "vm_name" on each builder, I am not able to build using named builds. Here is the simple error I am getting:

$ packer build -only=virtualbox-base-build-ovf packer.json
Unknown build in 'only' flag: virtualbox-base-build-ovf

I should note that I use user-variables to name them and override the scripts. For the override, the variable is in the key, not the value. I'm not sure if this makes a difference because packer is able to validate the JSON file successfully. Also note that I can no longer use the original "type" for the "only" flag since a "name" is specified.

@jonathanbiard
Copy link
Author

Another note, which I just tested, it works when not using user-variables.

@davishmcclurg
Copy link

I've noticed that you can't use user variables in the only values of the JSON file either, eg: "only": ["{{ user name }}-virtualbox"]

@jasonberanek
Copy link
Collaborator

This issue was identified as a bug in #858. Closing this issue as a duplicate so discussion around the issue can be kept in one place.

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants