Home:ALL Converter>Accessing Guest OS with hostname in VMWare Fusion

Accessing Guest OS with hostname in VMWare Fusion

Ask Time:2013-01-12T05:39:00         Author:reza

Json Formatter

I am using CentOS (Cloudera CDH3 image) as a guest OS running in my VMWare Fusion. Everything works fine and I can access the guest machine through my MAC OS using the IP address. I am bridging the network between my MAC and VMWARE machine so the Guest is having a separate IP and I can successfully SSH to it using the IP. The problem I am facing is that there is no way to access the guest OS by hostname. I tried setting up a hostname on the guest OS but still MAC cannot connect to the machine using the hostname and it even doesn't recognize the guest hostname. I need this because I am using a library that receives a remote machine hostname as a parameter to connect. Unfortunately, it doesn't accept IP and I wasn't able to make it work so far. Any idea on how to solve this?

I even tried to use NAT for VMWare but CentOS doesn't connect to Internet when in this mode. I tried modifying manually but no success. here's the screenshot from the Guest OS (CentOS):

enter image description here

Author:reza,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/14287069/accessing-guest-os-with-hostname-in-vmware-fusion
yy