The Selected Nic Type Is Not Supported Please Edit the Virtual Machine Configuration and Try Again

Hyper-V's Virtual network adapters are the windows that your virtual machines — and sometimes your management operating system — use to communicate with the residue of the world. You lot tin can perform basic adapter manipulation for virtual machines using the GUI. Advanced functionality, and anything to do with virtual adapters in the direction operating system, require PowerShell.

Virtual Adapters Do Non Change Ethernet and TCP/IP Behavior

Earlier I go into the how-to, I want to take a very brief detour to accost probably 80% or more of the questions that I see involving virtual network adapters. Hyper-V'south virtual network adapters exhibit the same logical behavior as a physical network adapter. Guest operating systems treat them no differently than physical adapters. If yous're about to post a annotate or question claiming that Hyper-5 is stopping your PING or blocking your web traffic, don't. Y'all need to understand the Hyper-Five virtual switch. You need to understand Ethernet and TCP/IP.

Remember that guest operating systems come with firewalls. Remember that virtual network adapters can be assigned, or not be assigned, to VLANs. The direction operating arrangement's firewall does non impact anything happening on any physical adapter hosting a Hyper-V virtual switch nor does information technology impact any virtual network adapter except those assigned to the management operating system. If that doesn't brand sense to you, and then yous do not understand the Hyper-5 virtual switch.

2 Types of Hyper-V Virtual Network Adapters

Hyper-V provides 2 types of virtual network adapters.

  • Legacy Network Adapter: The legacy network adapter is only available for generation one virtual machines. It is an emulated device, meaning that Hyper-5 creates a complete digital reconstruction of a common, basic concrete network adapter. This adapter type exists for those situations in which in that location is no way for a item guest to load the standard Hyper-Five network adapter. In most cases, this is for PXE booting Generation 1 virtual machines. Any other cases would involve unsupported operating systems that have no driver for the standard virtual adapter. This adapter is locked at nearly 100Mbps speed and requires a comparatively high amount of CPU processing, and so avoid using it in situations that exercise not strictly require it.
  • [Synthetic] Network Adapter: Unremarkably only named as a "Network Adapter", Hyper-V'southward synthetic network adapter is a connectedness between Hyper-Five'south VMBus or an IOV Virtual Role and the virtual car or management operating system. It is essentially faster than the legacy network adapter.

Employ PowerShell to Create a Virtual Network Adapter for a Invitee Operating System

Use Add-VMNetworkAdapter to create a virtual network adapter. I practise not know why this cmdlet does not use the New verb. In 2012 R2 and before, the virtual machine must be Off to add a new virtual adapter.

Add-VMNetworkAdapter -VMName svtest

The above will create a virtual network adapter named "Virtual Adapter", attach it to the virtual automobile named "svtest", and exit information technology disconnected.

During adapter cosmos, y'all accept the choice to name the adapter, set a static MAC address, specify that it is the legacy type, connect it to a virtual switch, and assign information technology to a resources pool. The following example shows some of these options:

Add-VMNetworkAdapter -VMName svtest -IsLegacy $true -Name 'LegacyInVLAN40' -SwitchName vSwitch

Fifty-fifty though I gave the adapter a name that includes a VLAN, it's just a name. You cannot utilise Add-VMNetworkAdapter to specify a VLAN. That's a different cmdlet, which I will evidence later in this post.

Tip : When adding a virtual adapter to a arrangement that already has a virtual adapter, override the Proper name. This makes information technology much easier to work with the adapter later on.

You can add a virtual adapter to many virtual machines at once:

Add together-VMNetworkAdapter -VMName vm1, vm2, vm3 -Name BulkAddedAdapter

Use PowerShell to Display Virtual Machines' Virtual Adapters

Utilize Go-VMNetworkAdapter to view virtual adapters. This cmdlet always has some required parameters, so information technology cannot be used alone.

To think the adapter(s) for a specific virtual machine:

Get-VMNetworkAdapter -VMName svtest

When run against the virtual automobile that I used the previous examples on, this is the output:

Name            IsManagementOs VMName SwitchName MacAddress   Status IPAddresses ----            -------------- ------ ---------- ----------   ------ ----------- Network Adapter False          svtest vSwitch    00155D197706        {} Network Adapter False          svtest            000000000000        {} LegacyInVLAN40  False          svtest vSwitch    000000000000        {}

If the virtual car were on, the MacAddress fields would exist populated. If the virtual machine were on and the invitee KVP exchange service is running/functional, the IPAddresses would be populated. What you don't see is that the last adapter is a legacy adapter. You can use -IsLegacy to filter for synthetic adapters (with $faux) or legacy adapters (with $truthful):

Become-VMNetworkAdapter -VMName svtest -IsLegacy $true

Y'all can also apply formatting to see all/other properties. Our introductory article on PowerShell includes a section on formatting.

View all virtual adapters on all virtual machines:

Get-VMNetworkAdapter -VMName *

Y'all can as well apply a partial friction match in the VMName field, ex "svweb*".

View all virtual adapters on the host, including those for the management operating organisation:

Get-VMNetworkAdapter -All

Everything that we've shown y'all to this point displays the virtual network adapter(south) on the screen. The output of Go-VMNetworkAdapter is a truthful object. It tin exist passed via the pipeline to other cmdlets, such as Remove-VMNetworkAdapter. Our introductory PowerShell article discusses the pipeline.

Use PowerShell to Remove a Virtual Machine's Virtual Network Adapter

Not surprisingly, Remove-VMNetworkAdapter is the cmdlet to remove a virtual adapter. Be aware that this permanently deletes the virtual adapter! Fifty-fifty if you lot afterward recreate it with the aforementioned settings, information technology volition have a unlike hardware signature than the one that you removed. If you just want to unplug an adapter from a virtual switch, meet the section on Disconnect-VMNetworkAdapter below. The virtual machine must be Off to remove a virtual network adapter.

Remove an adapter from a virtual car past name:

Remove-VMNetworkAdapter -VMName svtest -Name LegacyInVLAN40

Nosotros have a little problem on the virtual machine named "svtest" from our previous operations: two virtual network adapters with the same name. The best way to deal with this problem is to use Get-VMNetworkAdapter to observe something different almost the adapters. From in that location, use the pipeline to remove the unwanted adapter. I have two options in this case. First, the unwanted adapter is not connected to a virtual switch. 2nd, the unwanted adapter doesn't have a MAC address. If neither of those clues are helpful, I could turn the virtual machine on and await for the IPAddresses field to populate. I could then decide the MAC address of the adapter to remove and use that.

To remove all virtual adapters from a virtual machine that aren't connected to a switch:

Become-VMNetworkAdapter -VMName svtest | ? SwitchName -eq $cipher | Remove-VMNetworkAdapter

The "?" is an alias for Where-Object. That was also explained in our introductory article, but the simple caption is that we are retrieving all virtual adapters on that particular virtual machine and so filtering to only the adapters that don't accept a virtual switch.

Tip : The Remove-VMNetworkAdapter cmdlet has a -SwitchName parameter that allows you to easily remove adapters connected to a particular virtual switch. That parameter cannot be cipher or empty, then the higher up is the only way to remove disconnected virtual adapters.

To remove a virtual adapter from a virtual auto past MAC address:

Go-VMNetworkAdapter -VMName svtest | ? MacAddress -eq '000000000000' | Remove-VMNetworkAdapter

Remove all virtual network adapters from a virtual machine:

Remove-VMNetworkAdapter -VMName svtest

Use PowerShell to (Dis)Connect a Virtual Network Adapter To/From a Virtual Switch

The Connect-VMNetworkAdapter and Disconnect-VMNetworkAdapter cmdlets can exist used to connect and disconnect virtual machines' virtual network adapters to/from virtual switches. The virtual machine can exist On or Off when using these cmdlets.

The most common way to utilize both of these cmdlets is by virtual machine name, since most virtual machines utilise only a single adapter. To connect all of the adapters on a specific virtual automobile to a specific virtual switch:

Connect-VMNetworkAdapter -VMName svtest -SwitchName vSwitch

To disconnect them again:

Disconnect-VMNetworkAdapter -VMName svtest

You lot can use the pipeline for more granular control:

Get-VMNetworkAdapter -VMName svtest | ? MacAddress -eq '00155D197706' | Disconnect-VMNetworkAdapter

Use PowerShell to Add a Virtual Network Adapter to the Management Operating Arrangement

Use Add together-VMNetworkAdapter to create a virtual network adapter for the management operating arrangement, much similar you lot do for virtual machines.

Add together-VMNetworkAdapter -ManagementOS

The above volition add together a virtual adapter to the management operating system on the get-go virtual switch that information technology finds. The newly created adapter will have the aforementioned name as the virtual switch when using the *-VMNetworkAdapter cmdlets. In all other locations and tools, information technology will exist chosen vEthernet (< name_of_the_virtual_switch >).

To create a virtual network adapter in the direction operating system with a more descriptive name:

Add-VMNetworkAdapter -ManagementOS -Proper name DemoAdapter -SwitchName vSwitch

Tip : Virtual adapters in the direction operating system must always be continued to a virtual switch, and they must remain connected to the same virtual switch from cradle to grave. There is no way to disconnect them or reconnect them to a different virtual switch.

Use PowerShell to Remove a Virtual Network Adapter from the Management Operating System

Remove-VMNetworkAdapter is too used to remove a virtual adapter from the management operating arrangement. Just as it does with a virtual machine, this cmdlet permanently deletes the virtual adapter

Remove-VMNetworkAdapter -ManagementOs -Proper noun DemoAdapter

Use PowerShell to Modify a Virtual Adapter

Gear up-VMNetworkAdapter can command the following settings for virtual adapters connected to either a virtual machine or the management operating system:

  • DHCP Guard: When gear up to on, this virtual network adapter will never receive any Discover or Request frames in a DHCP DORA conversation. That way, if the guest operating organisation is running a DHCP server, it will never result IP addresses. This is mostly useful in hosting environments, but tin can be put into action anywhere that the Hyper-V ambassador doesn't really trust the ambassador of the invitee operating organisation.
  • Dynamic/Static MAC Accost: Instructs the network adapter to apply a MAC address generated past its host or 1 specified by y'all. Windows guests should be fine with a dynamic MAC address, just Linux guests will require a static MAC address if they will ever be Live Migrated.
  • Maximum IPSec Offload Associations: If you lot're using IPSec and you want to prevent a virtual adapter from offloading too many IPSec associations, this cmdlet has yous covered.
  • Enable or disable 802.1p tagging: This feature is mostly useful in hosted or other cases when yous may non be able to trust the administrator of the guest operating arrangement. In order to have any effect, your concrete network must be processing 802.1p tags. If 802.1p tagging is enabled, then the guest operating system tin transmit tags with an 802.1p priority gear up. If tagging is disabled, Hyper-V will reset the 802.1p department of all Ethernet frames leaving this adapter to 0.
  • SR-IOV settings. If your virtual switch and hardware is IOV-enabled, use this cmdlet to control the moderation method and weight of an individual virtual network adapter. If you lot want to preclude a virtual adapter from always using a Virtual Role, you can ready its -IovWeight parameter to 0.
  • MAC addressing spoofing: If disabled, then the guest operating arrangement administrator will non exist able to utilize in-invitee tools to override the MAC address of the adapter. Y'all'll want this off if the guest operating system is employing network load balancing.
  • Hyper-V QoS Settings: this cmdlet controls all of the Hyper-Five QoS settings for virtual adapters.
  • Cluster monitoring: By default, the cluster will Live Drift the virtual car if it detects that 1 of its adapters has lost network connectivity. You can disable this protection with this cmdlet.
  • Port mirroring: You can set Hyper-5 to mirror the traffic of one virtual network adapter to another. I've heard complaints that this characteristic does not actually work, only I've never tested information technology myself.
  • Router guard: When enabled, the virtual adapter will not be able to ship out Router Advert or Redirection packets. This will mostly prevent the guest operating system from establishing itself as a rogue router. Packets directed specifically to its MAC address for routing will still laissez passer, even so.
  • Storm protection: limits the per-second outbound menstruation rate of an adapter.
  • VMQ weighting: Yous can establish the hierarchy of this virtual adapter when registering for a queue, or you tin can set up VmqWeight to 0 to prevent it from receiving a queue at all.
  • Teaming: If you'd like to team virtual network adapters inside the guest, you lot'll demand to enable the characteristic at the virtual adapter level showtime. This cmdlet can do that.

The above list isn't quite exhaustive, but hits the most mutual and some of the less common items. I linked the aid folio for the cmdlet at the very top of this section so that you can discover many of these parameters easily. I'chiliad non going to show you everything possible. I'll demonstrate a few items.

Setting Hyper-V Virtual Adapter Quality of Service

Both the GUI and PowerShell are a chip clumsy for setting network quality of service, but overall, PowerShell is better. It's also the simply way to set QoS for virtual adapters in the direction operating system.

If you've gotten this far, then y'all should already know how to select a virtual network adapter past -VMName or -ManagementOs and by -Proper name. Yous should also know how to use pipelining to select a virtual adapter by other criteria, such as its MAC accost. I will simply be showing such things incidentally in this section.

First, you need to know what QoS mode your virtual switch is in:

Get-VMSwitch -Name vSwitch | select BandwidthReservationMode

If it is Weight, and then you can fix the -MinimumBandwidthWeight parameter on its virtual adapters. If it is Accented, then you can gear up the -MinimumBandwidthAbsolute parameter instead.

The weight style is a percentage. To set a virtual adapter then that it can reserve up to xx% of available bandwidth:

Set-VMNetworkAdapter -ManagementOS -Name LiveMigration -MinimumBandwidthWeight xx

If you employ Absolute, specify -MinimumBandwidthAbsolute as a numeric value with the minimum number of bits per second. According to the documentation, the number that you lot supply volition be rounded to the nearest multiple of 8 and should exist greater than 100Mbps.

For either manner, the upper QoS limit is specified in bits. You cannot fix a percentage limit. I would recommend using the PowerShell multipliers. To restrict all adapters on a virtual machine to 250Mbps (separately):

Gear up-VMNetworkAdapter -VMName svtest -MaximumBandwidth 250Mb

Statically Assigning an Automatically Generated MAC Address to a Virtual Network Adapter

This is a little fox I utilize with my Linux virtual machines. I showtime turn them on then that they are automatically assigned a MAC address past the host. Then, I shut them off and run the post-obit:

Go-VMNetworkAdapter -VMName svtest | % { Set-VMNetworkAdapter -VMNetworkAdapter $_ -StaticMacAddress $_.MacAddress }

Whatever MAC was dynamically assigned is now the permanently assigned static MAC address.

Apply PowerShell to Set a Virtual Network Adapter's VLAN

Utilize Set-VMNetworkAdapterVlan to command the VLAN for a virtual network adapter. I'1000 again going to assume that you lot read the above and know how to select a virtual network adapter with -ManagementOs and -Name or past -VMName and, if necessary, pipelining and ?/where.

Assign a virtual network adapter to a specific VLAN:

Set-VMNetworkAdapterVlan -VMName svtest -Access -VlanId 42

Remove a virtual adapter from all VLANs:

Gear up-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName Management -Untagged

Warning : Never assign a VLAN ID of 0. If the cmdlet were ameliorate designed, it would generate an error when you effort, considering the only valid VLAN IDs are from one-4096. VLAN ID 0 is undefined — an all-zip VLAN tag is only used across trunk ports and is treated as the native or default VLAN on devices that back up it. Hyper-Five does not know how to handle a virtual network adapter with a 0 VLAN ID and traffic will not menses.

I'm non going to demonstrate the Promiscuous, Isolated, and Customs mode settings, generally because I recall that 99% of the people that endeavour to employ them don't understand what they do and don't actually have a use example for their true purposes. A Hyper-Five network adapter in promiscuous mode does non capture frames headed to other network adapters. These modes are used in extended VLANs only. If yous empathize what those are and have a demand for them, run Get-Help Set-VMNetworkAdapterVlan -Examples to run into how to use the related parameters.

Use PowerShell to Rename a Virtual Network Adapter

Merely PowerShell tin can be used to rename a virtual network adapter, merely the selected name will show upwards in most GUI tools that can see the adapter. Equally with the previous two sections, I'm non going to reiterate how to select the adapter that you lot want to change.

Rename-VMNetworkAdapter -ManagementOs -Name Cluster -NewName ClusterCommunications

Utilize Hyper-V Manager/Failover Cluster Manager to Add together a Virtual Network Adapter

These GUI tools tin can only be used to add together adapters to a virtual machine. You lot must use PowerShell to add a virtual network adapter to the direction operating system. The guest must exist Off to add an adapter.

  1. In either tool, right-click a virtual machine and click Settings. You must use Failover Cluster Manager for clustered virtual machines.
  2. The first screen that opens should always be the Add together Hardware tab. Select that tab on the left if necessary.
  3. Highlight Network Adapter or Legacy Network Adapter (generation 1 VMs only). Click Add.
  4. You will exist viewing the property page for your new adapter. Information technology will non actually be created until you lot click OK or Utilise. Click Remove or Cancel if you don't desire to add together information technology.

Add Virtual Network Adapter

Add together Virtual Network Adapter

Use Hyper-5 Manager/Failover Cluster Manager to Modify or Remove a Virtual Network Adapter

  1. In either tool, right-click a virtual machine and click Settings. You must use Failover Cluster Manager for clustered virtual machines.
  2. On the left, you'll meet the virtual network adapter(s). Past default, they're all named "Network Adapter" or "Legacy Network Adapter", although they might have been renamed. Wait for the icon.
  3. The primary settings are on the first folio that y'all land on. If yous wish to delete the adapter, click Remove. Upon clicking OK or Apply, this removal is permanent! Other settings tin be reached past expanding the detail by click the small + icon adjacent to the adapter on the left. All screens are shown below.

Main Property Page for A Virtual Network Adapter

Principal Property Page for A Virtual Network Adapter

Virtual Network Adapter Acceleration Page

Virtual Network Adapter Acceleration Page

Virtual Network Adapter Advanced Settings

Virtual Network Adapter Advanced Settings

Most of these settings are very well-described in the dialogs. Yous tin can also refer to the PowerShell entries above, as these are graphical equivalents of those settings (a handful of items can only be prepare in PowerShell).

If your virtual switch is in Weight QoS mode, I recommend only using PowerShell to make adjustments. The dialog is worded simply for Absolute mode and you will typically be unable to use it to set the minimum. I more than strongly recommend fugitive setting QoS on individual VM network adapters at all. It's rarely necessary.

If you don't like PowerShell much but need to do majority settings, y'all can use the GUI to configure a model adapter and and so, with a trivial tinkering, employ PowerShell's pipeline to massively distribute those settings to other adapters. I'll exit that for your exploration (there's actually no one-size-fits all method or I'd prove it).

riddlekelp1963.blogspot.com

Source: https://www.altaro.com/hyper-v/work-hyper-v-virtual-network-adapters/

Related Posts

0 Response to "The Selected Nic Type Is Not Supported Please Edit the Virtual Machine Configuration and Try Again"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel