[BLOCK]AlmaLinux 8 (GoDaddy) to AlmaLinux 9
I have run /scripts/elevate-cpanel --check and it didn't detect any blockers however when I run /scripts/elevate-cpanel --start and got following error preventing me from upgrading.
My current server was elevated already from CentOS to AlmaLinux 8 (godaddy VPS).
`* 2025-05-04 21:44:42 [INFO] Running leapp preupgrade checks
-
2025-05-04 21:44:42 [INFO] Running: /usr/bin/leapp preupgrade
-
2025-05-04 21:44:42 [INFO]
-
2025-05-04 21:45:40 [INFO] Finished running leapp preupgrade checks
-
2025-05-04 21:45:40 [WARN] *** Elevation Blocker detected: *** Network configuration for unsupported device types detected RHEL 9 does not support the legacy network-scripts package that was deprecated in RHEL 8 in favor of NetworkManager. Files for device types that are not supported by NetworkManager are present in the system. Files with the problematic configuration: - /etc/sysconfig/network-scripts/ifcfg-eth0 Possible resolution: Consult the nm-settings-ifcfg-rh(5) manual for valid types of ifcfg files. Remove configuration files that can not be supported.
-
2025-05-04 21:45:40 [INFO] Leapp found issues which would prevent the upgrade, more information can be obtained in the files under /var/log/leapp
-
2025-05-04 21:45:40 [WARN] Please fix the detected issues before performing the elevation process. Read More: https://cpanel.github.io/elevate/blockers/`
So in order to overcome this I have manually installed NetworkManager
dnf install -y NetworkManager
systemctl enable NetworkManager --now
and run following script to convert interface to NetworkManager compliant
#!/bin/bash
set -euo pipefail
# === Settings from ifcfg-eth0 ===
IFACE="eth0"
IPADDR="xxx.xxx.xxx.xxx"
NETMASK="255.255.255.255"
GATEWAY="xxx.xxx.xxx.xxx"
DNS1="10.255.250.30"
DNS2="10.255.251.30"
log() {
echo -e "[+] $1"
}
error_exit() {
echo "[✘] ERROR: $1"
exit 1
}
# === 1. Backup old config
log "Backing up existing legacy config..."
cp "/etc/sysconfig/network-scripts/ifcfg-${IFACE}" ~/"${IFACE}.backup" || error_exit "Failed to back up ifcfg-${IFACE}"
# === 2. Delete existing NM connection
log "Deleting existing NetworkManager connection for ${IFACE} (if any)..."
nmcli connection delete "${IFACE}" 2>/dev/null || true
# === 3. Calculate CIDR prefix from netmask
log "Calculating CIDR from NETMASK=${NETMASK}..."
if ! command -v ipcalc &>/dev/null; then
error_exit "ipcalc is not installed. Install it using: dnf install -y ipcalc"
fi
CIDR=$(ipcalc -p "${IPADDR}" "${NETMASK}" | awk -F= '/PREFIX/ {print $2}')
[[ -z "$CIDR" ]] && error_exit "CIDR calculation failed"
# === 4. Create NM connection
log "Creating new NetworkManager connection for ${IFACE}..."
nmcli connection add type ethernet ifname "${IFACE}" con-name "${IFACE}" \
ip4 "${IPADDR}/${CIDR}" gw4 "${GATEWAY}" || error_exit "Failed to create NM connection"
# === 5. Add route to gateway manually
log "Adding manual route to gateway..."
nmcli connection modify "${IFACE}" +ipv4.routes "${GATEWAY}/32 0.0.0.0"
# === 6. Set DNS
log "Setting DNS servers..."
nmcli connection modify "${IFACE}" ipv4.dns "${DNS1} ${DNS2}" || error_exit "Failed to set DNS"
nmcli connection modify "${IFACE}" ipv4.ignore-auto-dns yes || error_exit "Failed to disable auto DNS"
# === 7. Enable manual config and autoconnect
log "Enabling static config and autoconnect..."
nmcli connection modify "${IFACE}" ipv4.method manual || error_exit "Failed to set ipv4.method"
nmcli connection modify "${IFACE}" connection.autoconnect yes || error_exit "Failed to set autoconnect"
# === 8. Bring up interface
log "Bringing up interface ${IFACE}..."
nmcli connection up "${IFACE}" || error_exit "Failed to bring up ${IFACE}"
# === 9. Test connectivity
log "Testing external connectivity..."
ping -c 3 8.8.8.8 >/dev/null || error_exit "Ping to 8.8.8.8 failed. Network may be misconfigured."
# === 10. Remove legacy config
log "Removing legacy ifcfg-${IFACE} file..."
rm -f "/etc/sysconfig/network-scripts/ifcfg-${IFACE}" || error_exit "Failed to remove legacy config"
log "✓ Migration to NetworkManager completed successfully and verified."
exit 0
After that elevate script has run normally with few hickups along the way related to the leapp.