Skip to content

Instantly share code, notes, and snippets.

@ntfc
Last active September 29, 2017 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntfc/77a5160eb69c3ce4fa88 to your computer and use it in GitHub Desktop.
Save ntfc/77a5160eb69c3ce4fa88 to your computer and use it in GitHub Desktop.
Vagrant & Ansible

VirtualBox

Install these packages to mount host volumes on the VMs

  • virtualbox
  • virtualbox-host-modules
  • virtualbox-guest-modules
  • virtualbox-guest-iso
  • virtualbox-guest-utils

Load modules:

  • modprobe vboxdrv vboxnetadp vboxnetflt vboxpci

Problems

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 71 of file VBoxManageHostonly.cpp

Solution: modprobe vboxnetadp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment