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.