Thursday, November 23, 2017

Hyper-V Virtual Switch Settings

Back in September I got a message from the facebook group VMware vSphere and Microsoft Hyper-V I am a part of and I got asked for some help with an issue with Hyper-V Switches.

The Issue:



The host machine is Server 2012R2 With the Hyper-V Role Enabled. Then a client VM was made on the host and connected it to virtual switch to communicate with my host.
The host operating system is pinging vm but i am unable to ping my host OS from VM .
host and guest vm and virtual switch created in host are all on same subnet and the firewall is off on both systems
So some simple questions about the setup.

Q:   What type of virtual switch?

A:   Virtual switch is internal

Q:   DHCP Server Setup?

A:   Yes on Host

So lets review our Hyper-V virtual switch Types:


External 


A Hyper-V virtual switch in external mode allows communications between virtual adapters connected to virtual machines and the management operating system. It uses single or teamed physical adapters to connect to a physical switch, thereby allowing communications with other systems.


External virtual networks are used where you want to allow communications between
  • VM to VM on the same VM Host
  • VM to VM Host (and visa-versa)
  • VM to externally located servers (and visa-versa)
  • (Optional) VM Host to externally located servers (and visa-versa)
External Virtual Switch


Internal 

A Hyper-V virtual switch in internal mode allows communications only between virtual adapters connected to virtual machines and the management operating system (VM Host).

Internal virtual networks are used where you want to allow communications between
  • VM to VM on the same physical server
  • VM to VM Host (and visa-versa)
Internal Virtual Switch


Private

A Hyper-V virtual switch in private mode allows communications only between virtual adapters connected to virtual machines.
Private virtual networks are used where you want to allow communications between
  • Virtual machine to virtual machine on the same physical server
Private Virtual Switch


Host Network Adapters


Dedicated

Dedicated switches are a physical Network Card on the host just for use just by virtual machines. 

They allow communication between:

Virtual machine to virtual machine on the same physical server
Virtual machine to externally located servers (and visa-versa)
The prevent the VM Host from using the adapter

A dedicated switch is just an external network switch that doesn't allow the host OS from using the adapter.


Dedicated Virtual Switch

According to the what we know the firewall being off and having a DHCP server setup everything should have been working unless we didn't have the DHCP server running on the right network.  The IP range on the host internal network adapter and the VM internal network adapters appeared to be getting different 169 addresses so the DHCP server was not running on the internal network.  Changing the IP address to STATIC IP addresses on the same subnet resolved the issue.  So it was an issue with the DHCP server on the internal network.


Video

I did a full video of the 3 mail virtual network options down below.


https://youtu.be/zI3p1AjZkPU

Sources

https://blogs.technet.microsoft.com/jhoward/2008/06/17/hyper-v-what-are-the-uses-for-different-types-of-virtual-networks/

https://www.altaro.com/hyper-v/the-hyper-v-virtual-switch-explained-part-1/

How to fix CURL call imporitng an RSS feed on a site blocking CURL calls

There is a 3rd party service provider that my organization uses called bibliocommons.  They have these nice book carousels.  However the car...