Hyper-V Networking Setup

BrianPitt 176 Reputation points
2021-05-10T17:09:22.087+00:00

Looking to setup a two different Hyper-V lab setups or a group of VMs. Each Hyper-V lab setup will be done on a different machine. Looking for some advice on some networking questions. For both setups, the VMs should only be able to communicate with other VMs in the Hyper-V environment. The machine hosting Hyper-V should play no part in the lab whatsoever, other than hosting the Hyper-V Environment. These VMs are being imported into Hyper-V after being converted from another environment.

First Setup - 1 VM with a static IP Address already assigned locally in a /24 network. IP needs to stay the same.

  • When I create the Virtual Switch for this, what is the type of switch to go with, Internal or Private? When I create the Virtual Switch, how does the switch know that the IP of the VM should connect? There is no where for IP Info when creating the switch

Second Setup - 3 VMs with pre-set static IP Addresses on 3 separate /24 networks. Same questions as above about type of switch and the creation of the Virtual Switch (I would create 3 of them here). Also, how do I get the 3 Virtual Switches to communicate?

Thanks!

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,709 questions
{count} votes

1 answer

Sort by: Most helpful
  1. TravisCragg-MSFT 5,681 Reputation points Microsoft Employee
    2021-07-29T21:28:56.537+00:00

    My apologies for the delay on this one.

    Communication from VMs deployed on HyperV is done via a Virtual Switch. The switch can be configured to isolate traffic to just the HyperV VMs, or both allow communication between the VMs and to outside networks / Internet.

    All 3 types of virtual switches should allow traffic between your HyperV VMs on the same server. If you are having communication issues, make sure that the OS firewalls allow the communication.

    Communication should be done via the DIP (Vnet level IP), and should be a different IP range than the VNET that the VM is in.

    For your last question, you are asking how to get 2 different VMs on 2 different Nested Virtualization hosts to communicate? You will need to configure the routing so that traffic destined for that IP will go to the host VM, which can then forward to to the correct nested Virtual Machine.

    Make sure you use External for your Virtual Switch type.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.