return;
}
HostDatastoreSystem hds = host.getHostDatastoreSystem();
HostNasVolumeSpec hnvs = new HostNasVolumeSpec();
hnvs.setRemoteHost("10.20.140.25");
hnvs.setRemotePath("/home/vm_share");
hnvs.setLocalPath("VM_Share");
hnvs.setAccessMode("readWrite"); // or, "readOnly"
Datastore ds = hds.createNasDatastore(hnvs);
DatastoreInfo di = ds.getInfo();
System.out.println("Name:" + di.getName());