How to share internet connection on Mac OS X to Virtualbox vm’s using Host-only

10,960

Doesn't Virtualbox have a third kind of interface, an automatic NAT interface, like VMware does? if so, replace the two interfaces with a single NAT interface and all should be good...

Share:
10,960

Related videos on Youtube

redben
Author by

redben

Updated on September 17, 2022

Comments

  • redben
    redben over 1 year

    In one line : is the following possible : Airport <- "OS X bridge" -> vbox-Host-only -> vm's

    Virtualbox (3.1.4) setup :

    • Host : Mac OS X 10.5
    • Guest : Ubuntu Linux
      • adapter1 - Bridged (en1: Airport) : To give the vm access to internet and communicate when Airport is connected
      • adapter2 - Host-Only (vboxnet0) : To enable host/guest communication when Airport is not connected

    I'd like to make it simpler and only keep adapter 2 (host-only) and relying on OS X connection sharing/bridging I thought i could just keep the Host only configuration, and on the host go to internet sharing and select "share from airport" to vboxnet0 . Only to find out that vbox's virtual interface doesn't appear in the interfaces list on OS X preferences.

    I know that on a linux host you could install something called bridge-utils and use that to bridge the two insterfaces. Is there any thing like that for Mac ?

  • redben
    redben about 14 years
    It seems like the NAT mode on interface does not allow communication between the host and the guest...that is what they say in the docs. Or have i misunderstood...?
  • JSchlather
    JSchlather about 14 years
    I am not sure what the adapter is named in OSX, but in my Windows Host, I have an adapter named "VirtualBox Host-Only Network". If I try to access the address assigned to it from my NAT'd VM, it works just fine.
  • Josh
    Josh about 14 years
    @redben: Wow. if so, that's a surprise. With VMware's NAT interface the guest can communicate with the host.
  • redben
    redben about 14 years
    @Goyuix On OS X it creates an interface with id vboxnet0, but you don't see it in the Network preferences (like network settings in windows).
  • redben
    redben about 14 years
    found an article that might be of interset. @Josh it also explains how Vbox implements NAT akutz.wordpress.com/2009/08/20/…