2

I'm currently having a Macbook Pro M1 as my development machine, running Docker on Mac for my containerised applications and Windows 11 VM using Parallels as my development environment. In this Windows VM lies the SQL Server database that Docker needs to connect to. To those who may be unaware, no, the M1 chip doesn't support nested virtualisation.

Therein lies my question: how do I establish a connection from Docker through the MacOS host to SQL Server in Windows VM?

Points that I'm aware of:

  • There is no direct connection between Docker and Windows
  • Docker has its own subnet assigned by default e.g. 192.168.65.0/24
  • Parallels uses shared network by default, which places the Windows VM in an invisible subnet e.g. 10.211.55.x
  • Parallels support bridged network but ideally would like the corporate VPN to just be in the MacOS host
  • Inside Mac's host file, an entry exists to resolve the private IP of the Windows VM to a hostname e.g. 10.211.55.x windows-11.shared
  • Docker uses a specific hostname to establish a connection to the MacOS host i.e. host.docker.internal
  • SQL Server is configured to accept TCP connections through port 1433
  • Using the connection string Server=windows-11.shared;Database=xxx;User ID=xxx;Password=xxx throws the "Server not found" error because no direct connection

Advice greatly appreciated!

Vergil
  • 69
  • 2
  • Is Windows Firewall with Advanced security inside the Windows 11 guest configured to permit incoming connections to TCP port 1433? From anywhere (since 192.168.65.0/24 is clearly a different subnet than anything on 10.211.55.x)? – AlwaysLearning Feb 21 '22 at 05:48
  • Yes the firewall is off – Vergil Feb 21 '22 at 06:14
  • So with the firewall off can you `ping 10.211.55.x` successfully from the macOS host? Can you `telnet 10.211.55.x 1433` successfully from the macOS host? – AlwaysLearning Feb 21 '22 at 10:15
  • I'm confused, I thought it was not possible to run SQL server on the M1 architecture, whether within Parallels or Docker? – lee_mcmullen Apr 26 '22 at 10:57
  • @Vergil how were you able to install SQL Server on UR M1 inside Parallels? I currently have M2 Max with Parallels running Windows 11 Pro but I am unable to install SQL, Visual Studio installed without any issues. – Ismail Umar Jun 16 '23 at 09:05

0 Answers0