question

AbuSalehMohammadSharifulHoque-2514 avatar image
0 Votes"
AbuSalehMohammadSharifulHoque-2514 asked AjayMahajan-4387 commented

Hyper-v windows 10 1809 automatically creates and deletes virtual network cards

I am using default install of hyper-v in windows 10 1809. Just created a nat switch of type internal. Then created a vm which has a vnic that is connected with this switch. By default I have three nics in my windows host. Two created by windows and one nat nic created by me. But everytime I start a vm, windows host automatically creates at least 5 another vnic out of nowhere. These vnic are there even if I turn down the vm. But if i restart the windows host then all the vnics are gone. We have only three vnics again. But this behavior again repeated as soon as I start a vm again. Out of idea what is creating those vm in the first place and why are they disappearing after a reboot. Let me know if someone needs some kind of log from my machine. Regards

windows-10-hyperv
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jiayaozhu-MSFT avatar image
0 Votes"
jiayaozhu-MSFT answered

Hello:

Thank you for your visit!

According to your descriptions, I would like to ask you some questions first:

The vnic you mentioned is the vnic normally generated by the internal virtual switch? Or something else that you cannot identify?

In addition, if possible, please provide us screenshots of all vnics on the host's NIC and screenshots of all virtual switches in the Hyper V manager, so that we can further troubleshoot the problem for you.

You can enter ncpa.cpl in the bottom left corner of the Windows interface to view the physical network card information on the host and the virtual network cards that the physical NICs have generated, or you can try the following steps to view this information:

1.Run the command of set devmgr_show_nonpresent_devices=1 and press ENTER.

2.In Device Manager, click VIEW then SHOW HIDDEN DEVICES.

3.Expand NETWORK ADAPTERS, Check if there are any grayed out NICs

Thank you for your time!

Best wishes
Joan


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AbuSalehMohammadSharifulHoque-2514 avatar image
0 Votes"
AbuSalehMohammadSharifulHoque-2514 answered

@jiayaozhu-MSFT

Two screenshot (ncpa.cpl and devmgmt) just after installing hyper-v

83383-01-default-network-cards-after-hyperv-installation.png


83338-02-default-network-cards-in-device-manager-after-h.png


Then when I start a VM - lots of unnecessary card created by hyper-V (this VM just using default-switch; created by hyper-v)

83433-03-after-starting-a-vm-more-vnics.png

To get rid of these network cards; I need to restart the windows 10 machine; then they are gone. But they re-appears as soon as I start a vm.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AbuSalehMohammadSharifulHoque-2514 avatar image
0 Votes"
AbuSalehMohammadSharifulHoque-2514 answered

And the virtual switch settings.

83405-04-virtual-switch.png



04-virtual-switch.png (116.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XiaoweiHe-MSFT avatar image
0 Votes"
XiaoweiHe-MSFT answered XiaoweiHe-MSFT edited

Hi,

According to your description, seems your issue is that there are multiple Hyper V default switches in the Network settings.

You may try if re-install Hyper-V role on the machine could fix the issue. As I tested in my lab, on Windows 10 Hyper V, when after reinstalling the Hyper V role, the original VMs will show up automatically. While it's still suggested to backup the VM before reinstallation.

Below is the link about a similar issue as yours, for your reference:

https://superuser.com/questions/1282014/how-to-remove-all-the-vethernet-default-switch-once-and-for-all

(Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.)


Thanks for your time!
Best Regards,
Anne


If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AjayMahajan-4387 avatar image
0 Votes"
AjayMahajan-4387 answered AjayMahajan-4387 commented

I have also seen this issue above 1809 versions where Hyper-V was unstable and for me, I had to manually create "Default Switch" with internal adapter to use Hyper-V.

you should be able to create and it will stop creating/deleting NICs, you should be able to use it Hyper-V afterwards normally.

Thanks.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Is there any commands to create "Default Switch"?

As far as I know default switch is created by windows itself; no commands available for a user to create it by themselves.

//

0 Votes 0 ·
AjayMahajan-4387 avatar image AjayMahajan-4387 AbuSalehMohammadSharifulHoque-2514 ·

Hi this link would help you, you can give the name as same "Default Switch"

New-VMSwitch -name "Default Switch"-SwitchType Internal (you would need local admin rights to create this switch)

[https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/get-started/create-a-virtual-switch-for-hyper-v-virtual-machines][1]

Thanks

0 Votes 0 ·

Hi,

"Default switch" is already created and in win10 you cannot change default-switch.

So your command is useless in my scenario.

Look at my pictures, default switch is already created.

0 Votes 0 ·
Show more comments