Connecting to host OS database from guest OS VirtualBox virtual machine

4

1

I’m using Pentaho BI server in a CentOS VirtualBox machine, and now I want to connect it to an SQL Server database that I am running in my Windows host OS (localhost).

Is there a simple way to do this? I’ve only found some references to do the opposite but I don’t really know if the same bridge principle can be applied in this situation.

franpen

Posted 2015-02-10T20:41:32.730

Reputation: 43

Answers

4

You would need to setup a second “host only adapter” within the VirtualBox host virtual machine configuration and on the CentOS guest virtual machine itself that would allow you to connect to your main host OS machine from the guest OS (CentOS) via the “router” address of that “host only adapter.”

For example, in the instructions I posted here the main “router” address you would connect to from CentOS would be 192.168.56.1 which would give you access to all of the “localhost” network services/connections you have on your host OS machine (Windows) from the guest OS (CentOS) via the 192.168.56.1 address.

JakeGould

Posted 2015-02-10T20:41:32.730

Reputation: 38 217