Error during vagrant up

Hi,

getting below error while running vagrant up --provision

Must redirect to new repository for old Vagrant versions
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
The box ‘ubuntu/trusty64’ could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp’s Atlas, please verify you’re logged in via
vagrant login. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: [“https://vagrantcloud.com/ubuntu/trusty64”]
Error: Could not resolve host: vagrantcloud.com

Could you please inform if I am missing anything. it will not work if antivirus is turned on?

Regards,
Prasad.

As suggested by the error, it is unable to reach vagrantcloud. Try opening this url and check if your firewall is blocking this.: https://vagrantcloud.com/ubuntu/trusty64

Kanika

2 Likes

To build on what Kanika says: are you working from home, or from a corporate network? If it’s the latter, then your company’s firewall or proxy may be blocking the traffic .

1 Like

Hello,

My install and setup of vagrant also seems to be hitting multiple glitches.
I do not see an similar event so I thought I would continue this thread.

I just received a brand new MACbook Pro
I find I cannot install anything without errors : virtual box, vagrant, VMs in vagrant,

VirtualBox install failed due to some authorization … but ‘vboxmanage --version’ works

daves-MacBook-Pro:m103 dave$ vboxmanage --version
6.0.14r133895

vagrant installed … but some error, yet it also seems to ‘work’

daves-MacBook-Pro:m103 dave$ vagrant --version
Vagrant 2.2.6
daves-MacBook-Pro:m103 dave$

unzipped the m103-vagrant-env.zip into m103 directory [truncated terminal output below]

then ran:

           vagrant up --provision

and error is : fail to create host adapter

I tried to install version 5 of virtual box, then updated to version 6 shown above, still not working as expected.

Is there a troubleshooting test for virtual box and vagrant other than the --version option?

Thanks

full output below

Last login: Sat Nov 2 22:24:14 on ttys000

daves-MacBook-Pro:~ dave$ ls Downloads/
Firefox 69.0.3.dmg m042-vagrant-env.zip
MongoDB-Univ mongodb-compass-1.19.12-darwin-x64.dmg
VirtualBox-5.2.34-133893-OSX.dmg mongodb-macos-x86_64-4.2.1
VirtualBox-6.0.14-133895-OSX.dmg mongodb-macos-x86_64-4.2.1.tgz
m042-vagrant-env vagrant_2.2.6_x86_64.dmg

daves-MacBook-Pro:Downloads dave$ ls -F
DMG-Pkgs/ m042-vagrant-env/
MongoDB-Univ/ m042-vagrant-env.zip

daves-MacBook-Pro:Downloads dave$ mv m042-vagrant-env* MongoDB-Univ/

daves-MacBook-Pro:Downloads dave$ mv MongoDB-Univ/ …/Documents/

daves-MacBook-Pro:Documents dave$ cd …/Documents ; pwd
/Users/dave/Documents

daves-MacBook-Pro:Documents dave$ cd MongoDB-Univ/

daves-MacBook-Pro:MongoDB-Univ dave$ mkdir m042

daves-MacBook-Pro:MongoDB-Univ dave$ ls
m042 mongodb-compass-1.19.12-darwin-x64.dmg
m042-vagrant-env mongodb-macos-x86_64-4.2.1
m042-vagrant-env.zip mongodb-macos-x86_64-4.2.1.tgz

daves-MacBook-Pro:MongoDB-Univ dave$ mv m042-vagrant-env* m042/

daves-MacBook-Pro:MongoDB-Univ dave$ ls
m042 mongodb-macos-x86_64-4.2.1
mongodb-compass-1.19.12-darwin-x64.dmg mongodb-macos-x86_64-4.2.1.tgz

daves-MacBook-Pro:MongoDB-Univ dave$ cd m042

daves-MacBook-Pro:m042 dave$ ls
m042-vagrant-env m042-vagrant-env.zip

daves-MacBook-Pro:m042 dave$ cd m042-vagrant-env

daves-MacBook-Pro:m042-vagrant-env dave$ vagrant up
Bringing machine ‘mongodb-m042’ up with ‘virtualbox’ provider…
==> mongodb-m042: Box ‘centos/7’ could not be found. Attempting to find and install…
mongodb-m042: Box Provider: virtualbox
mongodb-m042: Box Version: >= 0
==> mongodb-m042: Loading metadata for box ‘centos/7’
mongodb-m042: URL: https://vagrantcloud.com/centos/7
==> mongodb-m042: Adding box ‘centos/7’ (v1905.1) for provider: virtualbox
mongodb-m042: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1905.1/providers/virtualbox.box
==> mongodb-m042: Box download is resuming from prior download progress
mongodb-m042: Download redirected to host: cloud.centos.org
mongodb-m042: Progress: 100% (Rate: 324/s, Estimated time remaining: --:–:- mongodb-m042: Progress: 4% (Rate: 1214k/s, Estimated time remaining: 0:01:13 mongodb-m042: Progress: 7% (Rate: 1371k/s, Estimated time remaining: 0:01:00 mongodb-m042: Progress: 9% (Rate: 1500k/s, Estimated time remaining: 0:00:52 mongodb-m042: Progress: 10% (Rate: 1633k/s, Estimated time remaining: 0:00:5 mongodb-m042: Progress: 11% (Rate: 1071k/s, Estimated time remaining: 0:01:1 mongodb-m042: Progress: 11% (Rate: 874k/s, Estimated time remaining: 0:01:15 . . . . . [truncated output]
mongodb-m042: Progress: 93% (Rate: 2080k/s, Estimated time remaining: 0:00:0 mongodb-m042: Progress: 95% (Rate: 2121k/s, Estimated time remaining: 0:00:0 mongodb-m042: Progress: 98% (Rate: 2121k/s, Estimated time remaining: 0:00:0==> mongodb-m042: Successfully added box ‘centos/7’ (v1905.1) for ‘virtualbox’!
==> mongodb-m042: Importing base box ‘centos/7’…
==> mongodb-m042: Matching MAC address for NAT networking…
==> mongodb-m042: Checking if box ‘centos/7’ version ‘1905.1’ is up to date…
==> mongodb-m042: Setting the name of the VM: mongodb-m042
Vagrant is currently configured to create VirtualBox synced folders with
the SharedFoldersEnableSymlinksCreate option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:

https://www.virtualbox.org/manual/ch04.html#sharedfolders

This option can be disabled globally with an environment variable:

VAGRANT_DISABLE_VBOXSYMLINKCREATE=1

or on a per folder basis within the Vagrantfile:

config.vm.synced_folder ‘/host/path’, ‘/guest/path’, SharedFoldersEnableSymlinksCreate: false
==> mongodb-m042: Clearing any previously set network interfaces…
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [“hostonlyif”, “create”]

Stderr: 0%…
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 94 of file VBoxManageHostonly.cpp

daves-MacBook-Pro:m042-vagrant-env dave$ vagrant plugin install vagrant-vbguest
Installing the ‘vagrant-vbguest’ plugin. This can take a few minutes…
Fetching: micromachine-3.0.0.gem (100%)
Fetching: vagrant-vbguest-0.20.0.gem (100%)
Installed the plugin ‘vagrant-vbguest (0.20.0)’!

daves-MacBook-Pro:m042-vagrant-env dave$ vagrant reload
==> mongodb-m042: Checking if box ‘centos/7’ version ‘1905.1’ is up to date…
==> mongodb-m042: Clearing any previously set network interfaces…

There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [“hostonlyif”, “create”]

Stderr: 0%…
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 94 of file VBoxManageHostonly.cpp

daves-MacBook-Pro:m042-vagrant-env dave$ vagrant list
Usage: vagrant [options] []

-v, --version                    Print the version and exit.
-h, --help                       Print this help.

Common commands:
box manages boxes: installation, removal, etc.
cloud manages everything related to Vagrant Cloud
destroy stops and deletes all traces of the vagrant machine
global-status outputs status Vagrant environments for this user
halt stops the vagrant machine
help shows the help for a subcommand
init initializes a new Vagrant environment by creating a Vagrantfile
login
package packages a running vagrant environment into a box
plugin manages plugins: install, uninstall, update, etc.
port displays information about guest port mappings
powershell connects to machine via powershell remoting
provision provisions the vagrant machine
push deploys code in this environment to a configured destination
rdp connects to machine via RDP
reload restarts vagrant machine, loads new Vagrantfile configuration
resume resume a suspended vagrant machine
snapshot manages snapshots: saving, restoring, etc.
ssh connects to machine via SSH
ssh-config outputs OpenSSH valid configuration to connect to the machine
status outputs status of the vagrant machine
suspend suspends the machine
up starts and provisions the vagrant environment
upload upload to machine via communicator
validate validates the Vagrantfile
vbguest plugin: vagrant-vbguest: install VirtualBox Guest Additions to the machine
version prints current and latest Vagrant version
winrm executes commands on a machine via WinRM
winrm-config outputs WinRM configuration to connect to the machine

For help on any individual command run vagrant COMMAND -h

Additional subcommands are available, but are either more advanced
or not commonly used. To see all subcommands, run the command
vagrant list-commands.

daves-MacBook-Pro:m042-vagrant-env dave$ vagrant status
Current machine states:

mongodb-m042 poweroff (virtualbox)

The VM is powered off. To restart the VM, simply run vagrant up

daves-MacBook-Pro:m042-vagrant-env dave$ vagrant up
Bringing machine ‘mongodb-m042’ up with ‘virtualbox’ provider…
==> mongodb-m042: Checking if box ‘centos/7’ version ‘1905.1’ is up to date…
==> mongodb-m042: Clearing any previously set network interfaces…
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [“hostonlyif”, “create”]

Stderr: 0%…
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 94 of file VBoxManageHostonly.cpp

daves-MacBook-Pro:m042-vagrant-env dave$ pwd
/Users/dave/Documents/MongoDB-Univ/m042/m042-vagrant-env

daves-MacBook-Pro:m042-vagrant-env dave$ cd …

daves-MacBook-Pro:m042 dave$ ls
m042-vagrant-env m042-vagrant-env.zip

daves-MacBook-Pro:m042 dave$ pwd
/Users/dave/Documents/MongoDB-Univ/m042

daves-MacBook-Pro:m042 dave$ cd …

daves-MacBook-Pro:MongoDB-Univ dave$ ls
m042 mongodb-macos-x86_64-4.2.1
mongodb-compass-1.19.12-darwin-x64.dmg mongodb-macos-x86_64-4.2.1.tgz

daves-MacBook-Pro:MongoDB-Univ dave$ vboxmanage --version
6.0.14r133895

daves-MacBook-Pro:MongoDB-Univ dave$ echo $0
-bash

daves-MacBook-Pro:MongoDB-Univ dave$ ls
m042 mongodb-macos-x86_64-4.2.1
mongodb-compass-1.19.12-darwin-x64.dmg mongodb-macos-x86_64-4.2.1.tgz

daves-MacBook-Pro:MongoDB-Univ dave$ pwd
/Users/dave/Documents/MongoDB-Univ

daves-MacBook-Pro:MongoDB-Univ dave$ mkdir m103

daves-MacBook-Pro:MongoDB-Univ dave$ cd m103

daves-MacBook-Pro:m103 dave$ ls ~/Downloads
DMG-Pkgs
Fedora-Server-dvd-x86_64-31-1.9.iso
Fedora-Workstation-Live-x86_64-31-1.9.iso.download
FedoraMediaWriter-osx-4.1.4.dmg
VirtualBox&Vagrant_MacOS.pdf
VirtualBox-6.0.14-133895-OSX.dmg
Zoom.pkg

daves-MacBook-Pro:m103 dave$ vagrant --version
Vagrant 2.2.6

daves-MacBook-Pro:m103 dave$ unzip ~/Downloads/m103-vagrant-env.zip
Archive: /Users/dave/Downloads/m103-vagrant-env.zip
extracting: Vagrantfile
extracting: provision-mongod

daves-MacBook-Pro:m103 dave$ ls
Vagrantfile provision-mongod

daves-MacBook-Pro:m103 dave$ vagrant up --provision
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’ (v20190514.0.0) for provider: virtualbox
mongod-m103: Downloading: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20190514.0.0/providers/virtualbox.box
mongod-m103: Download redirected to host: cloud-images.ubuntu.com
mongod-m103: Progress: 100% (Rate: 279/s, Estimated time remaining: --:–:-- mongod-m103: Progress: 10% (Rate: 1188k/s, Estimated time remaining: 0:04:30 mongod-m103: Progress: 10% (Rate: 1389k/s, Estimated time remaining: 0:04:27 mongod-m103: Progress: 10% (Rate: 1583k/s, Estimated time remaining: 0:04:23 mongod-m103: Progress: 11% (Rate: 1715k/s, Estimated time remaining: 0:04:19 mongod-m103: Progress: 11% (Rate: 1808k/s, Estimated time remaining: 0:04:16 mongod-m103: Progress: 11% (Rate: 1626k/s, Estimated time remaining: 0:04:20 mongod-m103: Progress: 12% (Rate: 1417k/s, Estimated time remaining: 0:04:23 mongod-m103: Progress: 12% (Rate: 1227k/s, Estimated time remaining: 0:04:25 … . . . [truncated output]
mongod-m103: Progress: 98% (Rate: 2426k/s, Estimated time remaining: 0:00:05 mongod-m103: Progress: 98% (Rate: 2401k/s, Estimated time remaining: 0:00:04 mongod-m103: Progress: 98% (Rate: 1976k/s, Estimated time remaining: 0:00:03 mongod-m103: Progress: 98% (Rate: 1718k/s, Estimated time remaining: 0:00:03 mongod-m103: Progress: 99% (Rate: 1429k/s, Estimated time remaining: 0:00:02 mongod-m103: Progress: 99% (Rate: 1159k/s, Estimated time remaining: 0:00:01 mongod-m103: Progress: 99% (Rate: 992k/s, Estimated time remaining: --:–:--==> mongod-m103: Successfully added box ‘ubuntu/trusty64’ (v20190514.0.0) for ‘virtualbox’!
==> 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…
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [“hostonlyif”, “create”]

Stderr: 0%…
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 94 of file VBoxManageHostonly.cpp

daves-MacBook-Pro:m103 dave$

Hi @David_04631,

The possible solution for this error is to disable the Secure Boot on your machine.

Steps to disable Secure boot:

  • Click simultaneously the shortcut Restart + Shift key.
  • Click Troubleshoot → Advanced options → Start-up Settings → Restart.
  • Click repeatedly the F10 key (BIOS setup), before the “Startup Menu” opens.
  • Go to Boot Manager and disable the option Secure Boot. …
  • Save the changes and reboot.

Also, I would recommend you to put your error messages in code-blocks or paste screenshots to make it more readable and better to understand.

Let me know if this helps. :slight_smile:

Thanks,
Muskan