25

I'm trying to do a vagrant up on a box, and I get the following error.

INFO interface: error: There was an error executing the following command with VBoxManage: ["hostonlyif", "create"]

When doing an INFO on the VAGRANT_LOG, I get

ERROR vagrant: /opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/driver/virtualbox_base.rb:278:in `block in execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/util/retryable.rb:14:in `retryable'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/driver/virtualbox_base.rb:268:in `execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/driver/virtualbox_4_2.rb:61:in `create_host_only_network'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/network.rb:276:in `create_hostonly_network'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/network.rb:229:in `hostonly_adapter'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/network.rb:36:in `block in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/network.rb:31:in `each'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/network.rb:31:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/vm/clear_network_interfaces.rb:26:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.0.6/lib/vagrant/action/warden.rb:33:in `call'

I've tried putting replacing the 'hostonly' in the vagrantfile to 'hostonlyif', but that gives an error message saying that it should be set to 'hostonly'. How do I fix this erro?

The host machine is running archlinux, and I'm using the latest versions of vagrant and virtualbox.

lmcanavals
  • 2,339
  • 1
  • 24
  • 35
Ravi Desai
  • 471
  • 1
  • 5
  • 9

8 Answers8

24

try with this: sudo modprobe vboxnetadp

in my case it works

anibal
  • 339
  • 1
  • 8
22

I just recently updated to OS X 10.9 and had this problem with vagrant up.

If you're running VirtualBox version 4.2 or older, this should work:

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

However, if you're running a newer version of VirtualBox (4.3 or newer), try:

sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

As noted in this question: vagrant up failed, /dev/vboxnetctl: no such file or directory

Community
  • 1
  • 1
timhtheos
  • 473
  • 5
  • 6
3

I've experienced a similar problem, only there were no visible errors at all: the private network simply was never created. The solution was as dumb and simple as always in such cases:

$ pacman -S net-tools
Andy Mikhailenko
  • 1,571
  • 1
  • 11
  • 10
3

Looks like this is experienced on Mac OSX Mavericks (10.9) and it's a permissions issue.

You can fix it by running:

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

Henry Tseng
  • 3,263
  • 1
  • 19
  • 20
3

In my case it was also :

sudo modprobe vboxnetflt
fe_lix_
  • 938
  • 11
  • 18
1

I didn't see the version of VirtualBox you are running in your question but for version 4.2.x the command listed by the previous answers:

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

should fix your issue. If you are running 4.3.x though the equivalent to this command is:

sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

This will also restart the VirtualBox services and should fix your issue.

As a side note I have run into the issue where running that command will silently fail and cause VirtualBox to emit the same behavior you described. This is usually caused due to a VM still being active and can usually be resolved by suspending or destroying your vagrant instances or other VMs and rerunning the command.

devonbleibtrey
  • 1,567
  • 16
  • 22
1

I found none of the above to work on El Captian, the following does:

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
rich
  • 1,224
  • 1
  • 19
  • 36
0

I solved this issue just restarting my MAC, and running again

vagrant up
Davide Casiraghi
  • 15,591
  • 9
  • 34
  • 56