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

Use a directory name where Vagrantfile is stored as a prefix for VM name #82

Merged
merged 2 commits into from
Aug 16, 2014
Merged

Use a directory name where Vagrantfile is stored as a prefix for VM name #82

merged 2 commits into from
Aug 16, 2014

Conversation

mkuzmin
Copy link
Contributor

@mkuzmin mkuzmin commented Aug 14, 2014

At the moment all virtual machines created on vSphere get names with default_ prefix. That gets hard to navigate and manage them, when many machines are running in parallel.
A workaround exists to rename machines from default to other values, but it requires additional modifications in each Vagrantfile individually, and doesn't allow to set a default prefix for all instances of the box.

When Vagrant creates VMs under VirtualBox, it uses the current directory name where Vagranfile is stored as a prefix.
This PR adds the same logic here.

@flamingbear flamingbear merged commit f537fa1 into nsidc:master Aug 16, 2014
@mkuzmin mkuzmin deleted the name-prefix branch August 26, 2014 17:41
@marnovdm
Copy link

marnovdm commented Oct 3, 2014

Could this be made optional? We already deploy our VMs in a folder named after the Vagrant project using the vsphere.vm_base_path option, so having the project name also prepended to the VMs we deploy seems a bit redundant and looks 'less clean' in my opinion.

@mkuzmin
Copy link
Contributor Author

mkuzmin commented Oct 3, 2014

This change was a kind of bugfix. The plugin had a non-standard behaviour, and I made it work the same way the core Vagrant does.
vm_base_path is an optional parameter. Yes, VMs can be sorted into different folders, but this not a default case.

I understand your point, and think a new option like vsphere.skip_name_prefix would be valuable, but please do not revert this change, and leave a default behavior as it is today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants