«

»

Nov 29

Print this Post

VirtualBox Linux: DKMS module build problems

After a while I didn’t use VirtualBox, the virtualization system I use just to host my Windows virtual machines (all others machines are on KVM), I discovered that I cannot build the DKMS kernel module and so no way to start my Windows virtual machine. Not a big problem, I know :) But sometimes I need to test web application or build procedure on Windows environment.

After some tests I discovered in the build log file the real problem about the VirtualBox build procedure:

fatal error: asm/amd_iommu.h: No such file or directory
compilation terminated.

so, it cannot find the kernel asm/amd module. And the problem is exactly that in the latests version of the kernel this module is removed (or renamed, not sure exactly), but VirtualBox want to use it.

So a quick-and-dirt solution I found is to copy this module from the previous version of kernel. For me it was:

[root@mmornati 2.6.41.1-1.fc15.x86_64]# cp /usr/src/kernels/2.6.40.4-5.fc15.x86_64/arch/x86/include/asm/amd_iommu.h /usr/src/kernels/2.6.41.1-1.fc15.x86_64/arch/x86/include/asm/

After this I build the VirtualBox module without problem (/etc/init.d/vboxdrv setup) and started up my virtual machine.

About the author

mmornati

Permanent link to this article: http://blog.mornati.net/2011/11/29/virtualbox-linux-dkms-module-build-problems/

7 comments

Skip to comment form

  1. Johan

    Thanks. I had the same problem today.

    I also got an error when trying to install the extension pack
    “Installer failed with exit code 127 Error opening current controlling terminal for the process (/dev/tty): No such device or address

    When starting “VirtualBox ” as root, installation of extension pack worked.

    [Reply]

  2. mmornati

    Hi Johan,

    maybe your problem is due to group missing configuration. You need to add your normal user (the one you use to startup virtualbox) to vboxusers to allow access to your system.

    Marco

    [Reply]

  3. Johan

    Marco,

    No, my group permissions were fine.

    I found a ticket for this at https://www.virtualbox.org/ticket/8473
    There is also a solution given for Fedora 15:
    “The workaround is simply to run /usr/libexec/polkit-gnome-authentication-agent-1 manually before attempting to install the extension pack. ”

    But running /usr/libexec/polkit-gnome-authentication-agent-1 seemed to hang. So running VirtualBox as root for the installation was the easiest way for me.

    [Reply]

    mmornati Reply:

    Ok, good to know thanks. Fortunately for me the extension pack was already installed. But I note your solution in case I need to reinstall my virtualized windows :)

    For all others, as I said, I prefer to goind ahead using KVM… that is, in my opinion, well integrated with the RedHat/Centos/Fedora distributions (but that does not work very well if you want a full screen windows machine).

    [Reply]

  4. Quo

    You’re my ##### hero

    [Reply]

  5. notaname

    I had the same problem. I found it more satisfactory to remove VirtualBox-OSE and go to the VirtualBox website and get the latest version of the code which installs fine.

    [Reply]

Leave a Reply