NX-OS Guestshell 'Vault' Repository Config
Guestshells running CentOS 7 will be unable to update or install system packages since the the default repositories have been deactivated (EOL).
This article shows how to configure and use "Vault" repositories if updating to a newer version of the NX-OS Guestshell running Rocky Linux is not an option.
Access the Guestshell
First, enter the guestshell by typing "guestshell".
Then switch to the root user and get into the Management VRF (or whatever VRF has internet connectivity); configure a public DNS server in /etc/resolv.conf.
- This is not necessary if your default VRF has internet access.
Disable the Default Base & Vault Repositories
Simply renaming the repo files using mv
does the trick.
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
mv /etc/yum.repos.d/CentOS-Vault.repo /etc/yum.repos.d/CentOS-Vault.repo.bak
Create a New Vault Repository File
Create the file...
Use vi
to paste in the repo information and save the file.
[Vault-base]
name=Vault - CentOS-$releasever - Base
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
enable=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever
[Vault-updates]
name=Vault - CentOS-$releasever - Updates
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
enable=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever
[Vault-extras]
name=Vault - CentOS-$releasever – Extras
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
enable=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever
Update & Verify the Yum Cache
Clean all repo information and generate a new repo cache.
Verify repositories.
Conclusion & Validation
System updates and new package installations should now be possible, try running yum update -y
to update already installed packages.
[root@guestshell cisco]# yum update -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Vault-base | 3.6 kB 00:00:00
Vault-extras | 2.9 kB 00:00:00
Vault-updates | 2.9 kB 00:00:00
No packages marked for update
Or even install the nano
package so you don't have to go through the experience of editing a file with vi
again.
[root@guestshell cisco]# yum install nano -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package nano.x86_64 0:2.3.1-10.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
nano x86_64 2.3.1-10.el7 Vault-base 440 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 440 k
Installed size: 1.6 M
Downloading packages:
nano-2.3.1-10.el7.x86_64.rpm | 440 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : nano-2.3.1-10.el7.x86_64 1/1
Verifying : nano-2.3.1-10.el7.x86_64 1/1
Installed:
nano.x86_64 0:2.3.1-10.el7
Complete!