New-SCDCBSettings
注意: 此 cmdlet 适用于 VMM 2019 UR1 及更高版本。
在 VMM 管理的 S2D 群集中配置 DCB 设置。
语法
New-SCDCBSettings
[-VMMServer <ServerConnection>]
[-AddDCBSettings]
[-RemoveDCBSettings]
[-HostNetworkAdapters <HostNetworkAdapter[]>]
[-VirtualNetworkAdapters <VirtualNetworkAdapter[]>]
[-SMBPriority <Int32>]
[-SMBBandwidth <Int32>]
[-ClusterHeartbeatPriority <Int32>]
[-ClusterHeartbeatBandwidth <Int32>]
[<CommonParameters>]
说明
-New-SCDCBSettings cmdlet 在 Virtual Machine Manager (VMM) 管理的 S2D 群集中配置 DCB 设置。
示例
示例 1:创建 HCI 群集时设置 DCB 设置
PS C:\> $HostNetworkAdpaters = Get-SCVMHostNetworkAdapter where {$_.Name -like "RDMA*"}
PS C:\>$VirtualHostNetworkAdpaters = Get-SCVirtualNetworkAdapter where {$_.Name -like "RDMA*"}
PS C:\>$DCBSettings = New-SCDCBSettings -AddDCBSettings -SMBPriority 3 -SMBBandwidth 50 -ClusterHeartbeatPriority 7 -ClusterHeartbeatBandwidth 1 -HostNetworkAdapters $HostNetworkAdpaters -VirtualNetworkAdapters $VirtualHostNetworkAdpaters
PS C:\> $RunAsAcct = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $HostGroup = Get-SCVMHostGroup -Name "New York"
PS C:\> $Nodes = Get-SCVMHost | where {$_.Name -like "HostClus*" -and $_.VMHostGroup -eq $HostGroup}
PS C:\> Install-SCVMHostCluster -VMHost $Nodes -ClusterName "Cluster01" -Credential $RunAsAcct -EnableS2D -DCBSettings $DCBSettings
前两个命令用于提取 HostNetworkAdapters 和 HostVirtualNetworkAdapters。
第三个命令用于创建 DCB 设置对象。
第四个命令获取名为 RunAsAccount01 的运行方式帐户,并将其存储在 $RunAsAcct 变量中。
第五个命令获取名为 New York 的主机组对象,并将对象存储在 $HostGroup 变量中。
第六个命令获取以存储在 $HostGroup 中的主机组中名称 HostClus 开头的群集节点。 然后, 命令将节点存储在 $Nodes 变量中。
最后一个命令创建群集并将其命名为 Cluster01,并按照上述 cmdlet 应用 DCB 设置。 在超聚合群集上设置 DCB 设置
示例 2:在超聚合群集上设置 DCB 设置
PS C:\>$HostNetworkAdpaters = Get-SCVMHostNetworkAdapter where {$_.Name -like "RDMA*"}
PS C:\>$VirtualHostNetworkAdpaters = Get-SCVirtualNetworkAdapter where {$_.Name -like "RDMA*"}
PS C:\>$DCBSettings = New-SCDCBSettings -AddDCBSettings -SMBPriority 3 -SMBBandwidth 50 -ClusterHeartbeatPriority 7 -ClusterHeartbeatBandwidth 1 -HostNetworkAdapters $HostNetworkAdpaters -VirtualNetworkAdapters $VirtualHostNetworkAdpaters
PS C:\>$cluster = Get-SCVMHostCluster where {$_.Name -like "HostClus*"}
PS C:\> Set-SCVMHostCluster -VMHostCluster $cluster -DCBSettings $DCBSettings
前两个命令用于提取 HostNetworkAdapters 和 HostVirtualNetworkAdapters。
第三个命令用于创建 DCB 设置对象。
最后一个命令设置超聚合群集上的 DCB 设置。
示例 3:在横向扩展文件服务器 S2D 群集上设置 DCB 设置
PS C:\>$HostNetworkAdpaters = Get-SCVMHostNetworkAdapter where {$_.Name -like "RDMA*"}
PS C:\>$VirtualHostNetworkAdpaters = Get-SCVirtualNetworkAdapter where {$_.Name -like "RDMA*"}
PS C:\>$DCBSettings = New-SCDCBSettings -AddDCBSettings -SMBPriority 3 -SMBBandwidth 50 -ClusterHeartbeatPriority 7 -ClusterHeartbeatBandwidth 1 -HostNetworkAdapters $HostNetworkAdpaters -VirtualNetworkAdapters $VirtualHostNetworkAdpaters
PS C:\>$sofs = Get-SCStorageFileServer where {$_.Name -like "SOFSClus*"}
PS C:\> Set-SCStorageFileServer-StorageFileServer $sofs -DCBSettings $DCBSettings
前两个命令用于提取 HostNetworkAdapters 和 HostVirtualNetworkAdapters。
第三个命令用于创建 DCB 设置对象。
最后一个命令设置 SOFS 群集上的 DCB 设置。
示例 4:删除超聚合群集上的 DCB 设置
PS C:\>$HostNetworkAdpaters = Get-SCVMHostNetworkAdapter where {$_.Name -like "RDMA*"}
PS C:\>$VirtualHostNetworkAdpaters = Get-SCVirtualNetworkAdapter where {$_.Name -like "RDMA*"}
PS C:\>$DCBSettings = New-SCDCBSettings -RemoveDCBSettings -HostNetworkAdapters $HostNetworkAdpaters -VirtualNetworkAdapters $VirtualHostNetworkAdpaters
PS C:\>$cluster = Get-SCVMHostCluster where {$_.Name -like "HostClus*"}
PS C:\> Set-SCVMHostCluster -VMHostCluster $cluster -DCBSettings $DCBSettings
前两个命令用于提取 HostNetworkAdapters 和 HostVirtualNetworkAdapters。
第三个命令用于创建具有 RemoveDCBSettings 标志的 DCB 设置对象。
第四个命令是创建一个获取 SCVMHostCluster 详细信息的对象。
最后一个命令设置超聚合群集上的 DCB 设置。
示例 5:删除横向扩展文件服务器 S2D 群集上的 DCB 设置
PS C:\>$HostNetworkAdpaters = Get-SCVMHostNetworkAdapter where {$_.Name -like "RDMA*"}
PS C:\>$VirtualHostNetworkAdpaters = Get-SCVirtualNetworkAdapter where {$_.Name -like "RDMA*"}
PS C:\>$DCBSettings = New-SCDCBSettings -RemoveDCBSettings -HostNetworkAdapters $HostNetworkAdpaters -VirtualNetworkAdapters $VirtualHostNetworkAdpaters
PS C:\>$sofs = Get-SCStorageFileServer where {$_.Name -like "SOFSClus*"}
PS C:\> Set-SCStorageFileServer-StorageFileServer $sofs -DCBSettings $DCBSettings
前两个命令用于提取 HostNetworkAdapters 和 HostVirtualNetworkAdapters。
第三个命令用于创建具有 RemoveDCBSettings 标志的 DCB 设置对象。
第四个命令是创建一个获取 CStorageFileServer 详细信息的对象。
最后一个命令设置 SOFS S2D 群集上的 DCB 设置。
参数
-AddDCBSettings
启用此标志以添加 DCB 设置。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClusterHeartbeatBandwidth
指定群集检测信号流量的带宽。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClusterHeartbeatPriority
指定群集检测信号流量的优先级。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HostNetworkAdapters
指定要应用 DCB 设置的主机网络适配器。
Type: | HostNetworkAdapter[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveDCBSettings
启用此标志可删除 DCB 设置。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SMBBandwidth
指定 SMB 流量的带宽。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SMBPriority
指定 SMB 流量的优先级。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualNetworkAdapters
指定要应用 DCB 设置的主机虚拟网络适配器。
Type: | VirtualNetworkAdapter[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
指定VMM 服务器对象。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
输出
DCBSettings
此 cmdlet 返回 DCBSettings 对象。