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

Fail to create guest with XML error: target 'sda' duplicated for disk sources '<null>'  when converting a guest with IDE cdrom by virt-v2v [rhel-10.0]

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-10.0
    • virt-v2v
    • None
    • None
    • Important
    • rhel-virt-tools
    • ssg_virtualization
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • RegressionOnly
    • x86_64
    • None

      Description of problem:
      Fail to create guest with XML error: target 'sda' duplicated for disk sources '<null>'  when converting a guest with IDE cdrom by virt-v2v

      Version-Release number of selected component (if applicable):
      virt-v2v-2.7.1-2.el10.x86_64
      libnbd-1.20.3-2.el10.x86_64
      nbdkit-1.40.4-2.el10.x86_64
      guestfs-tools-1.52.2-2.el10.x86_64
      libguestfs-1.54.0-5.el10.x86_64
      libvirt-libs-10.10.0-1.el10.x86_64
      qemu-img-9.1.0-8.el10.x86_64

      How reproducible:
      100%

      Steps to Reproduce:
      1. Prepare a guest with IDE cdrom

      # virsh -c vpx://root@10.73.213.102/data/10.73.212.38/?no_verify=1 dumpxml Auto-esx7.0-rhel7.5-cdrom
      Enter root's password for 10.73.213.102: 
      <domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'>
        <name>Auto-esx7.0-rhel7.5-cdrom</name>
        <uuid>422c4e59-7200-0757-3347-e86f25450735</uuid>
        <memory unit='KiB'>2097152</memory>
        <currentMemory unit='KiB'>2097152</currentMemory>
        <vcpu placement='static'>1</vcpu>
        <cputune>
          <shares>1000</shares>
        </cputune>
        <os>
          <type arch='x86_64'>hvm</type>
        </os>
        <clock offset='utc'/>
        <on_poweroff>destroy</on_poweroff>
        <on_reboot>restart</on_reboot>
        <on_crash>destroy</on_crash>
        <devices>
          <disk type='file' device='disk'>
            <source file='[esx6.7-6.5-function] esx6.5/esx6.5-rhel7.5-cdrom/esx6.5-rhel7.5-cdrom.vmdk'/>
            <target dev='sda' bus='scsi'/>
            <address type='drive' controller='0' bus='0' target='0' unit='0'/>
          </disk>
          <disk type='file' device='cdrom'>
            <target dev='sda' bus='sata'/>
            <readonly/>
            <address type='drive' controller='0' bus='0' target='0' unit='0'/>
          </disk>
          <disk type='file' device='cdrom'>
            <target dev='hda' bus='ide'/>
            <readonly/>
            <address type='drive' controller='0' bus='0' target='0' unit='0'/>
          </disk>
          <disk type='file' device='cdrom'>
            <target dev='hdb' bus='ide'/>
            <readonly/>
            <address type='drive' controller='0' bus='0' target='0' unit='1'/>
          </disk>
          <controller type='scsi' index='0' model='vmpvscsi'/>
          <controller type='sata' index='0'/>
          <controller type='ide' index='0'/>
          <interface type='bridge'>
            <mac address='00:50:56:ac:0c:e8' type='generated'/>
            <source bridge='VM Network'/>
            <model type='vmxnet3'/>
          </interface>
          <video>
            <model type='vmvga' vram='8192' primary='yes'/>
          </video>
        </devices>
        <vmware:datacenterpath>data</vmware:datacenterpath>
        <vmware:moref>vm-91</vmware:moref>
      </domain>
      

      2. Convert a guest with IDE cdrom from  VMware by virt-v2v

      # virt-v2v -ic vpx://root@10.73.213.102/data/10.73.212.38/?no_verify=1 -o libvirt -of raw --mac 00:50:56:ac:0c:e8:bridge:virbr0 Auto-esx7.0-rhel7.5-cdrom -it vddk -io vddk-libdir=/home/v2v-tools/vddk7.0.3 -io vddk-thumbprint=86:25:2F:5E:74:5C:43:D9:28:62:31:E0:1F:BB:1F:FD:AC:18:A5:93 -ip /v2v-ops/esxpw
      [   0.2] Setting up the source: -i libvirt -ic vpx://root@10.73.213.102/data/10.73.212.38/?no_verify=1 -it vddk Auto-esx7.0-rhel7.5-cdrom
      [   1.9] Opening the source
      [  11.5] Inspecting the source
      [  19.9] Checking for sufficient free disk space in the guest
      [  19.9] Converting Red Hat Enterprise Linux Server 7.5 (Maipo) (rhel7.5) to run on KVM
      virt-v2v: warning: multiple CD-ROMs found; translation of CD-ROM references 
      may be inexact
      virt-v2v: This guest has virtio drivers installed.
      [  73.5] Setting a random seed
      [  73.5] SELinux relabelling
      [  96.3] Mapping filesystem data to avoid copying unused and blank areas
      [  96.8] Closing the overlay
      [  97.0] Assigning disks to buses
      [  97.0] Checking if the guest needs BIOS or UEFI to boot
      [  97.0] Setting up the destination: -o libvirt
      [  98.5] Copying disk 1/1
      █ 100% [****************************************]
      [ 342.2] Creating output metadata
      virt-v2v: warning: could not define libvirt domain: XML error: target 'sda' 
      duplicated for disk sources '<null>' and '<null>'.
      The libvirt XML is still available in '/tmp/v2vlibvirt2350d3.xml'.  Try 
      running 'virsh -c qemu:///system define /tmp/v2vlibvirt2350d3.xml' 
      yourself instead.
      [ 342.3] Finishing off
      

      Actual results:
      As above description

      Expected result:
      Fix the bug 

      Additional info:

              rhn-eng-rjones Richard Jones
              mxie@redhat.com Ming Xie
              virt-maint virt-maint
              virt-bugs virt-bugs
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: