Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B3YHY-00062U-M8 for qemu-devel@nongnu.org; Wed, 17 Mar 2004 05:28:16 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B3YH1-0005j4-Jb for qemu-devel@nongnu.org; Wed, 17 Mar 2004 05:28:14 -0500 Received: from [212.216.176.118] (helo=vsmtp14.tin.it) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B3YH0-0005iT-RR for qemu-devel@nongnu.org; Wed, 17 Mar 2004 05:27:43 -0500 Received: from wallace (82.49.10.250) by vsmtp14.tin.it (7.0.027) id 40571CC300023BBC for qemu-devel@nongnu.org; Wed, 17 Mar 2004 11:27:32 +0100 Date: Wed, 17 Mar 2004 11:27:47 +0100 From: Luca Ferroni Subject: Re: [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questions Message-Id: <20040317112747.077bcc0e.luca.ferroni@studio.unibo.it> In-Reply-To: <20040316183841.3c8c7ece.markus.niemisto@iki.fi> References: <200403161542.26268.jm@poure.com> <200403161616.09613.jm@poure.com> <20040316183841.3c8c7ece.markus.niemisto@iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Il Tue, 16 Mar 2004 18:38:41 +0200, Markus Niemist=F6 ha scritto: > 1) Download and extract linux-test package from QEMU homepage >=20 > 2) Configure your kernel to support tun and tap (see bochs manual) >=20 When I insert module tun in my kernel 2.6.4, I have to rebuild the link in = devfs to make qemu working this is the original link /dev/net/tun -> misc/net/tun this is the modified link /dev/net/tun -> /dev/misc/net/tun > 3) Create a network script; put the following lines to the > /etc/qemu-ifup file: >=20 > #!/bin/sh > /sbin/ifconfig $1 172.20.0.1 >=20 > and make the file executable: chmod 755 /etc/qemu-ifup >=20 The problem of root execution is the script /etc/qemu-ifup which calls ifco= nfig It is not enough to set permissions 755 to this script You can use sudo,=20 #!/bin/sh sudo /sbin/ifconfig $1 172.20.0.1 and put your user in /etc/sudoers file user ALL=3D(ALL) NOPASSWD: ALL Obviously you need sudo package installed in your system > 4) Start X server with TCP listening turned on: startx -listen_tcp >=20 > 5) Allow X connections from 172.20.0.2 (the quest). Run: >=20 > xhost +172.20.0.2 >=20 > 6) Run QEMU with linux-test distribution: >=20 > qemu -hda /tmp/linux-test/linux.img >=20 > 7) Setup DISPLAY variable in quest. Type in linux-test prompt: >=20 > export DISPLAY=3D172.20.0.1:0 >=20 > 8) Run xterm from the quest: >=20 > /usr/X11R6/bin/xterm >=20 > You can also ping 172.20.0.1 or run xlogo or whatever >=20 > And voil=E1! You have an xterm running in QEMU but it is displayed on your > host's X server. Network works! I have to run QEMU as root, so if this > doesn't work, try running QEMU as root. >=20 > So what really happens is that you see the QEMU quest as 172.20.0.2 and > it sees your computer as 172.20.0.1. >=20 > The following is untested but AFAIK it should work. In order to access > the Internet from the QEMU quest, set the gateway and nameserver of the > host to the gateway and nameserver you normally use on your computer. > You may have to do some additional route configuration, but I am not > sure (and cannot help you with that becouse I don't know that much > about Linux). >=20 In your host OS you have to build iptables with NAT support in your kernel. then you have to install iptables package and do the following: echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE And so, you can surf the web and make net update to your guest ... great! I hope this help bye --=20 ---------------------------------------- Non ci toglieranno mai....la LIBERTA'!!! Luca Ferroni www.cs.unibo.it/~fferroni/ ----------------------------------------