Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

No VirtualBox Guest Additions installation found #4

Closed
geerlingguy opened this issue Sep 27, 2019 · 12 comments
Closed

No VirtualBox Guest Additions installation found #4

geerlingguy opened this issue Sep 27, 2019 · 12 comments

Comments

@geerlingguy
Copy link
Owner

geerlingguy commented Sep 27, 2019

Unless using this box with the vagrant-vbguest Vagrant plugin, you won't end up with Guest Additions being found (and even then, it looks like the installation fails. Something may be breaking during the installation.

When I started up box version 1.0.1, I got the following message:

[virtualbox] No Virtualbox Guest Additions installation found.
Last metadata expiration check: 4:12:38 ago on Thu 26 Sep 2019 08:24:43 PM UTC.
Package binutils-2.30-49.el8.x86_64 is already installed.
Package make-1:4.2.1-9.el8.x86_64 is already installed.
Package perl-4:5.26.3-416.el8.x86_64 is already installed.
Package bzip2-1.0.6-26.el8.x86_64 is already installed.
...
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 
4.18.0-80.7.1.el8_0.x86_64.

VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what 
went wrong
ValueError: File context for /opt/VBoxGuestAdditions-6.0.12/other/mount.vboxsf already defined
modprobe vboxguest failed
The log file /var/log/vboxadd-setup.log may contain further information.
An error occurred during installation of VirtualBox Guest Additions 6.0.12. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
Redirecting to /bin/systemctl start vboxadd.service
Job for vboxadd.service failed because the control process exited with error code.
See "systemctl status vboxadd.service" and "journalctl -xe" for details.
Unmounting Virtualbox Guest Additions ISO from: /mnt
==> virtualbox: Checking for guest additions in VM...
    virtualbox: No guest additions were detected on the base box for this VM! Guest
    virtualbox: additions are required for forwarded ports, shared folders, host only
    virtualbox: networking, and more. If SSH fails on this machine, please install
    virtualbox: the guest additions and repackage the box to continue.
    virtualbox: 
    virtualbox: This is not an error message; everything may continue to work properly,
    virtualbox: in which case you may ignore this message.

The shell provisioner and vagrant ssh are still working fine, though.

@geerlingguy
Copy link
Owner Author

Debugging info:

$ cat /var/log/vboxadd-setup.log
Building the main Guest Additions 6.0.12 module for kernel 4.18.0-80.7.1.el8_0.x86_64.
Error building the module.  Build output follows.
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/4.18.0-80.7.1.el8_0.x86_64/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
Makefile:958: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel".  Stop.
make: *** [/tmp/vbox.0/Makefile-footer.gmk:111: vboxguest] Error 2
Could not find the X.Org or XFree86 Window System, skipping.
modprobe vboxguest failed

@geerlingguy
Copy link
Owner Author

See above issue, upstream. Testing if that's the fix.

@geerlingguy
Copy link
Owner Author

I keep getting the same problem, not sure why.

@geerlingguy
Copy link
Owner Author

geerlingguy commented Sep 27, 2019

Trying a manual install:

$ vagrant upload /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso /tmp/VBoxGuestAdditions.iso
$ vagrant ssh

Inside the VM:

$ sudo su
# mkdir /mnt/vbguest
# mount -t iso9660 -o loop /tmp/VBoxGuestAdditions.iso /mnt/vbguest/
# cd /mnt/vbguest
# sh VBoxLinuxAdditions.run
...

Ended up with the same error.

So tried:

# yum install -y elfutils-libelf-devel
# sh VBoxLinuxAdditions.run

And... the install seems to get through the kernel mods, but still errors out at:

ValueError: File context for /opt/VBoxGuestAdditions-6.0.12/other/mount.vboxsf already defined

I'm wondering if the sh context in the Packer build is different than the sh context me in an interactive session? I'm going to debug the packer_rhel role to see if that package is showing up in yum list installed right before attempting the additions installation.

@geerlingguy
Copy link
Owner Author

It's definitely there during install:

elfutils-libelf-devel.x86_64                0.174-6.el8                           @BaseOS

@geerlingguy
Copy link
Owner Author

Weird. It looks like the install succeeds in the build:

    virtualbox-iso:     stdout_lines:
    virtualbox-iso:     - Verifying archive integrity... All good.
    virtualbox-iso:     - Uncompressing VirtualBox 6.0.12 Guest Additions for Linux........
    virtualbox-iso:     - 'VirtualBox Guest Additions: Starting.'
    virtualbox-iso:     - 'VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel '
    virtualbox-iso:     - modules.  This may take a while.
    virtualbox-iso:     - 'VirtualBox Guest Additions: To build modules for other installed kernels, run'
    virtualbox-iso:     - 'VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>'
    virtualbox-iso:     - 'VirtualBox Guest Additions: or'
    virtualbox-iso:     - 'VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all'
    virtualbox-iso:     - 'VirtualBox Guest Additions: Building the modules for kernel '
    virtualbox-iso:     - 4.18.0-80.7.1.el8_0.x86_64.

Maybe Vagrant's guest additions detection doesn't work with CentOS 8 yet, and I've burned more than half a day on a ghost chase?

@geerlingguy
Copy link
Owner Author

Actually, the check for Guest Additions happens inside Vagrant, and vagrant-vbguest just uses that flag to determine whether to install... so maybe it's a Vagrant issue?

@geerlingguy
Copy link
Owner Author

geerlingguy commented Sep 27, 2019

Looks like they're not installed:

# lsmod | grep vboxguest
(no output)
# modprobe vboxadd
modprobe: FATAL: Module vboxadd not found in directory /lib/modules/4.18.0-80.7.1.el8_0.x86_64

Checking if /sbin/rcvboxadd quicksetup all might help ... nope.

@geerlingguy
Copy link
Owner Author

Going to have to give up on this for now. It seems to install without error, but it ain't working.

@ifurther
Copy link

ifurther commented Oct 3, 2019

Maybe VirtualBox 6.0.12 fixed this.

@MedUnes
Copy link

MedUnes commented Oct 22, 2019

@ifurther still experiencing the error under VBox 6 (ubuntu 18)

@geerlingguy
Copy link
Owner Author

Closing as all development work for my packer boxes is moving into a central repository, see: geerlingguy/packer-boxes#45

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants