Roots Trellis: A VirtualBox machine with the name ‘bla bla’ already exists.

Happily developing away and went to reboot the Virtualbox to troubleshoot THIS ERROR:

Warning: An unexpected error occurred. Something may be wrong with or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to Please contact your server administrator.) in /srv/www/ on line 158

When THIS ONE popped up:

A VirtualBox machine with the name '' already exists.
Please use another name or delete the machine with the existing
name, and try again.

This SO answer got me started with vboxmanage list vms, than updating the id file located within the Trellis directory at .vagrant/machines/virtualbox/default/id, but Vagrant kept trying to make a new box with the same name.

Then I tried this guys approach, finding the blablabla.vbox file in ~/VirtualBox VMs/ and copying it’s Machine uuid (<Machine uuid="{497bab1c-b4b2-4787-a54a-3f6c5e438b0f}") to theid` file referenced above. It didn’t seem to work at first, but after restarting the host computer AND turning VirtualBox GUI application off, it finally succeeded.

Now there’s an nginx 404 error in the browser. Vagrant ssh is failing with Failed to connect to the host via ssh error. Trying to do a vagrant reload --provision and getting:

default: Warning: Authentication failure. Retrying...

Which sometimes goes away on it’s own. This time it’s seeming more determined than usual. One try. Two tries. This is turning out to be a time consuming turn of events. Luckily there is Cryptonomicon to read and children to put to bed. Three tries. Maybe I need to manually place the ssh key on the vagrant box.

Now vagrant doesn’t seem to think virtualbox is installed and is trying to install.

Stderr: installer: Error - The installer has detected running virtual machines. Please shut down all running VirtualBox machines and then restart the installation.
VBoxManage list runningvms
bash: VBoxManage: command not found

These guys are saying there might be other VBox processes running. Not seeing anything promising with Top or in the Activity Monitor. Restart again.

Well, at least we’ve found our way back to the authentication failure again. Let’s look in /private/etc/hosts and see what the damn IP address of this virtualbox is set to.

$ ssh vagrant@
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
Please contact your system administrator.
Add correct host key in /Users/mikekilmer/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/mikekilmer/.ssh/known_hosts:42
RSA host key for has changed and you have requested strict checking.
Host key verification failed.

Open the known_hosts file in vim. Delete line 42.

Good goddess. This is taking forever. Run VAGRANT_LOG=debug vagrant up and find:

DEBUG ssh: Checking key permissions: /Users/mikekilmer/.vagrant.d/insecure_private_key
 INFO ssh: Invoking SSH: ssh ["vagrant@", "-p", "2222", "-o", "Compression=yes", "-o", "DSAAuthentication=yes", "-o", "LogLevel=FATAL", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-o", "IdentitiesOnly=yes", "-i", "/Users/mikekilmer/.vagrant.d/insecure_private_key", "-o", "ForwardAgent=yes"]

Local vagrant insecure key matches the one here. What the heck does this mean: UserKnownHostsFile=/dev/null?

There’s this:

  $ vagrant ssh-config
  Host default
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile "/Users/mikekilmer/.vagrant.d/insecure_private_key"
  IdentitiesOnly yes
  LogLevel FATAL
  ForwardAgent yes

Further dickering has taken a long time and lead nowhere.

I’m backing up the database by logging into the server through the VirtualBox GUI using username and password vagrant:vagrant, then logged into mysql using the credentials root and vault_mysql_root_password contained in host_vars/development/vault.yml:

mysql -uroot -p

Then within MySql: list databases;. Leave mysql by pressing CTRL-C (I think) and then:

mysqldump -uroot -p name_of_database_you_recognized_in_above_command > database_backup.sql

Then I went back to my computer (having to use Option + Command + Escape to get out of the VirtualBox VM window) and got my local IP address. You can just google IP address. I used ifconfig | grep "inet " | grep -v | awk '{print $2}' so I could feel cool. Now back to the VM:

rsync -avP database_backup.sql mikekilmer@my-ip-address:Documents/

And it’s now in ~/Documents.