How to connect VM in Hyper V 2012 to the host network

I have a dell server with 4 nics running on a windows 2012 server running hyper v.

Although I have 4 nics but only once is connected to the LAN on a 192.x.x.x net – NIC #4. On the hyper v server I created a virtual switch which binds the virtual switch with NIC#4.

The network settings on the vm are pointing to this network config.

I have come across instructions on settings up an internal network. But seing that I only need com from the vm to the host not vice versa, I cannot get this to work with simply an external network configured.

I can’t ping anything but loopback. I want the vm to be on the same network as the host. I have setup the nic on the vm with the proper ip scheme.

Not sure what I am missing. I recall doing this before and not having to bridge any nics. I mention this because I read about many article which reference created an internal nic or bridging  the TWO NICS on the hyper host but what if I am only using one NIC? Although I have four, I am only using this as a dev box…not my mission critical server
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Philip ElderTechnical Architect - HA/Compute/StorageCommented:
I have an EE article that will help with Hyper-V: Some Hardware and Software Best Practices. Start there as the physical NICs should be teamed.

An EXTERNAL vSwitch would be the way to hook any VMs connected to that vSwitch to the production network or other network depending on how things are cabled.
Lionel MMSmall Business IT ConsultantCommented:
have you checked the firewall and network discovery settings on both? also check to see that on the Hyper-V that the network type is NOT public but either private or domain--if public firewall will block just about everything.
tobe1424Author Commented:
Thanks for the input. I will check to see the firewall settings are domain/private - which i believe they are configured in that fashion.

Also, network discovery was enabled on the vm at least. i need to check the host.

The network cabling is ok. For now everything is on one vlan . I would like to clarify whether or not I need to bridge any nics or enable ICS like i read on some articles. My knowledge base tells me this is not necessary.

Am I ok by simply setting up the vswitch(binded with the nic of the host with ip and attaching the VM to this vswtich in which case it communicates with the host's network?

host ip is
vm ip is
Same dns and GW which is not necessary for peer to peer com but will need it eventually.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Philip ElderTechnical Architect - HA/Compute/StorageCommented:
Set Network Location Awareness to Automatic (Delayed) on the host and VM if necessary. The network stack is not always initialized when this service starts thus it defaults to Public and lockdown.
tobe1424Author Commented:
Will try this folks.

Meanwhile, is my external setup all I need for communication from vm to host network?

In other words, am I on the right path or do I need to setup something else? For example I only have one nic on the host with a static ip. Do I need to bridge or perhaps configure 2 vlans; one for mgmt one for vm traffic? I was under the impression that although it is the best way to go, it's not completely necessary
Lionel MMSmall Business IT ConsultantCommented:
Yes, on NIC#4 if the IP address for the Hyper-V is in the same subnet as the vlan you created for the VM then they can "communicate" (ping, etc.). So if the Hyper-V is and the IP for one of the VMs connected the virtual switch is then they can pass network traffic back and forth but there are restrictions if they are not on the same domain, which is as expected. Is that what you are asking?
tobe1424Author Commented:
Yes this is what I am asking. Yes the networking you referenced is basically how the nics are configured.

I believe they are not on the same domain.

I was trying to join them.  

However, if I don't want to join the domain, I will have to tweak the firewall and all other features such as network discovery, etc...or will it be necessary for me to join the domain.

Perhaps a persistent route will aid? I've used them in the past but I don't recall exactly.
Lionel MMSmall Business IT ConsultantCommented:
It is generally frowned upon to have the server with the hyper-v role to also have any other roles but if you want to join all you have to do is make sure that the preferred dns is the IP of the DC of your domain where AD resides.
tobe1424Author Commented:
I see.

I did not create a VLAN for the VM. I simply binded the VSwitch to the NIC #4. I left the VLAN ID portion unchecked. Am I suppose to enter the VLAN ID of my Hyper V host in here?

Only one NIC is being used here. Is this all I need? I am trying to create another environment to test all of these configs using another server which is identical to the source we are troubleshooting. But I keep on coming across articles which state to bind the NIC's. I am only using one NIC and I recall doing this all.
Lionel MMSmall Business IT ConsultantCommented:
I think we may not be using the same terminology for the same thing--in Hyper-V check your virtual switch Manager (see picture) and then post what you have.
tobe1424Author Commented:
I would post a screenie but I am not near the system now. I see you highlighted the external vswitch. which is what i also used. I binded the vswitch with the nic which the host uses to communicate to the ( production and only network that exist)

I will get screenshots asap
Lionel MMSmall Business IT ConsultantCommented:
OK let me tell you one example I have and maybe that will help. My Hyper-V is This server has only one NIC. In Virtual Switch Manger I created an "external" switch, and connected it to that NIC. Using that switch I then was able to use that switch to connect my Virtual Machines to. I have 2 VMs on this Hyper-V--both have 192.169.78.XX IP addresses.
tobe1424Author Commented:
Hi folks, I am back in town and will now be more responsive.

Thanks again for the examples lionelmm

I more or less followed what you did. However, when I created the external switch and connected it to my NIC, upon applying this new config, a virtual NIC was created on the host. Now I have the physical NIC and a virtual NIC on the hyper v host.

When I assigned an IP to the virtual NIC on the host which is on the same net as the physical NIC as  the external switch, my VM is now able to surf the LAN/internet and access shares on the host.

Again, only when I configured the virtual nic with the appropriate IP was I able to communicate with the production network. I was under the impression that this virtual NIC that is created upon generating the external switch was just a "trunk" of some sort that doesn't need to be touched. But apparently this also needs an IP.

Although I have it working now, I am wondering if this virtual NIC on the host in fact needs to be touched?

Perhaps some more feedback from you folks on what I did?

Lionel MMSmall Business IT ConsultantCommented:
OK what you just did was so wrong.  Delete the virtual switch you just created--remove it completely. Then check to see that you just have a NIC on the host (no virtual NIC)--give it the required IP address, subnet mask, etc. that you want it to have (forget about what you want the VM to have--what you want the Hyper-V host to have--what you want its settings to be); then test it and make sure the Hyper-V works as you expect it to. Once it is working as you want it to then go in Hyper-V Manager and create a virtual switch AND AT THIS POINT DO NOT GO BACK TO THE HOST AND MAKE CHANGES TO THE NETWORK OR VIRTUAL NETWORK CONNECTION ON THE HOST--LEAVE THOSE ALONE NOW. Once you have created the virtual switch, connect your VM to the switch in the settings section of the VM, then boot up the VM, login and go it its network connections settings and make the required NIC settings changes there.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tobe1424Author Commented:
i will give that a shot.

the reason i touched the virtual nic on the host is because i saw it on here

Although this references an internal switch i followed instructions using an external

stand by..
tobe1424Author Commented:
I reverted my setup and did as you said and it worked.

However, the IP settings on the Physical nic on the host were copied over to the virtual nic which was created when the virtual switch was created within hyper V.

The physical nic on the host has no config or IPv6/v4 settings; they are all unticked and are now replicated on the virtual nic of the host. In any case, this works. But for some odd reason it wasn't working on my clients lab.

As you guys suggested, perhaps because AD DS is also a role on the Hyper V host. Not sure why this was enabled since he does't even want AD. According to his Hyper V forced him to promoted the host to a DC.

Anyways, I will now send my client my config. Thanks again for your help.
Lionel MMSmall Business IT ConsultantCommented:
However, the IP settings on the Physical nic on the host were copied over to the virtual nic which was created when the virtual switch was created within hyper V.

That is normal--this is what the system does--that is why I said not to change those once you have it working on the host Hyper-V. AD DS will not affect these settings.
tobe1424Author Commented:
well noted
Lionel MMSmall Business IT ConsultantCommented:
I must say I am quite disappointed in you points awarded--I stayed with you and kept helping you and I provided the eventual solution yet you gave points to another user that gave you one small bit of information; info which apparently did not help since the problem continued after it was given. yet I kept helping you again and again and I was not awarded for the solution but only a "partial" solution.
Philip ElderTechnical Architect - HA/Compute/StorageCommented:
Lionelmm, not sure about that? In my mind I contributed to this question with the correct answer, with some of the details worked out by you?
tobe1424Author Commented:
Yes, in fact I appreciate how you dedicated yourself to helping me out with this particular issue. Not only did you stick with me to end, you very well did took the most granular approach and perhaps deserve my client money as well and for me to invite for a beer or two on me.

However, this is my philosophy on rewarding points:

No matter how little information you provided, I appreciate the fact that you took time to respond to my issue. In the case of Phillip, he did not ride this train all the way to the end, but I have to respect the fact that his 2 cents (it could be validation, clarification or simply input leading to the right direction) was correct information and I have to honor it.

sorry to disappoint you bud, but I hope I can one day contribute to one of your issues like you did to mine.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.