Geekish Stuff

pun for geeks, stuff that doesn’t matter

Luis Azevedo

VMWare Fusion Airport Bridged Interface

Today I needed that my bridged interface for my Linux Virtual Machine in VMWare Fusion was bind to the Airport network card instead of the wired ethernet card. I wanted that may wireless hosts could access my VM in the wireless network from other hosts.
By the way this was an Ad-Hoc network created with Internet Sharing option in Mac OS X system preferences, so that I can share internet to my home. 

In order to VMWare Fusion start to bind your virtual bridge interfaces you need to edit the file at:

/Library/Application\ Support/VMware\ Fusion/boot.sh

Locate in the file the following code:

# vmnet-bridge puts itself in background (daemon mode)
# Bridge to host network interface 'en0'.
#"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 en0
# Bridge to the primary host network interface (which can change over time).
"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 ''

And change to this:

# vmnet-bridge puts itself in background (daemon mode)
# Bridge to host network interface 'en0'.
"$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 en1
# Bridge to the primary host network interface (which can change over time).
# "$LIBDIR/vmnet-bridge" -d /var/run/vmnet-bridge-vmnet0.pid vmnet0 ''

Notice I’ve change the en0 interface (the wired NIC) to en1 (the Airport).

Restart VMWare services, including vmnet-bridge by issuing the following command:

sudo /Library/Application\ Support/VMware\ Fusion/boot.sh --restart

Yeahh.. Now my VM discovered an IP address on the wireless network. (DHCP was running on the Airport interface since I was using Internet Sharing in Mac OS X Leopard).

Category: Mac, Tech, Tips

Tagged: , , , ,

8 Responses

  1. Rob says:

    You saved my life! I’ve been fighting with this for MONTHS and could never figure it out. You are a ROCKSTAR!!!

    [Reply]

  2. Gabe says:

    Ahh perfect article! EXACTLY what i needed.Thank you so much..

    For some reason though I couldn’t get that last command to work to restart the services.. until i just copied and paste

    Figures , i’m a terminal noob anyway.

    Thanks again

    [Reply]

  3. Sean says:

    Thanks very much. I guess at this time there is no way to use both interfaces? I have 2 VM’s and I would like one to use en0, and the other to use en1.

    [Reply]

    braceta Reply:

    Good question! I believe you can’t do it..

    In VMware Fusion GUI there is no option to select which physical bridged interface is associated with your Virtual Machine..

    If you find out, please, let me know!

    Cheers

    [Reply]

  4. Mark says:

    Found this KB article in the VMware Communities: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1001875

    You can add more lines and specify more vmnets, like this:
    “$LIBDIR/vmnet-bridge” -d /var/run/vmnet-bridge-vmnet2.pid vmnet2 en1

    [Reply]

  5. Mark says:

    I left off the rest of the steps. You need to modify the .vmx file for your VM in a text editor and add the following as the last line:

    ethernet1.connectionType = “custom”
    ethernet1.vnet = “vmnet2″

    Really, though, go to the knowledge base article and follow its steps.

    [Reply]

    braceta Reply:

    Thanks for the help Mark! Really great info! You rule!

    [Reply]

  6. Babak says:

    You’re a life saver, thanks!

    [Reply]

Leave a Reply