I am using Linux Mint 18 as a host and with Qemu i' running an Androidx86 guest. It works perfectly fine for normal use but there is one thing I would like to be able to do.

I need to execute a command on the host(Linux Mint) when something happens on the Androidx86 guest. I am able to achieve this by creating a ssh connection with the host but this does only work when the host and guest have an internet connection. As soon as I disable wifi/ethernet it stops working.

So what I planned to do was something like 'ssh localhost' which of course doesn't work from inside the guest. Is there a way to avoid needing an active internet connection to execute the command ?

Or is there even a better way to talk with the host from within the guest ?

  • You need an "internal network" or "host-only network" (using VirtualBox terminology). This answer may help you set this up in QEMU: unix.stackexchange.com/a/157228/210243
    – Joe P
    Jun 2, 2017 at 10:30
  • Thank you for the quick answer. Although it says something from ssh from host to guest where i need guest to host i will try it because tcp connections should work voth ways, right ? Also something i forgot to add was that i still need to be able to use the internet on the guest. I just need to get the ssh connection to the host without internet access. Jun 2, 2017 at 11:21
  • The virtual network should put the host and guest on the same subnet allowing any direction communication, yes. And you should be able to have a virtual network in addition to a bridged or NAT network for internet access - sorry, I don't know the details of QEMU
    – Joe P
    Jun 2, 2017 at 11:43
  • I wasn't able to get it working with the link you provided. That would probably have needed more research on my end but i stumbled on another, much simpler way to do it that even works without specifying any network options for qemu. You can just connect from the guest to the host using the ip wich is assigned from qemu by default. So you are able to open an ssh connection from the guest to the host and also at the time are able to access the internet from the guest. Jun 4, 2017 at 12:54


You must log in to answer this question.

Browse other questions tagged .