I want to use ubuntu/xenial64
box to create two separate VMs for two separate projects. I defined Vagrantfile in two separate project directories and added the line config.vm.box = "ubuntu/xenial64"
to each.
The first box boots successfully. But when I do vagrant up
for second project, I get the error
A VirtualBox machine with the name 'ubuntu-xenial-16.04-cloudimg' already exists.
In Vagrant's documentation it's clearly written that
Boxes are globally stored for the current user. Each project uses a box as an initial image to clone from, and never modifies the actual base image. This means that if you have two projects both using the hashicorp/precise64 box we just added, adding files in one guest machine will have no effect on the other machine.
Why then do I get this error?
I have already checked out other similar questions, but I don't understand their solution of deleting existing VMs that appear to have the same name. According to the Vagrant documentation quote above, that shouldn't be necessary. Am I missing something?
ubuntu/xenial64
was created. I repeated the same experiment with another boxgbarbieru/xenial
and that one has no such problem while creating multiple VMs. When I see VirtualBox GUI, I see that the VM name is automatically renamed to containing folder's name upon boot. – Luteousgit checkout
instead of having to checkout then edit the box'sVagrantFile
– Underfur