[RESOLVED] VBOX Guest Additions for CentOS 6.2

General support questions

[RESOLVED] VBOX Guest Additions for CentOS 6.2

Postby dmischa » 2011/12/21 11:17:57

under 6.2 the VBOX Guest Additions don't build properly. For details see

https://forums.virtualbox.org/viewtopic ... 08#p211449

does anybody know which changes in the kernel headers could have caused it
(and what should be modifyed in vboxvideo_drm.c)?
dmischa
 
Posts: 58
Joined: 2011/03/21 14:46:56
Location: Germany

Re: VBOX Guest Additions for CentOS 6.2

Postby dmischa » 2011/12/21 14:42:31

--- vboxvideo_drm.c.ori 2011-12-21 13:26:06.000000000 +0100
+++ vboxvideo_drm.c 2011-12-21 13:48:58.000000000 +0100
@@ -112,7 +112,7 @@
.poll = drm_poll,
.fasync = drm_fasync,
},
-#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39)
+#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39) && !defined(DRM_RHEL61)
.pci_driver =
{
.name = DRIVER_NAME,
@@ -127,7 +127,7 @@
.patchlevel = DRIVER_PATCHLEVEL,
};

-#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 39)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 39) || defined(DRM_RHEL61)
static struct pci_driver pci_driver =
{
.name = DRIVER_NAME,
@@ -137,7 +137,7 @@

static int __init vboxvideo_init(void)
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39)
+#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39) && !defined(DRM_RHEL61)
return drm_init(&driver);
#else
return drm_pci_init(&driver, &pci_driver);
@@ -146,7 +146,7 @@

static void __exit vboxvideo_exit(void)
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39)
+#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39) && !defined(DRM_RHEL61)
drm_exit(&driver);
#else
drm_pci_exit(&driver, &pci_driver);



solves the problem for me
dmischa
 
Posts: 58
Joined: 2011/03/21 14:46:56
Location: Germany

Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2

Postby AlanBartlett » 2011/12/21 19:26:59

Thank you for your observation and solution.

For posterity (and on your behalf) this thread is marked [RESOLVED].
User avatar
AlanBartlett
Forum Moderator
 
Posts: 8975
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

[RESOLVED] VBOX Guest Additions for CentOS 6.2

Postby pschaff » 2012/01/03 21:58:22

I created a new Wiki page incorporating the patch procedure - CentOS as a Guest OS in VirtualBox.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2

Postby r_hartman » 2012/01/04 07:10:08

Not sure this issue should be labeled 'resolved' yet.

I'm not at my own box right now, but I have an older version of VBox (from memory 4.0.10) and encountered the same issue. It started when updating to CentOS6.2, and the 2.6.32-220.el6.x86_64 kernel. Reverting to the previous kernel allowed me to rebuild the VBoxAdditions successfully, so my feeling is that it's more related to the 2.6.32-220.el6.x86_64 kernel than to the VBox version.

While it's nice that a patch to VBox apparently fixes this (haven't tried it yet) the problem was clearly introduced by a RHEL kernel change rather than a VBox change.

As the OP already asked: what has changed in the 2.6.32-220.el6.x86_64 kernel to introduce this issue, and is it to be considered a bug?
I have not tested yet whether the 2.6.32-220.2.1.el6.x86_64 kernel fixes it.
r_hartman
 
Posts: 701
Joined: 2009/03/23 15:08:11
Location: Netherlands

Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2

Postby dmischa » 2012/01/04 09:43:36

r_hartman wrote:
...

As the OP already asked: what has changed in the 2.6.32-220.el6.x86_64 kernel to introduce this issue, and is it to be considered a bug?
I have not tested yet whether the 2.6.32-220.2.1.el6.x86_64 kernel fixes it.


if you compare the error messages at the VBOX forum with the patch, you find that the structure pci_driver and the functions drm_pci_init and drm_pci_exit were in 6.2 backported from the kernel 2.6..39.
dmischa
 
Posts: 58
Joined: 2011/03/21 14:46:56
Location: Germany

Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2

Postby r_hartman » 2012/01/04 14:40:42

Back at my own box, and updated to latest kernel
Code: Select all
$ uname -r
2.6.32-220.2.1.el6.x86_64

On reboot, VBoxGuest was installed by DKMS without issues and my CentOS6.2 client is working again as before.
Apparently, the 2.6.32-220.2.1 update fixed the issue introduced in the 2.6.32-220.

EDIT: Oh, my VBox (and guest) version is 4.0.12
r_hartman
 
Posts: 701
Joined: 2009/03/23 15:08:11
Location: Netherlands

Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2

Postby pschaff » 2012/01/04 15:11:43

Not sure if VB 4.0 has anything to do with it, but I still get the error on 2.6.32-220.2.1.el6 with VirtualBox-4.1-4.1.8_75467_rhel6-1.x86_64. Host is RHEL6u2 and guest is CentOS-6.2 - up to date naturally. :-)

Code: Select all
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.1.8 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing installed version 4.1.8 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules           [  OK  ]
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module                   [  OK  ]
Building the shared folder support module                  [  OK  ]
Building the OpenGL support module                         [[color=FF0000]FAILED[/color]]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions              [  OK  ]
Installing the Window System drivers
Installing X.Org Server 1.10 modules                       [  OK  ]
Setting up the Window System to use the Guest Additions    [  OK  ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services componen[  OK  ]
Press Return to close this window...


The patch fixes it.

As far as the thread status - I still think this thread is [RESOLVED] although Oracle still needs to fix their Guest Additions. The OP may not agree, in which case we can consider changing the status.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2

Postby r_hartman » 2012/01/04 18:38:26

Hmmm... Looks like DKMS grabbed the VBox modules compiled for the previous kernel, as my build-log (vboxadd-install.log) still mentions Dec 23 and kernel 2.6.32-131.17.1.el6.x86_64. DKMS-grab did not work when updating to 6.2 (on Dec 23), which made me reinstall the Guest Additions, which failed.
Then reverting to 2.6.32-131.17.1.el6.x86_64 allowed me to reinstall, and apparently those modules were now picked up by DKMS for the latest kernel, as everything works as expected.

Not sure how DKMS would manage to achieve this feat, but I'll leave things be for now.

Side effect of the failed install was that mount.vboxsf would not be installed, causing my vbox shared drive to fail (how this relates to OpenGL support failing is beyond me, but that was the only failure I had).
Reinstalling the guest additions will therefore likely fail again, given your report.
r_hartman
 
Posts: 701
Joined: 2009/03/23 15:08:11
Location: Netherlands

Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2

Postby antony_sudhakar » 2012/01/05 01:12:07

Phil, your procedure from the wiki worked for me. However, the last tar command listed should be

cd ~/TMP2/
tar jcvf ../TMP/VBoxGuestAdditions-amd64.tar.bz2
cd ~/TMP
./install.sh

instead of tar jtvf.

Thanks for the great wiki!!

-Antony
antony_sudhakar
 
Posts: 1
Joined: 2012/01/05 01:03:36

Next

Return to CentOS 6 - General Support

Who is online

Users browsing this forum: No registered users and 11 guests