microsoft / SDN

This repo includes PowerShell scripts and VMM service templates for setting up the Microsoft Software Defined Networking (SDN) Stack using Windows Server 2016
Other
486 stars 541 forks source link

New-HNSNetwork and vSwitch \ VMNetwork #300

Open mmgil opened 5 years ago

mmgil commented 5 years ago

Hi all

In my Hyper-V environment we have a vswitch named vSwitch01 and a VMNetworkAdapter (Managementos) named "REDE INTERNA". In this way, the Netadapter obtains the name vEthernet (REDE INTERNA).

I configured this way to be possible to have several VMNetworkAdapter in different ID VLANs, and to give me flexibility, if in the future, I need to add the Hyper-V host to other networks.

However, I believe that my configuration model is causing error in the New-HNSNetwork of the start.ps1 script because it search for netadapter with the name "vEthernet (Ethernet *" And in my case is "vEthernet (REDE INTERNA)".

I receive the following error:

VERBOSE: Result : {"Error":"An adapter was not found. ","ErrorCode":2151350278,"Success":false}

Even removing this criterion I get error:

Failed to find a suitable network adapter, check your network settings.

In my investigation I found that the New-hnsnetwork function call the function Get-vmcomputenativemethods, and this function return the following error:

Add-Type : Cannot add type. The type name 'VmCompute.PrivatePInvoke.NativeMethods' already exists.

mmgil commented 5 years ago

I think I found my problem.

I have only one network interface from which is already allocated to a vswitch in transparent mode.

Just as in the Sdn of VMM 2012, I believe that to operate the L2Bridge it is necessary to have other physical interfaces dedicated

Does it make sense to anyone?

daschott commented 5 years ago

Yes, this is correct, each external vSwitch requires one dedicated interface