3 Replies Latest reply on May 10, 2012 4:15 PM by nasamang

    OVM_311: pciback module gone?


      I just updated all of my 6 OVM VM server from 3.0.3 to 3.1.1 and it seems that the pciback module is not present anymore:

      [root@oraclevms06 ~]# /sbin/modprobe pciback
      FATAL: Module pciback not found.

      Anybody to know, where I can get that back?


      Ahh… now this module is named xen-pciback: /sbin/modprobe xen-pciback works

      Edited by: budachst on May 9, 2012 11:43 PM
        • 1. Re: OVM_311: pciback module gone?
          Our of curiosity, are you passing PCI devices into guests? Care to share how your doing that and how well its working?
          • 2. Re: OVM_311: pciback module gone?
            Yes - I am using pci-passthrough and it works really well. There are only a couple of steps involved to get that working, depending on how much you want to automate that.

            First off, you have to create a new initrd with the xen-pciback module included. This is done like this:

            cd /boot
            mkinitrd -v -f initrd-pciback-`uname -r`.img `uname -r` --with=xen-pciback

            Modify grub and either clone the current boot entry and substitute the used initrd with the newly created one or edit the actual one.

            After rebooting you should be able to load the xen-pciback module:

            modprobe xen-pciback

            Now comes the part where you need to decide which pci device you gonna bind to xen-pciback. The only thing to keep in mind is that you only can bind major device numbers to xen-pciback.
            Let's see what lspci spits out:

            07:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)
            07:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)

            This is the PCIe nic that I want to bind to xen-pciback and I think that I can't partially bind that nic to xen-pciback, that is, if one of these interfaces is already in use on the VM server, trying to bind the card to xen-pciback will result in an instant reboot - at least this is what I experienced with the Qlogic FC HBA, where I tried to bind one port to xen-pciback, while the other one connected to my FC SRs… ;)

            Anyway, after having loaded xen-pciback you can actually bind the pci device to xen-pciback like this:

            /etc/pciback/pciback.sh 0000:07:00.0

            where /etc/pciback/pciback.sh looks like this:

            if [ $# -eq 0 ] ; then
            echo "Require a PCI device as parameter"
            exit 1
            for pcidev in $@ ; do
            if [ -h /sys/bus/pci/devices/"$pcidev"/driver ] ; then
            echo "Unbinding $pcidev from" $(basename $(readlink /sys/bus/pci/devices/"$pcidev"/driver))
            echo -n "$pcidev" > /sys/bus/pci/devices/"$pcidev"/driver/unbind
            echo "Binding $pcidev to pciback"
            echo -n "$pcidev" > /sys/bus/pci/drivers/pciback/new_slot
            echo -n "$pcidev" > /sys/bus/pci/drivers/pciback/bind

            The last thing to do is to modify the vm.cfg to actually pass the device to the guest, where you need to add the following line:

            pci = ['07:00.0', '07:00.1']

            Actually I am passing both ports to the same guest and I don't know, if one could pass one minor device to one guest, while passing the other minor device to another guest.

            This has been working since OVM 2.2.x and pciback has been renamed xen-pciback in this 3.1.1 release - otherwise simply use pciback, when trying this on 2.2.x or up to 3.0.3

            How well is it working? - Well great, as far as I can tell. The only issue is, that you loose the HA ability since you could only achieve HA using another VM server with the exact same hardware layout - even the slots would have to be occupied by the same cards using the same drivers, since otherwise your cards will probably show up in a different order and your pci option in the vm.cfg would not work anymore
            Besides that - I have been using this for months now and never had any issue.

            • 3. Re: OVM_311: pciback module gone?
              very interesting, thanks for sharing.