Skip to content

Commit

Permalink
Merge pull request #706 from Varying-Vagrant-Vagrants/box-name
Browse files Browse the repository at this point in the history
[PR] Set the box name in VirtualBox to that of the working directory
  • Loading branch information
jeremyfelt committed Jul 20, 2015
2 parents 4910681 + 7fa3976 commit 48fc141
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@ Vagrant.configure("2") do |config|
# with possible backward compatible issues.
vagrant_version = Vagrant::VERSION.sub(/^v/, '')

# Configuration options for the VirtualBox provider.
# Give vm a name
config.vm.define vagrant_name do |v|
end

# Configurations from 1.0.x can be placed in Vagrant 1.1.x specs like the following.
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 1024]
v.customize ["modifyvm", :id, "--cpus", 1]
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]

# Set the box name in VirtualBox to match the working directory.
vvv_pwd = Dir.pwd
v.name = File.basename(vvv_pwd)
end

# Configuration options for the Parallels provider.
Expand Down

0 comments on commit 48fc141

Please sign in to comment.