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

Re: Qemu: network connection host => guest



On Friday 12 May 2006 16:41, Joao Lourenco wrote:
> 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#@$).

i've tried some of the howtos and it seems to fail at the point where they 
tell me to setup a tun device on the host OS. i did read something about 
tun/tap being broken but since i don't know tun/tap at all, can't tell if 
it's me doing something wrong.

i've been trying to setup hurd as a guest OS inside linux (using qemu). i've 
got hurd running. just couldn't figure out the tun setup on linux to get a 
network going between the host and the guest OS.

if you could post a short howto (for tun or any other ways to network the 
host/guest OSs), i'd appreciate it much. if it makes things easier you can 
assume both the host and the guest OSs being linux.


>
> 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

-- 

anoop aryal
aaryal@foresightint.com



Reply to: