VirtualBox upgrade issues

Author: | Posted in howto 1 Comment

VirtualBoxVirtualBox 4.2 has been released for quite a while but I didn’t want to migrate too soon from the stable 4.1. When I finally decided to make the switch I had some issues during the upgrade process. I was following the same simple steps that I took a while ago when I upgraded VirtualBox-3.2 to 4.0.

This is where I got stuck:

sudo yum remove VirtualBox-4.1
Loaded plugins: downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package VirtualBox-4.1.x86_64 0:4.1.24_82872_el6-1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================================================================
 Package                                          Arch                                     Version                                               Repository                                     Size
=====================================================================================================================================================================================================
Removing:
 VirtualBox-4.1                                   x86_64                                   4.1.24_82872_el6-1                                    @virtualbox                                   132 M

Transaction Summary
=====================================================================================================================================================================================================
Remove        1 Package(s)

Installed size: 132 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction

At this stage yum stopped responding. I waited for a few minutes and decided it wasn’t going to work so I tried to find out why. There was an active dkms command that was causing the delay:

/bin/bash /usr/sbin/dkms remove -m vboxhost -v 4.1.24 --all

I killed the yum process and tried to run dkms manually to see if I could reproduce the error:

sudo /usr/sbin/dkms remove -m vboxhost -v 4.1.24 -k 2.6.32-279.19.1.el6.x86_64

-------- Uninstall Beginning --------
Module:  vboxhost
Version: 4.1.24
Kernel:  2.6.32-279.19.1.el6.x86_64 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.
Removing any linked weak-modules

At this stage dkms also became unresponsive and there was clearly an issue with (a) certain kernel module(s) therefore I decided to remove all of them manually:

for i in `sudo dkms status vboxhost | awk -F ", " '{print $3}'`; do sudo rm -f /var/lib/dkms/vboxhost/kernel-$i-x86_64/module/* ; done

I confirmed the modules were deleted with:

sudo dkms status vboxhost
vboxhost, 4.1.24: added

Then I ran yum remove VirtualBox-4.1 && yum install VirtualBox-4.2 and it was successful this time, but dkms troubleshooting wasn’t complete yet:

sudo dkms status 
Error! Could not locate dkms.conf file.
File:  does not exist.

This error was likely related to references to old modules (as I found out later) so I deleted them:

sudo rm /var/lib/dkms/vboxhost/4.1.24/source

and confirmed that all was fine:

sudo dkms status 
vboxhost, 4.2.6, 3.5.2-10.31.el6.x86_64, x86_64: installed
Comments
  1. Posted by Larsen

Reply Cancel Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.