VirtualBox machine already exists

Getting the following message when trying various commands:
“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.”

See flow:

@:~ cd m103 **@**B:~/m103 ls
dataset provision-mongod vagrant_2.2.5_linux_amd64.zip
m103-vagrant-env shared Vagrantfile
m103-vagrant-env.zip vagrant_2.2.5_linux_amd64
@:~/m103$ cd m103-vagrant-env
@:~/m103/m103-vagrant-env$ vagrant ssh
VM must be created before running this command. Run vagrant up first.
@:~/m103/m103-vagrant-env$ vagrant up
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.
@:~/m103/m103-vagrant-env$ vagrant status
Current machine states:

mongod-m103 poweroff (virtualbox)

The VM is powered off. To restart the VM, simply run vagrant up
@:~/m103/m103-vagrant-env$ vagrant up
Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
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.
@:~/m103/m103-vagrant-env$ vagrant ssh
VM must be running to open SSH connection. Run vagrant up
to start the virtual machine.
@:~/m103/m103-vagrant-env$ vagrant up
Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
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.

Any suggestions?

I would open the VirtualBox GUI and see what is the other VM with the same name.

But it looks like you are trying to do vagrant up when logged in the VM.

Is your host Windows or Linux?

2 Likes

I solved the issue. I was trying to start up the VM from the wrong folder - a sub folder to be exact. So, when starting in the correct directory, it worked. But thank you very much for the suggestion about the VirtualBox GUI. I have not even looked at that before.