none
Hyper-V Internal and External Access RRS feed

  • Question

  • Hi all,

    A note before we start: I'm aware that using my laptop is far from ideal, this is purely for experience.

    I'm really new and inexperienced with Hyper-V (any virtualization to be honest), so it may be best to do a little explaining about my "environment" and what  I wish to achieve, and then get some help on achieving it, if at all possible.

    I'm running Windows 10 Pro on one of my laptops (no ethernet, WiFi only). It's configured with a static IP (set in router config) and has Hyper-V Installed.

    I want to create a VM (Server 2016 Core) to run a development web server (XAMPP) which can both access the internet, and be accessed by my laptop (the host).

    Further to this, I also want the VM to be on the same subnet as my laptop so I can configure port forwarding (temporarily, obviously) to redirect 80 and 443 traffic to it.

    My router is atrocious and only allows me to forward to a device that is currently on the network, and can only pick up devices on the same subnet as itself. (192.168.1.1)

    I have created an external switch so that the VM has internet access, and I have statically assigned the IP address to 192.168.1.242. - So far, so good.

    

    I fired up the VM and sure enough, as expected it gained an IP address on the same subnet as the host and has internet access as required. - Still looking good.

    Next I tried to ping the host, and vice versa. Alas, fails every time. I try telnet too from the host to the VM (using ports that are open) and this fails too.

    "Okay" I tell myself. "I'll just create an internal switch, too, and share the connection External -> Internal, allowing access to both." - Nope, Hyper-V has other ideas because this doesn't work.

    My question is this: Can I create a switch/set something up that will allow me to:

    A) Access the internet on the host, and on the VM

    B) Access the host, vice versa (RDP, Ping, etc)

    C) Remain on the same subnet as the host

    Any help or advice would be greatly appreciated.

    Thursday, September 5, 2019 8:50 PM

Answers

  • A.) you'll only need a single external vSwitch, if workgroup (no domain) then set the primary DNS on both host and guest to use ISP's DNS or optionally use google DNS (8.8.8.8)

    B.) yes it shouldn't be a problem but you'll need to allow the traffic through windows firewall for the network profile in use 

    • File and Printer Sharing (Echo Request - ICMPv4-In)
    • Remote Desktop - User Mode (TCP-In)
    • Remote Desktop - User Mode (UDP-In)

    C.) yes, not a problem

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Marked as answer by ReeceAlqotaibi Thursday, September 5, 2019 10:09 PM
    Thursday, September 5, 2019 9:07 PM

All replies

  • A.) you'll only need a single external vSwitch, if workgroup (no domain) then set the primary DNS on both host and guest to use ISP's DNS or optionally use google DNS (8.8.8.8)

    B.) yes it shouldn't be a problem but you'll need to allow the traffic through windows firewall for the network profile in use 

    • File and Printer Sharing (Echo Request - ICMPv4-In)
    • Remote Desktop - User Mode (TCP-In)
    • Remote Desktop - User Mode (UDP-In)

    C.) yes, not a problem

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Marked as answer by ReeceAlqotaibi Thursday, September 5, 2019 10:09 PM
    Thursday, September 5, 2019 9:07 PM
  • Hi Dave,

    Let me start by saying thank you. I am 99% of the way there. I can now do almost everything I want.

    The last thing left is getting RDP to work. It may have been prudent for me to say in the beginning that I am running Windows Server 2016 Core, not Desktop Experience.

    I have enabled both RDP User Mode TCP/UDP. I have also run this (following advice from people in other places, too): cscript %windir%\system32\scregedit.wsf /ar 0 - I believe this allows connections, is this correct?

    I'm trying to RDP from the host to the VM (I know I can use VMConnect but I would just like to get RDP working)

    Do you have any further advice to give?

    Thursday, September 5, 2019 10:08 PM
  • Glad to hear it helps. Some options for remote management here.

    https://docs.microsoft.com/en-us/windows-server/administration/server-core/server-core-manage

    or for RDS I'd reach out to experts over here.

    https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverTS

    https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winRDc

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Thursday, September 5, 2019 10:15 PM