KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

Tip: How to setup Windows guest paravirtual network drivers

The KVM project, maintained by Qumranet, recently released paravirtual network drivers for Windows XP/2k guest machines. I thought it would be useful to document how to setup these drivers on a windows guest machine. These drivers will greatly increase the network performance and throughput on the guest machine. Network and Block devices are the main bottlenecks in virtual machine performance so this release will be received warmly by the community. At the moment, there are no plans by Qumranet to release paravirtual block drivers for windows guests. Although these drivers are designed for windows 2000 and XP, they should also work for windows 2003 server. So let's begin:



Download Drivers into running Windows Guest Machine

Before you do anything, you will need to first download the windows guest drivers on the running guest machine so that the machine will have access to the driver software when it's running on the virtio hardware the first time. The reason is because the guest machine will not have any network connectivity when running in this mode for the first time since no drivers would have been installed. The drivers can be downloaded as either as a zipped archive or an ISO format for easy installation. The latest release of the drivers can be downloaded at the official download site here. Extract the files into a known location on your windows guest.


Reboot Windows Guest using Virtio Option

Next, you need to run the guest on the new "virtio network card" by restarting the guest machine with the new virtual hardware by starting qemu/kvm using the -net nic,model=virtio option. An example is shown here:

qemu-system-x86_64 -hda windowsxp.img -net nic,model=virtio....

To really get the maximum benefit of the paravirtual network drivers, use the -net tap option as opposed to the -net user option.


Install the drivers in the Guest Machine

When the windows guest is rebooted on new virtio nic the first time using the command above, the guest machine will automatically detect that it is running with new "hardware" and will prompt for installation of drivers. Do not connect to windows update to specify location of driver.

Choose the specified location where you downloaded the drivers. In my case, I'm running a windows xp guest and selected that folder.

The driver installation will now begin. Choose "Continue Anyway" at the microsoft hardware compatibility prompt.

What I found nice about the paravirtual network driver is that it was immediately functional after installation. There was no need to reset the interface to pick up dhcp settings or anything of the sort. I have been running my windows xp guest machine with these drivers and haven't had any issues so far. To verify that you are using the paravirtual network drivers in your windows guest you should see the Qumranet driver in the properties of your network interface as shown below:

I will post another article in the near future on using virtio block and network drivers with Linux guest machines on KVM host. Enjoy your new paravirtual network drivers!


The instructions for linux can be found here.

Download Windows Guest Drivers (release 1) here

Update 2:

See the following post on getting the latest windows guest virtio drivers


Windows Block Drivers:

Installing Redhat 5.4 Windows Block Drivers


See Also


There have been some reports

There have been some reports that the new paravirtual network drivers for windows halts the VM for windows XP. I did not experience this problem but it seems this may be a problem for windows XP installed with acpi HAL. The XP virtual machine I tested on was installed using the standard PC HAL and didn't have any problems with the paravirtual drivers.

qemu-kvm vs qemu-

btw Haydn,

I suspect there is a typo in the command line example because it states:
"starting qemu-kvm ..."

but then the example shows starting QEMU only:
"qemu-system-x86_64 -hda windowsxp.img -net nic,model=virtio...."

rather than:
"qemu-kvm -hda windowsxp.img -net nic,model=virtio...."

Actually I meant to say

Actually I meant to say qemu/kvm as qemu-system-x86_64 is the modified qemu built for kvm. I can see how that can be confusing and I have updated the content to reflect this. Thanks David.

Doesn't really work for me

I don't know if this has something to do with the fact that I'm running Ubuntu (8.04), or maybe you are assuming that some bridge or tap or vde or what-not network device is also setup properly, and you just forgot to mention it. Or, it is something else.

I followed your steps (thanks for the windows procedure explained well), and the first thing I noticed was:

Warning: vlan 0 is not connected to host network

I ignored it. I am guessing this has either something to do with either setting up some of the networks mentioned above, or simply because -net has to be invoked twice. I tried various combinations of -net nic -net xxx, but it did not help.

The next thing is that after installing the qumranet network driver on XP, windows started the network wizard to connect to the network. Since it didn't work, I gave up on it.

Windows is reporting two network connections, one with some autoconfigured IP address 169.254.x.x (there are numbers where 'x's are), and the other with all zeros. There are no default gateway and DNS entries.

Fortunately, everything goes back to normal if go back to default user network mode.

It would be nice if somebody wrote a really nice networking tutorial for dummies. While I am quite comfortable with most of the linux related settings (including samba, nfs, nis, etc.), all the network explanations for KVM are pretty useless.

I've tried bridged networking, as that seems to be the only thing everybody explains well, but my problem is my ISP will not really be happy to give me two IP addresses. I

The NAT networking is never completely explained (and I don't really know if your entry is related to NAT or not). The user mode works, but then there is this note everywhere that it is sub-optimal solution. Anyway, I followed the procedure described here to try and setup a NAT network properly:


and the XP could not talk with the network, but I was able to ping the quest (XP) from the host (Ubuntu). And I really followed the instructions. Plus some more instructions on various sites.

So, either a good tutorial needs to be written by somebody, or these guys from qumranet or qemu should write something similar to what VMware has, three types of networks, and they work.

Plus, out of sheer frustration, here is another problem. I installed libvirt and virt-manager, and all of a sudden I have this vnet0, but I have no idea how to use it or what to do with it. And it if is used by virt-manager, I wouldn't know because it is totally broken in Ubuntu, so I am trying everything from the command line.

Sorry for a long post.

Well, it works with -net user

After re-reading your article, I figured that the information was there, just not as explicit as I would like it to be. so, it would have been nice if you actually wrote two options:

qemu-system-x86_64 -hda windowsxp.img -net nic,model=virtio -net user ...
qemu-system-x86_64 -hda windowsxp.img -net nic,model=virtio -net tap

Still, it would be nice if you could write an explanation as to how to setup the tap device.
As I said, I think something is missing in:


Is there a need to setup a DHCP server for that network or something? Please, a tutorial for dummies !!!

Also, why does your form insist on pressing "post" button and then you call the post button "Save"?

Setting up a tap device

You can refer to another post I wrote which included the procedure for setting up a tap device here. Note however that this leans heavily towards Fedora although it should work for ubuntu as well. I will probably do a dedicated post about setting up a tap device as it seems many people complain about documentation for this procedure. Hope the included article helps.

RE: Setting up a tap device

Hm, I saw that page but I was not sure about three things:

1. Is the final result bridged or NAT network? Sorry, I am used to VMware convention, where 'bridged' means you get the IP from an external DHCP server and therefore you are part of the network.

2. Is your explanation to Fedora-centric and I was not sure if I should try it on Ubuntu. I would rather wait for Ubuntu article, if you plan to write it.

3. Somebody commented on your post that it is easier to use tunctl, and you agreed, saying how easily it creates tap0, tap1, etc. All I can say is that if you want to calculate int_{-inf}^{inf} exp(-x^2) dx, the easiest thing would be to square the integral and then the solution will be obvious.

Again, I want to point out that while most explanations are bridge-centric, many home enthusiasts (like myself) have one IP address available from their ISPs, and a good NAT bridging tutorial or script would be very helpful.

Hi Ivo, To answer your

Hi Ivo,

To answer your questions

1. Once you're using tap, then you're doing bridged networking which means you can get an IP from your LAN just like another physical pc on the LAN.

2. Yes, the explanation is Fedora centric but the packages should be same on Ubuntu. At the moment I don't plan on doing one for Ubuntu because I don't have enough hardware for testing KVM hosts right now.

3. Don't know what you mean by this.

4. If you're interested in using NAT, then it's actually simple with qemu. By default qemu will do userspace networking using NAT with the -net user even if you don't specify it.

Thank you for the answers

Hi Haydn,
I am positively surprised by the speed of your answers, and I hope you don't mind another post from me.

To clarify, I know that -net user works (after all, I said that in my first and second post). But, I red that usermode networking is implemented using the SLIRP protocol, and somewhere else I red that the default usermode networking is not that great, I assumed that there is a better way to setup a NAT network. For example, VMware's vmnet8, used for NAT, allows you to ssh from the host to the guest (e.g., guest is a linux distro). Can you do the same with KVM's NAT?

And, my apologies for my attempt of being sarcastic in 3). What I meant was that if something is easy for you and people who live and breathe networking stuff, it is not quite obvious for somebody else. Also, tunctl example was a put-off for me once you wrote the tutorial based on some other tool, and later admitted there was an easier way.

Hi Lvo, I don't mind another

Hi Lvo,

I don't mind another post from you at all. I'm actually trying to encourage interaction with the user community of KVM where information can be shared and learned.

It is true that usermode networking does not perform nearly as well as bridged networking. It is an interesting question you raised about host/guest communication which is all nicely setup in vmware. If you're using userspace networking you can communicate from guest to host using the ip address. I have not really experimented the other way. I can investigate and post some information on this.

I understand your frustration about information on using the many features of qemu which are sometimes not clear. I don't know if it's because there are so many options or that documentation is sometimes not so clear.

With respect to tunctl, I didn't even realize that there was an easier way either on Fedora until Laurent mentioned it! If you reread my comments you'll realize that Fedora only recently started supporting tunctl package and I didn't realize this as I couldn't get the package on previous versions of Fedora. I had promised to do another post on tunctl and will do so soon.

I just tried, and with KVM I

I just tried, and with KVM I cannot ssh from host to guest. This works with vmware's NAT.

Also, if you are running linux guest (I tried with Fedora 8), you cannot mount host side NFS shared folder. I can mount samba share though, and that seems like a workaround for accessing host files directly.

Yeah, doesn't look like host

Yeah, doesn't look like host to guest will work using userspace NAT as it's probably many to one NAT. Host to guest will have to be done using bridged networking. I also use samba for sharing files between host and guest ALL the time and actually plan on writing a procedure on it. Tools like virt-manager will eventually make all these configurations as simple as vmware.

Nat and tun

It seems like you should be able to create an ethernet bridge device on your host box, and attach the tun driver to it. Assign an ip address to your bridge device that is in the same subnet as your guests. You can even run something like dnsmasq on the bridge device to hand out dhcp and proxy dns for the guests.

Then you turn on ip forwarding and use iptables to nat the traffic out through your primary ethernet card.

I believe libvirt has a mode like this, although I am not sure how to enable it.

So basically follow these

So basically follow these instructions:

But don't add your ethernet device to the bridge. Just assign an ip to the bridge interface and use NAT like you would between any two interfaces on a linux box normally.


no speed improvement with -net user

Driver installed fine as suggested and is recognized by windows. Alas, the speed is still the same: about 500KB/sec for a samba share on the same machine... :-(
host: Ubuntu 8.04 and kvm
Guest: xp
computer: Thinkpad T61 (core2 2.5GHz with 3GB RAM)
emulation runs _very_ fast (faster than xp did on a real 1.5GHZ-machine), the networking part works fine but is very slow.
Accessing the same samba-server on my T61 from a different machine in the net results in 30MB/sec, using it from a debian-guest with kvm (on the same T61 again) still offers 5MB/sec. So it cannot be the samba server nor the host system, even kvm seems to do pretty fine (as the debian client proves with the standard driver).
Is there a way to improve the network performance with my xp client? I hoped to have a fine solution with the virtio interface (which works, but does not improve things)

Thanks Pat

Have you tried tap?

Are you looking for high performance with -net user specifically as opposed to using bridged networking? I guess what I'm asking is have you tried using tap interface with bridged networking yet? Using that method with virtio drivers will surely give you the best performance.

is tap the only way to achive speed >1MB/sec?

I like the simplicity and saftey of nat (-net user) and hoped that it would be fast enough. Is this not to be achived?
If tun/tap is necessary: will that work with different networks (dhcp) and standalone (no network or dhcp available, but still need to reach the host from the client)?
I only look to access a samba-share on the host and the internet (if available)... things that -net user would do. And on a fast computer should do at a decent speed: the emulation of the rest is far faster than I ever dreamed of, but the network does not catch up with that...

Virtio drivers should have

Virtio drivers should have given you some performance improvement. The fact that debian guest is performing somewhat better than the xp guest could be related to the guest operating system IO processing.

Performance is better than

Performance is better than default, but only about the same than e1000, which is far below 1MB/sec. a bit slow for such a fast machine. cpu won't even go up (neither host nor guest).
In debian I'm using the standard driver (nothing particular for virtio).

Again on "qemu-kvm" vs. "qemu-system-x86"!

Hi Haydn,

> April 20, 2008 - 1:45pm Haydn Solomon
> Actually I meant to say qemu/kvm as qemu-system-x86_64 is the modified qemu built for kvm. I can see how that can > be confusing and I have updated the content to reflect this

I am using Fedora 8, and I realized that "qemu-kvm" differs from "qemu-system-x86_64" . A Virtual Machine loaded with the latter, boots very slowly (and it even works with "kvm" and "kvm-intel" modules unloaded). "qemu-kvm" loads the VM much fasters, and does not work if I don't load "kvm-intel".

I am a bit confused about these two commands!! I followed the instructions in "http://kvm.qumranet.com/kvmwiki/HOWTO1", and I though that "qemu-system-x86_64" would load the machine with kvm support, but it doesn't seem to be the case. Something wrong with my installation?



P.S: An "rpm -q kvm qemu" returns the following:

rpm - q kvm-60-6.fc8

QEMU/KVM window title

One way to tell is to look at the title of the virtual machine window. If it says "QEMU/KVM" then it's actually running the modified qemu with kvm support.

Windows Update doesn't work with virtio driver


I recently installed a Windows 2003 x64 as a KVM guest, being the host an Ubuntu 8.04 Desktop. I've configured the guests (I have also a Windows 2008 x64 bit and an Ubuntu JeOS) using libvirt. Network is configured as a bridge, to the "eth0" on the host, which in turn is connected to the internal network of my company, like any other machine. The network part of the .xml file created for libvirt is the following:

I noted that, when using the PV driver on the guest, and the "model type='virtio'" on the host (which translates to "-net=tap", using the command line), Windows Update doesn't work: IE pops up, finds the IP address (so, DNS is ok), but waits for minutes until it shows a "could not connect to url" (or something like that). I can, however, access other sites normally.

Then, changing the "model type='virtio'" for "model type='e1000'", or even removing the "model type" option from the .xml file, makes Windows Update work again...

Does anyone knows anything about that ? I've Googled for this but couldn't find any information - the same on the KVM bugtracker. This is NOT a showstopper, but it's kinda curious WHY this behavior... Any information would be nice.


command line

Have you tested your virtual machine virtio drivers by running it from command line?


To start the Windows 2003 VM from the command line, and make it use an already
existing bridge/tap device, I'll need to use the "fd=" parameter to inform the address or file descriptor or I-don't-know-what-the-heck-fd-means, and I really don't know HOW TO obtain that value...

I see that libvirt "builds" a command line which uses "fd=11" to define the bridge I created before. However, AFAIK, libvirt just translates the options in the .xml file to a command line - that's the purpose of having such "abstraction".

I might be wrong, but I don't see why the virtio driver wouldn't work correctly just because one started the VM from the command line or by using libvirt, since they do the very same thing.

Do you know someting about that (where starting a VM from command line or libvirt can have a different effect) ?



For troubleshooting purposes, command line will remove all those automatically generated commands so that you can control the parameters yourself and compare what works and what doesn't work. It will help in the troubleshooting process.

Command line generated by libvirt

Hi Hayden,

You're right - it's valid to do such test to debug the process. However, I did not start the guest by myself, in the command line - I started it through libvirt and got the command line generated. Here are the results:

WITH virtio

/usr/bin/kvm -M pc -m 512 -smp 1 -monitor pty -localtime -drive file=/vms/w2003.img,if=ide,boot=on -net nic,macaddr=52:54:00:b8:94:a9,vlan=0,model=virtio -net tap,fd=11,script=,vlan=0 -usb -usbdevice tablet -vnc


/usr/bin/kvm -M pc -m 512 -smp 1 -monitor pty -localtime -drive file=/vms/w2003.img,if=ide,boot=on -net nic,macaddr=52:54:00:21:05:21,vlan=0 -net tap,fd=11,script=,vlan=0 -usb -usbdevice tablet -vnc

When I switched to the line WITHOUT virtio, Windows found a Realtek RTL8139 network card, and once the IP was configured, Windows Update worked just fine.

As you can see, the only difference is the "model=virtio" part.... So, I really don't understand why this is happening.

Any ideas ?

Thanks for your time,


Hi Roberto,

Your commands look ok and the fact that you can access other sites suggests that this is probably some kind of firewall problem (assuming there's a firewall in the picture ), maybe the way virtio handles packets that firewall doesn't like. I found a site with some possible resolutions and tests. The ones that I think may be useful to you are Resoluton Suggestion #1 and #2, however you can try all of them in your troubleshooting. The link is at


Try that link and let me know if it helps.


Hi Haydn,

Thanks for the suggestions and for your time. I've visited that website and tried solution #1 (because solution #2 does not apply - there's no firewall on the gateway and the windows firewall is turned off). Indeed, the link given in that solution did not work, and so they say that it means that a firewall is preventing the connection...

Well, I beg to differ, since there's no firewall on the gateway (as stated above). Besides that, there's a simple and logic fact: if I change from the virtio driver to the rtl8139 (or e1000) driver, everything works fine ! How could be a firewall problem if it works only changing the interface model ?

So, people reading all these posts I sent, might wonder: "What the heck man, it's just Windows Update not working - LET IT GO !!!" But I must say: now, there's no proof that this is only a "Windows Update not working" problem. What if some people out there are having problems with their KVM guests with PV drivers "misteriously" not accessing their Oracle or SQL Server databases ? What if their email servers "misteriously" drop some connections ? They all should avoid using PV drivers for the sake of stability ?

Don't get me wrong - I'm not complaining to YOU; I'm just bringing this strange behavior to light, so that people with more experience than me can research and find out what is wrong (and so do I).

Once again, thanks for your time and patience !


Windows Update doesn't work with virtio driver

Just installed the virtio drivers using ubuntu 8.04 server x64 & libvirt & bridged networking

Drivers installed fine and I have no problem accessing windowsupdate or any other webpage (guest is 32 bit win 2003 using standard HAL).

Not seeing any other network related problems either and peformance on the NIC increased significantly (getting sustained over 200 mb/s). Dont have any intelligent bet on the reason for your problem, but it does not seem to be a generally experienced problem.

It is of course possible there is some glitch with the 64 bit driver - (which seems the only real with your setup and mine) but on 32bit win 2003 I dont see that problem.

Don't know if there is any difference in Ubuntus server and desktop kernels as far as support for virtio but if so I guess you should see problems as soon as you start doing any kind of transfer, so guess it must be supported.

Hi planakim, Yes, the only

Hi planakim,

Yes, the only difference between your configuration and mine is the Windows 2003 Server bitness. I decided to install a 32 bit version to test, and indeed Windows Update worked perfectly with the PV driver. It was a quick instalation & test, though. I'll do some more instalations and tests (more complete) and post the results here, ok ? But as far as WE can see, it seems that the 64 bit version of the PV Driver is the one presenting strange behavior.

Thanks for the insigth !


Final Results....

Hi guys,

I did some tests, as promised, and here are the results:

I had the chance to put my hands on a brand new server, from Dell, to do these tests. It's a Poweredge 840, Quad-Core, 8 Gb RAM and 500 Gb SATA-II HDs. I installed Ubuntu Server AMD64 on it and created 2 guests - one is Windows 2003 64-bit and the other is Windows 2003 32-bit. I believe it's not necessary to say that I'm using KVM, with VT enabled in BIOS and all the required stuff. The PV driver was installed in both guests.

Indeed, the 64-bit Windows was able to access the Windows Update website and get all necessary updates. This was true to the 32-bit Windows too. So, no mysterious behavior with the PV drivers on this machine (the host). I really don't know if this has to do with the fact that this Ubuntu is a server version, or with the physical NIC on the servers (because in both tests, network was bridged to the "eth0" interface), or something else.

HOWEVER, before assuming that I was crazy when I reported this thing about the PV driver, let me tell you guys the rest of the story.

I also created a Windows 2000 32-bit guest on that server: it's a Terminal Server for the Call Center people, in which they run an Oracle Forms & Reports application. This application already exists, and is used by other departments as well. So, to test the new server (and the application) before putting it in production, I decided to test some critical reports. I started with a complex one, and, for my surprise, it didn't work: it gave me an "unexplainable" error, that supposedly means that the Oracle database is shutting down... Of course that was not the case - I'm an Oracle DBA and I believe I know when it is shutting down... Besides that, I runned the same report on another machine (physical machine) and it worked as it was supposed to. Then, I decided to shutdown the Windows 2000 guest and change the NIC type: I removed the "model='virtio'" and as a result, Windows 2000 found an Realtek RTL8029AS. Well, this time, that same report worked flawlessly.

Of course, I did this tests a lot of times - changing the NIC back to virtio, running other reports, etc, etc. It was not an isolated error: EVERYTIME I changed the NIC type to virtio, Oracle Reports gave me the same error, and EVERYTIME I changed it back to an emulated one, it worked. I must say that I tested about 4 or 5 other reports (with and without virtio) and all of them worked ok - just that complex one didn't.

I really don't know what is happening, but surely there's something wrong here. Maybe an incompatibility with certain physical NICs, or whatever - I don't know. In this specific case (a Windows Terminal Server guest) the emulated Realtek RTL8029AS, being a 10/100 NIC, presents no bottlenecks, since the network bandwidth rarely goes beyond the MBit/s rate. But in cases where one needs network performance, the virtio driver would be the choice...


hi Solomon: I am now tring

hi Solomon:
I am now tring to use the user mode networking to run qemu, and the command is as follows :
modprobe kvm
modprobe kvm-intel
/usr/local/kvm/bin/qemu-system-x86_64 -m 1000 /root/shan/centos.img -net nic,vlan=0,macaddr=52:54:00:12:34:84,model=rtl8139, -net user,script=/etc/qemu-ifup, -no-acpi -smp 2

and the content of qemu-ifup is as follows :
ifconfig eth0 -promisc
ifconfig eth0 netmask up
route add default gw
#ifconfig eth0:1 netmask up
modprobe iptable_nat
modprobe ip_nat_ftp
modprobe ip_nat_irc
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i eth0 -d -j DNAT --to
iptables -t nat -A POSTROUTING -o eth0 -s -j SNAT --to

is there anything wrong ?
thank you very much ~



The new Beta version of Virtualbox 3.1 supports virtio, and it seems the Windows XP driver developed by Qumranet works just fine with it.

wow.. thanks for the guide. I

wow.. thanks for the guide.

I got it all working pretty well, but with model=virtio, I am getting blue screens with any moderate amount of traffic. Otherwise, I guess it works ok, the virtio is really fast. gentoo 2.6.31-r6, win xp64 guest, 3 other gentoo guests running.

Without model=virtio, I get the realtek driver instead of the dummy one, and it is working 100% - no blue screens :D Appears to be a bit slower but it is good enough.

Last minor thing I can't figure out is I have the physical host running dnsmasq. Other guests are using that as primary dns, and lan/wan lookups work fine. But for some reason lan lookups on the windows guest don't work. I have set the dns server ip correctly but it doesn't work. ?

Viostor drivers doesn't work

Hi! I'm running Ubuntu 9.10 x64 as host os on AMD Athlon X2 6000+ hardware.

I'm having problem with both net and block virtio drivers on guest windows systems.

Tried Windows 7 32 bit, Windows Server 2003 R2 64bit, Windows Server 2008 R2 64bit with no luck.

The errors for virtio devices in Windows are "The device can not start", both for block and for net devices.

hello, routers are your friend

Of course most of us only have one ip address. So just get a router and stop connecting your computer directly to your isp's equipment. Clone your pc's MAC on your router if your isp is trying to make you connect your pc directly.

Use the updated drivers


Hi all. How are you?

""qemu-kvm" differs from

""qemu-kvm" differs from "qemu-system-x86_64"...the latter, boots very slowly.."

You should use the -enable-kvm switch if you use qemu-system-x86_64. (qemu-kvm contains it implicitly) If kvm module is loaded it doesn't mean, that qemu-system-x86_64 uses it. You can check this on the qemu monitor by using the "info kvm" command.

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.