Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


KVM - virtio_net
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

KVM - virtio_net

KairusKairus Member
edited October 2011 in General

Hey guys, I got my first KVM server yesterday, and I had virtio set up, but lsmod is showing 0 in the "Used by" column for virtio_net. I see virtio_blk is being used correctly, and disk I/O is great, nice and responsive. Is this normal, or did I set something up wrong?

lsmod | grep virtio
virtio_balloon        3256  0
virtio_net              9816  0
virtio_pci              5299  0
virtio_blk              4890  5

Also, according to the libvirt website, you should be able to "cat /sys/devices/virtio-pci/0/net/eth0/statistics/rx_bytes" and have it spew out info, but I have no virtio-pci in /sys/devices. Could this be because I disabled the IPV6 module? I had a problem where pacman was attempting to connect to repos using IPV6 and some servers would never respond, like lighttpd's, and I have no use for IPV6 so I removed it.

Comments

  • Someone with a KVM VPS and virtio enabled paste the contents of "lsmod | grep virtio" please :). I've looked into this a lot, and can't really find anything in any support forums, or the linux KVM website.

  • virtio_balloon         11329  0 
    virtio_blk             11720  3 
    virtio_pci             11845  0 
    virtio_ring             8513  1 virtio_pci
    virtio                  9541  3 virtio_balloon,virtio_blk,virtio_pci
  • KairusKairus Member
    edited October 2011

    Interesting, if I try to load the 'virtio' and 'virtio_ring' modules, and rebuild the ramdisk, I get:

    ==> ERROR: module not found: `virtio'
    ==> ERROR: module not found: `virtio_ring'
    

    edit: apparently 'virtio' module isn't needed for a 32-bit OS. Not sure why virtio_ring doesn't exist.

  • miTgiBmiTgiB Member
    edited October 2011

    @Kairus What OS? I've made this wiki page to help my clients, but it will work for anyone naturally. https://hostigation.com/wiki/index.php?title=KVM:Virtio

    Debian 6 I've found just works without any prep, and a fresh install will auto detect virtio.

  • KairusKairus Member
    edited October 2011

    miTgiB said: @Kairus What OS? I've made this wiki page to help my clients, but it will work for anyone naturally.

    I'm using Arch Linux, and I'm actually one of your clients and you set up the host portion of virtio for me yesterday! :). I've never used KVM before and I'm just curious if I've done something wrong that the pci/net modules (according to lsmod) aren't being used, though they are loaded. I've looked up a lot of the documentation and really can't find an answer if it's normal or not - to me it seems like it's loaded the module, but it's not using virtio for the NIC drivers.

  • modprobe 'virtio' and 'virtio_ring' and see if they were even built.

  • Is there a kmod for it? Arch is funny about a lot of stuff. dmmcintyre3 is a client as well, but using CentOS. I can always set your NIC to e1000 too if you'd like, you will not gain or lose anything between the two, the disk is want you are really after.

  • As it turns out, ethtool shows that the virtio_net driver is actually being used:

    driver: virtio_net
    version:
    firmware-version:
    bus-info: virtio0
    

    Interesting that lsmod says the module isn't being used.

    Thanks for the help guys! The VPS performs great, definitely better than my other 4 servers. :)

  • archlinux here, I think that's normal:

    lsmod | grep -i virtio
    virtio_balloon          3373  0 
    virtio_net              9680  0 
    virtio_pci              5347  0 
    virtio_blk              4307  5
    
  • Debian 6 @ Hostigation

    lsmod | grep virt
    virtio_balloon          2293  0
    virtio_blk              3602  3
    virtio_net              8682  0
    virtio_pci              4359  0
    
    lspci | grep Virt
    00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
    00:04.0 SCSI storage controller: Red Hat, Inc Virtio block device
    00:05.0 RAM memory: Red Hat, Inc Virtio memory balloon
Sign In or Register to comment.