Support Questions
Find answers, ask questions, and share your expertise

How does /etc/hosts gets updated

New Contributor

I am using HDP 2.5 Sandbox on VMWare. Somewhere in startup script /etc/hosts file gets updated with line:

Where is this update happening? I need pointing to a different IP address.


Expert Contributor

Sandbox HDP Docs:

Sandbox build packages/component to use it localhost name by default, and depends on where you going to import sandbox deployment like VB/VMs/Docker/Azure. localhost.localdomain localhost

Expert Contributor

sandbox built with IP you try to change /etc/hosts file nothing will work...after reboot sandbox /hosts file get reloaded again same ip only...they way it build like that..

because file time of loading sandbox use it for localhost name and route internally to sandbox IPs.


Hello @Vikas Pashte,

HDP 2.5 Sandbox is a Docker container, which runs inside docker host image on your VMWare / VirtualBox machine. This guest machine (Docker host) uses the default `docker0` bridge network to configure networking for container. So docker0 ( & container ( creates their own internal network and access to outside world is provided via port mapping (request port 8080 is to connected to etc.).

Coming back to your question, how to change container's IP address. You can change container's IP address by changing the default bridge network of Docker host. Please read this Docker documentation and it has an example in this section, to do the same.

Hope this helps !