
V.customize Ĭonfig.vm.define "chefworkstation1" do |chefworkstation1|Ĭhefworkstation1.vm.box = "ubuntu/xenial"Ĭhefworkstation1.vm.hostname = ""Ĭhefworkstation1.vm.provider :virtualbox do |v|Įach VM is defined with a name (eg chefworksation1 above) whose characteristics can then be accessed or modified with the dot notation (chefworkstation.vm.hostname). You can use this as an example: nfigure("2") do |config|Ĭonfig.vm.define "chefserver" do |chefserver|Ĭhefserver.vm.hostname = ""Ĭhefserver.vm.provider :virtualbox do |v|


It’s not immediately obvious how you create multiple machines on a host in Vagrant. You can also set the CPUs used by the VM: If you do a vagrant init then this is buried in the comments of the resulting Vagrantfile. Here’s a list of things I wish I’d known about before I started. Mostly I use it to spin up OpenShift clusters on my local machine, but I’ve had to poke into lots of corners to get various other things working too. One of the ironies of working a lot with Docker, Kubernetes, and OpenShift is that I’ve had to learn a lot about Vagrant and Virtualbox.
