Add Datastore (NFS)2023/03/01 |
Add Datastore (NFS) to ESXi Host.
On this example, it adds NFS datastore.
ESXi 7 supports NFS v3 and v4.1, this example shows v4.1 mounting. For NFS share, it uses share directory provided from Linux server like here. |
|
[1] | To configure on shell access, set like follows. |
# --hosts=(NFS server's hostname or IP address) # --share=(share directory) # --volume-name=(any datastore name) [root@ctrl:~] esxcli storage nfs41 add --hosts=nfs.srv.world --share=/home/nfsshare --volume-name=NFS-Share [root@ctrl:~] esxcli storage nfs41 list Volume Name Host(s) Share Accessible Mounted Read-Only Security isPE Hardware Acceleration ----------- ------------- -------------- ---------- ------- --------- -------- ----- --------------------- NFS-Share nfs.srv.world /home/nfsshare true true false AUTH_SYS false Not Supported[root@ctrl:~] vim-cmd hostsvc/datastore/info NFS-Share (vim.host.NasDatastoreInfo) { name = "NFS-Share", url = "/vmfs/volumes/425e7411-52a95044-0000-000000000000", freeSpace = 21817028608, maxFileSize = 17592186040320, maxVirtualDiskCapacity = 17418005980514, maxMemoryFileSize = 17592186040320, timestamp = "2023-03-01T00:36:53.015667Z", containerId = <unset>, aliasOf = <unset>, datastoreFormat = <unset>, logicalSectorSize = <unset>, physicalSectorSize = <unset>, nas = (vim.host.NasVolume) { type = "NFS41", name = "NFS-Share", capacity = 28422893568, remoteHost = "nfs.srv.world", remotePath = "/home/nfsshare", userName = <unset>, remoteHostNames = (string) [ "nfs.srv.world" ], securityType = "AUTH_SYS", protocolEndpoint = false } } (vim.Datastore.HostMount) [ (vim.Datastore.HostMount) { key = 'vim.HostSystem:ha-host', mountInfo = (vim.host.MountInfo) { path = "/vmfs/volumes/425e7411-52a95044-0000-000000000000", accessMode = "readWrite", mounted = true, accessible = true, inaccessibleReason = <unset> } } ][root@ctrl:~] esxcli storage filesystem list Mount Point Volume Name UUID Mounted Type Size Free ------------------------------------------------- ------------------------------------------ ----------------------------------- ------- ------ ------------ ------------ /vmfs/volumes/425e7411-52a95044-0000-000000000000 NFS-Share 425e7411-52a95044-0000-000000000000 true NFS41 28422893568 21817024512 /vmfs/volumes/63f86748-0a69d2d8-dc5c-52540094d817 VM-Data 63f86748-0a69d2d8-dc5c-52540094d817 true VMFS-6 171530256384 170019258368 /vmfs/volumes/63f86a02-6a87729a-0e75-52540094d817 ISO-Data 63f86a02-6a87729a-0e75-52540094d817 true VMFS-6 85630910464 84120961024 /vmfs/volumes/63edd31c-7f6b194e-4446-52540094d817 OSDATA-63edd31c-7f6b194e-4446-52540094d817 63edd31c-7f6b194e-4446-52540094d817 true VMFS-L 77040975872 73940336640 /vmfs/volumes/32a32ba4-c7431b3a-62bb-53408cbb2f76 BOOTBANK1 32a32ba4-c7431b3a-62bb-53408cbb2f76 true vfat 4293591040 4079091712 /vmfs/volumes/70d28441-c34632eb-ec8b-af86d58e456a BOOTBANK2 70d28441-c34632eb-ec8b-af86d58e456a true vfat 4293591040 4293525504 # for unmounting, run like follows [root@ctrl:~] esxcli storage nfs41 remove --volume-name=NFS-Share |
To add Datastore on VMware Host Client, Configure like follows.
|
|
[2] | Login to VMware Host Client with root user account and click [Storage] icon that is under [Navigator] menu. |
[3] | Click [New datastore] button. |
[4] | Select [Mount NFS datastore]. |
[5] | Input NFS share information to mount. For Username/Password, it's optional, OK to keep blank if you have not configured NFS server to require authentication. |
[6] | Click [Finish] button. |
[7] | After new NFS Datastore successfully added, it is listed on Datastores table like follows. |
Sponsored Link |