I have an XP laptop on which I am running an Ubuntu distro inside VirtualBox which is running a website via Tomcat. When I am in the VM I can access the site with localhost:8080/
What I really need to do, though, is to access the VM localhost from XP. vm-computer-name:8080/ isn't recognized.
Any help is much appreciated.
Go your Virtual Machine's network settings in Virtualbox. Set the network card not as attached through NAT, but through BRIDGED ADAPTER. If you have multiple adapters on your host machine, select the main one, the one you're using to obtain an IP from your router.
Use a browser to check whether Tomcat is running on URL http://localhost:8080 , where 8080 is the Tomcat port specified in conf/server. xml. If Tomcat is running properly and you specified the correct port, the browser displays the Tomcat homepage.
Setup your VM to run a host-only network, then reboot or restart networking to update DHCP. The IP address on the guest will now be accessible from the host.
You can also use bridged network mode, but that won't work when the host is disconnected from the network.
Get the IP Address of your guest OS and access it via that.
The following helped me after a new VM and tomcat installation.
Get the IP address of the Guest OS and the port number on which tomcat was started. Then you can access it via:
IP:Port/
In case you are not able to access it still or if you get no response, try
sudo iptables -F
This would flush the tables and would reflect the new mapping. You would need to do this only once though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With