How I got Vagrant working (Windows 10)

I don’t know if I was doing something wrong, but I had a lot of trouble provisioning Vagrant. I got it working and thought I’d share the steps I took in case anyone else is having the same problem.


Issue #1: Virtualization was not enabled in my BIOS


Please watch this video to learn how to get to your BIOS in Windows.

However, my enable virtualization setting was not in the same place as in this video (or the location cited on various web pages). Please see below for a screenshot of where my setting was located:

turn_virtualization_on_laptop




Issue #2 - Provisioning script could not seem to access the "dataset" folder


vagrant_downloading_dataset_error

The issue seemed to be that the provisioning script could not find the dataset folder, even though it was present (...\M103\m103-vagrant-env\).

Fixing this issue was a 2 step process:

  1. Download and unzip the product files in the dataset folder

  2. Comment out the line in the provisioning script that was trying to download and unzip these files so that the script would not get generate an error at that point and stop running.

Download and unzip the product files in the "dataset" folder

  1. Open the file provision-mongod in a text or code editor (e.g., Visual Studio Code, Notepad++, plain old Notepad, etc.) and find the download_dataset function:

download_dataset_function

  1. Follow the AWS links (ctrl + click in VS Code) for the two product files. Or I am pasting them here for you to follow:

  2. These product files will be downloaded to your computer as zip files. Move them into the dataset directory and unzip them. You can delete the zipped (.tgz) files if you want, as the download_database function appears to delete them after unzipping. But I kept them.

product_files

Comment out the line in the provisioning script and rerun

  1. In the provision-mongod file that is open in your text editor, scroll down to the bottom. Comment out the download_dataset command and save the file:

comment_out_download_dataset


  1. Rerun the vagrant up --provision command on your command line.

I got an error message about my IP address but everything else seemed to work fine. I was able to successfully run the ssh and validate_box commands.

2 Likes

Hi @Jennifer_45288,

Thanks for sharing this - the info you provided is really helpful for other students to look at.

Can you please just let us know what was the error message about IP address that you got and how you were able to figure it out?

Really appreciate your participation in the forum! :slight_smile:

Thanks,
Muskan,
Curriculum Support Engineer

Hi @Muskan_Sharma,

I don’t have a screen shot of the error anymore but it was the error generated by the verify_ip function:

IP_address_error

I didn’t even try to figure it out. I just tried seeing if the validate_box function would work in spite of the error, and it did, so I called it a day. :slight_smile:

@Muskan_Sharma

Update on IP Address Issue

I did get this issue (Vagrant using localhost) fixed by following the troubleshooting instructions provided with this course.

I did vagrant destroy and then did vagrant up --provision again and it seems to be working fine now.

Update #2 on IP Address Issue

@Muskan_Sharma

I thought I had this issue fixed but when I started following along with the first lesson in Chapter 1, it turned out that vagrant was again using localhost:

So I used --bind_ip, as suggested in the warning message highlighted in the red box in the picture above. I used the IP address that came up before when I pinged the server (192.168.103.100 - see previous post). I don’t really know much about IP addresses so I don’t know if this is the right IP address to use or not and would appreciate some guidance. Everything seems to be working ok and I am now getting the same results as in the video so far. My internet connection did cut out for a minute or two but I don’t know if it’s related or not.

Can you please provide some feedback as to whether what I’m doing is correct or not?

Thanks

Hi @Jennifer_45288,

This is not really an issue, it’s just a warning and can be ignored :slight_smile:

Also, to be sure, as written in the warning message, you can try and ping localhost to confirm if the value of IP address for your localhost is rightly set to “127.0.0.1”.

ping localhost

Happy learning!

Thanks,
Muskan
Curriculum Support Engineer

Thanks @Muskan_Sharma. I actually did keep moving forward and saw that it wasn’t causing any problems. I don’t know why it didn’t seem to work the first time.

I had the same issue as Jennifer_45288, and solved it with the guide. Just to add more help to this post, I also had a problem downloading the Validations.

I did exactly the same steps as shown on the guide (to download the file, unzip it to root/var/m103/validation/ and comment out the command on the provisions file. It all worked smoothly!

1 Like