I've installed VirtualBox on Debian Stretch together with two virtual machines: another Debian Stretch and a Win 10.
I installed a servlet server on the Win 10 VM (Jenkins/Jetty) that listens on port 8080. Locally, in Windows it works fine with http://localhost:8080. But how to reach it from outside?
Retrieving the locally known ip, I get 10.0.2.15 on both, the Debian VM (using ifconfig) and the Win 10 VM (using ipconfig).
Would it be possible - and if, how? - to reach the servlet server on the Win 10 VM from the Debian VM and/or the Debian host?
Yes, it is possible.
The virtual machines cannot talk to the world outside the host
You have to set network configuration on "host-only" for each virtual machine. In this way, the guests and the host are on the same network.
For each guest: power off the virtual machine. Open settings -> network configuration -> select "host-only". Configure ip and dhcp server so the guests are on the same network.
The virtual machines can talk to the world outside the host
You have to set network configuration on "bridged adapter" for each virtual machine. In this way, the guests and the host are on the same network.
For each guest: power off the virtual machine. Open settings -> network configuration -> select "bridged adapter". Configure ip and dhcp server so the guests are on the same network.