-
Notifications
You must be signed in to change notification settings - Fork 41
NfsDatastore
SimeonGerginov edited this page Dec 5, 2019
·
1 revision
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Server | Key | string | The name of the Server we are trying to connect to. The Server can be a vCenter or ESXi. | |
Credential | Mandatory | PSCredential | The credentials needed for connection to the specified Server. | |
VMHostName | Key | string | The name of the VMHost which is going to be used. | |
Name | Key | string | The name of the Nfs Datastore. | |
Path | Mandatory | string | The remote path of the Nfs mount point. | |
Ensure | Mandatory | Ensure | Specifies whether the Nfs Datastore should be present or absent. | Present, Absent |
NfsHost | Mandatory | string[] | The Nfs Host for the Datastore. | |
FileSystemVersion | Optional | string | The file system that is used on the Nfs Datastore. | |
AccessMode | Optional | AccessMode | The access mode for the Nfs Datastore. The default access mode is ReadWrite. | ReadWrite, ReadOnly |
AuthenticationMethod | Optional | AuthenticationMethod | The authentication method for the Nfs Datastore. The default authentication method is AUTH_SYS. | AUTH_SYS, Kerberos |
CongestionThresholdMillisecond | Optional | int | The latency period beyond which the storage array is considered congested. The range of this value is between 10 to 100 milliseconds. | |
StorageIOControlEnabled | Optional | bool | Indicates whether the IO control is enabled. |
The resource is used to create, modify and remove Nfs Datastores on the specified Nfs Host and VMHost.
Creates Nfs Datastore MyNfsDatastore with version 3 File System on the specified Nfs Host and VMHost. The access mode is ReadOnly and the Authentication method is AUTH_SYS.
Configuration NfsDatastore_CreateNfsDatastoreWithReadOnlyAccessMode_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$VMHostName,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string[]]
$NfsHost,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$NfsPath
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
NfsDatastore NfsDatastore {
Server = $Server
Credential = $Credential
VMHostName = $VMHostName
Name = 'MyNfsDatastore'
Path = $NfsPath
Ensure = 'Present'
NfsHost = $NfsHost
FileSystemVersion = '3'
AccessMode = 'ReadOnly'
AuthenticationMethod = 'AUTH_SYS'
}
}
}
Creates or modifies Nfs Datastore MyNfsDatastore with version 3 File System on the specified Nfs Host and VMHost. The access mode is ReadWrite and the Authentication method is AUTH_SYS. The StorageIOControl is enabled and the latency period beyond which the storage array is considered congested is 10 milliseconds.
Configuration NfsDatastore_CreateNfsDatastoreWithReadWriteAccessMode_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$VMHostName,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string[]]
$NfsHost,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$NfsPath
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
NfsDatastore NfsDatastore {
Server = $Server
Credential = $Credential
VMHostName = $VMHostName
Name = 'MyNfsDatastore'
Path = $NfsPath
Ensure = 'Present'
NfsHost = $NfsHost
FileSystemVersion = '3'
AccessMode = 'ReadWrite'
AuthenticationMethod = 'AUTH_SYS'
StorageIOControlEnabled = $true
CongestionThresholdMillisecond = 10
}
}
}
Removes Nfs Datastore MyNfsDatastore from the specified Nfs Host and VMHost.
Configuration NfsDatastore_RemoveNfsDatastore_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$VMHostName,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string[]]
$NfsHost,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$NfsPath
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
NfsDatastore NfsDatastore {
Server = $Server
Credential = $Credential
VMHostName = $VMHostName
Name = 'MyNfsDatastore'
Path = $NfsPath
Ensure = 'Absent'
NfsHost = $NfsHost
}
}
}
- Home
- Tips & Tricks
- Cluster
- DRSRule
- Datacenter
- DatacenterFolder
- DatastoreCluster
- DatastoreClusterAddDatastore
- DrsCluster
- Folder
- HACluster
- NfsDatastore
- NfsUser
- PowerCLISettings
- StandardPortGroup
- StandardSwitch
- VDPortGroup
- VDSwitch
- VDSwitchVMHost
- VMHostAcceptanceLevel
- VMHostAccount
- VMHostAdvancedSettings
- VMHostAgentVM
- VMHostAuthentication
- VMHostCache
- VMHostConfiguration
- VMHostDCUIKeyboard
- VMHostDnsSettings
- VMHostFirewallRuleset
- VMHostGraphics
- VMHostGraphicsDevice
- VMHostIPRoute
- VMHostIScsiHba
- VMHostIScsiHbaTarget
- VMHostIScsiHbaVMKernelNic
- VMHostNetworkCoreDump
- VMHostNtpSettings
- VMHostPciPassthrough
- VMHostPermission
- VMHostPhysicalNic
- VMHostPowerPolicy
- VMHostRole
- VMHostSNMPAgent
- VMHostSatpClaimRule
- VMHostScsiLun
- VMHostScsiLunPath
- VMHostService
- VMHostSettings
- VMHostSharedSwapSpace
- VMHostSoftwareDevice
- VMHostStorage
- VMHostSyslog
- VMHostTpsSettings
- VMHostVDSwitchMigration
- VMHostVMKernelActiveDumpFile
- VMHostVMKernelActiveDumpPartition
- VMHostVMKernelDumpFile
- VMHostVMKernelModule
- VMHostVdsNic
- VMHostVss
- VMHostVssBridge
- VMHostVssMigration
- VMHostVssNic
- VMHostVssPortGroup
- VMHostVssPortGroupSecurity
- VMHostVssPortGroupShaping
- VMHostVssPortGroupTeaming
- VMHostVssSecurity
- VMHostVssShaping
- VMHostVssTeaming
- VMHostvSANNetworkConfiguration
- VmfsDatastore
- vCenterSettings
- vCenterStatistics
- vCenterVMHost