Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I recently set up my VM to have a machine name like this :

sudo /bin/hostname jax
sudo dhclient

However, my host machine cannot ping "jax" ?

I would assume this is all thats needed.... am i missing something ?

My host terminal is max os x, and my virtual machine on the same host is ubuntu.

share|improve this question

1 Answer 1

You should type the hostname and the ip address mapping in the hosts file of every computer that you would like to call your virtual machine from.

Instructions on how to do this on Mac OSX Leopard are here: http://decoding.wordpress.com/2009/04/06/how-to-edit-the-hosts-file-in-mac-os-x-leopard/

You can easily find the way to do this in other operating systems by Google searching for "how can I edit hosts file in X operating system'.

Hope this helps you.

share|improve this answer
    
Then whats the point of changing the name on the actual server ? the ip is dynamic, so i was hoping i could just access it by name. –  jayunit100 Nov 2 '11 at 22:04
    
There is no magic here. In order for the name resolve to happen, you need a DNS server. Without a DNS server installed and running to a machine in your lan, then this 'manual' solution is the only solution you can have. –  Athanasios Emmanouilidis Nov 2 '11 at 22:09
1  
No, it's not. Local name resolution protocols are very common; Windows uses NBNS and LLMNR, OS X and Linux use mDNS and NBNS. –  grawity Nov 2 '11 at 22:37
    
Thanks grawity! I didn't even knew about those ;-0 –  Athanasios Emmanouilidis Nov 2 '11 at 22:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.