Setting up NFS share for ESXi Server

Chunk

Weaksauce
Joined
Dec 18, 2003
Messages
104
I have an ESXi server that I am currently running 4 VMs off of the local disk. I am trying to set up an NFS share on my file server (Storage Server 2008). I have installed Services for Network File System on the file server and am able to create the share with appropriate permissions.

I have also set up Services for Network File System on a Server 2008 domain controller along with Identity Management for Unix. I have also created a user (root) in the domain and set its UID and GID to 0.

However, when I try to mount the NFS share in vSphere I get the following error message:

Call "HostDatastoreSystem.CreateNasDatastore" for object "ha-datastoresystem" on ESXi "192.168.1.3" failed.
Operation failed, diagnostics report: Cannot open volume: /vmfs/volumes/d870785d-6c6b79de

I suspect that it has something to do with the fact that the share is located on a server that is not a domain controller which prevents me from installing Identity Management for Unix on it. Unfortunately I haven't been able to work out a solution.

Any advice you folks have would be appreciated.
 
What permissions does the user "root" have on the domain?

You could add a Global Security Group instead and add "root" to it just make sure that the unix attributes are configured properly on both and the user Primary group name is the group you created.
 
I figured it out. The missing step was to check "allow anonymous access" in NFS Advanced Sharing and set the GID and UID to "0" (the same as the root account).
 
In an interesting turn of events, my boss tried to create a smb share of the NFS share so that he could copy ISOs to it without going through vSphere. The end result of his efforts was to break the NFS share so that now none of the VMs on the drive are working and the ESXi server cannot write to the drive.

I have reversed all the changes that he made but it still isn't working. I tried unmounting the share in ESXi so that I could start fresh but I just get an error message that the drive is in use (all of the VMs are powered off).

What am i overlooking?
 
The files are probably still locked since they were dropped from vSphere unexpectedly. You may need to right click each VM, Remove from Inventory, then right click the .vmx file from the NFS datastore and register it again.

If there are too many VMs to do this by hand you can also use PowerCLI to do the same thing.

EDIT:

I see that you can't even mount the NFS share. Reading comprehension FTW. :)

You may need to recreate the share on your Windows server. Make sure the share is removed from all your ESXi hosts, then recreate the share in Windows, and reconnect the hosts. Then lock out your boss. ;)
 
Last edited:
Thanks for the reply. I've tried connecting a new NFS share but I get the same error message. I'm going to try removing everything from inventory to see if that helps at all.

EDIT:

I was able to mount a different share but it showed up with a capacity of 0.0 bytes. Read+Write access was definitely enabled. Still no luck with the original share.

EDIT 2:

Its working again. When the SMB share was created a user called "Anonymous Access" was created, although I don't know how or by whom. Once that user was added to the Domain Users group (which had read+write access to the share) the share started working again.
 
Last edited:
Back
Top