thelinuxvault blog

Install VirtualBox Guest Additions on openSUSE: A Comprehensive Guide

If you’re running openSUSE as a virtual machine (VM) in VirtualBox, you’ve likely noticed some limitations: clunky screen resolution, lack of shared clipboard, no drag-and-drop functionality, and poor performance. These issues can be resolved by installing VirtualBox Guest Additions—a set of drivers and utilities designed to optimize the guest operating system (openSUSE, in this case) for better integration with the VirtualBox host.

Guest Additions unlock critical features like:

  • Automatic screen resolution adjustment
  • Bidirectional shared clipboard (copy-paste between host and guest)
  • Drag-and-drop file transfer
  • Shared folders (access host files from the guest)
  • Seamless mode (run guest apps directly on the host desktop)
  • Improved video and mouse performance

In this guide, we’ll walk through installing VirtualBox Guest Additions on openSUSE in detail, ensuring you get the most out of your VM.

2026-02

Table of Contents#

  1. Prerequisites
  2. Step 1: Update Your openSUSE System
  3. Step 2: Install Required Dependencies
  4. Step 3: Mount the VirtualBox Guest Additions ISO
  5. Step 4: Run the Guest Additions Installer
  6. Step 5: Verify Installation and Enable Features
  7. Troubleshooting Common Issues
  8. Conclusion
  9. References

Prerequisites#

Before starting, ensure you have:

  • A running openSUSE VM in VirtualBox (tested on openSUSE Leap 15.5 and Tumbleweed).
  • The VirtualBox host application installed (version 6.1 or newer recommended; match the Guest Additions version to your host VirtualBox version).
  • Internet access on the openSUSE guest (to download dependencies).
  • Administrative privileges (root access) on the openSUSE guest.

Step 1: Update Your openSUSE System#

First, update your openSUSE system to ensure you have the latest packages and kernel headers. Open a terminal in openSUSE and run:

sudo zypper refresh
sudo zypper update -y

Reboot the VM if prompted (e.g., if the kernel was updated):

sudo reboot

Step 2: Install Required Dependencies#

Guest Additions require kernel headers, compilers, and tools to build and install drivers. Install these dependencies using zypper, openSUSE’s package manager.

2.1: Identify Your Kernel Version#

Guest Additions need headers matching your running kernel version. Check your kernel version with:

uname -r

Example output:

6.4.0-1-default

2.2: Install Kernel Headers and Build Tools#

Install the kernel headers package corresponding to your kernel version. For most openSUSE systems (using the default kernel-default), the package name is kernel-default-devel. Replace 6.4.0-1-default with your kernel version from uname -r:

sudo zypper in -y kernel-default-devel gcc make perl

If you’re using a non-default kernel (e.g., kernel-desktop or kernel-azure), replace kernel-default-devel with the appropriate package (e.g., kernel-desktop-devel). Verify available kernel header packages with:

zypper search kernel-*-devel

Step 3: Mount the VirtualBox Guest Additions ISO#

The Guest Additions installer is distributed as an ISO file bundled with VirtualBox. We’ll mount this ISO in the openSUSE guest.

3.1: Insert the Guest Additions ISO#

In the VirtualBox menu bar (on your host machine), go to:
Devices > Insert Guest Additions CD Image...

If prompted to download the ISO (first-time use), click “Download” and wait for it to complete.

3.2: Mount the ISO in openSUSE#

openSUSE may auto-mount the ISO (check the desktop for a “VBox_GAs_*” icon). If not, manually mount it:

  1. Create a mount point:

    sudo mkdir -p /mnt/cdrom
  2. Mount the ISO (replace /dev/sr0 with your CD-ROM device if needed; check with lsblk):

    sudo mount /dev/sr0 /mnt/cdrom

    You should see output like:

    mount: /mnt/cdrom: WARNING: source write-protected, mounted read-only.
    

Step 4: Run the Guest Additions Installer#

Now run the installer script from the mounted ISO.

4.1: Navigate to the Mounted ISO Directory#

cd /mnt/cdrom

4.2: Execute the Installer#

Run the VBoxLinuxAdditions.run script as root:

sudo sh ./VBoxLinuxAdditions.run

4.3: Monitor the Installation#

The installer will build and install kernel modules (e.g., vboxguest, vboxsf, vboxvideo). Watch for output like:

...
Installing VirtualBox Guest Additions ...done.

Note: Warnings about “X.Org server” or “3D acceleration” are usually safe to ignore unless you need advanced graphics features.

Step 5: Verify Installation and Enable Features#

Reboot the VM to load the new kernel modules:

sudo reboot

5.1: Check if Modules Are Loaded#

After rebooting, verify the Guest Additions kernel modules are loaded:

lsmod | grep vbox

You should see modules like:

  • vboxguest: Core Guest Additions module
  • vboxsf: Shared folders support
  • vboxvideo: Video acceleration driver

Example output:

vboxvideo              53248  1
vboxsf                 86016  0
vboxguest            4014080  2 vboxsf

5.2: Enable Key Features#

Most features work out-of-the-box, but confirm/enable them via VirtualBox settings:

Shared Clipboard & Drag-and-Drop#

Go to Devices > Shared Clipboard and select Bidirectional.
For drag-and-drop, go to Devices > Drag and Drop and select Bidirectional.

Shared Folders#

To access host files from the guest:

  1. On the host, create a folder to share (e.g., ~/VirtualBox_Shared).
  2. In VirtualBox, go to Devices > Shared Folders > Shared Folders Settings....
  3. Click “Add” (+), select the host folder, and check “Auto-mount” and “Make Permanent.”
  4. In the guest, access the shared folder at /media/sf_<FolderName> (e.g., /media/sf_VirtualBox_Shared).

Automatic Screen Resolution#

Resize the VirtualBox window—the guest resolution should adjust automatically. If not, log out and log back in.

Troubleshooting Common Issues#

Issue 1: “Kernel headers not found” Error#

If the installer fails with Kernel headers not found for target kernel, ensure:

  • You installed the correct kernel header package (e.g., kernel-default-devel matches uname -r).
  • The kernel version didn’t change after updating (reboot if needed).

Issue 2: ISO Not Mounting#

If mount /dev/sr0 /mnt/cdrom fails, check:

  • The ISO is inserted via Devices > Insert Guest Additions CD Image....
  • The CD-ROM device is recognized: lsblk | grep sr0 (look for a sr0 entry).

Issue 3: Poor Performance or Missing Features#

  • Ensure Guest Additions version matches your VirtualBox host version (e.g., host v7.0.8 → Guest Additions v7.0.8).
  • Reinstall Guest Additions after kernel updates: Repeat Steps 3–4.

Conclusion#

Installing VirtualBox Guest Additions transforms your openSUSE VM from a sluggish, limited environment into a seamless, high-performance system. With features like shared clipboard, automatic resolution, and shared folders, you’ll work as efficiently in the guest as you do on the host.

Follow the steps above, and if you run into issues, refer to the troubleshooting section or official documentation linked below.

References#