EuroLinux / cloud-images-rfc

This repository contains Requests for Change in EuroLinux made cloud images.
https://app.vagrantup.com/eurolinux-vagrant
9 stars 0 forks source link

[BUG] CentOS Linux 8.5.2111 - Set up vault repos #6

Closed r0x0d closed 2 years ago

r0x0d commented 2 years ago

Describe the bug The CentOS 8.5.2 box uses non-functioning repos. Since CentOS 8 has reached EOL, the original standard repos have been archived in the Vault (https://vault.centos.org/8.5.2111/).

Cloud Image Vagrant, libvirt, eurolinux-vagrant/centos-8 box version 8.5.2

To Reproduce

Steps to reproduce the behavior:

  1. Minimal vagrantfile

    Vagrant.configure("2") do |config|
    config.vm.box = "eurolinux-vagrant/centos-8"
    
    config.vm.provision "shell", privileged: true, run: "once", inline: <<-EOS
    yum update -y
    EOS
    end
  2. Run vagrant up
  3. See the error on terminal
    [r0x0d@fedora a]$ vagrant up
    Bringing machine 'default' up with 'libvirt' provider...
    ==> default: Checking if box 'eurolinux-vagrant/centos-8' version '8.5.2' is up to date...
    ==> default: Creating image (snapshot of base box volume).
    ==> default: Creating domain with the following settings...
    ==> default:  -- Name:              a_default
    ==> default:  -- Description:       Source: /tmp/a/Vagrantfile
    ==> default:  -- Domain type:       kvm
    ==> default:  -- Cpus:              1
    ==> default:  -- Feature:           acpi
    ==> default:  -- Feature:           apic
    ==> default:  -- Feature:           pae
    ==> default:  -- Clock offset:      utc
    ==> default:  -- Memory:            512M
    ==> default:  -- Management MAC:    
    ==> default:  -- Loader:            
    ==> default:  -- Nvram:             
    ==> default:  -- Base box:          eurolinux-vagrant/centos-8
    ==> default:  -- Storage pool:      default
    ==> default:  -- Image():     /var/lib/libvirt/images/pool/a_default.img, 80G
    ==> default:  -- Disk driver opts:  cache='default'
    ==> default:  -- Kernel:            
    ==> default:  -- Initrd:            
    ==> default:  -- Graphics Type:     vnc
    ==> default:  -- Graphics Port:     -1
    ==> default:  -- Graphics IP:       127.0.0.1
    ==> default:  -- Graphics Password: Not defined
    ==> default:  -- Video Type:        cirrus
    ==> default:  -- Video VRAM:        9216
    ==> default:  -- Video 3D accel:    false
    ==> default:  -- Sound Type:    
    ==> default:  -- Keymap:            en-us
    ==> default:  -- TPM Backend:       passthrough
    ==> default:  -- TPM Path:          
    ==> default:  -- INPUT:             type=mouse, bus=ps2
    ==> default: Creating shared folders metadata...
    ==> default: Starting domain.
    ==> default: Waiting for domain to get an IP address...
    ==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 192.168.121.151:22
    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: Rsyncing folder: /tmp/a/ => /vagrant
    ==> default: Running provisioner: shell...
    default: Running: inline script
    default: CentOS Linux 8 - AppStream                       40  B/s |  38  B     00:00
    default: Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
    ==> default: Removing domain...
    ==> default: Deleting the machine folder
    The SSH command responded with a non-zero exit status. Vagrant
    assumes that this means the command failed. The output for this command
    should be in the log above. Please read the output to determine what
    went wrong.

Expected behavior The box starts up and I am able to install packages through yum.

Additional context The original CentOS repos need to be edited for example using these commands to use the Vault: https://stackoverflow.com/a/70932217

AlexBaranowski commented 2 years ago

Hi this is very good issue.

I will fix it today - sorry I missed that notification.

Best, Alex

r0x0d commented 2 years ago

Hi, Alex! Thank you so much.

No problem at all.

Best regards,

AlexBaranowski commented 2 years ago

@r0x0d - the newest version has vault repos enabled by default.

https://app.vagrantup.com/eurolinux-vagrant/boxes/centos-8/versions/8.5.3

Here is a script that I used: https://gist.github.com/AlexBaranowski/becfe334979e0d1404f94a0d0b0e0d73

Thanks for Your contribution and bug report.

Best, Alex

r0x0d commented 2 years ago

@r0x0d - the newest version has vault repos enabled by default.

https://app.vagrantup.com/eurolinux-vagrant/boxes/centos-8/versions/8.5.3

Here is a script that I used: https://gist.github.com/AlexBaranowski/becfe334979e0d1404f94a0d0b0e0d73

Thanks for Your contribution and bug report.

Best, Alex

Thank you so much, Alex!