Page 1 of 1

Host networking on MacBook Air -> No physical Ethernet

Posted: 1. Sep 2011, 17:21
by knoxy
Hi,

I'm having some issues with VirtualBox (actually its more with OSX) and host networking.

I have a CentOS VM which I can connect to over the network no problem when ever I am connected to a wireless network. I have bridged networking or NAT setup.

However I take the train quite often but still want to work on the VM whilst I am not connected to any wireless network. Because the Macbook air doesnt have any physical wired Ethernet connection I can't just set it up with a static IP and connect to it like that.

How can i create a virtual ethernet interface in OSX? Is this even possible?

Any ideas more than welcome.

Thanks.
Mike

Re: Host networking on MacBook Air -> No physical Ethernet

Posted: 1. Sep 2011, 17:27
by Perryg
Add another virtual adapter set to host-only.

Re: Host networking on MacBook Air -> No physical Ethernet

Posted: 2. Sep 2011, 08:33
by knoxy
Thanks Perryg but don't i need a network interface on the Mac itself. I can add Virtual interfaces (along with the DHCP) on VirtualBox itself but i can't connect to it from the mac because there is no physical 'eth0' on the machine.

What I think i need to do is add a virtual 'eth0' on the physical mac in the same way that VirtualBox does for its VMs.

Re: Host networking on MacBook Air -> No physical Ethernet

Posted: 2. Sep 2011, 09:04
by BillG
No. If you installed Host Only Networking when you installed VirtualBox (and that is the default), you will already have a host only interface in the host OS, and the virtual NIC in the vm will connect to this interface.

Re: Host networking on MacBook Air -> No physical Ethernet

Posted: 2. Sep 2011, 10:26
by knoxy
ah ok. Maybe I need to reinstall VB then because I only have the Wireless and BT network connections. Will give it a try and let you know how it goes. Otherwise I was looking at TUN/TAP but i need to understand a little more how it works first.

Cheers,
Mike

Re: Host networking on MacBook Air -> No physical Ethernet

Posted: 2. Sep 2011, 19:46
by Sasquatch
The Host-Only interface only appears when you start a VM that uses it. Just check the Preferences from the VB GUI, it will show if you have a Host-Only interface or not. If not, create one. Then configure the VM to use it.
If that still doesn't work, check this forum a bit more, there is a user that had a solution for this.

Re: Host networking on MacBook Air -> No physical Ethernet

Posted: 6. Sep 2011, 16:21
by mschwartz
Maybe the link in my signature will help you.

I've only run into one issue using the scheme in the link. If I suspend the mac laptop and bring it to work and plug it into the company Ethernet, the guest's internet access goes away. If I reboot the guest, internet access comes back.

It makes sense if you think about it. Upon restore, the guest's networking is set up with IP, gateway, etc., from my house and wifi.

Re: Host networking on MacBook Air -> No physical Ethernet

Posted: 11. Sep 2011, 17:39
by Sasquatch
Renewing the IP address in the Guest is enough to get it going again. No need to reboot it.