Jonathan's Pancheria

dotcom Thousandaire

… with a little bit of cargo cult possibly rolled in.  Anywhere, here’s the stuff I put into a VagrantFile (for Vagrant v2.x) to get boxes to be named properly both for hostname and for the name that appears in the Virtualbox GUI:


  Vagrant.configure(2) do |config|

  # Any other Vagrant 2.x config settings you want here
  config.vm.define '__YOUR_BOX_NAME_HERE__'
  # Any other Vagrant 2.x config settings you want here
  config.vm.provider "virtualbox" do |vb|
    # Any of your other virtualbox modifications
    vb.name = "__YOUR_BOX_NAME_HERE__"
    # Any other virtualbox modifications here
  end
  # Any other Vagrant 2.x config settings you want here
  config.vm.hostname = "__YOUR_BOX_NAME_HERE__"
  # Any other Vagrant 2.x config settings you want here
 

Replace __YOUR_BOX_NAME_HERE__ with whatever you want to name the box. Also note that the stuff inside config.vm.provider "virtualbox" do |vb| might/will be different for other providers than virtualbox.

Published on 19/10/2016 at 06:42PM . Tags , ,

0 comments

Powered by Typo – Thème Frédéric de Villamil | Photo L. Lemos