none
Can't remove failed virtual switch from Hyper-V's Virtual Switch Manager RRS feed

  • السؤال

  • Hello,

    We have a virtual switch setup in the Virtual Switch Manager and the adapter has been deleted by mistake using the "Change Adapter Settings..." of the Network And Sharing Center. Now, obiviously the switch is in a failed state and we just want to remove it from the list.

    The Hyper-V console and the PowerShell command ("remove-vmswitch -Name "VSITCH01" - force") both returnsthe error below when removing the switch, because obivously, it can't find the adapter. How do I force remove the switch from the list?

    remove-vmswitch : Failed while removing virtual Ethernet switch.
    Failed to connect Ethernet switch port (switch name = '49ACD343-5D84-40F8-9B87-70F34F820AF1', port name =
    '16D596BE-F31A-43F4-8DD7-7A54FB9818C3', adapter GUID = '{045B0D69-2904-4C11-88C2-22EB4D67DC05}'): The system cannot
    find the file specified. (0x80070002).
    Ethernet port '{045B0D69-2904-4C11-88C2-22EB4D67DC05}' unbind failed: One or more arguments are invalid (0x80070057).
    A parameter that is not valid was passed to the operation.
    At line:1 char:1
    + remove-vmswitch -Name "VSWITCH01" -force
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [Remove-VMSwitch], Virtuali
       zationOperationFailedException
        + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.RemoveVMSwitchCommand

    Thank you!

    24/جمادى الأولى/1436 05:05 م

الإجابات

  • Thank you for your reply. I have deleted it from there but it was still appearing in the list. I made a registry-wide search and found the switch configuration is stored in "HKLM\SYSTEM\CurrentControlSet\Services\VMSMP\Parameters\SwitchList". I deleted the entry then rebooted and now the switch is gone
    • تم وضع علامة كإجابة بواسطة sixstorm1 24/جمادى الأولى/1436 08:35 م
    24/جمادى الأولى/1436 08:35 م

جميع الردود

  • try to delete it from registry.I have tried this on my test lab and it worked.I have mentioned the registry key ,but netowork connect id({4D36E972-E325-11CE-BFC1-08002BE10318})may differ

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\{388468EB-88C9-4D4C-AD2D-BFF07FC9995A}\Connection


    Darshana Jayathilake

    24/جمادى الأولى/1436 05:19 م
  • Thank you for your reply. I have deleted it from there but it was still appearing in the list. I made a registry-wide search and found the switch configuration is stored in "HKLM\SYSTEM\CurrentControlSet\Services\VMSMP\Parameters\SwitchList". I deleted the entry then rebooted and now the switch is gone
    • تم وضع علامة كإجابة بواسطة sixstorm1 24/جمادى الأولى/1436 08:35 م
    24/جمادى الأولى/1436 08:35 م
  • Hi Sir,

    Thanks for your sharing  , it must be very useful to someone who is running into the same issue .

    Best Regards,

    Elton Ji


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com .

    • تم الاقتراح كإجابة بواسطة Nayan Parmar 04/رجب/1438 08:15 ص
    • تم إلغاء اقتراح كإجابة بواسطة Nayan Parmar 04/رجب/1438 08:15 ص
    02/جمادى الثانية/1436 09:04 ص
    المشرف
  • Hi 

    Try Deleting the Bridge Adapter from "Control Panel>Network and Internet>Network Connections"

    it worked for me , Hope same works for you.

    Thank You.

    04/رجب/1438 08:17 ص
  • Thankyou!!!!!

    This helped me resolve an issue with not being able to remote debug from Visual Studio and also ping internet from side container.

    I believe issue started when i deleted a virtual adapter outside of Hyper-V manager


    PTSS

    16/شوال/1438 06:52 ص
  • Thanks for the advice, years later and it worked for me!
    23/شوال/1440 12:25 م