VirtualBox and Linux kernel updates

In order to weave its magic, VirtualBox uses loadable kernel modules both on the Host, and in the Guest as part of the Guest Additions. On Linux, these kernel modules are related to the version of the kernel that you're running and if you update the kernel then the modules need to be rebuilt to match the new version. Technologies such as dkms handle this and so if you're running dkms you'll be in good shape. But if you aren't running dkms, then you may find that after an update and a reboot, VirtualBox or the Guest Additions don't run anymore. Here's how to fix things... 

If your Linux system is setup to build modules you can just execute one of:

  • Host: 
    /etc/init.d/vboxdrv setup
  • Guest:
    /etc/init.d/vboxadd setup

If your system is not setup to build kernel modules you will need to get the relevant packages to do this. For example, on Oracle Enterprise Linux you need to:

  1. Update your system to the latest version: open a terminal and as root, execute 
  2. yum update
  3. Install the GNU C compiler and the kernel development packages using
  4. yum install gcc 
    
    yum install kernel-devel
  5. Reboot your guest system in order to activate the updates before then running the commands above to rebuild the VirtualBox modules. 

 This is covered in more depth in the VirtualBox User Manual in the sections on Host Modules and Guest Additions.

Hope this is some use to someone

-FB

Comments:

Post a Comment:
Comments are closed for this entry.
About

Fat Bloke

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today