I’m trying to boot a Fedora 40 VM (uefi) using Virtual Machine Manager, but the booting process hangs at this point:
[ OK ] Finished systemd-vconsole-setup.service - Virtual Console Setup.
[ *** ] Job dev-disk-by\2duuid-95ea526a ... (<time> / no limit)
The UUID shown (95ea526a…) matches the UUID of the VM’s root partition in the qcow2 image.
Back story: I’m attempting to create a copy of an existing real (hd) F40 system within a VM (qcow2 image). I’m using Virtual Machine Manager (QEMU/KVM) to manage the VM.
I know the UUID of the VM’s root partition needs to be fixed. Before booting the VM, I mounted the VM’s root partition from the qcow2 image (using nbd) and corrected the root partition UUID in /etc/fstab and /etc/kernel/cmdline:
$ virt-filesystems --add testf40.qcow2 --uuid --long
Name Type VFS Label Size Parent UUID
/dev/sda1 filesystem vfat SYSTEM 313929728 - 31EA-6894
/dev/sda2 filesystem ext4 TEST-F40 104776802304 - 95ea526a-5df4-4476-8f0e-e08b7a934e87
$ virt-cat --add testf40.qcow2 /etc/fstab | grep -vE '^(#| *$)'
UUID=95ea526a-5df4-4476-8f0e-e08b7a934e87 / ext4 defaults 1 1
UUID=31EA-6894 /boot/efi vfat umask=0077,shortname=winnt 0 2
$ virt-cat --add testf40.qcow2 /etc/kernel/cmdline
root=UUID=95ea526a-5df4-4476-8f0e-e08b7a934e87 ro selinux=0
I also started a chroot shell and ran grub2-mkconfig to update the grub.cfg and dracut to rebuild initramfs. I’m not sure if both of those are necessary, but I assume it doesn’t hurt.
# mount /dev/nbd0p2 /mnt
# mount --bind /dev /mnt/dev
# mount --bind /sys /mnt/sys
# mount --bind /proc /mnt/proc
# chroot /mnt
# grub2-mkconfig -o /boot/grub2/grub.cfg
# dracut --kver 6.10.12-200.fc40.x86_64 --force
# exit
# umount /mnt/proc
# umount /mnt/sys
# umount /mnt/dev
# umount /mnt
Is there some other place I need to change the UUID?
What exactly is the boot message that hangs doing? Is it attempting create the symlink for /dev/disk/by-uuid/95ea526a-5df4-4476-8f0e-e08b7a934e87? Or has that already been created at this point?
Is it attempted to access that symlink (assuming it’s already been created) and it’s failing because the symlink isn’t going to the correct device? Based on another F40 VM I created that works (this one from scratch - not a copy of an existing partition), I assume that symlink should be going to ../../vda2.
Do I need to do something so the /dev/vda* devices are created?
Any help appreciated.