VMware Cloud Community
pmorch
Enthusiast
Enthusiast
Jump to solution

Unable to mount any NFS datastore: Unable to resolve hostname '<obsolete server>'

Hi,

On a particular ESXi server, whenever I try to mount any NFS datastore, I get this error message:

Call "HostDatastoreSystem.CreateNasDatastore" for object "ha-datastoresystem" on ESXi "172.22.216.64" failed.
Operation failed, diagnostics report: Unable to resolve hostname 'cosmo'

Always mentioning hostname 'cosmo', regardless of what server I'm actually trying to mount from. 172.22.216.64 is the correct address of the ESXi server.

'cosmo' was the old name of a linux desktop machine, that many months ago got re-installed and renamed in the process. So 'cosmo' does not exist any more and it is fair and expected that 'cosmo' cannot be resolved. However, the error message mentioning 'cosmo' occurs regardless of what server I try to mount an NFS datastore from. I cannot find any references to 'cosmo' in the ESXi server's configuration in the vSphere client (although I'm not sure where to look exactly). I seem to remember that at some point, a NFS datastore was mounted temporarily from 'cosmo' to host debugging ISO files. But no longer.

I've tried mounting that same export on another ESXi (running same ESXi version) in the same subnet (works fine), and I've also tried mounting a new NFS share from a server where the ESXi already had another NFS datastore mounted from that same server (the already-mounted datastore works fine, but attempting to connect to a new datastore on the same server fails mentioning the unrelated 'cosmo' server as mentioned above.) I've tried rebooting the ESXi server, but the problem persists after reboot.

I'm running vSphere client 5.0.0 Build 455964 and ESXi-5.0.0-469512-standard with the free license. Because of the free license (I think), I don't have SSH access to the server. (Is that right?)

How do I get around the error message mentioning the obsolete 'cosmo' server? The only thing I can think of right now is to move all the local datastore data to an already-mounted datastore, reinstall the ESXi server, and move all the data back. I'm hoping for a simpler solution! 🙂

Peter

Tags (3)
1 Solution

Accepted Solutions
zXi_Gamer
Virtuoso
Virtuoso
Jump to solution

Can you confirm if this solution works for you?

View solution in original post

2 Replies
zXi_Gamer
Virtuoso
Virtuoso
Jump to solution

Can you confirm if this solution works for you?

pmorch
Enthusiast
Enthusiast
Jump to solution

Hi,

Thanks for you answer, that I've marked as the correct answer.

In order for me to access it, I had to first enable and get access to the command line with SSH. For that I followed the procedure for "Enable ESXi Console and SSH" in this post.

After that, the process outlined above worked sweet. It boils down to running this from the command line:

esxcfg-nas -l

which lists shares, and shows an error for 'cosmo'. Now put a line for host "cosmo" into /etc/hosts manually (I used 'vi' for that). Run

esxcfg-nas -l

again. This time no errors. Now delete the share with:

esxcfg-nas -d cosmo


Remove previous line for 'cosmo' from /etc/hosts and all is well. Now shares can be mounted from vSphere again as expected.