locked
Networking WITHIN Hyper-V RRS feed

  • Question

  • Hello,

    I have been trying to find information on the following scenario: 

    What I have:

    Windows 8.1 Pro with Hyper-V enabled (host computer)

    5 Hyper-V virtual machines installed (2-Windows 8.1, 2-Linux Distros, 1-Windows Server 2012 r2)

    What I want: 

    I'm currently taking a networking fundamentals class and want to setup a virtual network to practice TCP/IP and other networking basics. 

    What i've done: 

    • Created External, Internal, and Private virtual switches. 
    • Tried various IP configurations with both Internal and Private virtual switches to connect guest machines
    • Have not been able to connect the virtual machines
    • CAN ping one direction between two vm's when I leave the IP configs to DHCP and "obtain DNS automatically" although the APIPA addresses are assigned. But cannot type IP into Explorer window and access virtual machine.


    My question is: 

    How on earth do I connect the VM's WITHIN hyper-v? Do I need to setup the Windows Server 2012 r2 to act as DNS and DHCP server for the vm's or can the host computer perform these functions? 

    Me: 

    My networking skills are basic. I do understand the language but not the concepts fully yet. I've researched the heck out of this topic and found NO concise information. Please advise!

    Thanks so much!

    SeaDude

    Friday, June 27, 2014 7:42 PM

Answers

  • First of all - Hyper-V does not assign IP addresses to VMs.  It does not provide DHCP nor DNS.  You have to provide that (or your home router) in the OS of the VM - such as a VM console.

    Beyond that it is all very basic networking.  Subnets, VLANs are the isolation boundaries within a switch.  If you apply VLAN tags, only VMs on that VLAN can 'see' each other.  If you manually assign IPs, all VMs that need to 'see' each other must be on the same subnet with a complimentary subnet mask.

    The Private virtual switch is VM to VM only.  As long as the virtual NIC is working, and the VMs are on the same subnet, it works.

    The Internal virtual switch attaches the Hyper-V Server management OS in addition to the Private.

    The External has one port which is the physical NIC.  Thus traffic can exit the server.  Attaching the management OS is optional.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

    • Marked as answer by Michael_LS Tuesday, July 15, 2014 2:05 AM
    Friday, June 27, 2014 8:50 PM
  •  The vms cannot run while the host is shut down. However the system will put them in a saved state and restart them when the host restarts.

      Wireless networking is problematic. Updating the wireless NIC driver in the host OS will sometimes fix the problem.


    Bill

    • Marked as answer by Michael_LS Tuesday, July 15, 2014 2:05 AM
    Wednesday, July 9, 2014 11:01 AM

All replies

  • First of all - Hyper-V does not assign IP addresses to VMs.  It does not provide DHCP nor DNS.  You have to provide that (or your home router) in the OS of the VM - such as a VM console.

    Beyond that it is all very basic networking.  Subnets, VLANs are the isolation boundaries within a switch.  If you apply VLAN tags, only VMs on that VLAN can 'see' each other.  If you manually assign IPs, all VMs that need to 'see' each other must be on the same subnet with a complimentary subnet mask.

    The Private virtual switch is VM to VM only.  As long as the virtual NIC is working, and the VMs are on the same subnet, it works.

    The Internal virtual switch attaches the Hyper-V Server management OS in addition to the Private.

    The External has one port which is the physical NIC.  Thus traffic can exit the server.  Attaching the management OS is optional.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

    • Marked as answer by Michael_LS Tuesday, July 15, 2014 2:05 AM
    Friday, June 27, 2014 8:50 PM
  • Hello,

    I have been trying to find information on the following scenario: 

    What I have:

    Windows 8.1 Pro with Hyper-V enabled (host computer)

    5 Hyper-V virtual machines installed (2-Windows 8.1, 2-Linux Distros, 1-Windows Server 2012 r2)

    What I want: 

    I'm currently taking a networking fundamentals class and want to setup a virtual network to practice TCP/IP and other networking basics. 

    What i've done: 

    • Created External, Internal, and Private virtual switches. 
    • Tried various IP configurations with both Internal and Private virtual switches to connect guest machines
    • Have not been able to connect the virtual machines
    • CAN ping one direction between two vm's when I leave the IP configs to DHCP and "obtain DNS automatically" although the APIPA addresses are assigned. But cannot type IP into Explorer window and access virtual machine.


    My question is: 

    How on earth do I connect the VM's WITHIN hyper-v? Do I need to setup the Windows Server 2012 r2 to act as DNS and DHCP server for the vm's or can the host computer perform these functions? 

    Me: 

    My networking skills are basic. I do understand the language but not the concepts fully yet. I've researched the heck out of this topic and found NO concise information. Please advise!

    Thanks so much!

    SeaDude


    That is not really a Hyper-V problem. It is a basic Active Directory question. You would have the same problem if you had set this up on physical machines behind an Internet gateway (and you solve it in exactly the same way).

    Bill

    Monday, June 30, 2014 8:00 AM
  • Thanks for the replies, 

    As the networking class progressed and my understanding and research got more precise, I figured out my networking issues.

    I set up Server 2012 with Active Directory Directory Servcies, DHCP, and DNS (Thanks Eli The Computer Guy) and connected it to the Hyper-V Internal Virtual Switch I created. 

    Then I connected my hosts to the same Internal Virtual Switch. With the Linux hosts, I had to use "Add Hardware" then "Legacy Network Adapter" in Hyper-V to connect. 

    There are definitely some quirks with both Windows and Linux hosts. Sometimes I have to disable then enable the Ethernet Adapters in each to get them to connect. 

    Overall, this has been a great exercise in computer networking without needing to invest in multiple OS's/Computers/Routers/Switches. I will do a video series soon and post as the complete picture is not available anywhere that I could find. 

    Cheers, 

    E

    Friday, July 4, 2014 2:58 PM
  • One other "quirky" note.... I've found that sharing the Wireless Adapter of my physical machine with a virtual machine (while both are using it) results in BSOD with a "Killer Wireless Adapter" error message. 

    The error goes into a constant loop of shutdown - startup of my physical machine. The crazy part is that upon opening Hyper-V Manager, all of my VM's continue running through the shutdowns of the physical machine. 

    I thought that was pretty amazing. 

    The only way I found to stop the loop was to quickly shutdown the VM with the shared WiFi before the loop continues. 

    Cheers, 

    E

    Friday, July 4, 2014 3:03 PM
  • It sounds like your adapter configuration problematic. check your configuration.

    Wednesday, July 9, 2014 2:03 AM
  •  The vms cannot run while the host is shut down. However the system will put them in a saved state and restart them when the host restarts.

      Wireless networking is problematic. Updating the wireless NIC driver in the host OS will sometimes fix the problem.


    Bill

    • Marked as answer by Michael_LS Tuesday, July 15, 2014 2:05 AM
    Wednesday, July 9, 2014 11:01 AM