Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-137121

encrypted ubuntu installation fails to boot after conversion

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.6
    • virt-v2v
    • None
    • None
    • Moderate
    • 1
    • rhel-virt-tools
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • 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

        1. Screenshot 2025-12-19 at 9.34.48 am.png
          78 kB
          Germano Veit Michel
        2. Screenshot 2025-12-19 at 9.34.27 am.png
          371 kB
          Germano Veit Michel
        3. virt-v2v.log
          1.51 MB
          Germano Veit Michel

              virt-maint virt-maint
              rhn-support-gveitmic Germano Veit Michel
              virt-maint virt-maint
              virt-bugs virt-bugs
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated: