dotless-de / vagrant-vbguest

A Vagrant plugin to keep your VirtualBox Guest Additions up to date
MIT License
2.88k stars 207 forks source link

"vagrant up" fails under Vbguest 0.28.0. Downgrading to 0.21.0 solves the issue #399

Closed cvquesty closed 10 months ago

cvquesty commented 3 years ago

Under the new "Big Sur", running "vagrant up" when vagrant-vbguest is installed (and used) causes an error whereby a mount is looked for and generates a condition where vagrant-vbguest will not run and fails hard. The error output is:

Complete!
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.genesisadaptive.com
 * extras: mirror.rackspace.com
 * updates: mirror.umd.edu
No package kernel-devel-3.10.0-1127.el7.x86_64 available.
Error: Nothing to do
Unmounting Virtualbox Guest Additions ISO from: /mnt
umount: /mnt: not mounted
==> master: Checking for guest additions in VM...
    master: No guest additions were detected on the base box for this VM! Guest
    master: additions are required for forwarded ports, shared folders, host only
    master: networking, and more. If SSH fails on this machine, please install
    master: the guest additions and repackage the box to continue.
    master:
    master: This is not an error message; everything may continue to work properly,
    master: in which case you may ignore this message.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

umount /mnt

Stdout from the command:

Stderr from the command:

umount: /mnt: not mounted

Siply backporting vagrant-vbguest to 0.21.0 resolves the issue.

fnordfish commented 3 years ago

Possibly duplicate of #398

cvquesty commented 3 years ago

I don’t think so. RHEL8 is not involved in any way

On Dec 22, 2020, at 12:17 PM, Robert Schulze notifications@github.com wrote:

Possibly duplicate of #398 https://github.com/dotless-de/vagrant-vbguest/pull/398 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dotless-de/vagrant-vbguest/issues/399#issuecomment-749669128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALDI74PMCYGA23EP2E5RM3SWDID5ANCNFSM4VF45BJQ.

cvquesty commented 3 years ago

I checked #398 and was able to determine from looking at the code that the state behavior is not present in that ticket. Can I provide further illumination or logging to assist with the issue?

fnordfish commented 3 years ago

From your log No package kernel-devel-3.10.0-1127.el7.x86_64 available. I take it you are using CentOS7 ... hence the guess that the old "enable repo" fixes your problem.

For now, you could let vbguest update the kernel in your box (https://github.com/dotless-de/vagrant-vbguest#installer-specific-options-installer_options : config.vbguest.installer_options = { allow_kernel_upgrade: true } )

jonas commented 3 years ago

I can confirm that allow_kernel_upgrade: true fixes this issue for bento/centos-7.8.

gh0sthx commented 3 years ago
vagrant plugin uninstall vagrant-vbguest
vagrant plugin install vagrant-vbguest --plugin-version 0.21

it’s work for me

xinatcg commented 3 years ago

From your log No package kernel-devel-3.10.0-1127.el7.x86_64 available. I take it you are using CentOS7 ... hence the guess that the old "enable repo" fixes your problem.

For now, you could let vbguest update the kernel in your box (https://github.com/dotless-de/vagrant-vbguest#installer-specific-options-installer_options : config.vbguest.installer_options = { allow_kernel_upgrade: true } )

this resolve my issue, using 0.30.0 and reload, it will install the package to the vm after detect: [default] No Virtualbox Guest Additions installation found.

Vagrant.configure("2") do |config|
  config.vm.box = "centos/8"
  config.vbguest.installer_options = { allow_kernel_upgrade: true }
end
OneCodeMonkey commented 3 years ago

This works ! add this line in provider config: config.vbguest.installer_options = { allow_kernel_upgrade: true }

@fnordfish thks ~

andrewfawcett commented 3 years ago

I experience this after upgrading to the latest VirtualBox (6.1.26). Then vagrant-vbguest (0.24.0) was preventing my machine from starting up. Upgrading to latest (0.30.0) got me a little further, but I would get a similar failure after checking for guest additions. I tried the latest CentOS 7 (v2004.01) and CentOS 8 images (2011.0) but neither helped. Also tried allow_kernel_upgrade. I really liked this plugin, but I've reverted to rsync until this bug is fixed.

Update: I uninstalled vagrant-vbguest v0.30.0 and installed v0.24.0 and now it is able to install guest additions.

Update2: This bug was introduced in v0.25.0.

maltewhiite commented 3 years ago

From your log No package kernel-devel-3.10.0-1127.el7.x86_64 available. I take it you are using CentOS7 ... hence the guess that the old "enable repo" fixes your problem.

For now, you could let vbguest update the kernel in your box (https://github.com/dotless-de/vagrant-vbguest#installer-specific-options-installer_options : config.vbguest.installer_options = { allow_kernel_upgrade: true } )

What file do I place that line in?

Neko0258 commented 2 years ago

From your log No package kernel-devel-3.10.0-1127.el7.x86_64 available. I take it you are using CentOS7 ... hence the guess that the old "enable repo" fixes your problem. For now, you could let vbguest update the kernel in your box (https://github.com/dotless-de/vagrant-vbguest#installer-specific-options-installer_options : config.vbguest.installer_options = { allow_kernel_upgrade: true } )

What file do I place that line in?

in vagrantfile

maltewhiite commented 2 years ago

From your log No package kernel-devel-3.10.0-1127.el7.x86_64 available. I take it you are using CentOS7 ... hence the guess that the old "enable repo" fixes your problem. For now, you could let vbguest update the kernel in your box (https://github.com/dotless-de/vagrant-vbguest#installer-specific-options-installer_options : config.vbguest.installer_options = { allow_kernel_upgrade: true } )

What file do I place that line in?

in vagrantfile

I ended up changing to Ubuntu instead

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

andresbott commented 2 years ago

I'm still facing this issue with image "debian/bullseye64" and version v0.30.v downgrading to v0.21.0 or _config.vbguest.installer_options = { allow_kernelupgrade: true } did not help

rahaalizade commented 2 years ago

vagrant plugin uninstall vagrant-vbguest, vagrant destroy and vagrant up solved this issue for me! Don't give any vbguest addition to vagrant and virtualbox :))

andresbott commented 2 years ago

For whom might interest, I ended up baking my own image. check the details here: https://gist.github.com/andresbott/b09b4fb16113f02e20fa0ef39025064c

bruvv commented 1 year ago

Running rockylinux/9, same error. What helped for me is:

    ansible_host_01.vbguest.installer_options = { allow_kernel_upgrade: true, auto_reboot: true }
    ansible_host_01.vbguest.installer_hooks[:before_install] = ["dnf -y update kernel", "sleep 2"]
maisonhai3 commented 1 year ago

From your log No package kernel-devel-3.10.0-1127.el7.x86_64 available. I take it you are using CentOS7 ... hence the guess that the old "enable repo" fixes your problem.

For now, you could let vbguest update the kernel in your box (https://github.com/dotless-de/vagrant-vbguest#installer-specific-options-installer_options : config.vbguest.installer_options = { allow_kernel_upgrade: true } )

This works in my case.

I use the code below to create a VM with CentOS 9, then got the same problem. Then your solution fixes it.

### DB vm  ####
  config.vm.define "db01" do |db01|
    db01.vm.box = "eurolinux-vagrant/centos-stream-9"
    db01.vm.hostname = "db01"
    db01.vm.network "private_network", ip: "192.168.56.15"
    db01.vm.provider "virtualbox" do |vb|
     vb.memory = "600"
   end

  end
maisonhai3 commented 1 year ago

allow_kernel_upgrade: true workaround.

However, this code updates kernels EVERY SINGLE TIME while a box is set up, which costs a huge amount of time.

fnordfish commented 1 year ago

As an explainer: The allow_kernel_upgrade is there so that the matching Kernel header packages can be installed. This is, because CentOS* removes “old” Kernel header packages from its registry. We don’t need to update the Kernel, but it is the only way to get matching headers.

The Solution™ would be to use a base box which has the matching Kernel headers, maybe even all the other dependencies needed to compile guest additions, already installed.

bisrikarim commented 1 year ago

This works ! add this line in provider config: config.vbguest.installer_options = { allow_kernel_upgrade: true }

@fnordfish thks ~

That works for me, thank you so much :)

bahmanm commented 1 year ago

Using v0.31.0 w/ VirtualBox 7.0.10 on openSUSE Tumbleweed:
In my case all I had to do was to add the guest additions ISO file to the Media Manager. vbguest auto-detected the ISO and everything went smoothly w/o allow_kernel_upgrade or auto_reboot.

image