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

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

Closed
cvquesty opened this issue Dec 22, 2020 · 22 comments
Labels

Comments

@cvquesty
Copy link

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
Copy link
Member

Possibly duplicate of #398

@cvquesty
Copy link
Author

cvquesty commented Dec 22, 2020 via email

@cvquesty
Copy link
Author

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
Copy link
Member

fnordfish commented Dec 22, 2020

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
Copy link

jonas commented Feb 26, 2021

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

@gh0sthx
Copy link

gh0sthx commented May 18, 2021

vagrant plugin uninstall vagrant-vbguest
vagrant plugin install vagrant-vbguest --plugin-version 0.21

it’s work for me

@xinatcg
Copy link

xinatcg commented Jun 21, 2021

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
Copy link

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

@fnordfish thks ~

@andrewfawcett
Copy link

andrewfawcett commented Sep 8, 2021

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
Copy link

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
Copy link

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
Copy link

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
Copy link

stale bot commented Apr 28, 2022

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.

@stale stale bot added the wontfix label Apr 28, 2022
@andresbott
Copy link

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_kernel_upgrade: true } did not help

@stale stale bot removed the wontfix label Jul 17, 2022
@rahaalizade
Copy link

rahaalizade commented Nov 1, 2022

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
Copy link

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

@bruvv
Copy link

bruvv commented Jan 10, 2023

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
Copy link

maisonhai3 commented Jul 13, 2023

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
Copy link

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
Copy link
Member

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
Copy link

bisrikarim commented Aug 10, 2023

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
Copy link

bahmanm commented Sep 9, 2023

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

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

No branches or pull requests