Search code examples
sqlsql-server-2012virtual-machinevirtualboxssms-2012

SQL Server - How connect to Guest SQL server on Virtual Box from Host via SSMS


I want to connect to SQL server on VirtualBox VM from Host machine via SSMS and .NET code. Details are as follows

  • Host: Window 10 Professional
  • Virtual Box Ver.:5.2.8 r121009 (Qt5.6.2)
  • Guest: Window 7 Professional(Firewall down)
  • Network: Host:Asus Router- DHCP enter image description here Guest: Currently on NAT enter image description here enter image description here Each time i try to connect from Host, it fails.

SQL Configuration is as follows, Services enter image description here


Protocol enter image description here


TCPIP Properties enter image description here

Please help.

thank you Dheeraj Kumar


Solution

  • I solved it, do below steps

    1. Go to Virtual Box application on Host machine
    2. Now go to settings for Virtual machine
    3. Change Attached To: Bridged Adapter
    4. Now this step is tricky, you may need to choose/try different option here, select one try to run VM and see if it gets the IP address, if not choose another and try again
    5. Once VM gets IP, you can connect it from Host