[SOLVED] CentOS 6.7 guest in VBox 5.0.8 (Win 8.1 host)

General support questions
Post Reply
4hr1m4n
Posts: 11
Joined: 2012/10/30 12:00:22

[SOLVED] CentOS 6.7 guest in VBox 5.0.8 (Win 8.1 host)

Post by 4hr1m4n » 2015/11/06 18:38:50

Hi,

I installed CentOS 6.7 x86_64 in VirtualBox 5.0.8 (Windows 8.1 Professional 64-bit host) but, as many others here, I had problems building the OpenGL driver that comes with VB Guest Additions.

None of the patches that I've found on Internet worked, so I decided to post here what I did since it worked (at least for me):

Code: Select all

--- vboxvideo_drm.c.orig	2015-11-05 23:02:21.415140416 -0500
+++ vboxvideo_drm.c	2015-11-05 23:00:11.571262138 -0500
@@ -56,6 +56,10 @@
 #include <drm/drmP.h>
 #include "vboxvideo_drm.h"
 
+#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6, 7)
+# define DRM_RHEL67
+#endif
+
 /* This definition and the file-operations-as-pointer change were both added in
  * kernel 3.3.  All back-ports of the structure change to distribution kernels
  * that I have checked also back-ported the definition at the same time. */
@@ -89,7 +93,7 @@
         .open = drm_open,
         .release = drm_release,
         .unlocked_ioctl = drm_ioctl,
-# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
+# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) && ! defined (DRM_RHEL67)
         /* This shouldn't be necessary even for old kernels as there is
          * nothing sensible to mmap. But we play safe and keep it for
          * legacy reasons. */
You can follow the steps contained in the following page and use the above patch instead: https://wiki.centos.org/HowTos/Virtuali ... entOSguest

Cheers.

Post Reply