Fix how box is loaded by name
Closed this issue · 0 comments
sciurus commented
Right now when loading a box by name (e.g. vagrant mutate foo kvm
) we assume the provider is virtualbox (i.e. we look for it in in $VAGRANT_HOME/boxes/foo/virtualbox/) This prevents using other providers as inputs.
If the same box already exists with multiple providers, specifying just the name is not sufficient. We could do a couple things
- Just load the first box we find that is for a supported provider
- Keep a list of providers ordered by preference, and load the box from the most preferred provider that has the box
- Let the user specify which provider to use
I'm leaning towards the latter since that will be more flexible and testable. I'll add support for the syntax box_name/provider_name but the /provider_name will only be required if box_name is ambiguous.