Chapter 0 - Struggling to get set up with Vagrant

Hi there,

I’m scouring the boards in hope of a solution, but no luck so far. Here’s my issue(s)…

When running “vagrant up” from my “103” folder it reports back the following…

Box “ubuntu/trusty64” could not be found. Attempting to find and install…
The box “ubuntu/trusty64” could not be found or could not be accessed in the remote catalog.

Error: SSL certificate problem: unable to get local issuer certificate

For the record I’m running Windows 10. I’ve installed Virtual box, Vagrant, minGW, SSH and RSync. I had to install minGW, SSH and Rsync manually, in that it just wouldn’t/couldn’t download the packages, so I copied each link out and download the files individually and put them into the Package folder, retried and after it failed the downloads it extracted and installed the files successfully.

Should I be creating the “ubuntu/trusty64” server in Virtual Box first? I assume not, as this would be mentioned, along with some guidance. I get the impression the vagrantfile is meant to do this?

My folder structure is C:\Mongo\University\m103 - is this causing an issue? Within the m103 folder after running the vagrant up cmd, I’ve since gained .vagrant\machines\mongo-m103\virtualbox\vagrant_cwd - I’ve tried opening this with Virtualbox to no avail…

I’m a bit stumped and running out of time before I need to hand in the first assignment.

Thanks in advance


You must to set the m103 folder in


For my computer it is:


I suggest you a clean installation again, and be sure to place the Path in the environment variables.

You do not need to force the virtual machine to do something, in fact, once you have installed all, you do not even need to open virtualbox. Vagrant will do it for you from the terminal.

@Roger_37585 The structure of the file where the vagrantfile should not cause an issue, for reference here is where I unzipped the vagrant env stuff on my MAC

~Desktop/Web_Development_Stuff/MongoDB University/m103/m103-vagrant-env

where m103-vagrant-env was the ZIP name, etc… As @admnll mentioned, when you bring up the VM for the first time it will provision everything, including the OS (similar to how Docker will provision if you’re familiar with that) Vagrant will download the OS from its catalog using this key from Vagrantfile = “ubuntu/trusty64”

see here:

Next vagrant will execute the “provision-mongod” script/executable specified via the server.vm.provision key in the Vagrantfile which likely provisions and installs mongod

Can you post the output of the full log when doing vagrant up? Perhaps there is a more detailed error (or more helpful context) alongside that one. I >think< I’ve also seen that error in another post here but I’m not 100% sure.


Thank you Roger! I was also unable to download the packages. Thanks to your instructions I found the C:\MinGW\var\cache\mingw-get\packages folder to put the tar.xz files that failed to open.

Unfortunately I have additional errors when attempting to the run the installer. Where do I put the .lzma files?

Hi Shelley,

I put all my files in the packages folder and that was it, sorry.


Thanks for the help/suggestions guys. Below are my logs, firstly from running Vagrant Up, followed by another attempt to re-provision, which it doesn’t seem happy about, something along the lines of “mongod-m103: GPG error: trusty/mongodb-enterprise/3.6 Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY”

Vagrant up log

vagrant up
Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
==> mongod-m103: Clearing any previously set forwarded ports…
==> mongod-m103: Clearing any previously set network interfaces…
==> mongod-m103: Preparing network interfaces based on configuration…
mongod-m103: Adapter 1: nat
mongod-m103: Adapter 2: hostonly
==> mongod-m103: Forwarding ports…
mongod-m103: 22 (guest) => 2222 (host) (adapter 1)
==> mongod-m103: Running ‘pre-boot’ VM customizations…
==> mongod-m103: Booting VM…
==> mongod-m103: Waiting for machine to boot. This may take a few minutes…
mongod-m103: SSH address:
mongod-m103: SSH username: vagrant
mongod-m103: SSH auth method: private key
==> mongod-m103: Machine booted and ready!
==> mongod-m103: Checking for guest additions in VM…
mongod-m103: The guest additions on this VM do not match the installed version of
mongod-m103: VirtualBox! In most cases this is fine, but in rare cases it can
mongod-m103: prevent things such as shared folders from working properly. If you see
mongod-m103: shared folder errors, please make sure the guest additions within the
mongod-m103: virtual machine match the version of VirtualBox you have installed on
mongod-m103: your host and reload your VM.
mongod-m103: Guest Additions Version: 4.3.36
mongod-m103: VirtualBox Version: 6.0
==> mongod-m103: Setting hostname…
==> mongod-m103: Configuring and enabling network interfaces…
==> mongod-m103: Mounting shared folders…
mongod-m103: /shared => C:/Users/roger.ayres/mongod/University/m103/shared
mongod-m103: /vagrant => C:/Users/roger.ayres/mongod/University/m103
mongod-m103: /dataset => C:/Users/roger.ayres/mongod/University/m103/dataset
==> mongod-m103: Machine already provisioned. Run vagrant provision or use the --provision
==> mongod-m103: flag to force provisioning. Provisioners marked to run always will still run.

vagrant provision log

==> mongod-m103: Running provisioner: shell…
mongod-m103: Running: C:/Users/ROGER~1.AYR/AppData/Local/Temp/vagrant-shell20190114-25380-1iq6jc6
mongod-m103: + config
mongod-m103: + sudo su
mongod-m103: + echo -e never
mongod-m103: + echo -e never
mongod-m103: + echo manual
mongod-m103: + sudo tee /etc/init/mongod.override
mongod-m103: manual
mongod-m103: + ip_config
mongod-m103: ++ ifconfig
mongod-m103: ++ tail -1
mongod-m103: ++ awk ‘{ print $1}’
mongod-m103: ++ cut -d: -f2
mongod-m103: ++ grep -v
mongod-m103: ++ grep ‘inet addr:’
mongod-m103: + export CLIENT_IP_ADDR=
mongod-m103: + CLIENT_IP_ADDR=
mongod-m103: ++ hostname
mongod-m103: + export CLIENT_FQDN=m103
mongod-m103: + CLIENT_FQDN=m103
mongod-m103: ++ hostname
mongod-m103: ++ tr ‘[:upper:]’ ‘[:lower:]’
mongod-m103: ++ cut -d. -f 1
mongod-m103: + export CLIENT_NAME=m103
mongod-m103: + CLIENT_NAME=m103
mongod-m103: + echo ‘Configuring /etc/hosts …’
mongod-m103: Configuring /etc/hosts …
mongod-m103: + echo ‘ localhost localhost.localdomain localhost4 localhost4.localdomain4 ’
mongod-m103: + echo ‘::1 localhost localhost.localdomain localhost6 localhost6.localdomain6’
mongod-m103: + echo ‘fe00::0 ip6-localnet’
mongod-m103: + echo ‘ff00::0 ip6-mcastprefix’
mongod-m103: + echo ‘ff02::1 ip6-allnodes’
mongod-m103: + echo ‘ff02::2 ip6-allrouters’
mongod-m103: + echo ‘ff02::3 ip6-allhosts’
mongod-m103: + echo ‘ m103 m103’
mongod-m103: + update_repo
mongod-m103: + echo ‘Install MongoDB Enterprise Repository’
mongod-m103: Install MongoDB Enterprise Repository
mongod-m103: + echo ‘deb [ arch=amd64 ] trusty/mongodb-enterprise/3.6 multiverse’
mongod-m103: + sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
mongod-m103: deb [ arch=amd64 ] trusty/mongodb-enterprise/3.6 multiverse
mongod-m103: + sudo apt-key adv --keyserver hkp:// --recv 0C49F3730359A14518585931BC711F9BA15703C6
mongod-m103: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.dTO9beYdNx --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp:// --recv 0C49F3730359A14518585931BC711F9BA15703C6
mongod-m103: gpg:
mongod-m103: requesting key A15703C6 from hkp server
mongod-m103: gpg:
mongod-m103: key A15703C6: “MongoDB 3.4 Release Signing Key” not changed
mongod-m103: gpg:
mongod-m103: Total number processed: 1
mongod-m103: gpg:
mongod-m103: unchanged: 1
mongod-m103: + echo ‘Update Repositories’
mongod-m103: Update Repositories
mongod-m103: + sudo apt-get update -y
mongod-m103: Ign trusty InRelease
mongod-m103: Get:1 trusty-security InRelease [65.9 kB]
mongod-m103: Get:2 trusty-updates InRelease [65.9 kB]
mongod-m103: Hit trusty-backports InRelease
mongod-m103: Hit trusty Release.gpg
mongod-m103: Hit trusty Release
mongod-m103: Ign trusty/mongodb-enterprise/3.6 InRelease
mongod-m103: Get:3 trusty-security/main Sources [167 kB]
mongod-m103: Get:4 trusty-updates/main Sources [426 kB]
mongod-m103: Get:5 trusty/mongodb-enterprise/3.6 Release.gpg [801 B]
mongod-m103: Get:6 trusty-security/universe Sources [96.5 kB]
mongod-m103: Get:7 trusty-updates/restricted Sources [6,322 B]
mongod-m103: Hit trusty/mongodb-enterprise/3.6 Release
mongod-m103: Ign trusty/mongodb-enterprise/3.6 Release
mongod-m103: Get:8 trusty-updates/universe Sources [227 kB]
mongod-m103: Ign trusty/mongodb-enterprise/3.6/multiverse amd64 Packages/DiffIndex
mongod-m103: Get:9 trusty-security/main amd64 Packages [797 kB]
mongod-m103: Get:10 trusty-updates/multiverse Sources [7,427 B]
mongod-m103: Get:11 trusty-security/universe amd64 Packages [277 kB]
mongod-m103: Get:12 trusty-updates/main amd64 Packages [1,136 kB]
mongod-m103: Get:13 trusty-security/main Translation-en [427 kB]
mongod-m103: Get:14 trusty-updates/restricted amd64 Packages [17.2 kB]
mongod-m103: Get:15 trusty-security/universe Translation-en [150 kB]
mongod-m103: Get:16 trusty-updates/universe amd64 Packages [510 kB]
mongod-m103: Get:17 trusty-updates/multiverse amd64 Packages [14.6 kB]
mongod-m103: Hit trusty/mongodb-enterprise/3.6/multiverse amd64 Packages
mongod-m103: Ign trusty/mongodb-enterprise/3.6/multiverse Translation-en_US
mongod-m103: Ign trusty/mongodb-enterprise/3.6/multiverse Translation-en
mongod-m103: Get:18 trusty-updates/main Translation-en [562 kB]
mongod-m103: Get:19 trusty-updates/multiverse Translation-en [7,616 B]
mongod-m103: Get:20 trusty-updates/restricted Translation-en [4,021 B]
mongod-m103: Get:21 trusty-updates/universe Translation-en [272 kB]
mongod-m103: Hit trusty-backports/main Sources
mongod-m103: Hit trusty-backports/restricted Sources
mongod-m103: Hit trusty-backports/universe Sources
mongod-m103: Hit trusty-backports/multiverse Sources
mongod-m103: Hit trusty-backports/main amd64 Packages
mongod-m103: Hit trusty-backports/restricted amd64 Packages
mongod-m103: Hit trusty-backports/universe amd64 Packages
mongod-m103: Hit trusty-backports/multiverse amd64 Packages
mongod-m103: Hit trusty-backports/main Translation-en
mongod-m103: Hit trusty-backports/multiverse Translation-en
mongod-m103: Hit trusty-backports/restricted Translation-en
mongod-m103: Hit trusty-backports/universe Translation-en
mongod-m103: Hit trusty/main Sources
mongod-m103: Hit trusty/restricted Sources
mongod-m103: Hit trusty/universe Sources
mongod-m103: Hit trusty/multiverse Sources
mongod-m103: Hit trusty/main amd64 Packages
mongod-m103: Hit trusty/restricted amd64 Packages
mongod-m103: Hit trusty/universe amd64 Packages
mongod-m103: Hit trusty/multiverse amd64 Packages
mongod-m103: Hit trusty/main Translation-en
mongod-m103: Hit trusty/multiverse Translation-en
mongod-m103: Hit trusty/restricted Translation-en
mongod-m103: Hit trusty/universe Translation-en
mongod-m103: Ign trusty/main Translation-en_US
mongod-m103: Ign trusty/multiverse Translation-en_US
mongod-m103: Ign trusty/restricted Translation-en_US
mongod-m103: Ign trusty/universe Translation-en_US
mongod-m103: Fetched 5,238 kB in 4s (1,057 kB/s)
mongod-m103: Reading package lists…
mongod-m103: W
mongod-m103: :
mongod-m103: GPG error: trusty/mongodb-enterprise/3.6 Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 58712A2291FA4AD5
mongod-m103: + echo ‘Installing MongoDB Enterprise Dependencies’
mongod-m103: Installing MongoDB Enterprise Dependencies
mongod-m103: + sudo apt-get install -y libgssapi-krb5-2 libsasl2-2 libssl1.0.0 libstdc++6 snmp
mongod-m103: Reading package lists…
mongod-m103: Building dependency tree…
mongod-m103: Reading state information…
mongod-m103: libsasl2-2 is already the newest version.
mongod-m103: libgssapi-krb5-2 is already the newest version.
mongod-m103: libssl1.0.0 is already the newest version.
mongod-m103: libstdc++6 is already the newest version.
mongod-m103: snmp is already the newest version.
mongod-m103: 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
mongod-m103: + install_mongod
mongod-m103: + echo ‘Install MongoDB Enterprise’
mongod-m103: Install MongoDB Enterprise
mongod-m103: + sudo apt-get install --force-yes -y mongodb-enterprise
mongod-m103: Reading package lists…
mongod-m103: Building dependency tree…
mongod-m103: Reading state information…
mongod-m103: mongodb-enterprise is already the newest version.
mongod-m103: 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
mongod-m103: + mkdir -p /var/log/mongodb/
mongod-m103: + sudo chown vagrant:vagrant -R /var/log/mongodb
mongod-m103: + sudo chown vagrant:vagrant -R /var/lib/mongodb
mongod-m103: + sudo echo ’
mongod-m103: security:
mongod-m103: authorization: enabled’
mongod-m103: + sudo tee -a /etc/mongod.conf
mongod-m103: security:
mongod-m103: authorization: enabled
mongod-m103: + echo ‘Done installing MongoDB Enterprise’
mongod-m103: Done installing MongoDB Enterprise
mongod-m103: + user_setup
mongod-m103: + sudo sh -c ‘killall mongod; true’
mongod-m103: mongod: no process found
mongod-m103: + sudo mkdir -p /data
mongod-m103: + sudo chmod -R 777 /data
mongod-m103: + mkdir -p /data/db
mongod-m103: + mkdir -p /home/vagrant/data
mongod-m103: + chmod -R 777 /home/vagrant/data
mongod-m103: + chown -R vagrant:vagrant /home/vagrant/data
mongod-m103: + mkdir -p /var/m103/validation
mongod-m103: Set LC_ALL=C to .profile
mongod-m103: + echo ‘Set LC_ALL=C to .profile’
mongod-m103: + sudo echo ‘export LC_ALL=C’
mongod-m103: + sudo echo PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/var/m103/validation
mongod-m103: + data_path
mongod-m103: + sudo mkdir -p /data
mongod-m103: + sudo chown -R vagrant:vagrant /data
mongod-m103: + install_pymongo
mongod-m103: + sudo apt-get -y install python-pip
mongod-m103: Reading package lists…
mongod-m103: Building dependency tree…
mongod-m103: Reading state information…
mongod-m103: python-pip is already the newest version.
mongod-m103: 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
mongod-m103: + sudo pip install pymongo
mongod-m103: Downloading/unpacking pymongo
mongod-m103: Cannot fetch index base URL
mongod-m103: Could not find any downloads that satisfy the requirement pymongo
mongod-m103: Cleaning up…
mongod-m103: No distributions at all found for pymongo
mongod-m103: Storing debug log for failure in /root/.pip/pip.log
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Thanks in advance



I am getting the error while performing Vagrant up:
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [“startvm”, “b633e846-3969-43d9-932c-8da679bccd55”, “–type”, “headless”]

Stderr: VBoxManage.exe: error: The virtual machine ‘mongod-m103’ has terminated unexpectedly during startup with exit code 1 (0x1). More details may be available in ‘C:\Users\Jasnoor\VirtualBox VMs\mongod-m103\Logs\VBoxHardening.log’
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine

Please help me dealing with this issue


Please check our forum.Many threads on vagrant issues available
What does VBoxHardening.log show?
Please verify these

Enable virtualization in the BIOS.
Make sure you have Hyper-V turned off in Windows 10 For Windows 10: Press Windows key. Type “Turn Windows features on or off”Deselect checkbox next to Hyper-V. Select OK. Select Restart now

or try reboot of your system
or vagrant up provision

1 Like