2

ISSUE

I am using dotless' vbguest vagrant plugin to keep my Virtualbox guest additions updated.

Trying to install guest additions now using

$ vagrant vbguest --iso VBoxGuestAdditions_5.2.18.iso --do install

gives me:

$ vagrant vbguest --iso VBoxGuestAdditions_5.2.18.iso --do install --no-cleanup -f
[helix_dev] GuestAdditions versions on your host (5.2.8) and guest (5.0.16) do not match.
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* base: mirror.checkdomain.de
* epel: mirror.nl.leaseweb.net
* extras: mirror2.hs-esslingen.de
* updates: ftp.rz.uni-frankfurt.de
755 packages excluded due to repository priority protections
Package kernel-devel-3.10.0-862.11.6.el7.x86_64 already installed and latest version
Package kernel-devel-3.10.0-862.11.6.el7.x86_64 already installed and latest version
Package gcc-4.8.5-28.el7_5.1.x86_64 already installed and latest version
Package binutils-2.27-28.base.el7_5.1.x86_64 already installed and latest version
Package 1:make-3.82-23.el7.x86_64 already installed and latest version
Package 4:perl-5.16.3-292.el7.x86_64 already installed and latest version
Package bzip2-1.0.6-13.el7.x86_64 already installed and latest version
Nothing to do
Copy iso file VBoxGuestAdditions_5.2.18.iso into the box /tmp/VBoxGuestAdditions.iso
Mounting Virtualbox Guest Additions ISO to: /mnt
mount: /dev/loop0 is write-protected, mounting read-only
Forcing installation of Virtualbox Guest Additions 5.2.18 - guest version is 5.0.16
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.18 Guest Additions for Linux........
VirtualBox Guest Additions installer
/usr/sbin/vbox-uninstall-guest-additions: line 9: /opt/VBoxGuestAdditions-5.2.18/uninstall.sh: No such file or directory
Failed to remove existing installation.  Aborting...
An error occurred during installation of VirtualBox Guest Additions 5.2.18. 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
Failed to start vboxadd.service: Access denied
See system logs and 'systemctl status vboxadd.service' for details.

Mounting the VirtualboxAdditions inside the VM and running VBoxLinuxAdditions.run manually results in

$ sudo ./VBoxLinuxAdditions.run install
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.8 Guest Additions for Linux........
VirtualBox Guest Additions installer
/usr/sbin/vbox-uninstall-guest-additions: line 9: /opt/VBoxGuestAdditions-5.2.18/uninstall.sh: No such file or directory
Failed to remove existing installation.  Aborting...

So I figure it's not connected to dotless' plugin.

CURRENT ANALYSIS

The referenced folder /opt/VBoxGuestAdditions-5.2.18 does not exist, which I assume to be the root of the problem, thus uninstall.sh also does not exist obviously.

It seems that the setup procedure hard-requires the uninstall procedure to run which is not present anymore.

I cannot seem to get that folder back no matter what I try (yet).

I am hoping you guys have an idea what I might do.

Additional information:

I am on a Windows 10 host with a CentOS 7 guest:

cat /etc/*-release
CentOS Linux release 7.5.1804 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.5.1804 (Core)
CentOS Linux release 7.5.1804 (Core)

My Virtualbox version is 5.2.8, my Vagrant version is

$ vagrant version
Installed Version: 2.0.4
Latest Version: 2.1.2
  • Information for someone stumbling upon this: I was not able to get that folder back. I am still happy for suggestions how I might have approached this issue for future reference. This time though, the "fix" was to trash the broken VM and re-provision completely. – Worp Sep 3 '18 at 6:59
0

Workaround: On my Fedora 30 (as guest) i created the needed uninstall.sh in the dedicated folder and add the executable flag to it. The content of the file was only an echo Afterwards i was able to run again the wizard.

Here the uninstall.sh content in my Fedora 30 (Guest)

#!/bin/sh
# Auto-generated uninstallation file

PATH=$PATH:/bin:/sbin:/usr/sbin
LOGFILE="/var/log/vboxadd-uninstall.log"

# Read routines.sh
if ! test -r "/opt/VBoxGuestAdditions-6.0.8/routines.sh"; then
    echo 1>&2 "Required file routines.sh not found.  Aborting..."
    return 1
fi
. "/opt/VBoxGuestAdditions-6.0.8/routines.sh"

# We need to be run as root
check_root

create_log "$LOGFILE"

echo 1>&2 "Removing installed version 6.0.8 of VirtualBox Guest Additions..."

NO_CLEANUP=""
if test "$1" = "no_cleanup"; then
    shift
    NO_CLEANUP="no_cleanup"
fi

test -r "/var/lib/VBoxGuestAdditions/filelist" || abort "Required file filelist not found.  Aborting..."

# Stop and clean up all services
if test -r "/opt/VBoxGuestAdditions-6.0.8"/init/vboxadd-service; then
    stop_init_script vboxadd-service 2>> "$LOGFILE"
    delrunlevel vboxadd-service 2>> "$LOGFILE"
    remove_init_script vboxadd-service 2>> "$LOGFILE"
fi
if test -r "/opt/VBoxGuestAdditions-6.0.8"/init/vboxadd; then
    stop_init_script vboxadd 2>> "$LOGFILE"
    test -n "$NO_CLEANUP" || "/opt/VBoxGuestAdditions-6.0.8"/init/vboxadd cleanup 2>> "$LOGFILE"
    delrunlevel vboxadd 2>> "$LOGFILE"
    remove_init_script vboxadd 2>> "$LOGFILE"
fi
finish_init_script_install

# Load all modules
# Important: This needs to be done before loading the configuration
#            value below to not override values which are set to a default
#            value in the modules itself.
for CUR_MODULE in /opt/VBoxGuestAdditions-6.0.8/installer/module-autologon
    do
        . "$CUR_MODULE"
    done

# Load configuration values
test -r "/var/lib/VBoxGuestAdditions/config" && . "/var/lib/VBoxGuestAdditions/config"

# Call uninstallation initialization of all modules
for CUR_MODULE in ""
    do
        if test -z "$CUR_MODULE"; then
            continue
        fi
        mod_${CUR_MODULE}_pre_uninstall
        if [ 0 -ne 0 ]; then
            echo 1>&2 "Module \"$CUR_MODULE\" failed to initialize uninstallation"
            # Continue initialization.
        fi
    done

# Call uninstallation of all modules
for CUR_MODULE in ""
    do
        if test -z "$CUR_MODULE"; then
            continue
        fi
        mod_${CUR_MODULE}_uninstall
        if [ 0 -ne 0 ]; then
            echo 1>&2 "Module \"$CUR_MODULE\" failed to uninstall"
            # Continue uninstallation.
        fi
    done

# And remove all files and empty installation directories
# Remove any non-directory entries
cat "/var/lib/VBoxGuestAdditions/filelist" | xargs rm 2>/dev/null
# Remove any empty (of files) directories in the file list
cat "/var/lib/VBoxGuestAdditions/filelist" |
    while read file; do
        case "$file" in
            */)
            test -d "$file" &&
                find "$file" -depth -type d -exec rmdir '{}' ';' 2>/dev/null
            ;;
        esac
    done

# Remove configuration files
rm "/var/lib/VBoxGuestAdditions/filelist" 2>/dev/null
rm "/var/lib/VBoxGuestAdditions/config" 2>/dev/null
rmdir "/var/lib/VBoxGuestAdditions" 2>/dev/null
exit 0
| improve this answer | |
  • Could you paste the actual content of the uninstall.sh for future reference? Maybe I'll run into the problem again and would love to just have an easy copy/paste solution :) – Worp Jul 3 '19 at 12:54
  • Gets me /opt/VBoxGuestAdditions-6.0.8/uninstall.sh: line 12: /opt/VBoxGuestAdditions-6.0.8/routines.sh: No such file or directory What a mess. Deleting all this crap and using non Oracle product. – ficuscr Feb 4 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.