Add NFS datastore using VMWare PowerCLI

To add a NFS datastore to a single VMHost:

Get-VMHost "HOSTNAME" | New-Datastore -Nfs -Name "DATASTORE_NAME" -Path "VOLUME_MOUNT_PATH" -NfsHost "IP_OR_HOSTNAME_OF_NFS_HOST"  

To add a NFS datastore to all VMHosts in a Cluster:

Get-Cluster "CLUSTERNAME" | Get-VMHost "HOSTNAME" | New-Datastore -Nfs -Name "DATASTORE_NAME" -Path "VOLUME_MOUNT_PATH" -NfsHost "IP_OR_HOSTNAME_OF_NFS_HOST"  

Check if a datastore is SIOC Enabled | VMware

Researching unmanaged workloads today..here’s a quick way to check if your datastore is managed by Storage I/O Control (SIOC):

Get-Datastore | Select-Object Name, Type, StorageIOControlEnabled  

If you want to check VMhosts for SIOC events, like “An unmanaged I/O workload is detected on a SIOC-enabled datastore”:

Get-VMHost | Get-VIEvent | Where {$_.fullformattedmessage -like '*SIOC*'} | Select FullFormattedMessage, CreatedTime  

VMware Error: “msg.hbacommon.outofspace: There is no more space for virtual disk”

msg.hbacommon.outofspace:There is no more space for virtual disk .vmdk. You may be able to continue this session by freeing disk space on the relevant partition, and clicking Retry. Otherwise, click Abort to terminate this session.

I haven’t seen this message in awhile (knock-on-wood), but if this does occur, you will need to (1) add space to the datastore and (2) answer the message prompt. If this datastore housed a number of VMs, you could have your hands busy clicking VMs and answering message prompts.

Or you could use PowerCLI.

To target all VMs:
Get-VM | Get-VMQuestion | Answer-VMQuestion -DefaultOption  
To target all VMs on a specific datastore:
Get-Datastore datastorename | Get-VM | Get-VMQuestion | Answer-VMQuestion -DefaultOption  

To avoid being prompted to confirm the answer, you can add “-Confirm:$false” to each command.

More information on Answer-VMQuestion cmdlet (actually called Set-VMQuestion, but I prefer using its alias) located here: https://www.vmware.com/support/developer/windowstoolkit/wintk40u1/html/Set-VMQuestion.html