Our NFS path has changed for a vcenter / datastore.
Old path: /xyz
New path /vol/xyz
If I were adding a new datastore I'd go with the following:
$nfshost = "172.22.225.97"
$nfspath = "/vol/xyz"
$servers = get-content <filename> <-- list of virtual host names
foreach ($server in $servers) {
""
"Adding NFS Datastores to ESX host: $server"
"-----------------"
"<datastore name>"
New-Datastore -VMHost $server -Name "<datastore name>" -Nfs -NfsHost $nfshost -Path $nfspath
}
How do I rename / reset the nfs path for an existing datastore? Is this possible with Set-Datastore?
I'm afraid not.
Afaik there is no API method either to reconfigure a datastore.
The only way I can think of, is to remove the datastore and create a new one with the new configuration parameters.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'm afraid not.
Afaik there is no API method either to reconfigure a datastore.
The only way I can think of, is to remove the datastore and create a new one with the new configuration parameters.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc. Not the answer I wanted but easy enough.