Solved Browser access to Hyper-V VMs on LAN

adamf

Banned
Messages
1,870
I have CentOS running in a VM under Hyper-V on 8.1 Pro. This machine is assigned IP address 192.168.1.89 (I defined it on the router) and I can ping it fine. What I can't do is access web pages from it. I have installed an application Transmission which listens on port 9091. From the VM I can access http://192.168.1.89:9091 but from Windows I can not connect. Am I missing some set-up on the windows side? I'm only trying to access from within my network - not from the internet (yet).
 

Attachments

  • CentOS_7.PNG
    CentOS_7.PNG
    23.6 KB · Views: 124
  • IE11.PNG
    IE11.PNG
    11.9 KB · Views: 143
  • nmap.PNG
    nmap.PNG
    23.2 KB · Views: 133
  • ping.PNG
    ping.PNG
    4.2 KB · Views: 122

My Computer

System One

  • OS
    Windows 10 Pro Prieview x64
    Computer type
    Laptop
    System Manufacturer/Model
    MacBook Pro Core2Duo
    CPU
    T7600
    Memory
    3
    Graphics Card(s)
    ATI Radeon X1600
    Monitor(s) Displays
    Internal
    Screen Resolution
    1440 x 800
    Hard Drives
    40GB
    Keyboard
    Apple
    Mouse
    Apple
    Internet Speed
    Varies
    Browser
    Various
    Antivirus
    Defender

My Computer

System One

  • OS
    Windows 8.0 x64
    Computer type
    Laptop
    System Manufacturer/Model
    Toshiba Satelite C55D-A Laptop
    CPU
    AMD EI 1200
    Memory
    4 gb DDR3
    Graphics Card(s)
    Raedon 340 MB dedicated Ram
    Monitor(s) Displays
    Built in
    Screen Resolution
    1366 x 768
    Hard Drives
    640 GB (spinner) Sata II
    Keyboard
    Built in
    Mouse
    Touch pad
Hi there

I can't answer specifically because I'm not running HYPER-V. I've found though if you use VMWARE VPLAYER (It IS still free in spite of the confusion on the VMware website these days about a PAID one --that's only for COMMERCIAL organisations releases.. Then set networking to Bridged or NAT --your choice depending on how many IP addresses you want to use.

Note though if you use VBOX/VMWARE you'll have to uninstall HYPER-V. The VM though you've re-created should import / convert into the format needed by VBOX / VMWARE.

If you want to continue with HYPER-V Kari seems to be the expert on that one. I've had hideous problems with the Virtual NIC and Wifi with HYPER-V so I've given up on that one for the moment and am running my VM's successfully on VMWARE workstation --I'm typing this on a Windows 8.1 VM running on a Linux Host.

Cheers
jimbo
 

My Computer

System One

  • OS
    Linux Centos 7, W8.1, W7, W2K3 Server W10
    Computer type
    PC/Desktop
    Monitor(s) Displays
    1 X LG 40 inch TV
    Hard Drives
    SSD's * 3 (Samsung 840 series) 250 GB
    2 X 3 TB sata
    5 X 1 TB sata
    Internet Speed
    0.12 GB/s (120Mb/s)
Thanks both. @Miles - I can access the machine OK using the Hyper-V Manager. There is running a service that I can access on http :// localhost:9091 or its IP http://192.168.1.89:9091 - what I can't do is connect on this IP and port from the host (Win 8) PC (the VM is also running on this PC). @Jimbo - the networking is working fine both for Wifi and Ethernet on host and on my VMs (Wifi is bridged). I can also connect to VM using ssh and map network drives from linux to by host Win 8 PC - I just can't access using a browser on this 9091 port and don't know how to investigate it. Everything I find on Google says putting the IP and port should just work for all local machines but something is blocking it.
 

My Computer

System One

  • OS
    Windows 10 Pro Prieview x64
    Computer type
    Laptop
    System Manufacturer/Model
    MacBook Pro Core2Duo
    CPU
    T7600
    Memory
    3
    Graphics Card(s)
    ATI Radeon X1600
    Monitor(s) Displays
    Internal
    Screen Resolution
    1440 x 800
    Hard Drives
    40GB
    Keyboard
    Apple
    Mouse
    Apple
    Internet Speed
    Varies
    Browser
    Various
    Antivirus
    Defender

My Computer

System One

  • OS
    Windows 8.0 x64
    Computer type
    Laptop
    System Manufacturer/Model
    Toshiba Satelite C55D-A Laptop
    CPU
    AMD EI 1200
    Memory
    4 gb DDR3
    Graphics Card(s)
    Raedon 340 MB dedicated Ram
    Monitor(s) Displays
    Built in
    Screen Resolution
    1366 x 768
    Hard Drives
    640 GB (spinner) Sata II
    Keyboard
    Built in
    Mouse
    Touch pad
It turns out it was the CentOS firewall blocking the connection - not Windows or Hyper-V.

In case anyone else has the same issue you need to edit the file /etc/firewalld/zones/public.xml and add the lines in red below to open port 9091 to local addresses 192.168.1.* and then reload the firewall with firewall-cmd --reload

You can then access the service through browsers on your LAN. Hope this may help someone :)

Code:
<?xml version="1.0" encoding="utf-8"?>
<zone>
  <short>Public</short>
  <description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
  <service name="dhcpv6-client"/>
  <service name="ssh"/>
[COLOR=#ff0000]  <rule family="ipv4">
    <source address="192.168.1.0/24"/>
    <port protocol="tcp" port="9091"/>
    <accept/>
  </rule>[/COLOR]
</zone>
 

My Computer

System One

  • OS
    Windows 10 Pro Prieview x64
    Computer type
    Laptop
    System Manufacturer/Model
    MacBook Pro Core2Duo
    CPU
    T7600
    Memory
    3
    Graphics Card(s)
    ATI Radeon X1600
    Monitor(s) Displays
    Internal
    Screen Resolution
    1440 x 800
    Hard Drives
    40GB
    Keyboard
    Apple
    Mouse
    Apple
    Internet Speed
    Varies
    Browser
    Various
    Antivirus
    Defender
Back
Top