Reputation: 125
I am trying to install laravel/homestead however, during the installation I encountered an error with my VBoxManage when I ran the command vagrant up
, what can I do to fix this?
The Error:
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: Operation not permitted
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
Does this have anything to do with permissions? because of Operation not permitted
?
I checked the file with ls -l /dev/vboxnetctl
and this is what it returned:
crw------- 1 root root 10, 55 Oct 3 07:24 /dev/vboxnetctl
Should I be changing the permission of this file? If so, I want to let you know that I did it before and it still shows an error, but this error is different:
/home/troopy712139/Homestead/scripts/homestead.rb:4:in `configure': undefined method `[]' for nil:NilClass (NoMethodError)
from /home/troopy712139/Homestead/Vagrantfile:30:in `block in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/v2/loader.rb:37:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/v2/loader.rb:37:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/loader.rb:113:in `block (2 levels) in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/loader.rb:107:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/loader.rb:107:in `block in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/loader.rb:104:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/loader.rb:104:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/vagrantfile.rb:28:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:746:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:746:in `vagrantfile'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:492:in `host'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:214:in `block in action_runner'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/action/runner.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/action/runner.rb:33:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:479:in `hook'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/environment.rb:728:in `unload'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/bin/vagrant:177:in `ensure in <main>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/bin/vagrant:177:in `<main>'
The VBoxManage hostonlyif create
command worked once when I ran it in root.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface 'vboxnet1' was successfully created
Upvotes: 2
Views: 1502
Reputation: 125
So it seems all I needed to do was make vboxnetctl
be owned by me, and restart my computer. I also added vboxdrv
to run on startup by running this code:
service vboxdrv start
Upvotes: 1
Reputation: 64
The error around: /dev/vboxnetctl tells you that your user doesn't have access there.
Try something line: sudo usermod -a -G vboxusers
Alvaro
Upvotes: 0
Reputation: 4275
Can you try running sudo vagrant up --provision
.
You may also want to check to make sure your paths match up in the Homestead.yaml
file
Upvotes: 1