MM14
Contributor
Contributor

Name Resolution on SHD appliance

I have recently deployed the VMware Skyline Health Diagnostics for vSphere appliance in to a test environment to trial the product and post deployment I've noticed an issue with name resolution.

Name resolution doesn't appear to work correctly. I configured the DNS server upon deployment of the OVA and I can see the DNS entry in /etc/systemd/network/10-eth0-static.network of PhotonOS, however, name resolution is not working, neither from the SHD UI or from the CLi of PhotonOS. The following errors can be seen:
UI - "vSphere API connect failed. [Errno -2] Name or service not known.
CLi - "Temporary failure in name resolution"
If I add a static entry to the /etc/hosts file then name resolution works correctly so I believe the issue is isolated to DNS. Interestingly, the DNS server configuration in the 10-eth0-static.network file is not reflected in the /etc/resolv.conf file on the server.
 
Has anyone experienced similar and been able to resolve? I've deployed the OVA on multiple environments and experienced the same problem each time. Any assistance would be greatly appreciated.
0 Kudos
7 Replies
ComputingDon
Contributor
Contributor

I am running 2.5.0 of the appliance and have deployed multiple times.

I have tried with multiple DNS and single DNS in the .network configuration and continue to get the same message of name or service not known.  I did try just setting the resolv.conf to the DNS which resulted in the OS being able to resolve hosts but not the appliance.  I received the same resolution in the interface.

When using IP there are no issues with the connection and we are able to pull logs from different vCenters. 

Hope there is some sort of an answer soon to be able to show this in a better light.

Thanks,

0 Kudos
MM14
Contributor
Contributor

I also tried the same as you in changing the configuration of /etc/resolv.conf and had the same results, however, when you reboot the appliance it reverts to the default configuration in resolv.conf (nameserver 127.0.0.53).

I did have a look to see if there was an older version of the SHD that could be used to see if it had the same problem but was unable to find a download.

0 Kudos
ksram
VMware Employee
VMware Employee

SHD uses systemd-resolved service for name resolution. So local IP address for DNS server in the resolve.conf is expected. 

Can you check the DNS Server entry in the network configuration file? (/etc/systemd/network/*.network). 

Alternatively you can disable systemd-resolved service and rely on /etc/resovle.conf entries for DNS resolution.

 

-Thanks

Ram

0 Kudos
MM14
Contributor
Contributor

The network configuration is as follows:

[Match]

Name=eth0

[Network]

Address=x.x.x.x

Gateway=x.x.x.x

DNS=x.x.x.x (pointing to a known working DNS server that I can test using nslookup).

From the research I have done I believe that is the correct formatting for the network configuration file?

Interestingly, when I disable the systemd-resolved service the OS says that it's unable to find the resolv.conf file (it's highlighted in red in the directory) so I don't seem to be able to use resolv.conf for name resolution (unless I'm doing something wrong, I'm fairly inexperienced with the Photon OS).

0 Kudos
MM14
Contributor
Contributor

I have been doing some further investigation on this issue today and I think I've found a solution. If I add a search domain to the /etc/systemd/network/*.network file and restart the systemd-resolved & systemd-networkd services then name resolution works correctly, both from within the CLi and the UI of the SHD. The file now looks as follows:

[Match]
Name=eth0

[Network]
Address=
Gateway=
DNS=
Domains=

It doesn't really make a great deal of sense as to why that would matter, however, it does seem to work and I've tested it extensively. Do you have any search domains listed in your network config file?

ksram
VMware Employee
VMware Employee

Thanks for the update @MM14. The systemd-resolved service reads the DNS server names from the network configuration file (/etc/systemd/network/*.network. If that file has not entries for DNS Servers, the resolution will fail. 

-Thanks

Ram

0 Kudos
ComputingDon
Contributor
Contributor

Really appreciate your investigation into this name resolution issue.

As soon as I add the search domain in and restarted systemd-resolved resolution worked without a flaw.

Thanks again!