VMware Cloud Community
daggubatinagur1
Contributor
Contributor

New Datastore creating using VMware vSphere Power CLI

-------------- Example 1 --------------

New-Datastore -VMHost $vmhost -Name Datastore -Path $scsiLun.CanonicalName -Vmfs -FileSystemVersion 3

Creates a VMFS datastore by specifying the file system type.

-------------- Example 2 --------------

New-Datastore -Nfs -VMHost 10.23.112.60 -Name NFSDatastore -Path /mynfs -NfsHost 10.23.84.73

Creates a NFS datastore.

-------------- Example 3 --------------

$vmhost1, $vmhost2 | New-Datastore -Nfs -Name NFS1 -Path "/mnt/nfs1/nfs11/test1" -NfsHost 10.23.113.55 -ReadOnly

Guys if you have any other scripts please share here ..

Tags (1)
0 Kudos
1 Reply
vHaridas
Expert
Expert

scripts depend on what type of storage you have.

See URL Back To Basics – Configuring Storage: PowerCLI (Part 6 of 6) | Mike Laverick... which covers DS creation on iscsi, NFS.

Please consider awarding points for "Correct" or "Helpful" replies. Thanks....!!! https://vprhlabs.blogspot.in/
0 Kudos