Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using a Ubuntu 10.04 OS as host and Windows 7 as a guest OS. I want to run some Selenium test on my Ubuntu Linux OS whose Selinum server is launched on my Windows 7 guest OS. On the guest OS I can access the Selenium server as http://127.0.0.1:4444/wd/hub. However, I am not able to access the same from my host OS.

Enter image description here

I tried a different solution described online, but this combination seemed rare, and I never shortlisted on any answer. Most of the things I've seen were to use the IP address as 10.0.2.2 from the host, which left me trying http://10.0.2.2:4444/wd/hub from the host OS with hardly any luck.

share|improve this question
    
The solution given at [this][1] askubuntu forum solved my problem! [1]: askubuntu.com/questions/149218/… –  bragboy Aug 16 '12 at 21:00
add comment

1 Answer

You need to use the Virtual OS's IP address. For Windows 7 as the guest, click on Start, type cmd and press Enter. Type IPCONFIG and press Enter. Look for the IPv4 Address, and use that in place of the IP address.

The issue is that each device (physical or virtual) requires its own IP address on the network in order to connect. In the default mode, VirtualBox will assign its own address and address range to the virtual machines, and "bridge" the connections with the host to get Internet Access. That is where the whole 10.0.2.2 thing comes in. Your address may be different though, so that's why it's good to just double check as described above.

share|improve this answer
    
I found 10.0.2.15, even that did not work –  bragboy Aug 16 '12 at 20:26
    
Did you check the firewall on the guest? –  Canadian Luke Aug 16 '12 at 20:27
    
I have uploaded the settings as a screenshot. Please take a look –  bragboy Aug 16 '12 at 20:33
    
I disabled the firewall too as you advised. I am using the NAT mode as opposed the Bridge mode –  bragboy Aug 16 '12 at 20:33
    
From Ubuntu's terminal, can you ping 10.0.2.15? –  Canadian Luke Aug 16 '12 at 20:41
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.