Skip to content

Instantly share code, notes, and snippets.

@michaelrice
Created July 28, 2014 17:35
Show Gist options
  • Save michaelrice/be5e1639187dce9c6a14 to your computer and use it in GitHub Desktop.
Save michaelrice/be5e1639187dce9c6a14 to your computer and use it in GitHub Desktop.
mount NFS with groovy
HostDatastoreSystem hds = host.getHostDatastoreSystem()
HostNasVolumeSpec hnvs = new HostNasVolumeSpec()
hnvs.setRemoteHost(remoteHostIp)
hnvs.setRemotePath(remotePath)
hnvs.setLocalPath(localPath)
hnvs.setAccessMode(accessMode)
hds.createNasDatastore(hnvs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment