How do I connect to SQL Server running in the host from a Hyper V VM?

Viewed 2329

On my PC (host) I've:

  1. Installed SQL Server
  2. Enabled Hyper V, created a new VM connected to "Default Switch" (internal).
  3. Verified that sql server is running telnet localhost 1433 and telnet 172.17.169.1 1433 (hosts IP in the network created by Hyper V), see ip config output
  4. Enabled TCP/IP in SQL Server Network Configuration:
  5. I've added inbound firewall rule: Allow port 1433

enter image description here

However, I'm not able to connect to it from the VM using telnet 172.17.169.1 1433.

CMD Output (Host):

C:\>ipconfig

Windows IP Configuration

...

Ethernet adapter vEthernet (Default Switch):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::34f0:43ed:3e9b:8f6a%27
   IPv4 Address. . . . . . . . . . . : 172.17.169.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.240
   Default Gateway . . . . . . . . . :

C:\>telnet 172.17.169.1 1433
.... OK

CMD Output (VM):

C:\Users\User>ipconfig

Windows IP Configuration


Ethernet adapter Ethernet 2:

   Connection-specific DNS Suffix  . : mshome.net
   Link-local IPv6 Address . . . . . : fe80::99d0:eff8:c623:f82d%12
   IPv4 Address. . . . . . . . . . . : 172.17.169.4
   Subnet Mask . . . . . . . . . . . : 255.255.255.240
   Default Gateway . . . . . . . . . : 172.17.169.1

C:\Users\User>telnet 172.17.169.1 1433
Connecting To 172.17.169.1...Could not open connection to the host, on port 1433: Connect failed
0 Answers
Related