Page 1 of 1

internal network between os x host and linux guest

PostPosted: 13. Jan 2009, 03:48
by scattaneo
Hi all,

I'm relatively new to OS X and I've never had to do this in virtual box (I've done this same thing for linux hosts & linux guests on vmware w/o much of an issue).

I want to create a virtual network between my os x host and my linux guest.

I used the GUI for virtual box to configure the virtual network interface for my guest OS, I'm not sure how to go about configuring the host OS (OS X).

I google'd around a bit and couldn't find what I was looking for. Any one have a hint for me?



PostPosted: 14. Jan 2009, 11:46
by scattaneo
Well I found an interesting note in the End-User Documentation : " Finally, VirtualBox internal networking can be used to create a virtual network which is visible to selected virtual machines, but not to applications running on the host or to the outside world."

i.e. VirtualBox's private network feature is only for guests operating systems. This is a bummer. On VMWare I could create a virtual network that was privately shared amongst the guests AND host operating systems.



PostPosted: 3. Feb 2009, 07:29
by jrose
I'm in the same boat. I'm the author of but with reasonable MacOSX support it seems (seemed) like a good time to switch to VBox.

VMWare gives access to the host OS as a side effect of their NAT driver. This lets me set up a more or less private 1-1 NFS connection, which gives me the sharing I need without messing with (faulty) shared folder mechanisms. Coming to VBox I see that isn't part of either the NAT or the internal modes.

I might try to use the bridged mode, but the problem there is that every time my laptop's IP address changes (yes, I develop mobile) the guest/host NFS connection would have to be renegotiated. Seems like a loser to me.

Here's a plea (maybe I'll upgrade it to a bug or RFE too): Shouldn't a design which gives you a number of virtual machines running on with one host machine, also give a way to set up a virtual LAN among exactly those machines? If you gave me a bunch of physical machines in a room, but told me they could not be networked together, I'd be frustrated. In fact, I'm frustrated now, for virtually the same reason.

The NAT mode is default; that's a good choice, and the docs state why. (I find the VBox docs are unusually informative; kudos.) I think there should be an option (turned on by default!) which makes the host visible on the VM side of the NAT server, under a fixed IP address (and/or name). The converse should be done also; not sure how to do that short of making a new software network interface in MacOS. Since this is hard for the casual VM user to do, it should just work out of the box.

The point is that VirtualBox should allocate me a pair of private, stable addresses, for the guest and the host, and make them visible to each other, and to themselves, under those addresses.

Anything less than stable mutual visibility makes setting up NFS and SSH links too hard for a non-specialist like me. (I do Java VMs; I'm not a networking expert, nor should I have to be. I own a Mac so the system software can do networks for me.) By the way, I'd be overjoyed if there is a way to build such a virtual LAN but I missed the tutorial on how to set this up. I'm looking forward to adding the recipe, if or when it works, to .

PostPosted: 3. Feb 2009, 09:24
by jrose
There is a recipe for connecting host and guest at . However, this looks fragile; I'm guessing the guest connection will break whenever the host changes its IP address (say, because it moved from Starbucks to work). In order to create a permanent IP address for the guest/host pair, something like a tun0 interface is needed. There is some information about this for Linux on ... king_Linux and the User Manual (6.8.1) talks about "Permanent host interfaces" for Linux but not for Mac OS. I messed around with the OSX version of tuntap but with no success so far.

PostPosted: 3. Feb 2009, 09:37
by jrose
Here's the issue relevant to my beef and an earlier forum thread:

What I want is host-to-guest networking, with static IP addresses on a private 1-1 network. If you don't mind taking pot-luck from the host's ethernet interface, you might be able to get them to talk to each other across it.

Re: internal network between os x host and linux guest

PostPosted: 29. Mar 2009, 15:04
by andrewsharpe79
I also have this problem but am currently working around it based on information in the following thread: