New-Datastore -VMHost $vmhost -Name "MER002 - NAS-SATA-RAID6 (ISOs)" -Nfs -NfsHost 10.1.35.1 -Path /share/Images01 New-Datastore -VMHost $vmhost -Name "MER001 - NAS-SATA-RAID6 (Veeam Backups)" -Nfs -NfsHost 10.1.35.1 -Path /share/VeeamBackup01 "1st - MER001 - NAS-SATA-RAID6 (Veeam Backups)" "Adding NFS Datastores to ESX host: $vmhost" $hostsincluster = Get-Cluster "Cluster 1 - M" | Get-VMHost -State "Connected" # Only does this to hosts marked as "Connected" # PowerCLI script to add NFS datastores to ESX/ESXi hosts in a specified Cluster Plus, this can be used in the future for other Datastores or other clusters by simply modifying the script and re-running it. I had about 7 ESX hosts to add the Datastores to, so doing this manually would have taken twice the time it took me to whip up this script and run it. Using PowerCLI automation, this helped me save some time. Rather than go through each host in vCenter individually, adding the datastore using the Add Storage wizard, I thought I would script the process in PowerCLI and get it done in a more automated fashion. The other day I needed to add three NFS datastores to a bunch vSphere ESX hosts in a specific cluster.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |