I have deployed a UAG OVA through vCenter. I could not ping domain name from UAG.
Note: I have not edited /etc/hosts and /etc/resolve.conf
As per My understanding, I should not edit the resolve.conf file as per this document
another DNS related Issue KB article from VMware
Edit /etc/systemd/resolved.conf and uncomment the domains line and adding in your .local domain to the domains there.
Follow the docs for your version like
Note:If you are not able to access the Admin UI login screen, check to see if the virtual machine has the IP address displayed during the installation of the OVA. If the IP address is not configured, use the VAMI command mentioned in the UI to reconfigure the NICs. Run the command as "cd /opt/vmware/share/vami" then the command "./vami_config_net".
I think its the same on all versions. Use this to set the dns instead of messing with config files first, usually I've seen dns be a problem because of syntax issues when entering it in the ovf form.
This might answer a few of your findings:
Note : Industry recommendations and only use .local for multicast DNS as stated in the RFC. .local is defined for a specific multicast use and not for general DNS. It is covered by https://tools.ietf.org/html/rfc6762 & MS recommendations https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/selecting-the-forest-root-domain (see caution section when selecting suffix). Cnames can be employed to allow alternate names if you have a .local server that you need to alias.
As the UAG is an appliance based on photon o/s, never edit resolve.conf or the host file manually.
Please update dns entries with redeployment or in the admin user interface - note any manual changes to the file will get over-ridden by admin user interface entries or by a reboot.