Error A VirtualBox machine with the name 'mongod-m103' already exists. Please use another name or delete the machine with the existing

I’m trying to run the vagrant environment using the handout but when runing vagrant up --provision i get the following message:

Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
==> mongod-m103: Importing base box ‘ubuntu/trusty64’…
==> mongod-m103: Matching MAC address for NAT networking…
A VirtualBox machine with the name ‘mongod-m103’ already exists.
Please use another name or delete the machine with the existing
name, and try again.

I already tried with vagrant destroy and then vagrant up again but I keep getting the same error. When using vagrant status I get mongod-m103 poweroff (virtualbox)

I’m using Windows 10, Vagrant 2.2.6 and vitrual box 6.0.14r133895

Please help

Hi @Rodrigo_Alonso_30601,

You already have a virtual machine set up on your system with the name “mongod-m103”.

If you do not intend to work with the previously setup virtual machine on your system then please run the commands mentioned below to delete them.

VBoxManage list vms

This command will list all the vms on your machine.

VBoxManage unregistervm --delete “Name_of_the_Virtual_machine_that_you_want_to_delete”

This command will delete the virtual machine from your system.

For example, this is how I would do it on my system.

Once done, I think you are good to go from here.

Hope it helps!

If you have any other query then please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer

1 Like