Skip to content

Instantly share code, notes, and snippets.

@hyao
hyao / vagrantfile_set_hostname
Last active August 29, 2015 14:00
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|