How To Set Up Vagrant and VirtualBox for MongoDB Security in Window?

Connect with

MongoDBWell, How To configure Vagrant and VirtualBox in your Window OS for your any MongoDB or any other Exercise? Configuration is very simple, follow few step and you are done with set up.

Pre-Requisite for MongoDB Exercise on Vagrant and VirtualBox

Download or you can download same file from our network m310-vagrant-env-04dce7bfaaf1

Step 1. Install VirtualBox

I have installed the binary from VirtualBox and Vagrant

Step 2. Install Vagragnt

– Download the binary according to the 32 or 64 bit architecture.
– install the Vagrant by clicking on binary.

Step 3. Create a new Directory

Go to your prefered directory and create a new directory say “myVagrantTest” in my case it’s “e://noSQL/myVagrantTest”


E:\>cd noSQL
E:\noSQL>mkdir myVagrantTest
E:\noSQL>cd myVagrantTest

Initialize VirtualBox by Command

from the command line run the following command:

  • $ vagrant init precise32
  • $ vagrant up
  • $ vagrant ssh
E:\noSQL/myVagrantTest> vagrant init precise32
E:\noSQL/myVagrantTest> vagrant up
E:\noSQL/myVagrantTest> vagrant ssh 

Note: From window system vagrant ssh will not work, so install putty or tabbed putty i.e. mRemoteNG and loggin

userName: vagrant
password: vagrant

To return to your host machine

To return to your host machine, run the command:

$ exit

To Destroy the VM

To destroy the VM and remove the binary disk image:

$ vagrant destroy 

This command must be run from the directory which contains the Vagrantfile for the box you wish to destroy. It will not remove any of your configuration files. To recreate the machine, use the commands in step 4.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.


E:\>cd noSQL\mongoDB-security\m310-vagrant-env

 Volume in drive E is New Volume
 Volume Serial Number is 50F7-0BAD

 Directory of E:\noSQL\mongoDB-security\m310-vagrant-env

11/13/2016  01:53 PM              .
11/13/2016  01:53 PM              ..
11/07/2016  11:13 PM             1,515 provision-database
11/07/2016  11:13 PM             1,707 provision-infrastructure
11/07/2016  11:13 PM             1,067 Vagrantfile
               3 File(s)          4,289 bytes
               2 Dir(s)  199,087,276,032 bytes free

E:\noSQL\mongoDB-security\m310-vagrant-env>vagrant up
Bringing machine 'database' up with 'virtualbox' provider...
Bringing machine 'infrastructure' up with 'virtualbox' provider...
==> database: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    database: Box Provider: virtualbox
    database: Box Version: >= 0
==> database: Loading metadata for box 'ubuntu/trusty64'
    database: URL:
==> database: Adding box 'ubuntu/trusty64' (v20161109.0.0) for provider: virtualbox
    database: Downloading:
    database: Progress: 14% (Rate: 829k/s, Estimated time remaining: 0:05:42))

Connect with

3 thoughts on “How To Set Up Vagrant and VirtualBox for MongoDB Security in Window?

  1. Hi there, just became alert to your blog through
    Google, and found that it is really informative.
    I’m gonna watch out for brussels. I’ll appreciate if you continue this in future.
    Many people will be benefited from your writing.

Leave a Reply

Your email address will not be published. Required fields are marked *