Ansible/Vagrant error (Trellis) - ease of use?

Hello.

I’m at a point where Bedrock & Sage feel comfortable - and have thus decided I want to use Trellis for deployment too to further improve my workflow. Until now I’ve been ssh-ing to remote server’s and doing

git pull

and transferring yarn build:production generated dist folder to the server afterwards.

This doesn’t feel very clean, and with many sites I do want to improve it badly.

I followed GitHub - roots/roots-example-project.com: Example Roots stack project (Trellis, Bedrock, Sage) but was stopped already at step 3 for Fire up the server. vagrant up throws:

trellis git:(master) vagrant --version
Vagrant 2.2.5
➜  trellis git:(master) vboxmanage --version
6.0.6r130049
➜  trellis git:(master) vagrant reload
==> default: Checking if box 'bento/ubuntu-18.04' version '201906.18.0' is up to date...
==> default: 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

Tried to restart/reload vagrant, to no avail.

Is working with vagrant always such a pain? (I can remember trying something similar years ago on a non-WP project and also was stopped with errors…).

I hope someone can convince me to still try and use Trellis for Bedrock/Sage dev :blush:

Also, is Capistrano maybe an easier solution?

Thanks!

Quick question, have you got Virtualbox installed?

Indeed I have.

vboxmanage --version

should show that :slight_smile: Also running virtualbox opens GUI from CLI

Based on the error it looks like VirtualBox is having trouble setting up its network adapter to allow the VM to communicate with the host. I think I had a problem similar to this recently, but I don’t recall the exact solution. IIRC it had to do with my initial VirtualBox install not building with the correct drivers or headers, and the solution was to reinstall with the dkms package (this was on Manjaro w/ a custom kernel). I was eventually able to track down a solution by googling the VirtualBox error message I got.

Don’t use version 6 of VirtualBox, downgrade to 5 it will be ok :wink:

I had the same problem and it seems a permissions issue with OSX.
I followed the instructions here to grant permission in the Security & Privacy pane, and everything works like a charm now, even with Virtualbox 6.0.12

Check out the 2019 update as I needed to reach the Allow button using Tab key as stated here:

Thanks for your comment, but this seems as the issue with installing VirtualBox, not running vagrant up ? I can run Virtual Box and open it just fine, just not vagrant properly.

Yep, running vagrant up lead me to this issue.
I reinstalled Virtualbox and fixed the problem pressing the allow button with the tab key + space.

Indeed, the reinstall of virtualbox (via brew) helped. thanks! Did not even have to “Allow” again.