4

I'm fairly new to Hyper-V, and can't seem to find the answer to this question:

Do two virtual machines on a single Hyper-V host use the NIC when communicating with each other?

For example, take this diagram:

VM Diagram

Does the communication between the web and DB VMs go through the physical NIC, or is it able to communicate through the virtual switch without going over the physical NIC?

Also, does SR-IOV have anything to do with this, or is this more to do with going over the NIC directly without going through the host (as in the diagram on this article)?

Ideally, I'd like to see references to actual documentation explaining this, as I've searched, and can't find anything one way or the other.

Jerad Rose
  • 303
  • 1
  • 5
  • 12

1 Answers1

4

They will not use the physical NIC if the two VMs are on the same vSwitch.

SR-IOV basically takes a physical NIC and passes it through to a guest, so in that case, yes, communication would traverse that NIC since it's not part of a vSwitch.

Ideally, I'd like to see references to actual documentation explaining this, as I've searched, and can't find anything one way or the other.

It would be just as fast for you to fire up netmon on the host and watch the traffic in/out of the NIC and see that there's nothing there for intra-vSwitch communication.

MDMarra
  • 100,734
  • 32
  • 197
  • 329
  • Awesome, thanks. However, that makes [this issue](http://dba.stackexchange.com/questions/50200/named-pipes-provider-error-across-vms-in-hyper-v-environment) even more puzzling. And yes, I'll give netmon a spin. – Jerad Rose Sep 25 '13 at 00:09
  • @MDMarra - How would that explain VM level VLAN tagging? You can create two VM's on two different VLAN's and connect them to the same virtual switch, with the physical NIC of the host server connected to a switch trunk port. I don't see how those two VM's could communicate without going through the physical NIC? – joeqwerty Sep 25 '13 at 00:25
  • FYI, I ran netmon on the host, and while I saw a ton of activity to/from the web VM's IP (as expected), I saw zero activity to/from the DB VM's IP, confirming @MDMarra's answer. – Jerad Rose Sep 25 '13 at 00:52
  • 2
    MDMarra is correct. To JoeQwerty's question posted as a comment, yes, if the VMs are on different vLANs, and neither the host nor another VM is the router, then the VMs would have to communicate through an external router(s) as you would expect. – Chris S Sep 25 '13 at 02:14