PowerCLI Reference

Set-VsanClusterConfiguration

Synopsis

This cmdlet sets vSAN configuration settings for a cluster.

Syntax

Set-VsanClusterConfiguration [-Configuration] <VsanClusterConfiguration[]> [-HealthCheckIntervalMinutes <Int32>] [-SpaceEfficiencyEnabled <Boolean>] [-PerformanceServiceEnabled <Boolean>] [-AllowReducedRedundancy <Boolean>] [-StoragePolicy <SpbmStoragePolicy>] [-StretchedClusterEnabled <Boolean>] [-PreferredFaultDomain <VsanFaultDomain>] [-WitnessHost <VMHost>] [-WitnessHostCacheDisk <String>] [-WitnessHostCapacityDisk <String[]>] [-IscsiTargetServiceEnabled <Boolean>] [-DefaultIscsiNetworkInterface <String>] [-DefaultIscsiTcpPort <Int32>] [-DefaultIscsiTargetAuthenticationType <VsanIscsiTargetAuthenticationType>] [-DefaultIncomingChapUser <String>] [-DefaultIncomingChapSecret <SecureString>] [-DefaultOutgoingChapUser <String>] [-DefaultOutgoingChapSecret <SecureString>] [-StoragePolicyForIscsiTargetService <SpbmStoragePolicy>] [-AddSilentHealthCheck <String[]>] [-RemoveSilentHealthCheck <String[]>] [-ResyncThrottlingMbps <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VsanClusterConfiguration

Detailed Description

This cmdlet sets vSAN configuration settings for a cluster.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ConfigurationVsanClusterConfiguration[]Specifies the configurations to modify.
This parameter supports OBN based on the names of the associated cluster. This parameter also directly accepts objects of type Cluster by silently converting them to the configuration object through ArgumentTransformationAttribute.
truetrue (ByValue)
AddSilentHealthCheckString[]Specifies the health checks list you want to add to the silent list.falsefalse
AllowReducedRedundancyBooleanAllows reduced redundancy state.
This optional parameter is applicable to specific vSAN cluster reconfigure operations that need to migrate data across cluster for changing vSAN disk format. When specified, it might make the process move lesser data in order to ensure storage object accessibility, and some objects will be kept at reduced redundancy state, which means at a higher risk in case of a hardware failure during the migration process. This is applicable to the SpaceEfficiencyEnabled parameter only. The default value is False.
falsefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse
DefaultIncomingChapSecretSecureStringSpecifies the default CHAP secret for iSCSI targets on this cluster. Applicable when the authentication type is Chap or MutualChap.falsefalse
DefaultIncomingChapUserStringSpecifies the default CHAP user name for iSCSI targets on this cluster. Applicable when the authentication type is Chap or MutualChap.falsefalse
DefaultIscsiNetworkInterfaceStringSpecifies the default VMkernel network interface which handles the iSCSI traffic. Can be overridden per target. Mandatory if IscsiTargetServiceEnabled is specified as $true. This parameter accepts an object of type HostVMKernelVirtualNic by silently converting it to the string name by using ArgumentTransformationAttribute.falsefalse
DefaultIscsiTargetAuthenticationTypeVsanIscsiTargetAuthenticationTypeSpecifies the default authentication type for vSAN iSCSI targets in this cluster.falsefalse
DefaultIscsiTcpPortInt32Specifies the default network port for iSCSI targets. Can be overridden per target. If not provided, the default port 3260 is used. The server automatically opens the firewall for the specified port.falsefalse
DefaultOutgoingChapSecretSecureStringSpecifies the default CHAP user secret you want to attach to the initiator. Applicable when the authentication type is MutualChap.falsefalse
DefaultOutgoingChapUserStringSpecifies the default CHAP user name you want to attach to the initiator. Applicable when the authentication type is MutualChap.falsefalse
HealthCheckIntervalMinutesInt32Specifies the health check interval in minutes.
If the value of this parameter is non-zero, then health check is enabled on the cluster and health check frequency is set to the specified value. If the value of the parameter is zero, then health check is disabled on the cluster. The accepted values are from 15 minutes to one day (1440 minutes).
falsefalse
IscsiTargetServiceEnabledBooleanEnables or disables the iSCSI target service on a vSAN cluster.falsefalse
PerformanceServiceEnabledBooleanEnables or disables performance service on a vSAN cluster.falsefalse
PreferredFaultDomainVsanFaultDomainSpecifies the preferred fault domain.
If stretched cluster configuration is enabled, this becomes the preferred fault domain for this cluster. The other fault domain in this stretched cluster becomes the secondary fault domain.
falsefalse
RemoveSilentHealthCheckString[]Specifies the health checks list you want to remove from the silent list.falsefalse
ResyncThrottlingMbpsInt32Specifies the resynchronization traffic limit in Mbps for each disk group in the cluster. The valid values are from 1 to 512. If the value of the parameter is zero, throttling resynchronization traffic limits are disabled.falsefalse
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
SpaceEfficiencyEnabledBooleanEnables and disables deduplication and compression on a vSAN cluster. Both deduplication and compression are enabled or disabled together.falsefalse
StoragePolicySpbmStoragePolicySpecifies the storage policy.
This parameter is applicable in the context of enabling the VirtualSAN performance service. The vSAN performance history database is stored as a vSAN object. The policy controls the availability, space consumption and performance of that object. If the object becomes unavailable, the performance history for that cluster will also be unavailable.
falsefalse
StoragePolicyForIscsiTargetServiceSpbmStoragePolicySpecifies the storage policy for the iSCSI target service. When you enable the iSCSI target service, vSAN creates a home object that stores metadata for the iSCSI target service. The storage policy for the home object should have a number of failures to tolerate of 1 or more.falsefalse
StretchedClusterEnabledBooleanEnables or disables stretched cluster configuration.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
WitnessHostVMHostSpecifies the witness host virtual machine in case StretchedClusterEnabled is enabled. It can also be a vSphere virtual appliance called witness appliance.

Requirements for witness host:
- Must not be part of any vSAN-enabled cluster.
- Must have at least one VMkernel adapter with vSAN traffic enabled.
- That adapter must be connected to all hosts in the stretched cluster.

In vSAN versions earlier than 6.6, this parameter is only applicable when enabling stretched cluster. If StretchedClusterEnabled is not specified or is false, then this parameter is ignored.

In vSAN 6.7 or later, this parameter can be specified to update the witness host in a stretched cluster.
falsefalse
WitnessHostCacheDiskStringSpecifies cache disk canonical name for the disk group to be created on the witness host. Also accepts ScsiLun or VMHostDisk objects through argument transformation.falsefalse
WitnessHostCapacityDiskString[]Specifies the capacity disk canonical names for the disk group to be created on the witness host. Also accepts ScsiLun or VMHostDisk objects through argument transformation.falsefalse

Return Type

The list of modified vSAN configuration objects for the cluster of type VsanClusterConfiguration

Notes

Examples

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

Set-VsanClusterConfiguration -Configuration (Get-VsanClusterConfiguration $cluster) -SpaceEfficiencyEnabled $true -HealthCheckIntervalMinutes 120

Enables the space efficiency on the $cluster cluster and sets the periodic health check interval to 120 minutes.

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

Set-VsanClusterConfiguration -Configuration "MyCluster" -StretchedClusterEnabled $true -PreferredFaultDomain $fd -WitnessHost $vmHost

Enables stretched cluster on the "MyCluster" cluster and specifies $fd as the primary fault domain and $vmHost as the witness host.

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

Set-VsanClusterConfiguration -Configuration "MyCluster" -PerformanceServiceEnabled $true -StoragePolicy $policy

Enables performance service on the "MyCluster" cluster and associates the performance history database object with the $policy storage policy.

-------------- Example 4 --------------

Set-VsanClusterConfiguration -Configuration (Get-VsanClusterConfiguration $cluster) -HealthCheckIntervalMinutes 0

Disables periodic health checks on the $cluster cluster.


Copyright © VMware, Inc. All rights reserved.