// VirtualBox 4.1.6 on Fedora 15 with Kernel module compilation error

Some userspace programs got problems with the 2.6.x→3.x kernel numbering transition. To prevent the need to fix everything at once, the Fedora developers decided to ship 3.x kernels as 2.6.4x on Fedora 15 Lovelock and use the correct numbering scheme on Fedora releases ≥16 Verne.

This kernel version numbering hack makes some problems with the current VirtualBox 4.1.6 on Fedora 15: /etc/init.d/vboxdrv setup exits with an error (/var/log/vbox-install.log says that recompiling VBoxPci-linux.o failed). The reason is simple: A check thinks that the running kernel is older than 3.1. Therefore the wrong header file gets included (asm/amd_iommu.h instead of linux/amd-iommu.h).

Quick fix to get your VirtualBox working again:

  1. Open the belonging source code file as root:
    $ su -
    $ gedit /var/lib/dkms/vboxhost/4.1.6/source/vboxpci/linux/VBoxPci-linux.c
  2. Search for
    # include <asm/amd_iommu.h>

    (~line 37) and replace it with

    # include <linux/amd-iommu.h>
  3. Recompile the needed modules:
    $ su -c '/etc/init.d/vboxdrv setup'


No. 1 @ 2011/11/21 13:19

Perfect. Thanks for the tip! READERS: note the change to a dash from an underscore also (amd-iommu.h)

No. 2 @ 2011/11/21 14:56

I think a much better fix would be to change “KERNEL_VERSION(3, 1, 0)” to “KERNEL_VERSION(2, 6, 41)”

No. 3 @ 2011/11/21 16:57

@dutchhome: Come on, it does not matter. This it is just a local(!) hack to get things working again on the specific system you are running. It does not get redistributed. BTW: KERNEL_VERSION(2, 6, 41) is not a “much better” or general solution, too. E.g. it would break things on a 3.0 kernel machine. ;-)

No. 4 @ 2011/11/23 05:54

thanks for this hint…works perfect

No. 5 @ 2011/12/05 23:48

Thanks man, From Algeria.

No. 6 @ 2011/12/08 12:57


No. 7 @ 2011/12/08 16:31

@Andreas Haerter: Hi Andreas,

Thanks for the blog and However I agree with @dutchhome that it may be a better workaround to use (2,6,41)…

Although it's a local hack and bug only happens on Fedora/SuSE related versions.

It's still a common scenario when one using 2.6.41kernel downgrades to 2.6.40, which was still using “asm/amd-iommu.h”. so the using of 2.6.41 is better understood here.

Regards, -s

Leave a comment…

Y T᠎ P Q N
  • E-Mail address will not be published.
  • Formatting:
    //italic//  __underlined__
    **bold**  ''preformatted''
  • Links:
    [[http://example.com|Link Text]]
  • Quotation:
    > This is a quote. Don't forget the space in front of the text: "> "
  • Code:
    <code>This is unspecific source code</code>
    <code [lang]>This is specifc [lang] code</code>
    <code php><?php echo 'example'; ?></code>
    Available: html, css, javascript, bash, cpp, …
  • Lists:
    Indent your text by two spaces and use a * for
    each unordered list item or a - for ordered ones.
I'm no native speaker (English)
Please let me know if you find any errors (I want to improve my English skills). Thank you!
QR Code: URL of current page
QR Code: URL of current page 2011:11:19:virtualbox-4.1.6-fedora-15-kernel- (generated for current page)