Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How can I access the VM's localhost from my host machine?

avatar
New Contributor

I've got the VM up and running and I have a Java webserver that runs on the VM's localhost on port 8000. I'd like to be able to access this from my browser in my host machine, but I'm not sure exactly how to do that. I looked around and found that you can change the network type to bridged adapter, but doing that breaks some stuff in the sandbox and doesn't allow me to even ssh in afterwards.

So if someone could help me figure that out and get access to the VM's localhost from my host machine, that would be great. I am using the 2.4 Sandbox because the 2.5 version was having some issues with keeping services active for some reason.

Thanks.

3 REPLIES 3

avatar
Master Mentor

@Michael Knight

You will need to enable "Port Forwarding" on your "NAT" network.

For more details please refer to the section "Update VirtualBox VM ports" in the article.

https://community.hortonworks.com/articles/65914/how-to-add-ports-to-the-hdp-25-virtualbox-sandbox.h...

avatar
New Contributor

Hi. This tutorial is for the 2.5 version. I am using the 2.4 version because of issues with the 2.5 version. Is there a version for 2.4?

avatar
Master Mentor

@Michael Knight

Allowing port 8000 to be accessed outside of the VirtualBox VM is not specific to Sandbox 2.4/2.5 version.

It's a Virtual Box preference.The port forwarding steps should remain same.