Add NFS storage on VMware hosts
If you want to add a NFS volume on VMware to a lot of hosts, this is the perfect PowerCLI one-liner for you. This will iterate through every host in vCenter and add the datastore - great for ISO datastores, etc.
On the VMware PowerCLI:
For a read-only NFS datastore (great for ISOs), on the VMware PowerCLI:
If you want to add a NFS volume on VMware to a lot of hosts, this is the perfect PowerCLI one-liner for you. This will iterate through every host in vCenter and add the datastore - great for ISO datastores, etc.
On the VMware PowerCLI:
connect-viserver vcenter.domain.tld Get-VMHost | New-Datastore -Nfs -Name volumename -Path "/vol/volumename" -NfsHost nfs-server-ip
For a read-only NFS datastore (great for ISOs), on the VMware PowerCLI:
connect-viserver vcenter.domain.tld Get-VMHost | New-Datastore -Nfs -Name volumename -Path "/vol/volumename" -NfsHost nfs-server-ip -readonly
No comments:
Post a Comment