I. Background and Introduction
My “host” operating system has been 64-bit Windows 10 Home Edition for a few years. In Oracle Virtual “Machine” (VM) VirtualBox I have since December of the year 2013 had an openSUSE operating system installed as a “guest” operating system or VM. In Leap-15.2 openSUSE from July 23, 2020 through May or so of the year 2021 a usually quite workable procedure for me to obtain working VirtualBox Guest Additions was by executing VBoxLinuxAdditions.run from Oracle Corporation’s VirtualBox after installing a kernel update in Leap 15.3 or a new version of VirtualBox in Windows 10. However, after upgrading Leap 15.2 to Leap 15.3 I could no longer reliably use this procedure to obtain working VirtualBox Guest Additions in Leap 15.3 with VirtualBox. That is I learned from Larry Finger and/or the Internet that the kernel code in Oracle Corporation’s VirtualBox was apparently for a version of the Linux kernel newer than supplied through openSUSE Leap repositories. So to enable Oracle Corporation’s VBoxLinuxAdditions.run to work properly in openSUSE Leap 15.3 currently requires an openSUSE Leap code writer or writers to backport some kernel code to probably produce a Leap-15.3, kernel-appropriate version of VBoxLinuxAdditions.run. But it appears that this backporting has not always been performed for each new version of VirtualBox from Oracle Corporation and for each new version of the Linux kernel supplied through openSUSE Leap repositories.
So the alternative for obtaining working VirtualBox Guest Additions has been for me to, instead of producing VirtualBox Guest Additions from the latest version of Oracle Corporation’s VirtualBox, to try to use VirtualBox Guest Additions which come with the Linux kernel or else the VirtualBox Guest Additions in one of the virtualbox-… software packages, which in each of those cases is supplied through openSUSE Leap repositories. (Note that this makes a total of three sources for VirtualBox Guest Additions. And when all three of them are simultaneously installed, I don’t know for certain all of the openSUSE rules or priority for determining which of those three sets of VirtualBox Guest Additions will actually be used.) But I found that one or more functions of the VirtualBox Guest Additions in my Leap-15.3 installation could unfortunately rather easily be lost after making some software changes in that installation. These functions include the sharing of contents between my Windows-10 “host” and Leap-15.3 “guest” operating systems through a folder set up within VirtualBox for them to share and the copying and “pasting” of text via the computer “clipboard” between those two operating systems. And sometimes I saw that three question marks appeared in a window while “booting” my Leap-15.3 installation toward its graphical login screen.
Thus far my sure means to recover from such malfunctions has been to restore data onto my computer’s internal hard-drive from a backup of those data previously written onto an external hard-drive drive when the VirtualBox Guest Additions were working well for me. However, recovering to a previous state of the computer software was not always a means to proceed with working VirtualBox Guest Additions through updated or altered computer software. So I would instead like to have a means to repair or reconfigure the VirtualBox Guest Additions after one or more of their functions have been lost due to some change in my Leap-15.3 computer software. My approach up to now to proceed onward from a working state of the VirtualBox Guest Additions has been one of attempting to learn what to do from postings on the Internet and to employ methods of guessing with trial and error. These approaches have recently been unproductive uses of my time, including the fact that the restoration of Leap-15.3 data from a hard-drive backup could take about nine hours of time. Furthermore the methods posters posted for obtaining working VirtualBox Guest Additions in versions of openSUSE prior to Leap 15.3 might not apply to Leap 15.3, due to changes in the openSUSE computer software over some years of time. So rather than continue in such a slow, trial-and-error approach I think it would make more sense for me to learn from people who already know how to recover or obtain the functions of VirtualBox Guest Additions from openSUSE Leap-15.3 repositories. So that is my goal here.
**
II. Symptoms of My Troubles, Some of My Attempts to Remedy The Troubles, and Some of My Mysteries**
With the installed software packages
virtualbox-guest-tools 6.1.26-lp153.2.9.3
virtualbox-guest-x11 6.1.26-lp153.2.9.3
virtualbox-guest-source 6.1.26-lp153.2.9.3
virtualbox-kmp-default 6.1.26_k5.3.18_59.19-lp153.2.9.2
virtualbox-kmp-preempt 6.1.26_k5.3.18_59.19-lp153.2.9.2,
the running Linux kernel version 5.3.18-59.19-default,
the installed Linux kernel versions kernel-default 5.3.18-59.24.1 and kernel-preempt 5.3.18-59.24.1, and
the installed version 6.1.26r145957 (Qt5.6.2) of Oracle VM (Virtual Machine) VirtualBox from Oracle Corporation, Larry Finger on https://bugzilla.opensuse.org/show_bug.cgi?id=1187011 wrote that with virtualbox-guest-source installed the command “sudo /sbin/vboxguestconfig” one can “build” VirtualBox Guest Additions. In addition, in order for vboxguestconfig to be installed in my Leap-15.3 installation from experience on August 17, 2021 I found that it was necessary to have the software package virtualbox-guest-tools installed. Below I show you what occurred after entering the command ./vboxguestconfig in the directory /sbin as a “root” user.
linux-hdi0:/sbin # ./vboxguestconfig
Kernel modules available. but we will continue...
virtualbox-guest-source package version doesn't match the version of virtualbox package.
This situation is probably not fatal, thus we will try to continue ..
Building kernel modules...
Build of VirtualBox guest kernel modules failed.
Look at /var/log/virtualbox.log to find reasons.
linux-hdi0:/sbin #
/var/log/virtualbox.log
=== Building 'vboxguest' module ===
make[1]: Entering directory '/usr/src/kernel-modules/additions/src/vboxguest'
make V= CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/5.3.18-59.19-default/build M=/usr/src/kernel-modules/additions/src/vboxguest SRCROOT=/usr/src/kernel-modules/additions/src/vboxguest -j2 modules
make[2]: Entering directory '/usr/src/linux-5.3.18-59.19-obj/x86_64/default'
Building modules, stage 2.
MODPOST 1 modules
make[2]: Leaving directory '/usr/src/linux-5.3.18-59.19-obj/x86_64/default'
make[1]: Leaving directory '/usr/src/kernel-modules/additions/src/vboxguest'
=== Building 'vboxsf' module ===
make[1]: Entering directory '/usr/src/kernel-modules/additions/src/vboxsf'
make V= CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/5.3.18-59.19-default/build M=/usr/src/kernel-modules/additions/src/vboxsf SRCROOT=/usr/src/kernel-modules/additions/src/vboxsf -j2 modules
make[2]: Entering directory '/usr/src/linux-5.3.18-59.19-obj/x86_64/default'
Building modules, stage 2.
MODPOST 1 modules
make[2]: Leaving directory '/usr/src/linux-5.3.18-59.19-obj/x86_64/default'
make[1]: Leaving directory '/usr/src/kernel-modules/additions/src/vboxsf'
=== Building 'vboxvideo' module ===
make[1]: Entering directory '/usr/src/kernel-modules/additions/src/vboxvideo'
make V= CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/5.3.18-59.19-default/build M=/usr/src/kernel-modules/additions/src/vboxvideo SRCROOT=/usr/src/kernel-modules/additions/src/vboxvideo -j2 modules
make[2]: Entering directory '/usr/src/linux-5.3.18-59.19-obj/x86_64/default'
CC [M] /usr/src/kernel-modules/additions/src/vboxvideo/vbox_drv.o
CC [M] /usr/src/kernel-modules/additions/src/vboxvideo/vbox_irq.o
/usr/src/kernel-modules/additions/src/vboxvideo/vbox_drv.c:311:6: error: ‘DRIVER_PRIME’ undeclared here (not in a function); did you mean ‘DRIVER_NAME’?
DRIVER_PRIME |
^~~~~~~~~~~~
DRIVER_NAME
make[4]: *** [/usr/src/linux-5.3.18-59.19/scripts/Makefile.build:288: /usr/src/kernel-modules/additions/src/vboxvideo/vbox_drv.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [/usr/src/linux-5.3.18-59.19/Makefile:1675: _module_/usr/src/kernel-modules/additions/src/vboxvideo] Error 2
make[2]: *** ../../../linux-5.3.18-59.19/Makefile:179: sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-5.3.18-59.19-obj/x86_64/default'
make[1]: *** [/usr/src/kernel-modules/additions/src/vboxvideo/Makefile-footer.gmk:117: vboxvideo] Error 2
make[1]: Leaving directory '/usr/src/kernel-modules/additions/src/vboxvideo'
make: *** [Makefile:65: vboxvideo] Error 1
Mystery 1
Note that the major part of the version 6.1.26-lp153.2.9.3 of the Leap-15.3 software package virtualbox-guest-source at the time matched the major part of the version 6.1.26r145957 (Qt5.6.2) of VirtualBox. In addition virtualbox-guest-tools 6.1.26-lp153.2.9.3, virtualbox-guest-x11 6.1.26-lp153.2.9.3, virtualbox-kmp-default 6.1.26_k5.3.18_59.19-lp153.2.9.2,
and virtualbox-kmp-preempt 6.1.26_k5.3.18_59.19-lp153.2.9.2 were installed. And even the version 5.3.18-59.19-default of the running Linux kernel matched the number 5.3.18_59.19 which appeared in the installed versions of virtualbox-kmp-default and virtualbox-kmp-preempt. Yet the output of vboxguestconfig included “virtualbox-guest-source package version doesn’t match the version of virtualbox package.”
Mystery 2
After executing vboxguestconfig, /var/log/virtualbox.log included
/usr/src/kernel-modules/additions/src/vboxvideo/vbox_drv.c:311:6: error: ‘DRIVER_PRIME’ undeclared here (not in a function); did you mean ‘DRIVER_NAME’?
, which appears to be evidence of a mismatch between two computer codes. Searching the Internet I found this same sort of message posted by poster IamSteve on https://www.virtualbox.org/ticket/19863. The writing following that posting is not very direct regarding the cause of such a message, but includes a mention of backporting associated with one or two versions of the Linux kernel. So this makes me wonder whether my trouble with a similar message could be due to missing kernel backporting code or not.
I guess that the command “rcvboxadd setup” might have been a way fix or configure some faulty VirtualBox Guest Additions. This command was reported to have worked well in Leap 15.1 by the poster RustyPuma on https://forums.virtualbox.org/viewtopic.php?t=94359. However, no file named rcvboxadd was found in my Leap-15.3 installation!
A major result:
In a hard-drive backup including Leap 15.3 I had VirtualBox 6.1.22 from Oracle Corporation installed, which I think was “inherited” from my Leap-15.2 installation which was upgraded to Leap 15.3. I restored that Leap-15.3 installation onto my computer’s internal hard-disk drive. Then on October 8, 2021 in the directory /opt as a “root” user I entered the command ./uninstall.sh to uninstall the VirtualBox Guest Additions produced from Oracle Corporation’s VirtualBox 6.1.22. By that time I was working with VirtualBox-6.1.24 software packages from openSUSE, Leap-15.3 repositories; and since August 2, 2021 I had VirtualBox 6.1.26 installed in my “host,” Windows-10 operating system. So it makes sense to abandon something to do with VirtualBox 6.1.22 when working with VirtualBox 6.1.24 software packages from Leap-15.3 repositories. But the result of that uninstallation was that I lost the VirtualBox Guest Addition functions of the copying and “pasting” of text between my Windows-10 and Leap-15.3 operating systems; and the folders in my Leap-15.3 directory /media/sf_HostFolder, which corresponded to my Windows-10 directory C:\HostFolder, were invisible in Leap 15.3, while generally visible in Windows 10.—So, more simply, the file- and folder-sharing capabilities of the folder set up in VirtualBox to be shared between the Windows-10 “host” and Leap-15.3 “guest” operating systems were lost. So, with some mystery on my part, these important functions of the VirtualBox Guest Additions were evidently linked with the installation of the VirtualBox Guest Additions from Oracle Corporation’s VirtualBox 6.1.22 and not linked to the VirtualBox Guest Additions included in the Leap-15.3 virtualbox-… software packages or to the VirtualBox Guest Additions which have been reported by Larry Finger to be included in recent Leap Linux kernels. Updating multiple, Leap-15.3, virtualbox software packages to versions including “6.1.26” and updating the default and preempt versions of the Linux kernel from version 5.3.18-lp59.19 to version 5.3.18-lp59.24 appear to have restored the copying and “pasting” functions between the “host” and “guest” operating systems. But the folders in /media/sf_HostFolder were still invisible in Leap 15.3. And on at least one occasion I saw three question marks on a window while “booting” toward the Leap-15.3 graphical login screen.