Vagrant setup windows

ok so any instructions for us windows users?

same here. no instructions for windows users

Which instructions specifically are you missing? Any vagrant commands are the same cross-platform.

Hi Everyone,

The instructions for Windows users are available in the lecture notes. https://university.mongodb.com/mercury/M103/2019_February/chapter/Chapter_0_Introduction_Setup/lesson/5a9b89e997182d4140a45ecb/tab/5a9b89e997182d4140a45ecc

If you are having any trouble, let me know.

Please check here for any common issues: Vagrant Issues on Windows

Kanika

1 Like

Watch the video first, then do the install. Just take your time and don’t try to rush it.

I would recommend watching each video completely before attempting a segment, throughout the course, so you can see the whole picture of what you are attempting to do, and each element is put into context.

Then go and repeat a video, to perform the actions, if necessary.

PS - Switch on the subtitles, since that can provide extra clarity.

1 Like

The video is for mac users. Window dos has different commands for everything we need to do for the initial install. Any help would be greatly appreciated

I am a windows user, windows 10.

The video and the instructions on the lab page provide a lot of information. The video gives you a feel for what you need to do, while the lab page gives you the links.

To be fair I took a good couple of hours on the install and there was a small part where I could have done with some extra guidance, but I just took my time, and re read the lab notes, line by line. Making sure I didn’t skip anything.

1 Like

The command line actions shown in the video (cd, mkdir, cp) can all be done graphically using Windows Explorer. I assume that you can create a directory with Explorer and that you can unzip a .ZIP and move its contents into the directory you made.

  1. Open Windows Explorer
  2. Browse to My Documents
  3. Create directory m103
  4. Download and unpack the m103-vagrant-env into the m103 directory.

That’s all they did. From there on, you will first need to follow the Windows installation instructions in the Class Notes.

Then just start a cmd.exe or a powershell.exe and run the Vagrant commands shown in the video and the class notes. You will first run cd "My Documents\m103\m103-vagrant-env", which will be the working environment.

Windows10 here too. Yeah, got ‘lost’ too initially. Ignore the video and read the rest of the instruction. I am on Windows 10 Home, Hyper-V disabled. Virtualization enabled on BIOS. Use the latest Vagrant.

Install Virtual Box
Install Vagrant
Download the Hands-on-Lab zip and unpack it
cd to where the file is and run vagrant up etc. as per the course

I must admit these instructions are very confusing and also incomplete if set up on Windows 10.
I could install VirtualBox, Vagrant and MinGW fine following the instructions provided.
Then I copied the handout zip and extracted in my “Documents” folder following the setup:
C:\Users\your_username\m103\m103-vagrant-env
Then used the command prompt to navigate to this folder and run the first set of instructions:
“vagrant up”
I had plenty of error. such as fileutils.rb with mkdir not such file or directory. Also ruby.exe issue.
You have to add these applications/exe files in your Windows Defender Security Center -> Allow an app through Controlled folder access. Remember that the “Documents” folder is heavily protected by Windows Defender. Unless you set up the vagrant environment folder in the C:\ root or another folder NOT protected you might not have to do all that. You might have other issues that I cannot put here as I am using the Documents root folder.
Once I added the apps:
ruby.exe (C:\HashinCorp\Vagrant\embedded\mingw64\bin (for sure this one. the other ones I am not sure yet, but I just added them just in case):
fileutils.rb
rsync.exe
scp.exe
sftp.exe
ssh.exe

the “vagrant up” command seems to be running so far:

C:\Users\marc\Documents\m103\m103-vagrant-env>dir
Volume in drive C has no label.
Volume Serial Number is 16D9-7656

Directory of C:\Users\marc\Documents\m103\m103-vagrant-env

20/05/2019 08:13 PM .
20/05/2019 08:13 PM …
12/04/2019 05:30 PM 4,672 provision-mongod
12/04/2019 05:30 PM 811 Vagrantfile
2 File(s) 5,483 bytes
2 Dir(s) 80,235,810,816 bytes free

C:\Users\marc\Documents\m103\m103-vagrant-env>vagrant up
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:230:in mkdir': No such file or directory @ dir_s_mkdir - C:/Users/marc/Documents/m103/m103-vagrant-env/.vagrant (Errno::ENOENT) from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:230:infu_mkdir’
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:208:in block (2 levels) in mkdir_p' from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:206:inreverse_each’
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:206:in block in mkdir_p' from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:191:ineach’
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:191:in mkdir_p' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/environment.rb:909:insetup_local_data_path’
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/environment.rb:162:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/bin/vagrant:145:innew’
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/bin/vagrant:145:in `’

C:\Users\marc\Documents\m103\m103-vagrant-env>vagrant up
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:230:in mkdir': No such file or directory @ dir_s_mkdir - C:/Users/marc/Documents/m103/m103-vagrant-env/.vagrant (Errno::ENOENT) from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:230:infu_mkdir’
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:208:in block (2 levels) in mkdir_p' from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:206:inreverse_each’
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:206:in block in mkdir_p' from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:191:ineach’
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/fileutils.rb:191:in mkdir_p' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/environment.rb:909:insetup_local_data_path’
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/environment.rb:162:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/bin/vagrant:145:innew’
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/bin/vagrant:145:in `’

C:\Users\marc\Documents\m103\m103-vagrant-env>vagrant up
Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
==> mongod-m103: Box ‘ubuntu/trusty64’ could not be found. Attempting to find and install…
mongod-m103: Box Provider: virtualbox
mongod-m103: Box Version: >= 0
==> mongod-m103: Loading metadata for box ‘ubuntu/trusty64’
mongod-m103: URL: https://vagrantcloud.com/ubuntu/trusty64
==> mongod-m103: Adding box ‘ubuntu/trusty64’ (v20190429.0.1) for provider: virtualbox
mongod-m103: Downloading: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20190429.0.1/providers/virtualbox.box
mongod-m103: Download redirected to host: cloud-images.ubuntu.com
mongod-m103: Progress: 75% (Rate: 290k/s, Estimated time remaining: 0:03:13)

Hi @Marc_27596,

Are you able to do “Vagrant up” now?

If not, please share the latest error message.

Thanks,
Sonali

For windows 10, I had to do the following:

  • I needed to go to BIOS settings and enable virtualization
    • Start -> Settings -> Update/Security -> Recovery -> Advanced Startup ->Restart Now -> UEFI Firmware Settings -> Restart Now -> BIOS Settings -> Advanced or Security tab -> Technology Virtualization: change setting to Enabled

When I did vagrant up --provision, I was still having problems at the line after username: vagrant because the line “Authentication failure. Retrying…” The command prompt wasn’t asking me for a username or password, so there was no place for me to enter it, but I knew that was what was needed. I added the following 2 lines (lines 11 and 12) to the Vagrantfile
config.ssh.username = “vagrant”
config.ssh.password = “vagrant”
and everything worked. I was able to enter validate_box and finish the lab.

2 Likes

I needed to enable Technology Virtualization via my BIOS setup as well
Vagrant 1.9.6 won’t work anymore. You have to install a newer version.

once I confirmed I had Powershell 5.1 on my Win7 SP1 laptop, I went ahead and installed the latest Vagrant and VirtualBox, and all was good (well, good so far).