RHEL 9 Family VMs Failing to Boot After Clone or Snapshot Restore
How to fix boot failures in RHEL 9 family VMs (AlmaLinux, Rocky, CentOS Stream) after cloning or restoring a snapshot in VergeOS, caused by the LVM system.devices file pinning original disk serials.
This guide covers a specific boot failure: a RHEL 9 family VM (RHEL, AlmaLinux 9, Rocky Linux 9, or CentOS Stream 9) that boots fine on the source, then fails on cloned or restored snapshot instance because LVM's system.devices file no longer matches the VM's disk serial numbers. The steps below repair the VM from rescue mode. if you haven't performed the clone or restore yet, see the "Preventing this on future clones, snapshots, or exports" note further down.
Symptoms
After restoring a VM from a snapshot, or cloning a VM, the RHEL 9 VM fails to boot (drops to emergency mode or hangs at boot)
In rescue mode, vgchange -ay produces no output and lvdisplay shows nothing
Overview
RHEL 9 and its derivatives (AlmaLinux 9, Rocky Linux 9, CentOS Stream 9) use an LVM devices file at /etc/lvm/devices/system.devices that explicitly whitelists block devices by their unique identifiers — most notably disk serial numbers. At boot, LVM only considers devices listed in this file when assembling volume groups. If the serial numbers it sees don't match the ones recorded when the file was created, LVM won't activate the root volume group and the VM drops to a dracut emergency shell.
This means any operation that gives a VM new disk serial numbers — cloning a VM with new hardware serial numbers generated, or restoring a snapshot in a way that changes serial numbers — will cause the boot process to fail.
Prerequisites
Access to the VergeOS UI and VM console
A RHEL 9 family installation ISO available in VergeOS media (required only if the VM cannot reach the GRUB menu)
Steps
1. Boot into a Rescue Environment
The VM will likely fail to boot normally. Use one of the following methods to reach a working shell.
Option A — GRUB Rescue Kernel (preferred)
Power on the VM and open the console in VergeOS.
During boot, press and hold Shift (BIOS) or Esc (UEFI) to access the GRUB menu.
Select Advanced options and choose the rescue kernel entry.
Follow any prompts — if asked whether to mount the root filesystem, select Continue.
Option B — Boot from Installation ISO
If the GRUB menu is unreachable or the VM won't get that far:
In VergeOS, attach a RHEL 9 family installation ISO to the VM as a CD/DVD drive.
Adjust the VM's boot order to boot from the ISO first, or use a one-time boot option.
At the installer menu, navigate to Troubleshooting → Rescue a [distro] system.
When prompted about mounting the installed system, choose option 1 (mount under
/mnt/sysimage).Select Shell to open a command prompt.
2. Confirm the disk is visible, rescan, and verify volume groups
Display Block devices:
lsblkNote the device name (e.g., /dev/sda) and the LVM partition (e.g., /dev/sda3)
Force LVM to re-scan all block devices (bypasses the devices file):
pvscan --cachevgchange -ayIf rescan still shows nothing, register the LVM partition explicitly:
lvmdevices --adddev /dev/sda3Replace with your actual LVM partition from lsblkvgchange -ayVerify volume groups are now visible
lvdisplay
3. Mount the root partition and bind the filesystems
mount /dev/<device_name> /mntReplace <device_name> with your root partition (e.g., sda2, mapper/vg0-root).Verify the mount:
ls /mntYou should see directories like /root, /boot, /home, /etc, and /var.
Bind the Filesystems:
Use the following for-loop to bind the necessary virtual filesystems:
for i in proc sys dev run; do mount --rbind /$i /mnt/$i; doneOR mount them individually:
mount --rbind /proc /mnt/procmount --rbind /sys /mnt/sysmount --rbind /dev /mnt/devmount --rbind /run /mnt/runFor EFI/UEFI systems, also mount the EFI partition:
Replace /dev/sdX1 with your actual EFI partition (check with lsblk or fdisk -l).
4. Chroot into the Installed System and mount additional filesystems
Change the root directory
chroot /mntAfter chrooting, mount any additional partitions defined in fstab:
mount -a
5. Regenerate the Initramfs
Rebuild the initramfs so it picks up the cleaned-up device configuration:
dracut -f --regenerate-all
6. Reboot and Verify
Exit the chroot environment:
exitReboot the VM:
reboot**Verify Boot:**Confirm that the VM boots successfully, and all drives appear as expected.
Troubleshooting
Additional Resources
Last updated
Was this helpful?