Installing Vagrant

Hello All,

I am unable to setup “vagrant up” infrastructure VM (using Windows 10).
When I open infrastructure virtualbox, the following screen appears:

Kindly, help.
Regards.

Hi @Othman_25079,

Let’s see a full screenshot which includes the command you ran.

Hello @007_jb,
I am just trying to run command “vagrant up” as in the below image:

Hmmm your first screenshot is very different from this one.

So in this course, you have two machines to provision, database and infrastructure. Let’s do it one by one (using database as an example):

  1. vagrant destroy database
  2. Type y to the prompt and hit Enter
  3. vagrant up database

If there are no errors:

  1. vagrant ssh database
  2. Test using the following command:
    mongo
  3. If it doesn’t show “command not found” then it was successful
  4. Else, run vagrant provision database and test 2 & 3 again

Perform the same set of operations on infrastructure.

The second screenshot is from the PowerShell on my windows.
The first screenshot is from when I open VM VirtualBox for the “Infrastructure” machine.

I tried destroying the VM using “vagrant destroy” then running the machine using “vagrant up”, many times, but the issue is still there.

Kindly, help.

Can you share the full screenshot that includes the command and the full error message again.

The second screenshot includes the command and the full error message.
The first screenshot is shows the error only, since there are no commands entered. The error appears when running “power up” the machine.

Please review my post #4 again and let’s see the full screenshot of all the commands and their outputs step-by-step.

What I advised in that post is slightly different from what you’re running.

Here is the output:

Let’s see the output for the database machine too.

running database machine screenshot:

Database machine is fine. Do the following:

  1. vagrant provision database
  2. vagrant ssh database
  3. mongo
  4. ls -ld shared

If 1 and 2 are successful, let’s see the screenshot of 3 and 4. However, if 1 fails, share the screenshot.

@007_jb thanks for your help.
here is the screenshot:

The provision failed. A few more steps for the database machine:

  1. Open the provision-database file
  2. Find the install_mongod() function, add the part in yellow and save the file
    image
  3. Run the steps from post #12 again

Thanks. Database VM is working:

But what should I do about infrastructure VM?

Try once more and show me the screenshot if step 3 returns a different error message:

  1. vagrant destroy infrastructure
  2. Type y to the prompt and hit Enter
  3. vagrant up infrastructure
  4. vagrant provision infrastructure
  5. vagrant ssh infrastructure

It is returning the same error.

Try the following:
Disable firewall > disable antivirus > turn off WiFi > make a wired connection at home > destroy infrastructure > up infrastructure

By the way, are you using a Work laptop? What type of internet connection are you using?

Hi @Othman_25079 @007_jb,

There can be some more possible reasons for this error:

  1. Make sure that you are using latest version of vagrant.
  2. Check if you have installed vagrant-vbguest plugin, if not please run the command below from within the m310-vagrant-env directory:

vagrant plugin install vagrant-vbguest

Destroying one vagrant environment to set up another one might cause issues at a later stage in the course, so let us look for more options here to debug.

@007_jb thanks for your efforts to constantly look into the issue. :clap:

Please let me know, if you have any questions.

Thanks,
Sonali

No problem! Doing what we can to help :relaxed:

That’s a good call re vagrant version so that we can rule out any version bugs! Here’s how @Othman_25079: vagrant --version. Also include the version of VirtualBox.

The database machine (as per post #15) was successfully booted up so it most probably wouldn’t be related to guest-additions (vbguest). And since we’re destroying a specific machine the effects should be isolated to that specified machine.

My suspect is a network issue; i.e. virtualization BIOS setting, ssh port forwarding redirect (i.e. host to guest) not being acknowledged, vagrant not able to detect the port is being used elsewhere (if it were), slow network or general firewall/anti-virus issues, hence my last post #18 to partially attempt to address it.

So since the database machine is running and to avoid disrupting it, I would suggest that @Othman_25079 tries the above suggestions above, and if they don’t work, then we can explore other suggestions. At which point I would like to see the following screenshots:

  1. Open VirtualBox > open the Settings for the infrastructure machine > show screenshots for
    – System > Acceleration tab
    – Network > Adapter 1 & 2 (with Advanced expanded) tabs
    – Serial Ports > Port 1 tab
  2. Windows start menu > search for and open View Network Connections > screenshot of all connections beginning with the word “VirtualBox”
  3. Installed and available RAM