CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 6 - General Support
  [RESOLVED] VBOX Guest Additions for CentOS 6.2

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  dmischa
      dmischa
[RESOLVED] VBOX Guest Additions for CentOS 6.2
#1
Regular Board Member
Joined: 2011/3/21
From Germany
Posts: 56
under 6.2 the VBOX Guest Additions don't build properly. For details see

https://forums.virtualbox.org/viewtopic.php?f=1&t=46808#p211449

does anybody know which changes in the kernel headers could have caused it
(and what should be modifyed in vboxvideo_drm.c)?
Posted on: 2011/12/21 11:17
Create PDF from Post Print
Top
  •  dmischa
      dmischa
Re: VBOX Guest Additions for CentOS 6.2
#2
Regular Board Member
Joined: 2011/3/21
From Germany
Posts: 56
Quote:

--- 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
Posted on: 2011/12/21 14:42
Create PDF from Post Print
Top
  •  AlanBartlett
      AlanBartlett
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#3
Moderator
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 9135
Thank you for your observation and solution.

For posterity (and on your behalf) this thread is marked [RESOLVED].
_________________
Alan

100% Unix & Linux. Co-founder of the ELRepo Project.
Posted on: 2011/12/21 19:26
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#4
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
I created a new Wiki page incorporating the patch procedure - CentOS as a Guest OS in VirtualBox.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2012/1/3 21:58
Create PDF from Post Print
Top
  •  r_hartman
      r_hartman
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#5
Professional Board Member
Joined: 2009/3/23
From Netherlands
Posts: 701
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.
_________________
René

Recommended reading for new forum users: FAQ & Readme First
Posted on: 2012/1/4 7:10
Create PDF from Post Print
Top
  •  dmischa
      dmischa
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#6
Regular Board Member
Joined: 2011/3/21
From Germany
Posts: 56
Quote:

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.
Posted on: 2012/1/4 9:43
Create PDF from Post Print
Top
  •  r_hartman
      r_hartman
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#7
Professional Board Member
Joined: 2009/3/23
From Netherlands
Posts: 701
Back at my own box, and updated to latest kernel
$ 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
_________________
René

Recommended reading for new forum users: FAQ & Readme First
Posted on: 2012/1/4 14:40
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#8
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
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.

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                         [FAILED]
(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.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2012/1/4 15:11
Create PDF from Post Print
Top
  •  r_hartman
      r_hartman
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#9
Professional Board Member
Joined: 2009/3/23
From Netherlands
Posts: 701
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.
_________________
René

Recommended reading for new forum users: FAQ & Readme First
Posted on: 2012/1/4 18:38
Create PDF from Post Print
Top
  •  antony_sudhakar
      antony_sudhakar
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#10
Newbie
Joined: 2012/1/5
From
Posts: 1
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
Posted on: 2012/1/5 1:12
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#11
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

Thanks for the correction. Copy/paste from the wrong line.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2012/1/5 3:07
Create PDF from Post Print
Top
  •  CrayXMP
      CrayXMP
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#12
Peeking in the Member Window
Joined: 2009/4/2
From
Posts: 14
# cd ~/TMP2/
# tar jcvf ../TMP/VBoxGuestAdditions-amd64.tar.bz2
tar: Cowardly refusing to create an empty archive

# cd ~/TMP2/
# tar jcvf ../TMP/VBoxGuestAdditions-amd64.tar.bz2 *
_________________
Let me issue and control a nation's money and I care not who writes its laws. (Mayer Amschel Bauer 'Rothschild', 1790)
Posted on: 2012/1/9 23:38
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#13
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
OK - hopefully 3rd time's the charm. Fixed the fix. Thanks.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2012/1/10 17:12
Create PDF from Post Print
Top
  •  HenrykD
      HenrykD
Re: [RESOLVED] VBOX Guest Additions for CentOS 6.2
#14
Regular Board Member
Joined: 2011/1/14
From Poland
Posts: 52
Finally it worked with *:

Building the OpenGL support module                         [  OK  ]


Thank you very much.
_________________
Henry
■ All Dell servers running on CentOS 5.9 professionally.
■ All test servers running on CentOS 6.4 virtually.
Posted on: 2012/1/10 17:50
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com