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

Customize vm.name in Vagrantfile.erb #144

Closed
dennyzhang opened this issue Mar 3, 2015 · 5 comments
Closed

Customize vm.name in Vagrantfile.erb #144

dennyzhang opened this issue Mar 3, 2015 · 5 comments

Comments

@dennyzhang
Copy link

If we want to customize VM name in vm list of virtualbox, we can customize vm.name in Vagrantfile.

Looks like Vagrantfile.erb currently doesn't support us to do that.

Thanks.

@dennyzhang
Copy link
Author

Something like this in Vagrantfile

  config.vm.provider :virtualbox do |vb|
    vb.name = "mytest.dennyzhang.com"
    vb.customize ["modifyvm", :id, "--memory", 2048, "--cpus", "2"]
  end

@dennyzhang
Copy link
Author

It's supported indeed like below, though not that apparent.

We can mark it as INVALID now.

Vagrangfile

driver:
  name: vagrant
driver_config:
  use_sudo: false
  customize:
      name: kitchen-vagrant-ubuntu-1404

@fnichol
Copy link
Contributor

fnichol commented Mar 23, 2015

@dennyzhang, glad you were able to sort this out without any code changes, yay!

I'm assuming you had a reason for wanting to set the vm.name--care to add some insight for me so I can better understand?

As it looks like you're good to go here, I'll close this out and feel free to reopen if I've misunderstood. Thanks!

@fnichol fnichol closed this as completed Mar 23, 2015
@dennyzhang
Copy link
Author

@fnichol I have multiple VMs in virtualbox, so I'd like to differentiate them by name in the list.

@fnichol
Copy link
Contributor

fnichol commented Mar 26, 2015

@dennyzhang as of #101 (released in 0.16.0+), the names in VirtualBox (and VMware) should be named something like:

"kitchen-#{project_directory_name}-#{instance_name}"

Would that help?

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

No branches or pull requests

2 participants