管理 vRSSManage vRSS

若要管理 vRSS 虛擬機器 (VMs) 和 Hyper\ HYPER-V 主機上,您可以使用下列 Windows PowerShell 命令。You can use the following Windows PowerShell commands to manage vRSS in virtual machines (VMs) and on Hyper-V hosts.

注意

如需有關本主題中所提到的命令中,請查看Windows PowerShell 命令 RSS 和 vRSSFor more information about the commands mentioned in this topic, see Windows PowerShell Commands for RSS and vRSS.

HYPER-V 主機上 VMQVMQ on Hyper-V Hosts

HYPER-V 主機上,您必須使用關鍵字控制 VMQ 處理器。On the Hyper-V host, you must use the keywords that control the VMQ processors. 您可以使用下列的 Windows PowerShell 命令檢視主機中目前的設定。You can view the current settings inside the host by using the following Windows PowerShell command.

Get-NetAdapterVmq

若要設定的 VMQ 設定,您可以使用下列 Windows PowerShell 命令。To configure the VMQ settings, you can use the following Windows PowerShell command.

Set-NetAdapterVmq

在 HYPER-V vRSS 切換連接埠vRSS on Hyper-V switch ports

在 HYPER-V 主機,您必須也可以讓 vRSS Hyper\ HYPER-V Virtual 切換連接埠。On the Hyper-V host, you must also enable vRSS on the Hyper-V Virtual Switch port.

您可以使用其中一項下列 Windows PowerShell 命令檢視目前的設定。You can view the current settings by using one of the following Windows PowerShell commands.

Get-VMNetworkAdapter <vm-name> | fl

Get-VMNetworkAdapter -ManagementOS | fl

執行一個命令之後,您可以看到這兩個欄位:After you run one of these commands, you can observe two fields:

VrssEnabledRequested   : True
VrssEnabled: True

一般而言,如果VrssEnabledRequested為 True,然後VrssEnabled也會,則為 TrueGenerally, if VrssEnabledRequested is True, then VrssEnabled will also be True.

在某些資源限制條件,可能會無法有此功能支援 Hyper\ HYPER-V Virtual 切換連接埠。Under some resource limitation conditions, a Hyper-V Virtual Switch port might be unable to have this feature enabled. 這是暫時性的條件,並功能可能會有可用在後續的時間。This is a temporary condition, and the feature may become available at a subsequent time.

如果VrssEnabled為 True,然後此 Hyper\ HYPER-V Virtual 切換連接埠的功能 \ (也就是針對這個 VM 或 vNIC\)。If VrssEnabled is True, then the feature is enabled for this Hyper-V Virtual Switch port (i.e., for this VM or vNIC).

若要設定切換連接埠 vRSS 設定,您可以使用將其中一項下列 Windows PowerShell 命令VrssEnabledRequested欄位設,則為 True:To configure the switch port vRSS settings, you can use one of the following Windows PowerShell command to set the VrssEnabledRequested field to True:

Set-VMNetworkAdapter <vm-name> -VrssEnabled $TRUE

Set-VMNetworkAdapter -ManagementOS -VrssEnabled $TRUE

vRSS 主機 vNICs Vm 中vRSS in VMs and host vNICs

您可以設定 vRSS 虛擬機器 (VMs) 和主機 vNICs 中,使用下列的 Windows PowerShell 命令的原生 RSS 使用相同的命令。You can configure vRSS settings in virtual machines (VMs) and host vNICs by using the following Windows PowerShell command, which is the same command used for native RSS. 這也是 RSS 可 vNICs 主機的方式。This is also the way RSS can be enabled on host vNICs.

Set-NetAdapterRss

您可以使用下列的 Windows PowerShell 命令檢視 vRSS 設定。You can view the vRSS settings by using the following Windows PowerShell command.

Get-NetAdapterRSS

注意

設定 VM 中的設定檔不會影響排程工作。Setting the profile inside the VM does not impact the scheduling of the work. Hyper\ HYPER-V 讓所有的排程決策和忽略 VM 中的設定檔。Hyper-V makes all the scheduling decisions and ignores the profile inside the VM.

停用 vRSSDisable vRSS

您可以使用 Windows PowerShell 命令來停用的任何之前所述設定 vRSS 停用。You can disable vRSS by using Windows PowerShell commands to disable any of the previously mentioned settings.

  1. 您可以關閉 VMQ 實體而或 VM。You can disable VMQ for the physical NIC or the VM.

警告

停用實體 VMQ NIC 嚴重會影響您 Hyper\ HYPER-V 主機的能力來處理輸入封包。Disabling VMQ on the physical NIC severely impacts the ability of your Hyper-V host to handle incoming packets.

  1. 您可以使用下列的 Windows PowerShell 命令 Hyper\ HYPER-V 主機上停用 vRSS vm Hyper\ HYPER-V Virtual 切換連接埠。You can disable vRSS for a VM on the Hyper-V Virtual Switch port by using the following Windows PowerShell command on the Hyper-V host.

    設定 VMNetworkAdapter < vm 名稱 > VrssEnabled $FALSESet-VMNetworkAdapter -VrssEnabled $FALSE

  2. 使用下列命令 PowerShell Hyper\ HYPER-V 主機上,您可以停用 vRSS 的主機但 vNIC Hyper\ HYPER-V Virtual 切換連接埠。You can disable vRSS for a host vNIC on the Hyper-V Virtual Switch port by using the following PowerShell command on the Hyper-V host.

    設定 VMNetworkAdapter-ManagementOS VrssEnabled $FALSESet-VMNetworkAdapter -ManagementOS -VrssEnabled $FALSE

  3. 您可以停用 VM 中的 RSS (or host vNIC) 使用下列 Windows PowerShell 命令 VM 中的 \ (或 host\)You can disable RSS in the VM (or host vNIC) by using the following Windows PowerShell command inside the VM (or on the host)

    停用-NetAdapterRSS *Disable-NetAdapterRSS *