PDA

View Full Version : vtun and qemu - anyone got it going?



WedDa
12-14-2004, 07:37 PM
Hi! I recently installed qemu deb package 0.6.1-1 and Windows 98 on my Debian box. This version of Qemu uses vtun (instead of slirp?) to tunnel IP traffic to/from the emulated system. I have not managed to get the vtun network working. Is there anyone out there who has managed to run qemu+windows+network? If so, can you please give me some hints on how to configure the network. A vtund.conf would be nice.

MerryC!
/WedDa

pau1knopp
12-15-2004, 08:20 AM
Glad to meet another Qemu enthusiast. Works great on KNOPPIX running from CD. It is especially helpful when a new Knoppix version comes out as you can boot it and do a review right from the downloaded ISO. I also am running a Windows 98 virtual machine using qemu, and now have the sound and networking functional. Performance is similar to VMWare Workstaiton (at least in my experiences with VMWS version 2.0 and 3.0)

If you are talking about the tun / tap network interface, what version of Knoppix are you using? I don't think that TUN / TAP is part of a standard KNX release, so you would have to remaster. I am just using the local NAT qemu network, and that works well for my purposes, and no need to install TUN / TAP for network access. (All runs nicely in user space with no need for admin / root access either).

Here is the command line I am using:

./qemu -L . -hda win98.img -cdrom /dev/cdrom -boot c -m 256 -enable-audio -user-net -localtime

You may want to also check out the QEMU forum at:

http://www.dad-answers.com/qemu-forum/index.php

I would be interested in speaking with you regarding any success you may have had with Windows 2000 or XP.

Regards,

Paul

WedDa
12-15-2004, 01:14 PM
Thanx for you reply pau1knopp!

Yes, Qemu rocks in many ways. Being able to boot any LIVE-isos just like that is really nice. My main reason though for using Qemu and Windows 98 is actually to be able to run some comparatively small scientific command-line Windows packages on phylogenetics and biogeography and not have to reboot my machine all the time. For instance, DIVA (http://www.ebc.uu.se/systzoo/research/diva/diva.html) and TreeFitter (http://www.ebc.uu.se/systzoo/research/treefitter/treefitter.html). At some point, like a year ago, at least one of these programs (don't remember which) worked with Wine, but not anymore. Damn shame. Therefor Qemu. However, since I have not been able to get the network going this time around I can not transfer output-files back to my Linux system. Damn irritating shame.

Back in July, I successfully installed and ran Windows XP with Qemu 0.5.4 (or 0.5.5). But the performance was VERY poor. I am using a HP NX7000 Pentium-M 1.5GHz/512MB RAM, and Windows 98 is ok, using Debian's 0.6.1-1 package. Actually I am running a HD install of Kanotix Bug Hunter 9A, which is a great Knoppix mod for laptops.

Yes, I am referring to the tun / tap network interface, which was not required before, and is a pain to configure. At least the debian templates are too cryptic for me.

Are you using a standard debian/knoppix Qemu package? Or did you compile it from scratch? What version?

The local NAT qemu network? Is that what is compiled in with the " ./configure --enable-slirp" option and activated with "-user-net"? I had this going before in earlier Qemu versions, but I don't remember now - the virtual network card is detected during the installation of Windows, but can I change my ("defective") qemu binary later on and have my installed Windows detect it when it boots instead? Do I need to configure the network card (IP-numbers, DNSs etc) in Windows?

Btw, how is the graphics looking for you in Windows 98? I have only 640x480 16-bit, which is ok for my purposes but a bit boring.

Thanx for your feedback and happy for more!

Will have a look at the qemu-forum.

Regards,
Andreas

pau1knopp
12-16-2004, 12:08 PM
Good to know you can get Windows XP going. I had it running once, and performance (with 0.6.0 and / or 0.6.1) was good. However, I built the disk image too small and the vm quickly ran out of space. When trying to recreate my steps, I keep getting a "disk boot unreadable" error. In the current state of things, it is important to note which utility or method you use to build a disk image, and what version of qemu you use to install a particular O/S. It is obvious that this very powerful and intriguing emulation package is still not at version 1.0 yet, but the potential is incredible. I am sure MS and VMWare must be taking notes regarding this competing option.

Since I run everything from CD, compiling is not an (easy) option. I just pull down the latest precompiled binaries from qemu from their download page and am currently running 0.6.0 and 0.6.1 on both Windows 2000 and KNOPPIX 3.4 Live CD hosts. I would recommend you start with these before compiling since they "just work" and you can see how things should happen before you compile it yourself with the various options.

The -user-net option creates a virtual NAT bridged environment (complete with dhcp server) between the host and the client systems. All traffic to the outside is natted through the host NIC. TUN/TAP lets you obtain a real IP address on your real network, and does not use NAT. I like using both, but haven't messed with TUN/TAP yet, as it would require remastering or an HD install.

I'm waiting on TUN/TAP till I get Win2K and XP running first. I am going to obtain the latest version from cvs and compile it (in a chroot environment) to try to work around work around the current known Win2k/XP install issues being discussed in the forum.

I have sound (sb awe 32 emulation), video (32 bit), and networking (realtek NIC emulation) working great after some tweaking based on tips I found in the forum. I am actually able to run Win98 faster in emulation than I was on any of my real pc's back in the day ;)

Looking forward to seeing you there. I use the same user account ID as here, so you can track my various posts regarding any of the above discussions.

Regards,

~pau1

WedDa
12-16-2004, 02:39 PM
Hmm, ok. I have just re-installed the debian Qemu package 0.6.1-1 and Windows 98. I have run this qemu command all the time:

qemu -m 128 -hda /home/andreas/qemu_win/virtual_disk.img -cdrom /dev/cdrom -boot d -user-net -enable-audio

There are some BSOD messages during install, but the installation completes anyway.

Sound card is detected and functional (sb16). Nice.

There is a virtual network card detected (realtek rtl8029), which is attached to the TCP/IP interface. Running ipconfig in a command-line box tells me that there are three network cards (0,1,2). Number 2 has gotten an IP-number and a netmask (169.254.222.52/255.255.0.0), but no gateway. Number 0 and 1 are not configurated at all (0.0.0.0/0.0.0.0), and probably part of some NDIS/VPN stuff. Internet is not reachable anyway. Darn.

Do I need to change any NAT configurations in Qemu? Add a gateway from within windows?

Screen resolution and color depth can be increased, but the boot procedure fails miserably with anything over 640x480x16. It gives me some draconic protection error. Sad.

Are the possible settings somehow connected to the X-server? Maybe my laptop BIOS/Radeon 9200 is causing some problem...

What do you think about some other Windows versions? I have licences for Windows 98 and XP? Is 95 or 2000 more compatible? Is it even worth trying XP? I mean, I could just abandon the whole thing and dual boot instead... But that would be taking the easy way out ;-)

Thank you for all your help!

/Andreas

pau1knopp
12-16-2004, 03:25 PM
Andreas,

You should not have to change anything if you have an IP address on the client. You will not be able to ping www.yahoo.com (because you are "inside" the natted network), but you should be able to use a browser to access it from the client, as long as the internet connection is working on the host. No need to adjust NAT settings or setup a gateway. It should all happen automagically.

With regards to your other questions, I would encourage you to post at the QEMU forum, as you will get better coverage there.

I am not interested in dual booting either, especially with the decent performance I am seeing with qemu / win98. Glad to hear you are meeting with some success. Supposedly you can use WIN2K and WINXP, and it sounds like others have, but I have not had success (yet :) but I am continuing to experiment and post questions in the qemu forum as time permits.

Regards,

~pau1

Harry Kuhman
12-16-2004, 03:33 PM
You should not have to change anything if you have an IP address on the client. You will not be able to ping www.yahoo.com (because you are "inside" the natted network), but you should be able to use a browser to access it from the client, as long as the internet connection is working on the host.
Being inside a NAT system does not stop one from doing this ping. The NAT router knows you sent out the request and gets the response back to you. As confirmation, I just did it (from Windows) from behind my NAT router:



C:\WINDOWS>ping www.yahoo.com

Pinging www.yahoo.akadns.net [216.109.117.108] with 32 bytes of data:

Reply from 216.109.117.108: bytes=32 time=223ms TTL=54
Reply from 216.109.117.108: bytes=32 time=220ms TTL=54
Reply from 216.109.117.108: bytes=32 time=192ms TTL=54
Reply from 216.109.117.108: bytes=32 time=221ms TTL=54

Ping statistics for 216.109.117.108:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 192ms, Maximum = 223ms, Average = 214ms

pau1knopp
12-16-2004, 09:12 PM
Sorry, I did imply that you could not ping from behind a NAT router. That is not correct. What I should have stated is that the qemu virtual NAT network does not allow ping responses back from the outside. In fact the qemu documenation says that for all intents and purposes the virtual network has the functionality of a firewall that blocks this traffic.

Here is their representation of the virtual network.

By using the option `-user-net' or if you have no tun/tap init script, QEMU uses a completely user mode network stack (you don't need root priviledge to use the virtual network). The virtual network configuration is the following:

By using the option `-user-net' or if you have no tun/tap init script, QEMU uses a completely user mode network stack (you don't need root priviledge to use the virtual network). The virtual network configuration is the following:


QEMU Virtual Machine <------> Firewall/DHCP server <-----> Internet
(10.0.2.x) | (10.0.2.2)
|
----> DNS server (10.0.2.3)
|
----> SMB server (10.0.2.4)

chris-uk
12-28-2004, 09:10 AM
I got it going. It autoplays if you want. http://www.knoppix.net/forum/viewtopic.php?t=15884
Virtual networking seems fine, unless you are on a real 10.x.x.x LAN. My real nat-router sets this up :-( so I have to go to work to do virtual networking :)

pau1knopp
12-28-2004, 01:33 PM
Chris,

Glad to see you are using this with your games distro with good success. Wanted to tell you that my observation is that both your virtual and "real" networks can be 10.x.x.x, but must be different networks. My "real" network is 10.0.1.x/24 and the virtual network is 10.0.2.x/24. I can attach to machines on the real network just fine from my virtual machines.

~pau1