-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-9.6
-
None
-
None
-
Moderate
-
1
-
rhel-virt-tools
-
None
-
False
-
False
-
-
None
-
Virt-tools for next sprint
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
-
x86_64
-
None
What were you trying to do that didn't work?
Customer converting Ubuntu Server from VMware to OCP-V, the VM fails to boot after conversion.
What is the impact of this issue to you?
Complicates the conversion of Virtual Machines, extra steps needed to make it boot.
Please provide the package NVR for which the bug is seen:
virt-v2v-2.7.1-12.el9_6.x86_64 libguestfs-1.54.0-8.el9_6.x86_64
How reproducible is this bug?:
Always
Steps to reproduce
1. Install ubuntu server 24.04.03 LTS from ISO on VMware (doesn't seem version depedent, its the one I reproduced)
2. Go for defaults for everything, except set it to setup disk encryption with a password. See:

3. Convert the VM to KVM
# virt-v2v -i vmx -it ssh "ssh://root@vmware-esxi-1.virt.home.arpa/vmfs/volumes/Local/ubuntu-luks/ubuntu-luks.vmx" -o libvirt -vvv -x 2>&1 | tee virt-v2v.log
4. Boot on KVM. It will fail to try to open the luks device (vda3), doesn't even ask for password.

Expected results
Boots
Actual results
Fails to boot. It appears crypttab is missing there (its empty), so it doesn't try to unlock it.
Gave up waiting for root file system device. Common problems: - Boot args (cat /proc/cmdline) - Check rootdelay= (did the system wait long enough?) - Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/mapper/ubuntu--vg-ubuntu--1v does not exist. Dropping to a shell!
This in v2v logs may be relevant during dracut:
cryptsetup: WARNING: target 'luks-61b6c7d0-ce70-4305-a45c-95c407152415' not found in /etc/crypttab
I can recover the guest just by rebuilding its initramfs:
cryptsetup luksOpen /dev/vda3 /dev/mapper/dm_crypt-0 <enter password> mount /dev/mapper/ubuntu-vg-ubuntu-lv /root mount /dev/vda2 /root/boot mount /dev/vda1 /root/boot/efi mount --bind /proc /root/proc mount --bind /sys /root/sys mount --bind /dev /root/dev chroot / update-initramfs -u -k all