Skip to content

Instantly share code, notes, and snippets.

@hyao
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyao/11203584 to your computer and use it in GitHub Desktop.
Save hyao/11203584 to your computer and use it in GitHub Desktop.
Create hostname in Vagrantfile that's shown in VBox gui, vagrant stdout and logs, and guest hostname
hostname = "vg-guest1"
Vagrant.configure("2") do |config|
# config.vm.box = "ubuntu"
# configure guest hostname
config.vm.hostname = hostname
# configure vm name used in vagrant stdout and logs etc.
config.vm.define hostname do |hostname|
end
config.vm.provider "virtualbox" do |v|
# set vbox gui name
v.name = hostname
# v.memory = 1024
# v.cpus = 2
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment