Connecting to SQL Server in Parallels from Docker on Mac - sql-server

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!

Related

Can't connect to SQL Server in docker from Hyper-V virtual machine

I have a SQL Server instance in docker which maps its port 1433 to host 1433.
It's working and I connect to it.
Next, I have a Windows (actually, its old Windows 7) virtual machine in Hyper-V on same host. Virtual machine can see host (to be specific at ip 192.168.10.1).
But from virtual machine I can not connect to SQL Server on port 1433. I can't simply open a socket from virtual machine (have tried though python).
I've tried to stop docker container and start simple web server on 1433 port and I can easily connect to it from virtual machine. But once SQL Server appears there, something goes wrong.
Any ideas, what may be wrong or what to check (just got a humble idea that may be caused by MTU, but not yet checked - makes sense?)

rdc windows10 to headless VM using a port number fails

I upgraded my desktop machine from windows 8 to 10 and now I'm unable to connect to any of my Vms (hosted on another server) using RDC.
I have one server(Ubuntu no GUI) that host multiple VM's(windows and Linux w and w/o GUI) using VirtualBox. From my laptop I normally connect with RDC using the host(server) ip followed by port number (192.168.0.2:3396 assigned during create VM process) works fine, at that point I adjust network setting(static ip) for the LAN and exit. etc etc..
On the windows 10 desktop I receive and error; This computer can not connect to the remote computer. I can however connect with the ip address (192.168.0.5) no port. this part is fine for existing Vms that have static ip. I need to connect and assign the ip.
Thanks for any feedback or suggestions

Connecting Java EE application with Sql Server in virtual box

I have Ubuntu installed on my laptop, and I'm developing a web application with java, using eclipse, and I want to connect, with sql server. To do this I have installed sql server 2012 in my virtual machine(Virtual box).
I have installed windows 7. I'm using Bridged Adapter setting, to receive ip from dhcp.
I have tested connection with ping command and is running successful, but when I run my application I have this error: Unknown server host name 'PEACH-PC'
the PEACH-PC is the
have you added Peach-PC variable in the etc/hosts file? that may be the case. If not add the ip and the variable there.

connecting biztalk to sql server on virtual pc

I have biztalk server installed on my host(physical machine) and i need to connect or use the sql server on my virtual pc 2007 machine.i have been running the virtual pc in loopback adapter networking mode but when i try to configure biztalk on the host machine it is not able to connect to the sql server on the virtual pc. it says
the database server you specified cannot be reached.any suggestions...
You will probably need to change the networking mode on the virtual machine. In VirtualBox you can configure port forwarding for this. There may be something similar in Virtual PC.

SQL Server communication between VirtualBox images

I have a WinXP host with VirtualBox 3.1.2 installed. I have a VirtualBox image called "hydrogen" on which I installed WinXP and MS SQL Server 2005 Express. I have another VirtualBox image called "helium" on which I installed WinXP. I am trying to create a ODBC DSN on "helium" that connects to SQL Server on "hydrogen" but it fails.
All of the documentation I've seen so far only says to use a "bridged adapter" in my VirtualBox image settings. I've done that but I still don't have communication.
The express edition does not listen on remote ports by default. You can enable remote connections using the "Surface Area Configuration Tool" or by running this SQL script:
exec sys.sp_configure N'remote access', N'1'
go
reconfigure with override
go
Also, if you use a bridged adapter, your virtual boxes are sharing your host's IP address. That means you'll have to configure both instances of SQL Server on a separate port.
I've gone through a couple of tweaks and changes and I have it working. My environment:
Host:
WinXP Pro
SQL Server 2005
Guest "Hydrogen":
WinXP Pro
SQL Server 2005
Network Adapter #1: NAT
Network Adapter #2: Bridged
Guest "Helium":
WinXP Pro
Network Adapter #1: NAT
Network Adapter #2: Bridged
On "Hydrogen", I ran the Network Setup wizard, specifying that it was part of a network that did not have an internet connect (part of the "Other" option). I rebooted "Hydrogen".
On "Helium", I ran the Network Setup wizard, specifying taht it ws part of a network that did not have an internet connect (part of the "Other" option). I rebooted "Helium".
I turned off the firewall on "Hydrogen".
I can now connect to SQL Server on "Hydrogen" from both "Helium" and my host. Some of these settings may be extraneous; I don't know. But I know it's working for me reliably now, even after rebooting the host.

Resources