Hyper-V external switch has no connectivity between VM and host

Notsopublic 1 Reputation point
2020-09-15T14:26:11.547+00:00

Hello! first of all what I want to achieve.
I would like to be able to connect from the Hyper-V host (the main vm) to another vm I have created and other way around. Possibly with some internal connection but main goal is to connect to their external ip that is visible to internet.
The current situation is that the host can connect to internet and I can remote connect to it from home to the datacenter.
The guest vm has also connection to internet and I can connect to it from home, but there is issue between those two vms running on same machine. They cant connect to each other at all.
My issue is that the main vm is running web and database and the guest cant connect to it over external ip which work from anywhere else. In same way the host vm cant connect to app running on the guest but I its accessible from internet.

I have created a extenal virtual switch and checked the option "allow operation system to share this network adapter". After that I have added few static ip to the network adapter and some of them are used by the main vm and work fine. But when I add another vm linux or windows and give it one of those ip it cant connect to any external ip that is added to the virtual switch.
How can I make those ip visible to each other?

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,555 questions
Windows Server Infrastructure
Windows Server Infrastructure
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Infrastructure: A Microsoft solution area focused on providing organizations with a cloud solution that supports their real-world needs and meets evolving regulatory requirements.
516 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dave Patrick 426.1K Reputation points MVP
    2020-09-15T14:31:25.213+00:00

    I have added few static ip to the network adapter

    It should work out of the box. There may be some confusion because of adding multiple addresses to the adapters. I'd try again but using a single address per adapter. If problem persist then posting an unedited ipconfig /all of host and guest may be helpful.

    0 comments No comments

  2. Xiaowei He 9,871 Reputation points
    2020-09-16T06:39:35.54+00:00

    Hi,

    Is there any IP conflict between the IP addresses, please try to give only one IP address on the NIC of each VMs. Check if the network is well.

    Thanks for your time!
    Best Regards,
    Anne

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments