Last Updated: February 25, 2016
·
2.299K
· destructuring

Run Virtualbox guests with a host-only network

Vagrant creates an eth0 NAT interface to guests which prevents it from contacting other guests. The host (on OSX) does not have a network interface that matches the guest's eth0. It's all very magical and buggy.

Often vagrant will hang waiting for a guest's port mapped ssh to become available on localhost. An ifdown eth0, ifup eth0 fixes this on the guest if you can log in via the console or a host-only network.

A host-only network a private network between OSX and participating guests. The host has a network interface named vboxnet0. Port mapping to localhost is not necessary, just access the guest IP. It's just basic networking.

I'm working on a vagrant configuration to replace NAT eth0 with host-only eth0, get rid of eth1, get rid of mapped ports, and get vagrant to return all this information in ssh-config. And make it zeroconf by randomly selecting a 192.168.88.x IP with avahi-daemon installed.

1 Response
Add your response

Any luck getting this setup working in the end?

over 1 year ago ·