none
Cannot add Intel Associated network card to virtual network

    Question

  • Hi,

    The problem happens on Hyper-V installed on a Windows 2008 Datacenter Core installation.

    This server has 2 NICs + 2 Dual Port NICs that are teamed 2 by 2 using Intel ProSet and drivers utilities (Switch Fault Tolerance).
    Configuration is OK on the host and networks works fine.

    The problem is that when I try to use the NIC associations in a virtual network I get the following errors :

    Using Virtual Machine Manager :
    Unknown error (0x8005)

    Using Hyper-V Manager MMC Snap-in :
    "Echec du commutateur d'installation. Le commutateur n'a pas pu se lier à ... car il est déjà lié à un autre commutateur."
    (Switch installation failure. The switch cannot link to ... because it is already linked to another switch"

    Note that there is no existing virtual network when I proceed ...

    Must I anderstand that there is absolutly no way to get switch redondancy to work with Hyper-V ??


    Beebop
    Friday, December 19, 2008 4:58 PM

Answers

  • You see this error message because the switch protocol is already enabled on that NIC.  It's enabled either because there is already a virtual network using that adapter or because something or someone enabled it incorrectly.  If you already have a virtual network using that NIC, you can't use that NIC on two virtual networks.

    Delete all your virtual networks.

    Close the Hyper-V UI.

    run "ncpa.cpl" and disable the virtual switch protocol on all NICs (the "real" NICs and the teamed interfaces).

    close "ncpa.cpl".

    Re-open the Hyper-V UI and try to create the virtual network again.

    Close the Hyper-V UI.

    run "ncpa.cpl" again and you should see a new Hyper-V virtual NIC -- verify the bindings are correct on that NIC.   Verify that *only* the switch protocol is bound to the teamed NIC -- don't change those bindings!


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, December 21, 2008 2:57 PM
  • I finaly did as follow :

    - format hyper-v host and install the full version of Win 2008
    - install hyper-v
    - made the first association, create a virtual network, it works !!!
    - made the second association, create the second virtual network, get the error :-((
    - go to network connections, disable virtual switch protocol on the association, create the second virtual network, it works !!!


    So I think I can now resume the issue :

    When you create a network card association (and virtual network already exists ?), virtual switch protocol is activated on this association so hyperv considere it's already attached to a virtual switch . The problem is how to disable it in command line mode when you are on a minimal installation of Windows ..... I've modified many registry keys without getting any result.



    Beebop
    Tuesday, December 23, 2008 1:30 PM

All replies

  • Simple answer, Hyper-v currently doesn't support software NIC teaming.



    I've personally been struggling to make NIC teaming work to provide network redundancy but couldn't make it to work.

    There is another thread that talks about this issue and looks like someone found a work around but that didn't work for me.

    http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/5af859d0-d26f-4125-9f24-a52378933d80/
     


    I am currently trying out some ideas of providing some level of redundancy at the switch level and multiple NICs

    • Marked as answer by Vincent HuModerator Monday, December 22, 2008 6:29 AM
    • Unmarked as answer by Beebop_FR Monday, December 22, 2008 10:26 AM
    Friday, December 19, 2008 7:03 PM
  • You see this error message because the switch protocol is already enabled on that NIC.  It's enabled either because there is already a virtual network using that adapter or because something or someone enabled it incorrectly.  If you already have a virtual network using that NIC, you can't use that NIC on two virtual networks.

    Delete all your virtual networks.

    Close the Hyper-V UI.

    run "ncpa.cpl" and disable the virtual switch protocol on all NICs (the "real" NICs and the teamed interfaces).

    close "ncpa.cpl".

    Re-open the Hyper-V UI and try to create the virtual network again.

    Close the Hyper-V UI.

    run "ncpa.cpl" again and you should see a new Hyper-V virtual NIC -- verify the bindings are correct on that NIC.   Verify that *only* the switch protocol is bound to the teamed NIC -- don't change those bindings!


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, December 21, 2008 2:57 PM
  • Keith,

    I cannot run "ncpa.cpl" on the hyper-v host because it is a minimal installation of Windows Server. I try to do this trough the registry.
    I have removed the 'VMSP' term from the following keys (wich correspond to my teamed cards, other cards didn't contains VMSP) :
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0008\Linkage\UpperBind
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0009\Linkage\UpperBind

    I reboot the machine and I tried to create a virtual network again.
    It did'nt worked. I got the same error.

    Actually I removed all teams and I cannot add any network cards to hyperv virtual network. I always got the error 'already linked to another switch'.

    I think it's going to drive me crazy...


    Beebop
    Monday, December 22, 2008 10:35 AM
  • Can you delete your c:\windows\inf\setupapi.app.log, try it again (after you've cleared the bindings) and attach the setupapi.app.log?

    It's important to delete (perhaps save it somewhere first) setupapi.app.log because it can get very big.



    This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, December 23, 2008 12:09 AM
  • The only way to make it work is to revert back to Windows default drivers. I always get the error when using Intel provided drivers.

    I will try again and send you the fresh setupapi.app.log file.

    Beebop
    Tuesday, December 23, 2008 8:56 AM
  • I finaly did as follow :

    - format hyper-v host and install the full version of Win 2008
    - install hyper-v
    - made the first association, create a virtual network, it works !!!
    - made the second association, create the second virtual network, get the error :-((
    - go to network connections, disable virtual switch protocol on the association, create the second virtual network, it works !!!


    So I think I can now resume the issue :

    When you create a network card association (and virtual network already exists ?), virtual switch protocol is activated on this association so hyperv considere it's already attached to a virtual switch . The problem is how to disable it in command line mode when you are on a minimal installation of Windows ..... I've modified many registry keys without getting any result.



    Beebop
    Tuesday, December 23, 2008 1:30 PM
  • When you say "made the second association", are you trying to use the same NIC interface on two virtual networks?  That won't work.

    If you create a virtual network with a "teamed" interface or a NIC in a team, you can't create a second virtual network using that teamed interface or any NIC in that team.

    I don't think modifying the registy is equivalent to disabling the binding in ncpa.cpl.

    The following script will help you scrub *all* virtual networks and removes the virtual switch protocol binding on all NICs -- it's equivalent to using Virtual Network Manager to delete all virtual networks and then using ncpa.cpl to remove the virtual switch bindings.  I wouldn't recommend running it remotely because it will tear down your network stack but it should restore it once completed.

    /*
    Copyright (c) Microsoft Corporation
     
    Module Name:
     
        nvspscrub.js
     
    */


    //
    // VirtualSwitchManagementService object.  Logical wrapper class for Switch Management Service
    //
    function
    VirtualSwitchManagementService(
        Server,
        User,
        Password
        )
    {
        //
        // Define instance fields.
        //   
        this.m_VirtualizationNamespace  = null;
       
        this.m_VirtualSwitchManagementService = null;
           

        //
        // Instance methods
        //       
       
        VirtualSwitchManagementService.prototype.DeleteSwitch =
        function(
            VirtualSwitch
            )
           
        /*++

        Description:

            Deletes a virtual switch
           
        Arguments:

            VirtualSwitch - Msvm_VirtualSwitch object to delete

        Return Value:

            SWbemMethod.OutParameters object.

        --*/
       
        {
            var methodName = "DeleteSwitch";

            var inParams = this.m_VirtualSwitchManagementService.Methods_(methodName).inParameters.SpawnInstance_();

            inParams.VirtualSwitch = VirtualSwitch.Path_.Path;
           
            return this.m_VirtualSwitchManagementService.ExecMethod_(methodName, inParams);
        }
       
       
        VirtualSwitchManagementService.prototype.DeleteInternalEthernetPort =
        function(
            InternalEthernetPort
            )

        /*++

        Description:

            Deletes an internal ethernet port
           
        Arguments:

            InternalEthernetPort - Msvm_InternalEthernetPort to delete
           
        Return Value:

            SWbemMethod.OutParameters object.

        --*/

        {
            var methodName = "DeleteInternalEthernetPort";

            var inParams = this.m_VirtualSwitchManagementService.Methods_(methodName).inParameters.SpawnInstance_();
           
            inParams.InternalEthernetPort = InternalEthernetPort.Path_.Path;
           
            return this.m_VirtualSwitchManagementService.ExecMethod_(methodName, inParams);
        }
       
        VirtualSwitchManagementService.prototype.UnbindExternalEthernetPort =
        function(
            ExternalEthernetPort
            )

        /*++

        Description:

            Unbinds an external ethernet port from the virtual network subsystem.  Usually this method
             won't be called directly
           
        Arguments:

            SwitchPort - Msvm_ExternalEthernetPort to unbind.

        Return Value:

            SWbemMethod.OutParameters object.

        --*/

        {
            var methodName = "UnbindExternalEthernetPort";

            var inParams = this.m_VirtualSwitchManagementService.Methods_(methodName).inParameters.SpawnInstance_();

            inParams.ExternalEthernetPort = ExternalEthernetPort.Path_.Path;
           
            return this.m_VirtualSwitchManagementService.ExecMethod_(methodName, inParams);
        }
       
        //
        // Utility functions
        //
       
        VirtualSwitchManagementService.prototype.WaitForNetworkJob =
        function(
            OutParams
            )

        /*++

        Description:

            WMI calls will exit with some type of return result.  Some will require
            a little more processing before they are complete. This handles those
            states after a wmi call.

        Arguments:

            OutParams - the parameters returned by the wmi call.

        Return Value:

            Status code

        --*/

        {
            if (OutParams.ReturnValue == 4096)
            {
                var jobStateStarting        = 3;
                var jobStateRunning         = 4;
                var jobStateCompleted       = 7;
       
                var networkJob;

                do
                {
                    WScript.Sleep(1000);
                   
                    networkJob = this.m_VirtualizationNamespace.Get(OutParams.Job);

                } while ((networkJob.JobState == jobStateStarting) ||
                         (networkJob.JobState == jobStateRunning));

                if (networkJob.JobState != jobStateCompleted)
                {
                    throw(new Error(networkJob.ErrorCode,
                                    networkJob.Description + " failed: " + networkJob.ErrorDescription));
                }
               
                return networkJob.ErrorCode;
            }

            return OutParams.ReturnValue;
        }
       
        VirtualSwitchManagementService.prototype.GetSingleObject =
        function(
            SWbemObjectSet
            )

        /*++

        Description:

            Takes a SWbemObjectSet which is expected to have one object and returns the object

        Arguments:

            SWbemObjectSet - The set.

        Return Value:

            The lone member of the set.  Exception thrown if Count does not equal 1.

        --*/

        {
            if (SWbemObjectSet.Count != 1)
            {
                throw(new Error(5, "SWbemObjectSet was expected to have one item but actually had " + SWbemObjectSet.Count));
            }
           
            return SWbemObjectSet.ItemIndex(0);
        }

       
        //
        // Aggregate functions
        //
        VirtualSwitchManagementService.prototype.DeleteSwitchAndWait =
        function(
            VirtualSwitch
            )
           
        /*++

        Description:

            Deletes a switch
           
        Arguments:

            VirtualSwitch - Msvm_VirtualSwitch to delete
           
        Return Value:
       
            None.

        --*/
       
        {
            var outParams = this.DeleteSwitch(VirtualSwitch);

            var wmiRetValue = this.WaitForNetworkJob(outParams);

            if (wmiRetValue != 0)
            {
                throw(new Error(wmiRetValue, "DeleteSwitch failed"));
            }
        }
       
        VirtualSwitchManagementService.prototype.DeleteInternalEthernetPortAndWait =
        function(
            InternalEthernetPort
            )
        /*++

        Description:

            Deletes an internal ethernet port
           
        Arguments:

            InternalEthernetPort - Msvm_InternalEthernetPort to delete
           
        Return Value:

            SWbemMethod.OutParameters object.

        --*/
       
        {
            var outParams = this.DeleteInternalEthernetPort(InternalEthernetPort);

            var wmiRetValue = this.WaitForNetworkJob(outParams);

            if (wmiRetValue != 0)
            {
                throw(new Error(wmiRetValue, "DeleteInternalEthernetPortAndWait failed"));
            }
        }
       
       
        VirtualSwitchManagementService.prototype.UnbindExternalEthernetPortAndWait =
        function(
            ExternalEthernetPort
            )
        /*++

        Description:

            unbinds an internal ethernet port
           
        Arguments:

            ExternalEthernetPort - Msvm_ExternalEthernetPort to unbind
           
        Return Value:

            SWbemMethod.OutParameters object.

        --*/
       
        {
            var outParams = this.UnbindExternalEthernetPort(ExternalEthernetPort);

            var wmiRetValue = this.WaitForNetworkJob(outParams);

            if (wmiRetValue != 0)
            {
                throw(new Error(wmiRetValue, "UnbindExternalEthernetPortAndWait failed"));
            }
        }
       
        //
        // Constructor code
        //
       
        if (Server == null)
        {
            Server = WScript.CreateObject("WScript.Network").ComputerName;
        }
       
        //
        // Set Namespace fields
        //
        try
        {
            var locator = new ActiveXObject("WbemScripting.SWbemLocator");

            this.m_VirtualizationNamespace = locator.ConnectServer(Server, "root\\virtualization", User, Password);
        }
        catch (e)
        {
            this.m_VirtualizationNamespace = null;
           
            throw(new Error("Unable to get an instance of Virtualization namespace: " + e.description));
        }
       
        //
        // Set Msvm_VirtualSwitchManagementService field
        //
        try
        {
            var physicalComputerSystem =
                    this.m_VirtualizationNamespace.Get(
                            "Msvm_ComputerSystem.CreationClassName='Msvm_ComputerSystem',Name='" + Server + "'");
             
            this.m_VirtualSwitchManagementService = this.GetSingleObject(
                                                            physicalComputerSystem.Associators_(
                                                                "Msvm_HostedService",
                                                                "Msvm_VirtualSwitchManagementService",
                                                                "Dependent"));
        }
        catch (e)
        {
            this.m_VirtualSwitchManagementService = null;
           
            throw(new Error("Unable to get an instance of Msvm_VirtualSwitchManagementService: " + e.description));
        }
    }


    //
    // main
    //

    var wshShell = WScript.CreateObject("WScript.Shell");

    var g_NvspWmi   = null;

    Main();

    function Main()
    {
     WScript.Echo("Looking for nvspwmi...");
     g_NvspWmi   = new VirtualSwitchManagementService();

     WScript.Echo("");
     WScript.Echo("Looking for internal (host) virtual nics...");
     var list = g_NvspWmi.m_VirtualizationNamespace.ExecQuery("SELECT * FROM Msvm_InternalEthernetPort");
     for (i = 0; i < list.Count; i++)
     {
      var next = list.ItemIndex(i);
      WScript.echo(next.DeviceID);
      g_NvspWmi.DeleteInternalEthernetPortAndWait(next);
     }
     
     WScript.Echo("");
     WScript.Echo("Looking for switches...");
     list = g_NvspWmi.m_VirtualizationNamespace.ExecQuery("SELECT * FROM Msvm_VirtualSwitch");
     for (i = 0; i < list.Count; i++)
     {
      var next = list.ItemIndex(i);
      WScript.echo(next.Name);
      g_NvspWmi.DeleteSwitchAndWait(next);
     }
     
     WScript.Echo("");
     WScript.Echo("Looking for external nics...");
     list = g_NvspWmi.m_VirtualizationNamespace.ExecQuery("SELECT * FROM Msvm_ExternalEthernetPort WHERE IsBound=TRUE");
     for (i = 0; i < list.Count; i++)
     {
      var next = list.ItemIndex(i);
      WScript.echo(next.DeviceID);
      g_NvspWmi.UnbindExternalEthernetPortAndWait(next);
     }
     
     WScript.Echo("");
     WScript.Echo("Finished!");
    }



    This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, December 23, 2008 7:18 PM
  • Keith Mange,

    Thanks for the above script!  It came in very handy when I had this issue on Hyper-V Server 2008 R2.  I was then able to correctly assign the network adapter to the external virtual network.
    Tuesday, September 22, 2009 4:28 PM
  • Thank you *so* much! Saved me a huge amount of stress tonight when I foundthis script.

    The only *dur* moment I had was realizing after an hour of fiddling with FTP attempts that Core has got notepad.exe already in it!
    Sunday, March 07, 2010 3:11 AM
  • Hi

    I know this thread is old but you never know?...

    Would you have a 2012 version of this script or do you think it's safe to run on 2012?

    Thanks

    Daren


    HP DL120 G6 16Gb, 250GB, 1TB Data, SBS2008

    Sunday, December 29, 2013 10:23 AM