Note
The following methods only applies for Genymotion Desktop, and if your server/service run on the same host machine.
How to access a local host or service from a virtual device?
If the application you are developing needs to connect to a local server or service, such as a REST service, you may need your virtual device to access your local host.
With VirtualBox
You can use the IP address 10.0.3.2 from the virtual device to reach your service or server.
IP 10.0.3.2 is a VirtualBox alias to your host loopback interface (i.e., 127.0.0.1 on your host machine).
If you run a service on your host machine which listens to localhost:1234, it can be accessed from the virtual device using the IP 10.0.3.2:1234.
With QEMU
Unlike VirtualBox, there is no loopback interface when using QEMU.
However, it is possible to use adb reverse to bind a virtual device local port to a host local port.
If you run a service on your host machine that listens to localhost:1234, then use the command:
adb reverse tcp:1234 tcp:1234
This will bind the virtual device local TCP port 1234 to your host machine local TCP port 1234.
Thus, the service can be accessed from the virtual device using the IP localhost:1234.