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?
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?
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!
Did you try modifying virt-v2v? What was the result?
Posting the full virt-v2v conversion log is usually helpful too.
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