Vagrant Up - VirtualBox requires that the same user to be used to manage the VM that was created error message and the fix for it
“Dreams are messages from the deep.” - Dune 2021
I am learning to use Vagrant in order to set up virtual machines as I prepare for a cybersecurity certification in Q1 of 2022.
I have followed HashiCorp for some time - and y'all should know I adore Ruby, and the Ruby on Rails framework, so I am interested in other uses of Ruby.
For this course, I had to setup a virtual machine.
Found this definition:
A virtual machine - VM for short - is a snapshot of all the software on a computer. The snapshot is called an image.
Vagrant is a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases production parity, and makes the "works on my machine" excuse a relic of the past.Getting started with their demo was easy. But my specific use case required installing a specific image in order to work in a setup defined by the course.
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.
From my earlier adventures in web development, I've learned to embrace the well written error messages. In this case, the error politely tells me "This is not a Vagrant issue."
The helpful error message refers to a UID.
My UID is 501 and does not match the UID used to create the VM.
I went to look at the vagrant file setup in the .vagrant file setup which holds a couple of well named folders:
.vagrant > machines > default > VirtualBox > creator_uid
The creator_uid file that had one line of code in it, the value 0.
I simply typed in 501 over the 0 and saved it:
I then typed "vagrant up" and it succeeded.
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'cybersecurity/UbuntuVM' could not be found. Attempting to find and install...
Comments
Post a Comment