I have deployed a CentOS 6.6 VM (hortonwoks sandbox VM) on my Windows 7 OS. The VM publishes apache spark applications through a http url. The url's have the hostname as sandbox.hortonworks.com (e.g.http://sandbox.hortonworks.com:8088/proxy/application_1430918431488_0001/). All the port forwarding is set up and is working as expected. I can access the url using http://localhost:8088/proxy/application_1430918431488_0001/.To access the url as is (i.e http://sandbox.hortonworks.com:8088/proxy/application_1430918431488_0001/) I would have to add an entry to the /etc/hosts file as below127.0.0.1 localhost sandbox.hortonworks.comI tried adding this and restarted the network service, but the url doesn't work. I get an error This webpage is not available ERR_NAME_NOT_RESOLVEDThe complete file contents of /etc/hosts file are as below127.0.0.1   localhost.localdomain localhost10.0.2.15   sandbox.hortonworks.com sandbox ambari.hortonworks.com127.0.0.1   localhost sandbox.hortonworks.comWhat changes do I need to make to get the url working?Thanks!
Adding alias in /etc/hosts for Linux OVM
centos;windows;virtualbox;hosts
The address 10.0.2.15 is a internal address for your VM which can not be reached from the Host OS because of the NAT mode.You need to change your network adapter to use bridged mode or host-only-adapter.In bridged mode the guest will try to get an address in the host network and using host-only-adapter you will create an interface on the host OS, normally with address 192.168.56.1 and you need to configure an address in your guest OS (for example 192.168.56.101) to connect to it. I advise you to use a static address so you don't have to change the hosts file when the address of the guest changes.If you reconfigured your (VM) network edit the Host OS hosts file and put the ip address (192.168.56.101) there to point to your necessary URLs.