On Fri, May 15, 2026 at 3:36 PM Richard W.M. Jones <rjones@redhat.com> wrote:
On Fri, May 15, 2026 at 09:24:25AM -0000, sparimi--- via Libguestfs wrote:
Hi
I am trying to solve this above issue. The problem happens when we convert RHEL 7.9 VMware VM using virt-v2v to KVM (not limited to RHEL 7.9). These are the steps
1. Create a RHEL7.9 VM in vmware
Is this using UEFI or BIOS?
VM is using UEFI
2. Boot the VM in VMware, and change the /etc/fstab to have /dev/sda* instead of FS partition UUID where initramfs and vmlinuz are to be found.
I think an example could be worth a 1000 words here. What does the /etc/fstab file look like before & after this change? Are you adding new entries or changing existing ones?
For sake of clarity - cut-paste of only relevant entries of /etc/fstab - original and modified 1. Original: UUID=2d175056-c536-4e26-a795-f1654c61d007 /boot xfs defaults 0 0 UUID=73ED-A308 /boot/efi vfat umask=0077,shortname=winnt 0 0 2. Modified /dev/sda2 /boot xfs defaults 0 0 /dev/sda1 /boot/efi vfat umask=0077,shortname=winnt 0 0 We need to run grub2-mkconfig after the modification
3. Power down the VM 4. Use virt-v2v to convert the VM - successfully done 5. If we try to boot the converted VM, the error messages show up error: can't find command linux16 error: can't find command initrd16
While debugging the problem - I localized the source which in my understanding could be problematic
In File virt-v2v/convert/convert_linux.ml
Line Number ~1265 if String.starts_with "/files/etc/crypttab" path &&
String.starts_with "/dev/sd" value then (
try
let uuid = g#vfs_uuid value in
"UUID=" ^ uuid
with ex ->
warning (f_"failed to translate encrypted device name %s to a
UUID \
in /etc/crypttab. This may prevent the guest from
booting \
after conversion. You may have to manually change the
file and \
reconvert. The original error was: %s")
value (Printexc.to_string ex);
adjusted_dev
) else
adjusted_dev
This is from function remap_block_devices, while it checks for /etc/crypttab and device file, and determines the UUID of the device file, it does not seem to consider /etc/fstab entries for similar exercise. This seems to be related to the problem at hand.
We definitely do check /etc/fstab for device names and replace (eg.) /dev/sda with /dev/vda, but we don't replace filesystem device names with UUID=<uuid>s at the moment. This is a wishlist item. Whether it'll fix the current bug, I don't know.
It's not clear to me why grub would care about the contents of /etc/fstab, but then grub is a big mystery for everyone!
I did one experiment (me too unaware of details) to understand the issue - put back the UUIDs instead of /dev/sda* and the problem disappears.
Did you try modifying virt-v2v? What was the result?
I will do this to handle /etc/fstab too
Posting the full virt-v2v conversion log is usually helpful too.
Sure - instrumenting the code to get more logs and I will post it
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html