Acces static IP of ubuntu server from MAC OS X Host

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
jarno
Posts: 1
Joined: 2. Jan 2012, 15:58
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Ubuntu

Acces static IP of ubuntu server from MAC OS X Host

Post by jarno »

Hello,


Im stuck in my configuration of VirtualBox and im clueless how to resolve it and maybe you guys (or girls) can help me further, or sugest another way
to resolve it.

Mac OS X 10.7.2
VirtualBox version 4.1.8


The 'problem' is that im using my Mac on multiple locations (Work, School, Home) wich result in different ranges of IP's.
Now i have configured a VirtualBox with Ubuntu server. This all works fine and when i reboot at a different location i can access it and do my stuff.

Now i had the idea to put the Ubuntu server on static ip, so i dont have to look every time what the IP is to access the server, or even better, i edit the host file on
my mac and put the ip in there so i can acces my Virtual Box image with Ubuntu by name.

The problem then is that the ip addresses are not always in the same range so they cannot communicate or see each other. Is there a way to solve this ? I read somewhere a post on this forum of another person trying this but that post is dated in the early 2008, since thats 4 years ago i was hoping for a better solution. (Also the idea that was given to him is not working for me)


Thx in advantace.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Acces static IP of ubuntu server from MAC OS X Host

Post by Perryg »

The most reliable way to access the guest when used in a various networks is to use host-only for the first adapter so the guest and host can always communicate and add a second adapter set to NAT on the guest for Internet.
Post Reply