Is there a CLI to add a NFS datastore to the ESX ? I am a newbie testing a storage product and am exhausted after repeatedly clicking through the VSphere Client screens to add a NFS datastore. I looked at vmware-mount and vmware-diskmanager but that didn't seem to match my requirements. I am using ESX 5.1
thanks
Yes you can add using powercli and as well as using Vi Client
New-Datastore -Nfs -VMHost 10.23.112.345 -Name Datastore -Path $remotePath -NfsHost $remoteHost
Creates a new Nfs datastore named Datastore on the virtual machine host with IP address 10.23.112.345 with the specified parameters.
Get-VMHost | New-Datastore -Nfs -Name NFS1 -Path "/mnt/nfs1/nfs11/test1" -NfsHost 10.91.246.21
Mount/Unmount an NFS Datastore using vSphere Client.
I hope this would help you
Thanks
Yes you can add using powercli and as well as using Vi Client
New-Datastore -Nfs -VMHost 10.23.112.345 -Name Datastore -Path $remotePath -NfsHost $remoteHost
Creates a new Nfs datastore named Datastore on the virtual machine host with IP address 10.23.112.345 with the specified parameters.
Get-VMHost | New-Datastore -Nfs -Name NFS1 -Path "/mnt/nfs1/nfs11/test1" -NfsHost 10.91.246.21
Mount/Unmount an NFS Datastore using vSphere Client.
I hope this would help you
Thanks
Hi and welcome to the communites..
If you have shell access, then it is quite easily done by esxcfg-nas command.
Example:
esxcfg-nas -a <SOMENAME> -o <NAS SERVER IP/hostname> -s /<share exported>
esxcfg-nas -a TEST -o 192.168.1.1 -s /testfolder
Managing ESX from command line, Its good to have vMA appliance. For managing nas :
vicfg-nas <conn_options --add --nasserver dir42.eng.vmware.com -s /<mount_dir>nfsstore-dir42
vicfg-nas is the command.
-A
thanks everyone for the answers. Looks like I can only mark 2 helpful answers so I picked one of the 3 to be the correct one.
I found all the tools you mentioned except for the VI (virtual infrastructure) client. i can only find a link to 3.5 not 5.1. Can someone provide a link to it ?