How do I set up "local" host networking on Mac OS

Discussions related to using VirtualBox on Mac OS X hosts.

Is it possible to do host networking in VirtualBox 2.0 while on an airplane where there are no ethernet or wireless connections?

Yes
1
100%
No
0
No votes
 
Total votes : 1

How do I set up "local" host networking on Mac OS

Postby tgrushka » 23. Nov 2008, 18:54

I'm very frustrated. I have the following configuration:

Host: Mac OS X 10.5 Leopard
Guest: Windows Server 2003

Web and database servers are set up on both host and guest.
VB networking is set to Host Interface.
Under Host Interface, I can select only en0, ethernet, or en1, Airport. I cannot select a "loopback" or "dummy" interface as there is no way to create one under System Preferences/Networking. I've tried installing TUNTAP (http://tuntaposx.sourceforge.net) to no avail.

Here's the problem:

When I'm at home or somewhere where I have access to a wireless network or plug-in Ethernet, Host Networking works GREAT in VB. I can access the guest from the host, and the host from the guest.

BUT... If I lose my internet connection, such as on an airplane, where I cannot use wireless or ethernet, EVEN IF I manually configure an IP address, OS X considers the interface "unplugged" and will not allow it to be used.

Can't find anything online about this ... been searching for hours and hours. Am I the only one who wants to be able to network between VB guest and host on OS X without needing a live network connection to do it?

The only workaround I've found is to duplicate the Airport connection, use that as the Host Interface in VB, then create a Computer Network in airport and assign it a manual address. Got everything working with that... except if I switch my Airport back to my Internet connection, the manual IP set up in the duplicate Airport connection no longer works. Ugh.

MY QUESTION IS: How do I setup networking between host and guest in VirtualBox that is completely independent of the physical network adapters on my Mac and whether or not they have a live connection?
tgrushka
 
Posts: 3
Joined: 23. Nov 2008, 18:39

Postby tkwm » 23. Nov 2008, 21:47

Isn't it possible to solve your problem by using shared folders and the localhost (127.0.0.1) url?
tkwm
Volunteer
 
Posts: 147
Joined: 3. Mar 2008, 17:56

Postby tgrushka » 23. Nov 2008, 22:28

tkwm wrote:Isn't it possible to solve your problem by using shared folders and the localhost (127.0.0.1) url?


Shared folders work fine, that's not my problem. I need the following to work:

Guest (Win Server 2K3) runs IIS and SQL Server and has an IP of, say, 192.168.0.2.
Host (Leopard) runs Apache and MySQL has IP 192.168.0.1.

When I type http://192.168.0.2 in the HOST web browser, it should bring up the site hosted on IIS on the Guest.

When I type http://192.168.0.1 into the GUEST web browser, it should bring up the site hosted on Apache on the Host.

The only way to make this work is to manually configure AirPort or Ethernet (both are physical network adapters) with the IP 192.168.0.1. That makes absolutely no sense at all.

This functionality should not require use of any physical interface on the host.

There should be some kind of "Virtual Ethernet" adapter for OS X (an equivalent to the Microsoft Loopback Adapter on Windows) that I can configure in System Preferences with whatever IP address I want, and then be able to select this virtual adapter in VirtualBox. Like I said before, I tried TUNTAP but it does not expose the tap devices to System Preferences, and therefore VBox doesn't pick them up as selectable interfaces.

Does it make sense what I'm trying to do? The Linux version of VB has this bridging capability -- please note "6.8 Host Interface Networking and bridging on Linux hosts" and "6.8.1 Permanent host interfaces and bridging" in the VBox manual on page 78.

Why can I not do this simple thing under OS X? Why aren't the VBoxAddIF and VBoxDeleteIF utilities provided on the OS X distro? Why has this functionality been completely left out of the OS X version? OS X is based on Unix... how difficult is it really to port the bridging capability over to OS X?

There must be a zillion web developers out there using MacBook Pros who need to run Windows virtually for testing purposes, and bridging should be a basic function of any VM software. Other than this, VirtualBox is totally awesome...

...but if I'm out in the field and want to demo some of my sites without accessing someone else's network, why should I have to resort to a totally ridiculous workaround every time when this feature is standard on other systems such as VMWare Fusion and the Linux version of VBox?
tgrushka
 
Posts: 3
Joined: 23. Nov 2008, 18:39

FOUND A SOLUTION... with Parallels Desktop Network Adapter

Postby tgrushka » 24. Nov 2008, 02:14

AHA... I got it!!!

1. Downloaded and installed Parallels Desktop 4.
2. Opened System Preferences > Network ... Voila! There they are:
Parallels Host-Only Networking Adapter;
Parallels Shared Networking Adapter.

(Both show status of "Connected," which I can disable by changing the "Configure" option to "Off.")

Configured Parallels Host-Only with the local IP and subnet I wanted on the host side: 192.168.1.1.

3. Opened VBox Network config... I'm in heaven. Besides the usual en0 and en1, I've also now got en2 and en3, the Parallels Networking Adapters. Selected en3 (Host-Only) and fired up Windows, and (had already) configured a static IP (192.168.1.2) on the same subnet as the one in step 2.

Works perfectly.

(NOTE: I did not even have to launch Parallels once to get this to work. Its virtual adapter just worked immediately after installation of Parallels.)

I now have seamless networking between host and guest, on the same subnet, without the need for Airport or Ethernet. And, thanks to VBox's multiple interfaces, I can add another virtual adapter and connect it to Airport for Internet connectivity on the Guest.

But should anyone really have to download a *competing* product to get this functionality? Hopefully Sun will soon release a virtual interface like this one that will install on Mac OS X along with VBox, that will work right out of the "box." <g>

I'm crossing my fingers and hoping that the "time limit" on the trial version of Parallels doesn't apply to it's networking adapter. With any luck, it's one of those: "and just for trying our product, the networking adapter is our free gift to you, and yours to keep." Hopefully. <g>
tgrushka
 
Posts: 3
Joined: 23. Nov 2008, 18:39

Second this request

Postby andrewsharpe79 » 25. Nov 2008, 06:43

I second this request. I have been able to do this with all the virtualisation software I've used (VMWare, Xen, QEMU, KVM) on linux but not VirtualBox on OSX.

I would really like this functionality to come with VirtualBox but will try the parallels workaround for now...

Thanks for an awesome product :)
andrewsharpe79
 
Posts: 5
Joined: 25. Nov 2008, 06:37

Re: How do I set up "local" host networking on Mac OS

Postby gvlx » 27. Apr 2009, 13:15

Version 2.2.0 has the "Host-Only" network interface available.

Tested with a guest connection to host PostgreSQL (WXP guest on a Mac OSX 10.5.6 host).

It is probably better to restart the host after setting up the Host-Only Interface (to make sure _all_ services will bind to the new interface.

I did not find the new interface vboxnet0 on the Network Settings Preference Pane (as it is managed within the VirtualBox console).

ping does not work.
gvlx
 
Posts: 1
Joined: 20. Apr 2009, 13:34
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: WXP Ubuntu FreeNAS FreeShell

Re: How do I set up "local" host networking on Mac OS

Postby Ball » 25. May 2011, 13:39

gvlx wrote:I did not find the new interface vboxnet0 on the Network Settings Preference Pane (as it is managed within the VirtualBox console).


Unfortunately, this makes VirtualBox pretty useless for me. Mac OS X absolutely NEEDS the adapter exposed to System Preferences in order to use the VM as a gateway. You can mess with the routing table all you want, but the system will erase your changes whenever another device becomes active (like Airport).

Desktop Parallels 5 and 6 (and probably 4) have this functionality. This allows me to use Linux in DP as my router, among other things. Unfortunately, Parallels only cares about Windows and has yet to support 2.6.36, 37, 38... kernels so I assume Linux support is pretty much dead. I was hoping VirtualBox could fill the void, but without some kind of hack to expose the host-only adapter all hope is lost.

ARRRRRG :( :( :(
Ball
 
Posts: 9
Joined: 25. May 2011, 12:10
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: bt5

Re: How do I set up "local" host networking on Mac OS

Postby Ball » 25. May 2011, 14:36

I've managed to 'fix' this problem by bridging with vnic1, a virtual NIC created by Parallels Desktop.

This is still a glaring missing feature in VirtualBox
Ball
 
Posts: 9
Joined: 25. May 2011, 12:10
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: bt5

Re: How do I set up "local" host networking on Mac OS

Postby Nasher » 26. May 2011, 08:42

Please, can you give some more details. I have the same problem and this is driving me crazy.
Nasher
 
Posts: 1
Joined: 26. May 2011, 08:38
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Ubuntu

Re: How do I set up "local" host networking on Mac OS

Postby Ball » 29. May 2011, 09:51

Nasher wrote:Please, can you give some more details. I have the same problem and this is driving me crazy.


Hm, for some reason "notify me" isn't the default behavior on this forum unlike the 100s of others I'm registered to.

My solution is to install Desktop Parallels and expose vnic1 to Network Preferences. In DP 5 (and probably 4) this was a built-in option in DP's prefs. In version 6 they decided to hide the option (in their infinite wisdom). If you have DP6 you need to google prl_shownet.sh
Ball
 
Posts: 9
Joined: 25. May 2011, 12:10
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: bt5


Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: No registered users and 22 guests