Saturday, April 18, 2020

VirtualBox VM was created with a user that doesn't match the current user running Vagrant.

Recently I moved some project files from my old to new laptop and hit this "vagrant up" error

~/projects/vagrant-postgres9.6 $ vagrant up
The VirtualBox VM was created with a user that doesn't match the
current user running Vagrant. VirtualBox requires that the same user
be used to manage the VM that was created. Please re-run Vagrant with
that user. This is not a Vagrant issue.


The UID used to create the VM was: 303684054
Your UID is: 501


Googling I soon found 


The VirtualBox VM was created with a user that doesn't match the current user running Vagrant. #8630https://github.com/hashicorp/vagrant/issues/8630


and TLDR the fix is a simple mv on the .vagrant file:


~/projects/vagrant-postgres9.6 $ mv .vagrant .vagrant.bak
~/projects/vagrant-postgres9.6 $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos/7' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'centos/7'
    default: URL: https://vagrantcloud.com/centos/7

==> default: Adding box 'centos/7' (v1905.1) for provider: virtualbox


NB In case your curious ... for more details around my vagrant postgres setup please see:
I also presented to the Amsterdam Postgres UserGroup last year:


No comments:

Post a Comment