UsingVhost: Difference between revisions
From KVM
m (show the important option in bold) |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
=== Obtaining the code === | === Obtaining the code === | ||
'''You need the at least qemu-kvm-0.13.0''' (http://sourceforge.net/projects/kvm/files/qemu-kvm/) | |||
=== kernel requirements === | === kernel requirements === | ||
Line 13: | Line 13: | ||
=== example command line === | === example command line === | ||
To start a guest with vhost: | To start a guest with vhost: | ||
* | * kvm -netdev type=tap,id=guest0,script=kvm-ifup,'''vhost=on''' -device virtio-net-pci,netdev=guest0,mac=''ma:c:a:dd:re:ss'' ..''other options''.. | ||
=== Caveats === | === Caveats === | ||
Some DHCP clients have problems with this implementation, more [http://www.spinics.net/lists/kvm/msg37660.html details here]. | Some DHCP clients have problems with this implementation, more [http://www.spinics.net/lists/kvm/msg37660.html details here]. |
Latest revision as of 05:24, 8 March 2011
As of September 2010, vhost is not included in any released tarballs, so you need the git version.
VhostNet provides better latency (10% less than e1000 on my system) and greater throughput (8x the normal virtio, around 7~8 Gigabits/sec here) for network.
Obtaining the code
You need the at least qemu-kvm-0.13.0 (http://sourceforge.net/projects/kvm/files/qemu-kvm/)
kernel requirements
On the host you need a kernel with CONFIG_VHOST_NET=y and in the guest you need a kernel with CONFIG_PCI_MSI=y
example command line
To start a guest with vhost:
- kvm -netdev type=tap,id=guest0,script=kvm-ifup,vhost=on -device virtio-net-pci,netdev=guest0,mac=ma:c:a:dd:re:ss ..other options..
Caveats
Some DHCP clients have problems with this implementation, more details here.