# HELP - kvm network under winxp dies - SOLVED

## Moriah

I have qemu-kvm running with a gentoo x86_64 guest machine and virtio net and disk driver, and it works great.    :Very Happy: 

I also have win-xp (32-bit) guest, and win-7 (64-bit) guest, and they work with native disk and net drivers, but the net driver dies on these 2 machines if I move large amounts of data at high speed (restoring 100 gb of user files over the lan from my backup server).

I have tried to install the virtio net driver in the win-xp guest (which is a very important machine for me!), but it fails.  All the docs I can find on this are ancient, and obviously suffering from terminal bit rot.  The drivers were fetched from the redhat site and are dated april 2013.  Obviously something is very wrong, but I do not know what.  

Can anybody tell me how to either fix the native windoze net drivers so they don't die, or better, install a workable virtio net drive in these guests?

Symptoms of death are that the network just stops working.  Restarting without virtual power down does not get it going again, but doing a halt, then a run does get it going, without restarting libvirt or virt-manager, and all this while other virtual machines are running.

Problem is reproducable by running the following in a cygwin shell on the offending guest:

```

$ ssh foo@bar 'dd if=/dev/zero' | cat > /dev/null

```

After a while, the network on the guest goes brain dead, and cannot be restarted with the widows "repair" operation.  Logging out and back in does not fix it either.  Neither does a "restart", but a "power down" and then a "run" from virt-manager does get it going again.  

Note that the restart does not de-instantiate the vnet device associated with this guest, but the power down and run does de-instantiate it and re-instantiate it, so the one might think that the problem might be on the host instead of the guest.  This seems to not be the case, as issuing the same command from a gentoo guest works faultlessly, even after moving hundreds of gb.

What can I do to get the network working reliably on my xp and w7-64 guests?  The xp guest is especially important to me.  I used to run it under vmware for years, but vmware no longer installs properly on gentoo, and the fine folks at vmware say the solution is to run red hat, which I refuse to do, so vmware just lost me as a customer (yes, I paid for my copy of vmware workstation!).

----------

## vaxbrat

Did you get those from here?  http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/  here (bundled with spice tools) http://spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-0.59.exe or somewhere else?

I think I've worked with both of these bundles in guests and with earlier virtio versions going back several years on both phenom II and Intel systems.  In all that time, the only problem I've ever had is with the virtio disk drivers in a version from about 4 years ago on what was probably a core duo.  What sort of hardware and kernel version are you running in the hypervisor?

----------

## Moriah

How about that!  I am running on a core2duo powered Lenovo w500 with 8 gb ram and a 512 gb ssd.  So is the problem core2duo related?  Why does the gentoo guest with a virtio net driver work ok then?  Isn't it the same software used on the host side for both gentoo and win-xp?

The kernel is 3.7.10-gentoo-r1.

BTW I did routine weekly updates a few days ago, and qemu-kvm or libvirt (don't remember which), and I could no longer start any of my vm guests, so I reverted back to the older version, and everything worked again.    :Confused: 

----------

## vaxbrat

Depending on how you are running, your guest will usually be talking to a tun or tap device which is then passed over a bridge of some sort to the physical network device.  If you use virt-manager, that setup will do a NAT style bridge by default.  So the client will be using virtio and virtio_net modules in the case of your gentoo guest or the virtio_net driver that gets installed under windows in those guests.  The host AFAIK is only relying on the virtio and tun/tap modules on the client side of the bridge, bridge and ebtables modules and, of course, the physical nic driver.

I have also been updating on a regular basis and have recently moved from 3.7 up to 3.8 and haven't seen any problems.  I have seen somebody in one of the threads I replied to here talking about possible issues with 3.9, but I haven't tried starting any guests yet on boxes where I have just installed it.

----------

## Moriah

So I don't understand what you are trying to say above.  What point were you trying to make, with respect to helping me resolve my problem?  Or were you just describing thing in general terms?

The virtio network stuff is working great with a gentoo 64-bit guest, but I can't even get the virtio network stuff to install at all under win-xp.  I fetched the latest drivers from redhat's site; they were dated april 2013.  Win-xp could not even *FIND* a driver on the .iso cdrom image when I ran the wizard.

The drivers I fetched were from:

http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/

and I fetched the file:

 virtio-win-0.1-59.iso         24-Apr-2013 23:39   59M  

I repeat:  "I can't even install the virtio net driver for win-xp, and the default win-xp net driver fails miserably. "

<Off_Topic>So your a beltway guy who runs vaxen, huh?  My 3rd computer was a PDP-11/20!</Off_Topic>

----------

## vaxbrat

I've had my guests for a while now so the only new thing I've done with them lately (past few months) was playing with spice and the qxl video driver.  So my virtio_net on the xp guest may actually still be from a version that's a couple of years old.

I was just pointing out the general setup for network i/o and the guest.  There are some fairly new additions in the later kernels (starting with 3.8.x I think) to provide vhost acceleration and to also replace tun/tap with mac vtap.  I think there may be a problem if you use vhost on some 3.9 kernel versions.  The key takeaway is that the virtio_net module is only a guest thing (in your gentoo guest).

----------

## Moriah

As I stated above, the virtio net driver is working great with my gentoo guest.  It looks to me like somebody broke the windoze driver.    :Crying or Very sad: 

I absolutely need to be able to run win-xp (32 bit) and win-7 (64 bit) as virtual machines, as I have cleints that require these platforms, and I have user data files that are in Microsoft proprietary formats which I need to be able to use.  I could use a non-virtio net driver, but the one I have now dies after a while, as I also stated above.  If the virtio net driver likewise dies, then there is another problem.  I know people have been running windoze as guests.  How do they do it?  It refuses to work reliable for me.  I cannot even transfer my user data file onto the windoze guests because the network driver dies before it finished.  

This is an absolute deal breaker and show stopper!     :Evil or Very Mad:   :Evil or Very Mad:   :Evil or Very Mad:   :Evil or Very Mad:   :Evil or Very Mad: 

I used to run vmware workstation, but lately, vmware will no longer support their stuff on gentoo; they tell me to run a supported platform for the host, such as red hat.

If I need to run an old version of the windows virtio net driver, where can I get a copy of it?

----------

## Moriah

I found an earlier copy of the virtio network driver at:

http://alt.fedoraproject.org/pub/alt/virtio-win/stable/virtio-win-0.1-52.iso

I also discovered that I must install this driver immeadiately after I install windows from the distribution cd -- no other updates allowed!    :Shocked: 

I also discovered (again, the HARD way) that the newer driver at:

http://alt.fedoraproject.org/pub/alt/virtio-win/latest/virtio-win-0.1-59.iso

just will not instal anyway; it seems broken.    :Evil or Very Mad: 

So I now have win-xp (32 bit) and w7 (64 bit) guest machines running with the virtio network drivers.

I still have to update these vm's to bring them up to date, install avira antivirus, and cygwin, then I will stress test them to see if the virtio driver fixes my original problem of network driver death.

I will report back after I have done all of these things.

----------

## Moriah

Updates completed, cygwin installed, stress test passes.

VERDICT:  Use virtio driver from "stable" set dated January of 2013.  They work and passed over 100 GB of data at about 250 Gbits/sec.

----------

