[Home] [Forum] [3i RCLI Guide]

The commands vicfg-nas.pl (esxcfg-nas.pl) are used to manage NFS shares that your ESXi host will use as datastores. The following options can be used with the vicfg-nas.pl command

--list (-l) -- List all known NFS datastores along with the NFS host name and share.
--delete < (-d < -- Removes an NFS datastore from the ESXi host. The datastore can't be in use by VMs for the command to succeed.
--add <datastore_name> (-a <datastore name>) -- Adds a new NFS share to your ESXi host as a datastore. This option requires both the --nasserver and --share options
--nasserver <host_name/IP> (-o <host_name/IP) -- Hostname or IP address of the NFS server.
--share <share> (-s <share>) -- Share on the NFS host that will be used as a datastore.

Sample Session

vicfg-nas.pl --server 192.168.1.40 --add NFS1 --nasserver 192.168.1.100 --share /NFS1
Connecting to NAS volume: NFS1
NFS1 created and connected.

vicfg-nas.pl --server 192.168.1.40 --list
/vmfs/volumes/caac2d9b-eae6922c
NFS1 is /NFS1 from 192.168.1.100 mounted

vicfg-nas.pl --server 192.168.1.40 --delete NFS1
/vmfs/volumes/caac2d9b-eae6922c
Unable to remove datastore: The resource is in use.
In the above example the command fails because a VM is using an ISO image on the NFS1 datastore.

vicfg-nas.pl --server 192.168.1.40 --delete NFS1
/vmfs/volumes/caac2d9b-eae6922c
NAS volume NFS1 deleted.

These options can also be set in the VI client. Select Configuration \ Storage and then click on Add Storage to start the Add Storage Wizard. Select Network File System as the storage type and then enter the datastore name, NFS server and share on the subsequent screen.


INSERT YOUR COMMENT - IF YOU HAVE A QUESTION PLEASE USE THE FORUM


Name (required)

Web Site (optional)

Email address (required - will not be displayed)

Comment (required)

Please enter code

 

Copyright © 2011 - Dave Mishchenko