Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am on Windows 7, building an web application.

There are a few services that I need to connect to, and don't want to go through the hassle of installing them on Windows.

I also run VirtualBox with Ubuntu.

Can I install memcached (for example) on Ubuntu, and then connect to it from my windows operating system? If so, how?


There seems to be a confusion in what I'm asking. I just want to connect to services running on my Ubuntu virtual machine from my host/parent windows 7 operating system.

Is this possible?

share|improve this question

migrated from Sep 8 '11 at 8:00

This question came from our site for professional and enthusiast programmers.

Once you have installed Memcached (or in fact any other software) on the guest, you can easily connect to that instance from the host (Windows 7 in your scenario). You have to configure the VirtualBox to let the guest and the host to talk to each other.

There are different networking modes in VirtualBox (Bridged Networking, Internal Networking, Host-Only Networking etc). Based upon your requirement you can configure the appropriate networking mode by following the instructions in the URL.

I have Ubuntu 11.04 as Guest and Host OS using VirtualBox and I have installed Hadoop on them. I configured VirtualBox for Bridged Networking and the applications in the host and the guest were able to talk to each other. The disadvantage of the Bridged Networking is that the Host has to be connected to a physical network (through a router or something, so that the host and the guest can talk to each other). If the host machine is not connected to a physical network then Host-Only Networking should be configured in the VirtualBox.

share|improve this answer

Actually sounds like this might be better asked as multiple questions (1)How can I install memcached on Ubuntu and (2) How can I connect my app to a memcached instance running on a separate Ubuntu machine.

You may want to check out this article where the author basically tries to do exactly what you're doing:

Pretty sure you can install memcached on ubuntu via apt these days:

sudo apt-get install memcached
/etc/init.d/memcached restart
share|improve this answer
Hi, my quesiton is how to connect to a virtualpc from the host computer, not how to install memcached (that was just an example). From my host computer (windows 7), I want to connect to the e.g. memcached running on the VM. – user27449 Sep 8 '11 at 13:20
you want to use something like Memcached Manager to manage the memcache instance from Windows - – brendan Sep 8 '11 at 13:33
I don't think you get what I'm asking :) I don't want to install memcached on windows, let's forget memcached for a moment. I want to connect to services running on my ubuntu VM from my windows (host/parent operating system). Get it? – user27449 Sep 8 '11 at 23:26

Most of these services already listen for commands over TCP/IP ports. All that is left is to setup the required networking. There are many configuration possible, ranging from the guest being able to only talk to the host, and up to the guest being fully equal to the host as a network computer.

A good place to start is this tutorial : Network & sharing in VirtualBox - Full tutorial, which explains nicely all the concepts and software, and with many screen-captures.

share|improve this answer
On my windows host computer, I want to connect to services running on the Ubuntu VM, so for example, my web application that I am developing on the windows computer can connect to services on the VM like memcached, redis, mysql etc. So yes, I would need the VM to have an IP address and then a seperate port for each service (which they all usually run on a specific port anyhow). – user27449 Sep 11 '11 at 22:00
This is certainly feasible, and in fact I do this frequently. If the VM is configured correctly, then it is just another computer on the network. Does your question pertain to VirtualBox network setup ? – harrymc Sep 12 '11 at 8:27
yes the network setup is what I don't get. – user27449 Sep 15 '11 at 0:40
I have edited my answer. – harrymc Sep 15 '11 at 6:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .