-
Notifications
You must be signed in to change notification settings - Fork 41
VmfsDatastore
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 Vmfs Datastore. | |
Path | Mandatory | string | The canonical name of the Scsi logical unit that contains the Vmfs Datastore. | |
Ensure | Mandatory | Ensure | Specifies whether the Vmfs Datastore should be present or absent. | Present, Absent |
FileSystemVersion | Optional | string | The file system that is used on the Vmfs Datastore. | |
BlockSizeMB | Optional | int | The maximum file size of Vmfs in megabytes (MB). If no value is specified, the maximum file size for the current system platform is used. | |
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 Vmfs Datastores on the specified VMHost.
Creates or modifies Vmfs Datastore MyVmfsDatastore with version 5 File System and maximum file size of Vmfs: 1MB on the specified VMHost. The StorageIOControl is enabled and the latency period beyond which the storage array is considered congested is 100 milliseconds.
Configuration VmfsDatastore_CreateVmfsDatastore_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]
$ScsiLunCanonicalName
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
VmfsDatastore VmfsDatastore {
Server = $Server
Credential = $Credential
VMHostName = $VMHostName
Name = 'MyVmfsDatastore'
Path = $ScsiLunCanonicalName
Ensure = 'Present'
FileSystemVersion = '5'
BlockSizeMB = 1
StorageIOControlEnabled = $true
CongestionThresholdMillisecond = 100
}
}
}
Removes Vmfs Datastore MyVmfsDatastore from the specified VMHost.
Configuration VmfsDatastore_RemoveVmfsDatastore_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]
$ScsiLunCanonicalName
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
VmfsDatastore VmfsDatastore {
Server = $Server
Credential = $Credential
VMHostName = $VMHostName
Name = 'MyVmfsDatastore'
Path = $ScsiLunCanonicalName
Ensure = 'Absent'
}
}
}
- 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