[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Qemu: network connection host => guest



Hi,

Yes.  It is possible to have a network connection between the host and
the virtual (QEMU) machine.  The way you setup the connection depends on
your host OS: Window$ or Linux.  If you search the web for a while
you'll find some suggestions for both OS.  If you can't make it work,
let me know, and I'll try to prepare a small HOWTO for you (for a Linux
based host, I don't use Win#@$).

Once you get a valid network connection between the host and the virtual
machine, you may use SSH to redirect connections on the host to the
virtual machine with:

ssh VMIP -L LP:localhost:RP

where
VMIP = virtual machine IP
LP   = local port (on the host)
RP   = remore port (on the virtual machine)

For example, assuming your virtual machine (VM) has ip 172.20.0.2 and
that you want to redirect your http port (80) to the VM 8080 port you
should execute

ssh 172.20.0.2 -L 80:localhost:8080

>From now on, any connection to HOST:80 will be forwarded to VM:8080

Hope this helps,
João

On Fri, 2006-05-12 at 21:56 +0200, André Wendt wrote:
> Hi,
> 
> the qemu (0.8.0-3) documentation implies that the option "-redir
> tcp:8080::80" permits a connection from host:8080 to guest:80. However, I
> already filed a bug [1] because it doesn't work (connection timeout) --
> and I'm not the only one with this problem [2]. According to [3], it
> doesn't work at all.
> 
> Do you know of any other possibility to connect from the host to the Qemu
> guest, e.g. accessing a running server in the emulation?
> 
> Thanks,
> André
> 
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=366847
> [2] http://qemu.dad-answers.com/viewtopic.php?p=4866
> [3] http://qemu.dad-answers.com/viewtopic.php?p=4915
> 
> 
-- 
Joao Lourenco                  Tels: (+351) 212 948 536
Dep. Informatica                     (+351) 212 948 300
FCT / Univ. Nova de Lisboa      Ext: 10740
Quinta da Torre                 Fax: (+351) 212 948 541
P-2829-516 CAPARICA   http://www-asc.di.fct.unl.pt/~jml



Reply to: