Today i found a strange behaviour on a freshly deployed Powerpath vAPP.

Because the customer DNS server wasn’t ready at the time of the deployment, i had to use the local “/etc/hosts” file.

I opened the /etc/hosts file with my editor of choice and added the lines for all ESXi servers + the vCenter itself.
The reason for that is that if the Powerpath vAPP can’t resolve the names of the ESXi servers that have to be licensed, the ESXi servers show as unlicensed in the GUI.

vapp:~ # vi /etc/hosts     localhost.localdom      localhost      
localhost.localdom      localhost
#ESXi and vCenter        vcenter vcenter.localdom.local         esx001  esx001.localdom.local         esx002  esx002.localdom.local         esx003  esx003.localdom.local         esx004  esx004.localdom.local         esx005  esx005.localdom.local         esx006  esx006.localdom.local


After rebooting the vAPP appliance, the “/etc/hosts” file is automically reset to default

vapp:~ # vi /etc/hosts     localhost.localdom      localhost
 localhost.localdom      localhost


Now this happens because the Powerpath vAPP is deployed as a Virtual Appliance, and this has an in‐guest management component called Virtual Appliance Management Infrastructure (VAMI).

VAMI places a lot of scripts in the vAPP located in the following directory:


The script that is responsible for rewriting the hosts file is called



To prevent VAMI from resetting the host file:

– Open vi with the file “subsequentboot”

localhost:/ # vi /opt/vmware/etc/isv/subsequentboot

– Comment the following 2 lines in line 23/24:

#echo "     localhost.localdom      localhost"  >       /etc/hosts
#echo "$HOSTADDR     $FQDNADDR      $SHORTHNAME"         >>      /etc/hosts


Edit the “/etc/hosts” file again and reboot…
Voilá…”/etc/hosts” file should still have all the entries that you put in



Leave a Reply

Your email address will not be published. Required fields are marked *