I've setup a virtual development machine with Windows Web Server 2008 R2 and installed SQL Server 2008 R2 Express on it as well. I didn't install any SQL tools on it, because I have them on the host machine.
Virtual machine is running on VMWare Workstation 8.
VM has 2 NICs
- Bridged so others (testers) can access web application in development
- Host-only so I can have faster communication with this machine on my host
I'm not running SQL Browser and am connecting to it directly using machine\instance,port name. This way I can connect to it even though SQL is not discoverable.
I've opened SQL Engine's network port on the firewall.
I can access my SQL using bridged IP address, but not host-only IP address. I've checked Protocols for SQL Express and enabled TCP/IP and checked IP Addresses tab which shows 5 IPs:
- 2 for bridged network (v6 and v4)
- 2 for localhost (v6 and v4)
- one v6 IP address (fe80::100:7f:fffe%12) that is not related to either bridged or host-only network.
This somehow explains it why I can't access my SQL using host-only network. Even if I change these settings and change bridged IP to host-only one, I still can't access my SQL.
it seems as if host-only network is not visible to SQL. Although it's working.
Another fact is that if I ping my VM from my host I get a response on bridged network but not on host-only one.
I suspect this must be somehow related to VM's host-only network settings. Or maybe not. Hence this question. The question is of course How can I setup SQL server on my VM so that I will be able to access it via my host machine and from localhost (because web application is running on the same machine)? But I don't want SQL server to accessible via bridged network so nobody else will be able to access it.