vThinkBeyondVM
VMware Employee
VMware Employee

It worked for me when I invoked this API against vCenter. Below is the code snippet

HostDatastoreSystem dssystem=host.getHostDatastoreSystem();

HostNasVolumeSpec NasSpec=new HostNasVolumeSpec();

NasSpec.setAccessMode("readWrite");

NasSpec.setLocalPath("NFSShare2");

NasSpec.setRemoteHost("10.192.x.x"); //NFS server IP

NasSpec.setRemotePath("/store1");

dssystem.createNasDatastore(NasSpec);

System.out.println("createNasDatastore API is called");

Can you please try the same? At the moment, I am not sure if this API works directly on ESXi host as well (Without any connection to vCenter)

I am using VC 60U2 and ESXi also 60U2.

Let me know your progress.


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Reply
0 Kudos