Page 1 of 1
How to access MSSQL on Windows Guest?
Posted: 3. Mar 2010, 06:13
by RobG
I've Googled all over for this but haven't come up with an answer...
I have a WinXP guest installation, with MSSQL 2008 installed on it. The host's IP is 10.0.2.15, but I can't see that IP from my Mac. I'd love to be able to connect to it from the OSX side of things. How can I do this? I've ensured Widows Firewall is turned off. This is on Snow Leopard and VBox 3.1.4.
Thanks!
Rob
Re: How to access MSSQL on Windows Guest?
Posted: 3. Mar 2010, 16:03
by Perryg
Using NAT you would need to setup port forwarding. Or if there is a router in the network you can switch to Bridged mode.
If there is no router then you can use host-only and add a second adapter if the guest needs Internet access.
See Section Chapter 6. Virtual networking in your VirtualBox Users Guide
Re: How to access MSSQL on Windows Guest?
Posted: 3. Mar 2010, 18:09
by RobG
I read that part of the manual and configured an adapter with Bridged networking, and pointed it to en0 on my Mac... but I still can't "see" the Guest.
When I do ifconfig, I see en0 listed, but no IP address assigned to it. On the Guest, I see another network adapter, and it also has no IP assigned. Do I need to assign IPs to each one adapter? I.e. is this acting as if I had a crossover cable connecting two computers together?
Thanks again!
Rob
Re: How to access MSSQL on Windows Guest?
Posted: 3. Mar 2010, 18:25
by Perryg
Do you have a router?
Does it support DHCP?
Re: How to access MSSQL on Windows Guest?
Posted: 3. Mar 2010, 18:53
by RobG
Yes, I have a wireless router with DHCP... it's connected to my AirPort, though my internet comes through my Verizon 3G/USB760 modem.
Rob
Re: How to access MSSQL on Windows Guest?
Posted: 3. Mar 2010, 19:00
by Perryg
If your configuration does not work with Bridged mode then I would switch to using host-only as the primary (1) adapter so the host and guest can communicate and add a second adapter set to NAT so the guest has the Internet.
When troubleshooting I would get one thing working before I move to the other, so get the host and guest talking first then shut down the guest and add the second adapter.
Re: How to access MSSQL on Windows Guest?
Posted: 3. Mar 2010, 19:41
by RobG
Hey...
I appreciate your help, but you've lost me.
Given my current situation, is it like having two computers connected via a crossover? If so, I can work with that.
The Guest currently has internet access and can access the host. That has always worked.
But getting the Host to access services on the Guest is the problem. Also, I would rather not involve an external router, since this is on a laptop, and I need access to the MSSQL server for development purposes. In short, I need to create a datasource on my ColdFusion server on my Mac to talk to the MSSQL server on the Guest.
So what I'm not understanding is this... with the second adapter active and set to Bridged mode, should that second interface get an IP automatically? I'm guessing not since there is no DHCP server around. Likewise, I'm guessing I also need to configure my en0 adapter on the Mac with an IP. If this is all I have to do, that's easy.
Thanks.
Rob
Re: How to access MSSQL on Windows Guest?
Posted: 3. Mar 2010, 20:41
by Perryg
OK here are the steps:
(1) shut down the guest
(2) go to the network settings of the guest and change the first adapter to host-only.
(3) click on adapter (2) and set it to NAT. Make sure that you click on enable network adapter.
(4) save and close.
Start the guest and it should add the necessary adapters. You should now have (2) adapters in the guest.
You can then run ipconfig /all in a command window and it will show you the network configuration. ( you may or may not need to reboot for these to take effect in Windows).
You can then run ifconfig -a on the host and it will show you the network address it is using.
You should have 192.168.56.x and 10.0.2.0 in the guest and 192.168.56.x in the host along with your Internet address.
When accessing the guest from the host you would use the 192.168.56.x to get to it.
This does not involve an external router and will work Host to Guest regardless of whether you are connected to the Internet or not. The VBox host-only adapter was designed specifically for this purpose and works great. While you can create your own network (crossover like) it may not work as it should with VirtualBox.
Re: How to access MSSQL on Windows Guest?
Posted: 3. Mar 2010, 21:12
by RobG
Bingo! It works!! THANK YOU for your help!!
Rob