Can a Hyper Guest Have 2 Virtual Nics Assigned?

Good solar day!

tl:dr: I want my virtual auto to use a separate network from my host, using its own dedicated NIC that's got that separate network plugged into it (with the Virtual Switch in between to permit my VM connect). Virtual Switch Manager is not taking over the NIC when I assign information technology to a Virtual Switch.

I repent if this has been asked to expiry- I haven't managed to notice answers withal. I'1000 trying to go my virtual machine to use its ain network completely separated from my main network, and my Virtual Machine isn't making it out to the separate network at all.

I have a server with 4 NICs running Server 2019, hosting Hyper-Five. I have created a virtual switch and assigned it to my 2nd NIC, and I've plugged a second network into that 2nd physical NIC.

NIC1 is on a 192.168.30.0/24 network, and NIC2 is on 10.0.0.0/24. Both go IPs, both are visible and working, DHCP, DNS, all the skillful stuff is there and happy from the host perspective right off the bat.

When I assign my virtual switch to NIC1 my virtual machine can connect- it gets an IP and can both reach out on that network and be reached. The problem is that I want my VM on a separate network that I have.

When I assign my virtual switch to NIC2 the VM stops existence able to reach out and has no network connectivity. I can see the virtual adapter and mess with it in the VM, but information technology simply sees "unidentified network."

The "Let direction operating system to share this network adapter" selection has no effect on the behavior observed, except that of course I tin can't come across it in Network Settings in the host OS if I've got it toggled off.

It's my understanding (and I'm super new to this, delight correct my misunderstandings and gaps!) that when a Virtual Switch is assigned to a physical NIC information technology replaces the driver and basically takes the physical NIC over- as far equally the direction Os is concerned, when it tries to access the NIC it'south directed to the Virtual Switch instead, not sharing the NIC really, but connecting to the same Virtual Switch that a VM would.

When I've seen this demonstrated (accept non managed it myself), the physical NIC is yet visible in Network Connections when assigned to a Virtual Switch, merely the only features/services/things (please allow me know the right vocabulary here) enabled under Properties are Microsoft LLDP Protocol Driver and  Hyper-V Extensible Virtual Switch.

When I assign a virtual switch to whatsoever of my NICs, it does non accept them over in that sense- Hyper-Five Extensible Switch is never toggled, and attempting to toggle information technology results in a warning that my actions volition disable that feature... which isn't enabled.

I've deleted and remade, I've watched countless tutorials, I've read a ton of guides, I've turned it off and back on again (repeatedly, none of this has only been tried once) and none of the examples I've seen had a split network going into that 2nd NIC being dedicated to the VM. I know that teaming exists but I don't desire to become into that at present if I can assistance it- I experience like at that place has to be a way that my 2nd NIC can be on a second network and for my Virtual Machine to use that network.

Am I merely hopelessly confused here? I would be happy to provide any info/screenshots/settings and would really capeesh the assist!

Thank you in advance!


21 Replies

kevinmhsieh
kevinmhsieh This person is a Verified Professional
This person is a verified professional.
Verify your account to enable Information technology peers to see that you are a professional.
Jan 6, 2022 at 06:44 UTC

Welcome to the customs!

Which version of Hyper-V?

Take you updated NIC drivers with version from your OEM? Microsoft'southward native Broadcom drivers are notoriously bad and volition cause all sorts of things to break in mysterious ways.

kevinmhsieh
kevinmhsieh This person is a Verified Professional
This person is a verified professional person.
Verify your business relationship to enable IT peers to see that you are a professional.
Jan 6, 2022 at 06:52 UTC

Your understanding of how it should work seems right.

When y'all create an external virtual switch and connect it to a NIC, that NIC then acts as the uplink from the virtual switch to the physical network. The virtual switch is simply a L2 switch. If you share the connection with the direction OS, then a virtual NIC is added to the host and is connected to the virtual switch.

From your description, of you share 2d switch with management Os and the direction OS gets a x.0.0.0/24 IP via DHCP, that indicates things should be okay. Any VM with a NIC on that same switch should likewise get an IP accost from DHCP.

What is your DHCP server? Take you checked it for logs?

How is the physical switch port configured? Does it allow multiple devices (MAC addresses) on that port? A switch with porf security enabled might only let the starting time device access to the network.

Yous tin can always try adding a new NIC natural language VM and connect that to the second external virtual switch.

shaiksaj
shaiksaj This person is a Verified Professional
This person is a verified professional.
Verify your account to enable IT peers to meet that you are a professional person.
January 6, 2022 at 07:xvi UTC

As our friend kevinmhsieh  said... you have to create seperate External switch for Each Lan Interface to connect seperate external network

all the best

adrian_ych
adrian_ych This person is a Verified Professional
This person is a verified professional.
Verify your business relationship to enable It peers to see that you are a professional.
Jan six, 2022 at 07:17 UTC

I remember OP is running server 2022 with hyper-v feature.....

Did you happen to squad the NICs in the Server 2022 host ? This prevents the NICs from being used separately

Seth Burlando

Hello, and thank you for the welcome and quick response!


I'yard on version 10.0.17763.1 of Hyper-5, and I honestly haven't done annihilation to the drivers for the NIC. It'southward 4 ports built into the back of the server, not a separate card if that makes any difference- I'll go come across if I can go the drivers from Dell direct after this.

Both networks are working as far as DHCP is concerned- I plug a cable from 192.168.thirty.0 into a figurer, I get 192.168.xxx.X, and if I move that cable to a port on the switch with the ten.0.0.0 network, I get a new 10.0.0.x IP Address.

I accept a Cisco-Meraki MX firewall that I'm using to create the second network. And the first network I suppose. Comcast enters my apartment, hits the modem, the modem feeds into the firewall, the firewall gives me a default network and any others I wish to create. One trunked line runs from the firewall to a managed switch- all but 1 port cake everything except 192.168.30.0, and the remaining port only allows 10.0.0.0.

Ane line runs from the switch to NIC1, another line runs from the 10.0.0.0 port on the switch to NIC2 on the server.

The MX device handles DHCP for both networks, and I had non thought to look in the logs, thank you! For better or worse, they show me simply success- any lease requested was granted and from what I can tell it didn't ever become a asking from the VM.

I dug through the switch settings a fleck and cannot find whatever reference to multiple devices being something I could plough on or off. Filter by MAC, sure, just there isn't an easy toggle to allow specific numbers of devices. Since the other ports support multiple downstream devices (similar some other switch that in turn feeds a couple computers) I don't call up that would be the outcome. It's a Cisco-Meraki switch as well if that helps.

I apologize, I'm not sure what you meant in the last line, " Y'all can always endeavour adding a new NIC natural language VM and connect that to the 2d external virtual switch." My all-time guess is that you're suggesting I add another External Virtual Switch to a unlike NIC and try that- if that'due south the case, I accept tried, but it hasn't worked.

The LAN interface I'grand attempting to use does have a dedicated, External Virtual Switch, I double checked- thank y'all for thinking of it Shaiksaj.

Adrian, you're right, I am running the Hyper-Five feature on Server 2019, simply I have specifically avoided teaming any of this- at this point it just seems like information technology would add a layer of complexity to this. Thank you for thinking of that equally well.

adrian_ych
adrian_ych This person is a Verified Professional
This person is a verified professional.
Verify your account to enable IT peers to encounter that you are a professional.
Jan 6, 2022 at 08:35 UTC

If y'all accept not teamed any of the NICs of the host, then y'all should have at least ii vSwitches (one physic NIC per vSwitch) so that the VMs (if required) tin can take 2 vNICs, one linked to each vSwitch.

The idea is that VMs should almost never connect to physical NICs of the host but connect to vSwitch(es) then y'all assign physical NICs to the respective vSwitch....at least thats the way it is done on most hypervisors like VMware or Xen.

...

Using Server 2022 with hyper-v itself is a layer of complexity.....thats why there is VMware ESXi or Hyper-V server.....these go rids of the underlying Os complexity....

Seth Burlando

Update: Drivers have been updated- no difference.

Is in that location whatever chance I need to statically assign addresses somewhere in this? I've tried it everywhere I could think of, just in case- information technology hasn't worked, but I may well have missed something other folks know about.

I really feel similar this utilize instance isn't unusual- I'k not trying to make something work in a way information technology wasn't designed to or do anything fancy, merely trying to make the VM utilise the 2nd NIC. I'm sure the hardware is capable, and I'thou sure the software is also- then I'grand adequately confident I've mis-configured it. Thanks all again for the assistance!

Seth Burlando

Adrian,

I think you lot may accept constitute something!

I have but one Virtual Switch- which is  assigned to the second NIC.

NIC1: physical server, Windows 2019, the host

NIC2: assigned to the Virtual Switch

NIC3: Hanging out

NIC4: Having a beer with NIC3

Virtual Machine has a Virtual Adapter only cannot see the Virtual Switch.

This problem goes away if I tell the Virtual Switch to use NIC1, fifty-fifty though the host OS is using information technology, merely of course the VM then gets the aforementioned network as the host.

Should at that place exist more/other Virtual Switches? I apologize if I'm not comprehending an answer!

Seth Burlando

As for other options for hyper-visors: I used Windows Server 2022 considering it was all I was familiar with and knew I could use it to host virtual machines. I'm very new to this arena, this is education for me, and I'd really like to further myself in this full general field- what hyper-visor would you recommend I start familiarizing myself with?

tfl
tfl This person is a Verified Professional
This person is a verified professional.
Verify your account to enable IT peers to encounter that y'all are a professional.
Jan 6, 2022 at 11:56 UTC

RanaRambles wrote:

Adrian,

I remember you may have found something!

I have only one Virtual Switch- which is  assigned to the 2d NIC.

NIC1: physical server, Windows 2019, the host

NIC2: assigned to the Virtual Switch

NIC3: Hanging out

NIC4: Having a beer with NIC3

Virtual Machine has a Virtual Adapter just cannot come across the Virtual Switch.

This problem goes away if I tell the Virtual Switch to use NIC1, even though the host OS is using it, simply of course the VM then gets the aforementioned network as the host.

Should there be more/other Virtual Switches? I apologize if I'grand not comprehending an respond!

I would have NIC1 assigned to the physical server - and why not create a virtual switch bound to this external NIC.

Then have NIC ii assigned to the second virtual switch Switch2.

Have the NIC in your VMs jump to Switch2.

That works here...

kevinmhsieh
kevinmhsieh This person is a Verified Professional
This person is a verified professional.
Verify your account to enable IT peers to meet that you are a professional.
Jan 6, 2022 at xiv:06 UTC

VMs can have more than 1 virtual NIC. Effort adding some other virtual NIC fastened to the second virtual switch and come across if that helps. Maybe something wrong with the VM...

It is incommunicable to straight connect a VM to a physical NIC in Hyper-V...it always has to go through a virtual switch.

What you're trying to practise in full general is fine and normal practice and should work. Running Hyper-Five role is fine and works only the same every bit Hyper-Five Server, but you go a local GUI if you installed it that way. Perfect fashion to get started.

BrentQuick
BrentQuick This person is a Verified Professional
This person is a verified professional.
Verify your business relationship to enable It peers to see that y'all are a professional.
Jan 6, 2022 at fifteen:22 UTC

Since you lot have four ports off of the back of the server I would advise for troubleshooting the post-obit:

ane) Take all NIC's out of vSwitches and confirm if static IP's have been set?  If yes convert that to a DHCP reservation on the MX device and NIC.
     Verify that all NICs on active switch ports receive IP's and related settings and can attain the outside globe.
     This means one at a time, so unplug the 192. cable and cheque the 10. so reverse.
If they both work contained of each other go along.
If they practice not the check the switch/MX device for VLAN tag issues.

2) Configure as follows:
     vSwitch1 connected to 192. switch port with "allow managemnt..."
          SInce you lot are non teaming you will need to determine which physical NIC port to put into this switch.
     vSwitch2 continued to 10. switch port without "allow direction..."
          SInce you are not teaming you volition demand to determine which physical NIC port to put into this switch.
Add together two vNIC's to the VM with both being disconnected.
Connect vNIC1 to vSwitch1 and see if it pulls a DHCP from the MX device.
Change vNIC1 to not continued and set vNIC2 to vSwitch2 and confirm information technology pulls DHCP from the MX device.


If not cheque the MX logs for why or confirm VLAN/Switch configured properly.

3) Failing above plug the 10. NIC (vNIC2 on VM and vSwitch2 on Host) directly to the MX on the that network port and check DHCP.

Eric M
Eric M This person is a Verified Professional
This person is a verified professional.
Verify your business relationship to enable IT peers to meet that you are a professional.
Jan 6, 2022 at 16:04 UTC

If from your host, you can see the IP address of NIC2, you lot're not setup the way you lot want.  If you desire NIC2 to be reserved for the VM, your Host won't have an IP (or whatever real connectivity to that NIC.)

- Create a new vSwitch, telephone call it something meaningful (DevNetwork, ProdNetwork, etc,) make sure the Allow management performance arrangement to share is unticked.
- In VM assign this vSwitch to your kickoff (only) NIC and set the VLAN tag (if required) and apply.

That'southward all there should be to this.  What I don't empathize is, you lot haven't mentioned VLANs, how is your host getting DHCP for both 192.10.x.ten and 10.ten.ten.10 networks?  Do you have a ii divide DHCP servers or a multi-homed server?

BrentQuick
BrentQuick This person is a Verified Professional
This person is a verified professional.
Verify your account to enable It peers to see that you are a professional.
Jan half dozen, 2022 at 16:49 UTC

Eric M​ - The Meraki MX can do multiple DHCP scopes in different ports but there is non a requirement to brand them separate VLAN'southward.  Yous can utilize rules to prevent the 2 subnets from talking to each other.  I would non propose this configuration only it is possible.

kevinmhsieh
kevinmhsieh This person is a Verified Professional
This person is a verified professional.
Verify your business relationship to enable IT peers to see that you are a professional.
January 6, 2022 at 16:54 UTC

Y'all may want to take a packet capture of the traffic on the Meraki switch port to run across what is happening. Is there DHCP traffic from the VM? MAC address you look?

What happens if you statically assign the IP address on the VM?

What if you change the MAC accost of the VM?

Seth Burlando

Give thanks you all for the aid!

Wiped a bunch out and started over, took screenshots:

First, confirmed DHCP was working by physically plugging into the ports I'1000 using on the switch and pulling the IP:


Tested to see if both would work at one time on the server:

So, time for a make clean start, no virtual switches:

Created 2 External Virtual Switches, Dwelling Network and Lab Network, and assigned Home to NIC1 and Lab to NIC2:

Home Network was shared with the direction Bone, Lab Network was not.

I cannot add more than screenshots here, then I'm going to follow this with the rest of the results.
Seth Burlando

Next I created 2 unassigned Network Adapters for the VM:

I assigned the kickoff virtual NIC to the Abode Network Switch and got an IP:

The IP is from the wrong network!

Disconnected the showtime Virtual NIC and assigned the 2nd Virtual NIC to the Lab Network Virtual Switch, just that gave me no network connectivity. At outset information technology gave me the cached IP, simply a release/renew showed me in that location was no DHCP.

I can employ either adapter on the Home Network Virtual Switch assigned to NIC1 and go an IP on my VM- and even though NIC1 is on the 192.168 net, I get a 10.0 address. I tin can switch the Habitation and Lab Virtual Switch assignments and have the same results- whatever virtual switch is connected to NIC1 will allow my VM to connect. No virtual switch connected to NIC2 (or three or 4- I tried) will let it to connect.

Static assignments of addresses and gateways haven't resulted in whatsoever changes- I've tried at each level I could retrieve of (everything between assigning a lease to a MAC in the firewall to setting it in the VM) and haven't produced any success.

As for VLANs, this is also somewhat my introduction to them. The firewall allows me to create many VLANs and the trunking/access configuration to take information technology play overnice with the switch is dead simple- I truly cannot imagine a better, easier UI than the Cisco-Meraki stuff. If yous want to do deeper level stuff, anything that would require command line plain they're non the manner to go, just unless I'm so confused that I don't know I'grand confused, I take one network coming out of all the ports on my switch except Port4, and Port4 is giving me a second network. Do I need another firewall/router per VLAN?

My adjacent steps will exist a further deep dive into the DHCP logs of the Meraki MX. I'chiliad going to spin up another VM on the host and come across if possibly another Os does better, run across if in that location's any chance this event is on the VM side. After that I'thou going to drib a spare physical NIC in my desktop (Win10 Pro, vs Server 2022 on the server), spin up Hyper-Five, create virtual switches, a virtual server, and replicate the upshot on another gear up of hardware/software entirely. After that I may yell angry words at a computer and get for a long walk.

Seth Burlando

Update to the update:

When I share the Home Network Virtual Switch (leap to NIC1, the aforementioned i the OS is using with a 192.168 IP), with the direction OS I tin can come across it listed when I run ipconfig. Information technology's got a 10.0 accost. United nations-sharing it with the network has no bear upon on connectivity of the VM. The NIC says it'south 192.168, the virtual switch using that aforementioned NIC is on x.0.

The ten.0 network enters the host only through NIC2. When I unplug NIC2 my VM loses connectivity even though it'south only connected to a Virtual Switch that is connected to NIC1- there'due south no connection between my VM and NIC2 at all. Since unplugging NIC2 drops the 10.0 network and it becomes unavailable everywhere in the OS, I know I'1000 not accidentally sharing the 10.0 and 192.168 traffic on NIC1. NIC1 shouldn't be able to communicate with the x.0 network at all or even see it- only data for 10.0 will pass through it, but not the NIC actually assigned to that network.

Seth Burlando

Thank you lot all so much, Eric had it, the problem is solved!

The port labeled i on my auto is Gigabit Ethernet 4 in the list of External Networks to connect to, the second port is only listed as Gigabit Ethernet and is at the top of the list, the port marked three is Gigabit Ethernet two and the 4th physical port is Gigabit Ethernet 3.

I had to become lay down and think nigh some life choices later on that.

Thanks all then much for the assistance and advice!

Eric M
Eric M This person is a Verified Professional
This person is a verified professional.
Verify your business relationship to enable IT peers to see that y'all are a professional.
January 7, 2022 at 12:42 UTC

RanaRambles wrote:

Cheers all so much, Eric had it, the trouble is solved!

The port labeled 1 on my motorcar is Gigabit Ethernet 4 in the listing of External Networks to connect to, the second port is just listed every bit Gigabit Ethernet and is at the pinnacle of the list, the port marked 3 is Gigabit Ethernet 2 and the quaternary physical port is Gigabit Ethernet 3.

I had to get lay down and call up about some life choices subsequently that.

Thank you lot all so much for the help and advice!

Glad my hurting could help someone else - I was burned past this ane too when I was get-go edifice my Hyper-V servers out likewise.

This topic has been locked past an ambassador and is no longer open up for commenting.

To continue this discussion, please ask a new question.

trichecatir1943.blogspot.com

Source: https://community.spiceworks.com/topic/2250254-hyper-v-won-t-take-second-nic-network

0 Response to "Can a Hyper Guest Have 2 Virtual Nics Assigned?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel