Vagrant up command failing - Issue resolved

I am getting the following error when try to bring up the Vagrant using “vagrant up” command on my Windows 10 home edition laptop. Please help me to fix the issue.

C:\Users\MostWanted\Desktop\MongoDB\M103 - Basic Cluster Administration\m103-vagrant-env>vagrant up
Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
==> mongod-m103: Importing base box ‘ubuntu/trusty64’…
==> mongod-m103: Matching MAC address for NAT networking…
==> mongod-m103: Setting the name of the VM: mongod-m103
==> 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…
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [“startvm”, “9290e397-46a2-4523-bb84-256f1fed3c14”, “–type”, “headless”]

Stderr: VBoxManage.exe: error: Not in a hypervisor partition (HVP=0) (VERR_NEM_NOT_AVAILABLE).
VBoxManage.exe: error: VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

Please check this link

Vagrant up –provision fails

I have managed to fix the hypervisor partition issue. I am not getting the following error message. How to fix the timeout issue please?

C:\Users\MostWanted\Desktop\MongoDB\M103 - Basic Cluster Administration\m103-vagrant-env>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: 127.0.0.1:2222
mongod-m103: SSH username: vagrant
mongod-m103: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured (“config.vm.boot_timeout” value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you’re using a custom box, make sure that networking is properly
working and you’re able to connect to the machine. It is a common
problem that networking isn’t setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout (“config.vm.boot_timeout”) value.

Alright, The issue is now resolved. I do not know why the timeout issue occurred but guess this was due to I was messing around with virtualization, removing & re-installing ssh & rsync etc. I decided to clean up everything and did the fresh installation from scratch and it worked. Here are the steps I followed, but these steps may vary for others, please proceed with caution.

My machine details: Windows 10 64bit home edition laptop.

Clean up:

  • Uninstall Vagrant software (it will restart the machine after uninstall)
  • Uninstall Oracle VM virtual box software
  • Uninstall MinGW (go to C:\ and delete the directory “MinGW”)
  • Remove any stuck VMs. Go to C:\Users<username> and delete the directory “VirtualBox VMs”
  • Restart the machine

Start fresh installation from scratch and set-up:

  • Enable virtualization in BIOS settings
  • Install Oracle VM virtual box software
  • Install MinGW and install ssh & rsync (follow the steps provided in the lecture)
  • Install Vagrant software (it will restart the machine after install)
  • Bring up the vagrant and then provision (follow the steps provided in the lecture)

Thanks,
Vimal

Hello, if you’re on a VM and did not install VT-x, you can only use 1 cpu. If you change the

vb.customize [“modifyvm”, :id, “–cpus”, “2”]
to
vb.customize [“modifyvm”, :id, “–cpus”, “1”]

This would fix the issue.

I am not on VM. Thanks for the solution. Thanks Marcel