Rhel

In-Place Upgrade from RHEL 9 to RHEL 10 Using Leapp

In-Place Upgrade from RHEL 9 to RHEL 10 Using Leapp #

This guide walks through the process of upgrading from RHEL 9 to RHEL 10 in place, without requiring a complete system reinstallation.

Current System Status #

Here’s what my lab’s test VM looks like:

[user@test ~]$ hostnamectl
 Static hostname: test.home.arpa
       Icon name: computer-vm
         Chassis: vm 🖴
      Machine ID: dec9d730df4f4e629ba20d02aed02f03
         Boot ID: 67e690ef7fbe45edb112a82dcdf72a97
  Virtualization: kvm
Operating System: Red Hat Enterprise Linux 9.6 (Plow)
     CPE OS Name: cpe:/o:redhat:enterprise_linux:9::baseos
          Kernel: Linux 5.14.0-570.28.1.el9_6.x86_64
    Architecture: x86-64
 Hardware Vendor: Red Hat
  Hardware Model: KVM
Firmware Version: 1.16.3-4.el9

We can see we’re currently running RHEL 9.6 on a KVM virtual machine.

SELinux Troubleshooting

SELinux Troubleshooting #

Here’s a little guide on how to find if SELinux is blocking something and how to add an exception to the policy.

SELinux Modes #

SELinux operates in three modes:

# Check SELinux status and mode
sestatus

Understanding the Three Modes #

  1. Enforcing: SELinux policy is enforced
  2. Permissive: SELinux policy violations are logged but not blocked
  3. Disabled: SELinux is completely disabled

Check if SELinux is the problem #

# Temporarily set to permissive mode and test
setenforce 0
# Test your application
# If it works now, SELinux was blocking it
setenforce 1

Troubleshooting Workflow #

When an application fails and you are certain that SELinux is blocking it, e.g. you turned SELinux off or into permissive mode and the application worked, you can do the following:

Optimizing KVM Virtual Machines with Tuned Profiles

Optimizing KVM Virtual Machines with Tuned Profiles #

The tuned service on Red Hat-based systems provides pre-configured performance profiles that can significantly improve your VM performance with minimal effort.

In this post, I’ll show you how to optimize your KVM VMs using tuned profiles and automate the entire process with Ansible.

The Playbook #

Since I manage dozens of VMs in my homelab, doing this manually would be tedious. Instead, I use this Ansible playbook to apply tuned optimization to all my VMs:

Automating RHEL Server Updates with Ansible

Automating RHEL Server Updates with Ansible #

Introduction #

I hate updating my servers manually so I’ve set up this playbook to run updates. This was probably the first playbook I ever wrote for my home lab, and it’s been running automatically for years now on a weekly schedule every Friday night through AAP (Ansible Automation Platform).

This guide shows you how to automate RHEL (and other yum/dnf based distros like Fedora, CentOS etc.) server updates using Ansible, including proper reboot handling.