Wednesday, March 18, 2015

Installing Virtualbox Guest Additions on SUSE Linux Enterprise Server 12 and 15

 This article is not a complete and detailed how to, but will covered the subtlety of installing and using the Virtualbox Guest Additions (or Virtualbox Tools) on SUSE Linux Enterprise Server 12 SPX and SUSE Linux Enterprise Server 15 SPX.

Requirement:
Packages : gcc make kernel-default-devel
And of course you need to add the CD image of the Virtualbox Guest Additions in your SLES Virtual Machine :
Devices -> Insert Guest Additions CD image

Step :
1) Mount the cd image:
# mount /dev/sr0 /mnt


2) Install the package requirement:
# zypper in gcc kernel-default-devel

3) Enable "unsupported modules" to be loaded in the SLES's kernel:
Edit /etc/modprobe.d/10-unsupported-modules.conf
and set: allow_unsupported_modules 1
 
4) Run the Virtualbox Guest Additions installation script:
# cd /mnt
# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.14 Guest Additions for Linux............
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules                  done
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module                              done
Building the shared folder support module                             done
Building the OpenGL support module                                    done
Doing non-kernel setup of the Guest Additions                         done
You should restart your guest to make sure the new modules are actually used

Installing the Window System drivers
Installing X.Org Server 1.15 modules                                  done
Setting up the Window System to use the Guest Additions               done
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 components         done

5) You can now reboot your system and check the if the new modules are used:
# reboot
and then after the reboot: 
# lsmod | grep vbox vboxsf                 47920  0 vboxvideo              12669  1 drm                   322623  2 vboxvideo vboxguest             298126  3 vboxsf

6) Voilà !

27 comments:

  1. The best solution for this problem I ever read. Thank you so much!! I really spent a lot of time looking for working solution.

    ReplyDelete
  2. Great description! Thanks a lot. Searched 2 days til i found this, was the first which worked. And so easy...
    I'm happy... :D
    Cheers, Thomas from Germany

    ReplyDelete
  3. Thank you. You help me saving time on step 3 Enable "unsupported modules" to be loaded in the SLES's kernel.

    ReplyDelete
  4. Muchas gracias, me estaba volviendo loco tratando de resolver el problema.

    ReplyDelete
  5. This worked for me. I also searched the solution for 2-3days.
    Thanks :)

    ReplyDelete
  6. Magistral, fue de gran ayuda, el problema es para volverse loco

    ReplyDelete
  7. Thank you very much. I was on the point of reverting to SLES 11 having wasted an afternoon fighting with this.
    Excellent and straightforward description.

    ReplyDelete
  8. Where do you get the Virtualbox Guest Additions CD from?

    ReplyDelete
    Replies
    1. It's "build-in" Virtualbox, You should see the "Insert Guest Additions CD image" in the "Devices" menu of Virtual Box when your VM is started.

      Delete
    2. That does not work with SUSE Enterprise Linux as by default, none of the developer tools needed to build the additions are present.

      Delete
    3. Which "developer tools" ? gcc and kernel-default-devel are both in the SLES12-SP2-Pool and SLES12-SP2-Updates channel. These channel are the default channel of SLES 12 SP2 and the "SLES12-SP2-Pool" is basically what you can get from the Installation DVD. So please give more details information.

      Delete
  9. Excellent~ It works for me with vbox version 5.1.14. Many thanks!!

    ReplyDelete
  10. This is fantastic... I spent more than a day running behind this Guest additions! Thank you so much !

    ReplyDelete
  11. Followed the steps with SUSE ES 12 SP2 and the it failed. The result was
    fatal error generated/autoconf.h no such file or directory.

    ReplyDelete
    Replies
    1. 1) its SUSE Linux Enterprise Server 12 SP2 or SLES 12 SP2 not SUSE ES 12 SP2
      2) please give more details on your error.

      Delete
  12. Thanks a lot. I missed " allow_unsupported_modules 1" part.

    ReplyDelete
  13. Thanks so much. Worked like a charm.

    ReplyDelete
  14. Muchas Gracias!!! excelente metodo.. TNX

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. It works ! SLES12 SP3 with VirtualBox 5.2.6

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. Running vbox 6.1 with SLE 15.2 SP2 on Win 10 with Nvidia RTX2070 & latest drivers. Thanks your post as it got me a little closer and I can now install the Guest Tools however the screen sizing is still greyed out and fixed at 600x800. Any thoughts? From the log:

    00:00:05.578695 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
    00:00:05.588090 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000b820000 w=640 h=480 bpp=32 cbLine=0xA00 flags=0x0 origin=0,0
    00:00:05.955865 GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen 0 to 800x600
    00:00:05.958487 GUI: 2D video acceleration is disabled

    ReplyDelete
    Replies
    1. Hi, hummm this looks strange. Could you make sure that you are up-to-date on all sides? Reboot and try again?
      I think we need to check this before going any deeper.

      Delete