Installing VBoxAdditions for PhotonOS. Kernel not found

Discussions about using Linux guests in VirtualBox.

Installing VBoxAdditions for PhotonOS. Kernel not found

Postby VirtualMountain » 11. Apr 2019, 14:50

Hi

PhotonOS is a minimal Linux distro made by VMware mainly for DevOPS.

But I cannot install VBoxAdditions to the VM because the installer cannot find the kernel headers even though I have installed them

Here is the error:

Code: Select all   Expand viewCollapse view
root@photon [ /mnt/cdrom ]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.0.4 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 5.1.26 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: Kernel headers not found for target kernel
4.4.77-1.ph1. Please install them and execute
  /sbin/rcvboxadd setup
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: modprobe vboxsf failed


I have installed the kernel headers via
Code: Select all   Expand viewCollapse view
tdnf install build-essential
but rcvboxadd cannot find them.

Where is rcvboxadd looking for the kernel headers? What specific file is it looking for?

Thanks
VirtualMountain
 
Posts: 4
Joined: 11. Apr 2019, 13:15

Re: Installing VBoxAdditions for PhotonOS. Kernel not found

Postby VirtualMountain » 12. Apr 2019, 00:18

I've just installed the test build 6.0.5 but the problem persists.

The package for the linux headers is called linux-api-headers-4.19.29-1.ph3 and is installed, but the install script can't find them for some reason.
VirtualMountain
 
Posts: 4
Joined: 11. Apr 2019, 13:15

Re: Installing VBoxAdditions for PhotonOS. Kernel not found

Postby andyp73 » 12. Apr 2019, 07:48

The output from the guest additions installer says that it is looking for headers to go with the kernel 4.4.77-1.ph1. It looks like you may have updated your kernel headers but not the kernel itself.

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
andyp73
Volunteer
 
Posts: 1640
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Installing VBoxAdditions for PhotonOS. Kernel not found

Postby VirtualMountain » 12. Apr 2019, 13:19

Good spot, but where is the script getting that lower kernel version?

When I do
Code: Select all   Expand viewCollapse view
uname -r
I get 4.19.29-1.ph3 which is correct. There is no 4.4.77-1.ph1 directory anywhere on the system
Last edited by socratis on 12. Apr 2019, 15:32, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
VirtualMountain
 
Posts: 4
Joined: 11. Apr 2019, 13:15

Re: Installing VBoxAdditions for PhotonOS. Kernel not found

Postby andyp73 » 14. Apr 2019, 10:13

Not sure why you are getting the discrepancy between 4.4.7-1.ph1 and 4.19.29-1.ph3 but with a clean install of PhotonOS using Full ISO x86_64 fails to build the guest additions out of the box.

The build script is looking for the presence of the directory /lib/modules/"$TARGET_VER"/build where TARGET_VER is derived from 'uname -r'. This is normally a softlink to the kernel headers in /usr/src. In order to get the Guest Additions to build I needed to first run:

tdnf install linux-devel

I did need to reboot the guest as it downloaded a new kernel and the corresponding headers (4.19.32-3.ph3).

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
andyp73
Volunteer
 
Posts: 1640
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Installing VBoxAdditions for PhotonOS. Kernel not found

Postby VirtualMountain » 14. Apr 2019, 17:31

Andy

Thank you very much for finding the missing link (tdnf install linux-devel) and solving the problem.

Best regards

John
VirtualMountain
 
Posts: 4
Joined: 11. Apr 2019, 13:15


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 11 guests