[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questi
Re: [Qemu-devel] Morphix booting in 1024x768 resolution and Win32 questions
Wed, 17 Mar 2004 11:27:47 +0100
Il Tue, 16 Mar 2004 18:38:41 +0200, Markus Niemistö <address@hidden> ha
> 1) Download and extract linux-test package from QEMU homepage
> 2) Configure your kernel to support tun and tap (see bochs manual)
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:
> /sbin/ifconfig $1 172.20.0.1
> and make the file executable: chmod 755 /etc/qemu-ifup
The problem of root execution is the script /etc/qemu-ifup which calls ifconfig
It is not enough to set permissions 755 to this script
You can use sudo,
sudo /sbin/ifconfig $1 172.20.0.1
and put your user in /etc/sudoers file
user ALL=(ALL) NOPASSWD: ALL
Obviously you need sudo package installed in your system
> 4) Start X server with TCP listening turned on: startx -listen_tcp
> 5) Allow X connections from 172.20.0.2 (the quest). Run:
> xhost +172.20.0.2
> 6) Run QEMU with linux-test distribution:
> qemu -hda /tmp/linux-test/linux.img
> 7) Setup DISPLAY variable in quest. Type in linux-test prompt:
> export DISPLAY=172.20.0.1:0
> 8) Run xterm from the quest:
> You can also ping 172.20.0.1 or run xlogo or whatever
> And voilá! 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.
> 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.
> 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).
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
Non ci toglieranno mai....la LIBERTA'!!!