Registered RHEL 9 VM recently cloned/restored from a latest Veeam backup. Changed IP, gateway, and also /etc/hosts file, generate /etc/machine-id, fstab file, and SELinux contexts.
Here's a step-by-step guide to update the system:
- Update the system packages:
sudo dnf update -y
- Reboot the system:
sudo reboot
- Generate a new machine ID:
sudo systemd-machine-id-setup
- Regenerate the
/etc/hostsfile:
sudo nano /etc/hosts
Update the file with the new IP addresses and hostnames.
- Update the
/etc/fstabfile:
sudo nano /etc/fstab
Update the file with the new mount points and options.
- Update the SELinux contexts:
sudo restorecon -R /
- Update the IP and gateway settings:
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
Update the file with the new IP and gateway.
- Reboot the system again:
sudo reboot
References:
- Books:
- RHEL 9 System Administration (2021)
- Linux Network Administration (2020)
- Articles:
- Red Hat Enterprise Linux 9: System Administration Guide (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/system_administration_guide/index)
- Managing SELinux (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_selinux/index)
- Online Resources:
- Red Hat Enterprise Linux 9 Documentation (https://docs.redhat.com/en-us/red-hat-enterprise-linux/9/)
- Red Hat Enterprise Linux 9 System Administration Guide (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/system_administration_guide/index)