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

RFE: virt-v2v ignores bind mounts, breaking conversions if /var/lib is bind-mounted on an Ubuntu guest

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

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

      None

      Show
      None
    • None
    • Virt-tools Blocked
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      The /var/lib is bind mounted in a Ubuntu VM:

      ubuntu22:~# cat /etc/fstab |egrep "sdb|lib"
      /dev/sdb /data xfs defaults 0 1
      /data/lib /var/lib none bind 0 0

      While converting this VM from vMware to OpenShift Virtualization, migration is failing with following error:

      libguestfs: trace: v2v: filesize "/var/lib/dpkg/status"
      guestfsd: => inspect_get_package_format (0x1e5) took 0.02 secs
      guestfsd: <= filesize (0xda) request length 64 bytes
      guestfsd: error: /var/lib/dpkg/status: No such file or directory
      gulibguestfs: trace: v2v: filesize = -1 (error)
      libguestfs: trace: v2v: inspect_list_applications2 = NULL (error)
      virt-v2v: error: libguestfs error: filesize: /var/lib/dpkg/status: No such file or directory

      This is because it's not mounting the /data/lib to /var/lib when it tries to find the Kernel package at "/var/lib/dpkg/status". Problem is only with bind mounts and I cannot reproduce the issue if I mount directly on a different disk. Looks like v2v is ignoring the bind mount entries.

      v2v: inspect_get_mountpoints = ["/data", "/dev/sdb", "/boot/efi", "/dev/disk/by-uuid/1B12-24EF", "/boot", "/dev/disk/by-uuid/6f979251-660f-415e-897f-401549c5aa81", "/", "/dev/disk/by-id/dm-uuid-LVM-nVVMRcaYjNNfO6PUBPqTHh7ktCebXL0iXkyyNQf1ydZmX9fj2ANwOA18PQNdrYmh"]

      What is the impact of this issue to you?

      Please provide the package NVR for which the bug is seen:

      virt-v2v 2.5.6

      Migration Toolkit for Virtualization Operator   2.7.9

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1.  Created an Ubuntu VM in vMware. Added a new disk and mounted the new disk at "/data/". Moved  /var/lib/ to new disk. 
      2.  Bind mounted the /data/lib to /var/lib
      3.  Try converting the VM to OpenShift Virtualization using MTV. Migration failed with the above error. 

      Expected results

      The Ubuntu VM migration from vMware fails if /var/lib/ is bind-mounted

      Actual results

              rhn-eng-rjones Richard Jones
              rhn-support-nashok Nijin Ashok
              virt-maint virt-maint
              Ganesh Hubale Ganesh Hubale
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated: