View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017884 | administration | operations | public | 2020-11-24 20:53 | 2021-02-17 01:14 |
Reporter | rka | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Vagrant/Virtual Box | OS | CentOS 7.8 | ||
Summary | 0017884: Vagrant box fails to install Virtual Box additions after publishing of new CentOS Release | ||||
Description | Today I fail start provisioning a CentOS 7.8 VM in Virtual Box. The failure is caused by a missing kernel-devel-3.10.0-1127.el7.x86_64.rpm. Why does this happen? When CentOS publishes a new release, support for the previous release is removed from the mirror servers. For example CentOS 7.8. support disappeared on 2020-11-17, when CentOS 7.9 was published. See the timestamps in http://mirror.centos.org/centos. The missing kernel-devel-3.10.0-1127.el7.x86_64.rpm was available on the mirrors until CentOS 7.9 was published. AFter that it is gone and can be only found in the vault archive. Since yum is not configured to use the vault archive, the box becomes unusable with the new release unless you either update to the newest OS version. if you install the guest additions with the vagrant-vbguest (which is a common way for setting up a box with vagrant) you cannot update the CentOS in advance. You have to rely on that either a box for the current release is available or that old boxes still work after a new release has been published. Today the publishing of vagrant box images for CentOS is not in sync with the publishing of new CentOS releases. For example on 2020-11-24 there is only the 7.8 box available (which fails to work) but not a 7.9 one. But you cannot install new rpms for 7.8 since they are not available on the mirrors anymore. Provisioning still would work, if yum would have been configured to also use vault for this version. Then the provisioning would find the missing rpm(s) in the vault archive. However this is not the case. The problem also occurs to all CentOS versions (See https://github.com/dotless-de/vagrant-vbguest/issues/311 for a discussion on it). I've explicitly checked CentOS 8 for that. | ||||
Steps To Reproduce | Build a new VM with vagrant with active vagrant-vbguest plugin and virtual box. See attached Sample vagrantfile and log. You need not the newest versions of vagrant, plugin an virtual box, but the CentOS/7 Box version 2004.01 from https://app.vagrantup.com/centos/boxes/7/versions/2004.01 | ||||
Additional Information | The solution consists of two parts: 1. Organizational: Whenever there is a new CentOS release published also publish a new vagrant box. Vagrant user then could update to the new box and work around the problem. Today (2020-11-24) they would fail since there is a box with CentOS 7.8 available but not one with CentOS 7.9. 2. Improve Setup of Boxes: Once a box is published, it should already contain configuration to access the vault archive of its release. See attached example for CentOS 7.8. With such an additional configuration, a CentOS box will still work as expected once its release is superseded by a new release. | ||||
Tags | vagrant | ||||
CentOS-Vault_7.8_entries.txt (939 bytes)
# C7.8.2003 [C7.8.2003-base] name=CentOS-7.8.2003 - Base baseurl=http://vault.centos.org/7.8.2003/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 enabled=1 [C7.8.2003-updates] name=CentOS-7.8.2003 - Updates baseurl=http://vault.centos.org/7.8.2003/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 enabled=1 [C7.8.2003-extras] name=CentOS-7.8.2003 - Extras baseurl=http://vault.centos.org/7.8.2003/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 enabled=1 [C7.8.2003-centosplus] name=CentOS-7.8.2003 - CentOSPlus baseurl=http://vault.centos.org/7.8.2003/centosplus/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 enabled=1 [C7.8.2003-fasttrack] name=CentOS-7.8.2003 - Fasttrack baseurl=http://vault.centos.org/7.8.2003/fasttrack/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 enabled=1 log (4,531 bytes)
Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'centos/7'... [KProgress: 20% [KProgress: 40% [KProgress: 70% [KProgress: 90% [K==> default: Matching MAC address for NAT networking... ==> default: Checking if box 'centos/7' version '2004.01' is up to date... ==> default: Setting the name of the VM: CentOS ==> default: Fixed port collision for 22 => 2222. Now on port 2200. ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2200 (host) (adapter 1) ==> default: Resized disk: old 40960 MB, req 51200 MB, new 51200 MB ==> default: You may need to resize the filesystem from within the guest. ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2200 default: SSH username: vagrant default: SSH auth method: private key default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Configuring proxy environment variables... ==> default: Configuring proxy for Yum... [default] No Virtualbox Guest Additions installation found. Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.mirror.iphh.net * extras: ftp.antilo.de * updates: mirror.plustech.de Resolving Dependencies --> Running transaction check ---> Package centos-release.x86_64 0:7-8.2003.0.el7.centos will be updated ---> Package centos-release.x86_64 0:7-9.2009.0.el7.centos will be an update --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: centos-release x86_64 7-9.2009.0.el7.centos base 27 k Transaction Summary ================================================================================ Upgrade 1 Package Total download size: 27 k Downloading packages: No Presto metadata available for base Public key for centos-release-7-9.2009.0.el7.centos.x86_64.rpm is not installed warning: /var/cache/yum/x86_64/7/base/packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 Importing GPG key 0xF4A80EB5: Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>" Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5 Package : centos-release-7-8.2003.0.el7.centos.x86_64 (@anaconda) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : centos-release-7-9.2009.0.el7.centos.x86_64 1/2 Cleanup : centos-release-7-8.2003.0.el7.centos.x86_64 2/2 Verifying : centos-release-7-9.2009.0.el7.centos.x86_64 1/2 Verifying : centos-release-7-8.2003.0.el7.centos.x86_64 2/2 Updated: centos-release.x86_64 0:7-9.2009.0.el7.centos Complete! Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.mirror.iphh.net * extras: ftp.antilo.de * updates: mirror.plustech.de 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 ==> default: Checking for guest additions in VM... default: No guest additions were detected on the base box for this VM! Guest default: additions are required for forwarded ports, shared folders, host only default: networking, and more. If SSH fails on this machine, please install default: the guest additions and repackage the box to continue. default: default: This is not an error message; everything may continue to work properly, default: in which case you may ignore this message. Vagrantfile (532 bytes)
# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| # list of required plugins # if not installed vagrant will install them automatically config.vagrant.plugins = ["vagrant-vbguest" ] # The most common configuration options are documented and commented below. # For a complete reference, please see the online documentation at # https://docs.vagrantup.com. config.vm.box = "centos/7" config.disksize.size = '50GB' config.vm.provider "virtualbox" do |vb| vb.name = "CentOS" end end |
|
Can confirm I'm having the exact same issue, also since a couple a weeks back! Workaround was to simply upgrade to latest centos/8 box instead, which was just fine for us. |
|
I am also running into this problem. | |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-24 20:53 | rka | New Issue | |
2020-11-24 20:53 | rka | File Added: CentOS-Vault_7.8_entries.txt | |
2020-11-24 20:53 | rka | File Added: log | |
2020-11-24 20:53 | rka | File Added: Vagrantfile | |
2020-11-24 20:53 | rka | Tag Attached: vagrant | |
2020-12-17 11:55 | klingan | Note Added: 0038096 | |
2021-02-17 01:14 | goldfita | Note Added: 0038250 |