Fixing the "HostDatastoreSystem.CreateNasDatastore" for object "ha-datastoresystem" error when setting up VMware ESXi NFS data store

If you try to add a remote NFS data store forVMware Esxi, you may encounter this error:
Call “HostDatastoreSystem.CreateNasDatastore” for object “ha-datastoresystem” on ESX “{ESX server}” failed:

This is often a firewall issue, and the very first place you should look. Browse to Configuration/Software/Security Profile and verify that the  “NFS Client” is listed under “Outgoing Connections:”

If you do not see the NFS Client entry, click “Properties” and enable it:

Now retry the connection to the NFS data store. If you still cannot connect, open a command prompt on the ESXi console and issue a “vmkping <hosthame>” command where the hostname is your NFS server.  If you receive a successful ping, your VMKernel is setup correctly.  If it returns this, you have a VMKernel problem:

# vmkping 192.168.1.4
*** vmkernel stack not configured ***

You now need to examine your Virtual Switch settings to verify the presence of a VMKernel Port.  Browse to Configuration/Hardware/Networking and examine your settings.  You should see an entry for VMKernel Port; if you do not, your configuration will look like something like this:

To fix this, click the “Properties” link in the upper right corner to examine the properties of your vSwitch0.  You will notice that there is no VMKernel listed:

Click the “Add” button and select the VMKernel connection type:

You will be taken to the first screen of a multi-step wizard.  Keep the default properties you see on the first screen of the wizard:

The second screen is IP Connection Settings. Here, select “Use the following IP settings” and enter a unique IP address and your network’s subnet mask:

Next, click the “Edit” button and enter your network’s default gateway:

You are now done with the wizard, and should see your new VMkernel. Click the “Finish” button:

You should now see VMkernal in the vSwitch0 properties:

You should also now see it in your main vSwitch0 properties:

Now retry adding your NFS store, and you should now be able to do so successfully.

A vmkping should also work now:
# vmkping 192.168.1.4
PING 192.168.1.4 (192.168.1.4): 56 data bytes
64 bytes from 192.168.1.4: icmp_seq=0 ttl=64 time=0.121 ms
64 bytes from 192.168.1.4: icmp_seq=1 ttl=64 time=0.153 ms
64 bytes from 192.168.1.4: icmp_seq=2 ttl=64 time=0.137 ms

  • Pingback: Tweets that mention Fixing the "HostDatastoreSystem.CreateNasDatastore" for object "ha-datastoresystem" error when setting up VMware NFS data store | Jeffrey Costa -- Topsy.com()

  • Nery R. Gonzalez

    Hi Jeff!

    I found your post very useful. However, I have a question. Under Configuration->Software->Security Profile
    I can’t see a Firewall options, I just get a Services list. Is there something else I should do?

    I appreciate your response.

  • Jeff

    Nery: Once you go to Configuration Tab, Security Profile (Under Software), you should see “Firewall” with Incoming Connections and Outgoing Connections. If you do not, you can always try configuration from the command line. This site shows a long list of useful ESXi command-line firewall commands that could help you:
    http://www.vmadmin.co.uk/vmware/35-esxserver/51-esxfirewallcmd

  • Hey, just wanted to thank you for posting this. It was actually more helpful than VMWare’s own site, and I just had to create the VMKernel and open the NFS client port.

    Thanks dude!!

  • Marcel

    Great!

    Thanks a lot!

  • Michael

    In my case, one of my vhds is iSCSI disk. and the RPM disk is off line from that host which the VM guest was on. I refreshed the storage on the host got the disk back and restarted the VM guest. all works since.

  • Otto

    Oh yes, you saved me! I was trying to implement the napp-it.org “all in one” i.e. Esxi, virtualised Solaris, Solaris provides a NFS share as datastore for Esxi (and put Vms on it).

    Did not work. Took me two days. Now I have a beer on you!

    Best
    Otto

  • Rena

    I have tried most of this and I do not see the firewall setting either but I think I read that there is no firewall in esxi4.1? I don’t know if that is true. I am not familiar with command line but tried esxcfg-firewall and get error messages.

  • Rena

    I did finally get in to the directory via command line and the reason esxcfg-firewall doesn’t work is because it’s not listed..so does that mean there is no firewall?

  • Hussain

    Hello, your post is really helpful, it gives me a hint to create a VMKernel portgroup, but still that doesn’t work. I got an error

    Call “HostDatastoreSystem.CreateNasDatastore” for object “ha-datastoresystem” on ESX “xxx.xxx.xxx.xxx” failed.
    Operation failed, diagnostics report: Cannot open volume: /vmfs/volumes/42b0dc2a-6ec3c127

  • Philip Lao

    Thank you. Very useful and informative.

  • Michael Ramsing

    Lifesaver. Thx

  • romain

    I can’t find the firewall menu on my Esxi 4.1.
    I searched in the documentation and i saw that ESXi doesn’t have a firewall (ESX does)

  • NIVISE

    Thank you!!

  • Tommy

    Good Article!! Thanks.

  • Prayut

    Thanks a lot!!!

    Great blog, it has saved a lots of time!!

    Thanks again!!

  • Chakradhar

    Could you please help with the below issue
    Call “HostDatastoreSystem.CreateNasDatastore” for object “datastoreSystem-1605” on vCenter Server “svr-ies-vc-03.mgc.mentorg.com” failed.

  • Michael

    I ran into this problem in my production environment when adding a couple new hosts.

    To start with, I added several datastores to the new hosts, but did so with the FQDN instead of the shortname, which caused an issue with mismatched datastore names. After unmounting all the datastores, during the remounting process, I happened upon a single NFS volume that would produce this issue, while 2 other volumes on the same filer had no issues. I verified permissions on the volume, verified the NFS client settings, etc… finally, the issue was resolved by rebooting the VMHost.

  • Stanley Shi

    Really helpful, thanks!

  • Manoel Tadeu Anjos

    Great!!!! Very tks!!!

  • Dave

    In case someone faces the same issue, NFS pads the initial communication packets up to the MTU size of the interface. In my case this was 1500 bytes. A cheap Linksys switch could not carry VLAN tags and transmit 1500 byte IP packets, causing NFS client connections to fail.
    Connected to a decent (Cisco) switch with higher system MTU NFS works just fine to QNAP and Synology NAS.

    Test your MTU with vmkping -s 1500 [IP of NFS server]

  • cam

    A different issue I had was the NFS server (QNAP NAS) didn’t have the NFS permissions for the VM Host’s VMKernel IP address in the allow list. Also, you need to specify the share path as case sensitive