Bug 1808610 - Migration failing due to "Internal error: Missing essential config entry 'ide0:0.fileName'"
Summary: Migration failing due to "Internal error: Missing essential config entry 'ide...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.2
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: rc
: ---
Assignee: Pino Toscano
QA Contact: gaojianan
URL:
Whiteboard:
Depends On:
Blocks: 1815269
TreeView+ depends on / blocked
 
Reported: 2020-02-29 00:46 UTC by Jared Deubel
Modified: 2023-09-07 22:10 UTC (History)
18 users (show)

Fixed In Version: libvirt-6.0.0-14.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1815269 (view as bug list)
Environment:
Last Closed: 2020-05-05 09:57:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-38344 0 None None None 2023-09-07 22:09:59 UTC
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:58:51 UTC

Description Jared Deubel 2020-02-29 00:46:23 UTC
Created attachment 1666510 [details]
VMX file

Description of problem:
When running a migration of a VM we are getting "Internal error: Missing essential config entry 'ide0:0.fileName'" and not able to proceed.

This can be reproduced with libvirt 6.0.0:

$ virsh -c 'esx://root@vmware?no_verify=1' domxml-from-native vmware-vmx A000-VPQB01.vmx
2020-02-28 07:28:11.700+0000: 99730: info : libvirt version: 6.0.0, package: 1.fc32 (Fedora Project, 2020-01-15-16:19:53, )
2020-02-28 07:28:11.700+0000: 99730: warning : esxConnectOpen:824 : Ignoring unexpected path '' for non-vpx scheme 'esx'
Enter root's password for vmware:
error: internal error: Missing essential config entry 'ide0:0.fileName'

Version-Release number of selected component (if applicable):
4.5.0

How reproducible:
100%

Comment 1 Richard W.M. Jones 2020-02-29 07:20:27 UTC
I'm able to reproduce this with libvirt 6.0.0 in Fedora too.

Comment 5 Martin Kletzander 2020-03-03 13:32:21 UTC
Oh, so that happens with empty CD drive?

Comment 6 Lili Zhu 2020-03-04 09:42:34 UTC
(In reply to Martin Kletzander from comment #5)
> Oh, so that happens with empty CD drive?

after adding a line in the attached vmx file:
ide0:0.startConnected = "FALSE"
ide0:0.filename = "mydisk.vhd"       <== the added line
ide0:0.deviceType = "atapi-cdrom"
ide0:0.present = "TRUE"

# virsh -c 'esx://root.75.219?no_verify=1' domxml-from-native vmware-vmx b.vmx
2020-03-04 09:37:14.855+0000: 560975: info : libvirt version: 6.0.0, package: 7.virtcov.el8 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2020-02-26-14:47:29, )
2020-03-04 09:37:14.855+0000: 560975: info : hostname: hostname
2020-03-04 09:37:14.855+0000: 560975: warning : esxConnectOpen:825 : Ignoring unexpected path '' for non-vpx scheme 'esx'
Enter root's password for 10.73.75.219: 
<domain type='vmware'>
  <name>T999-VPQB01</name>
  <uuid>9780d227-32b1-4dc8-ad95-1b031602e7ef</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <shares>2000</shares>
  </cputune>
  <os firmware='efi'>
    <type arch='x86_64'>hvm</type>
  </os>
  <cpu>
    <topology sockets='1' dies='1' cores='2' threads='1'/>
  </cpu>
  <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='[?] ?/A000-VPQB01_3.vmdk'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <source file='[?] ?/A000-VPQB01_2.vmdk'/>
      <target dev='sdb' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <disk type='block' device='cdrom'>
      <source dev='mydisk.vhd'/>            <== the added ide disk filename 
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='scsi' index='0' model='lsisas1068'/>
    <controller type='ide' index='0'/>
    <interface type='bridge'>
      <mac address='00:50:56:be:9b:0b'/>
      <source bridge='VM Network'/>
      <model type='e1000'/>
    </interface>
    <video>
      <model type='vmvga' vram='4096' primary='yes'/>
    </video>
  </devices>
</domain>

Conversion succeed

Comment 7 Martin Kletzander 2020-03-05 09:11:36 UTC
Thanks, that could be an easy fix.  I'll look into that.

Comment 9 Martin Kletzander 2020-03-17 09:53:25 UTC
This is related to libvirt's "ignorance" of the following line in the config:

  ide0:0.startConnected = "FALSE"

The reason for that is we need to distinguish whether the VM is on or off, for a turned off VM this device should probably be visible, but for a started one we need to check the `present` parameter

There is a workaround for that and that is to either remove the cdrom or set:

  ide0:0.present = "false"

However this should get fixed.  The most important information for this to get fixed would be an actual documentation or description of what exactly do the keys mean because I can only guess.  I'll try to look up some documentation.  If anyone has better ideas or more info, feel free to jump in.

Comment 14 Pino Toscano 2020-03-17 16:26:58 UTC
First attempt to fix this posted:
https://www.redhat.com/archives/libvir-list/2020-March/msg00616.html

Comment 24 Fabien Dupont 2020-03-19 09:57:26 UTC
I've downloaded the OpenStack conversion host image and was able to inspect it.
For the inspection, I've not created an instance, but rather access the filesystem. Here are the steps I followed:

First, mount the image locally with qemu-nbd to create a device from the QCOW2 image.

# modprobe nbd
# qemu-nbd --connect /dev/nbd0 /root/rhosp-v2v-appliance-14.0-20190826.1.x86_64.qcow2
# mount /dev/mapper/rhel-root /mnt
# mount -o bind /dev /mnt/dev
# chroot /mnt /bin/bash


Then, retrieve the information about the packages:

# rpm -q libguestfs
libguestfs-1.40.2-5.el7_7.1.x86_64

# rpm -q virt-v2v
virt-v2v-1.40.2-5.el7_7.1.x86_64

# rpm -q libvirt-libs
libvirt-libs-4.5.0-23.el7.x86_64

# rpm -qa redhat-release-server
redhat-release-server-7.7-10.el7.x86_64


Finally, clean up the environment:

# exit
# umount /mnt/dev
# umount /mnt
# vgchange -an rhel
# qemu-nbd --disconnect /dev/nbd0
# rmmod nbd

Comment 25 Pino Toscano 2020-03-19 10:08:26 UTC
(In reply to Fabien Dupont from comment #24)
> I've downloaded the OpenStack conversion host image and was able to inspect
> it.
> For the inspection, I've not created an instance, but rather access the
> filesystem. Here are the steps I followed:

Erm... let's eat our dogfood, shall we? ;-)

$ virt-inspector -a /root/rhosp-v2v-appliance-14.0-20190826.1.x86_64.qcow2 > image.xml
$ for pkg in libguestfs virt-v2v libvirt-libs redhat-release-server; do \
    ver=$(xmllint --xpath "string(//application[name='$pkg']/version)" image.xml) \
    printf '%s: %s\n' $pkg $ver \
  done

(Or inspect image.xml manually, in case XPath is not your cup of tea.)

Comment 26 Pino Toscano 2020-03-19 10:55:50 UTC
Commits pushed upstream:

commit 9a469c0d358bf3fd4b4e55b20360620d6fda44b5
Author:     Pino Toscano <ptoscano>
AuthorDate: Wed Mar 18 10:29:51 2020 +0100
Commit:     Pino Toscano <ptoscano>
CommitDate: Thu Mar 19 11:25:16 2020 +0100

    vmx: shortcut earlier few 'ignore' cases in virVMXParseDisk()
    
    Move earlier the checks for skipping a hard disk when parsing a CD-DROM,
    and for skipping a CD-ROM when parsing a hard disk. This should have no
    behaviour changes, and avoids to add repeated checks in following
    commits.
    
    Signed-off-by: Pino Toscano <ptoscano>
    Reviewed-by: Ján Tomko <jtomko>
    Tested-by: Richard W.M. Jones <rjones>


commit c5ee737bc5c0fc61451e45ff41526270bdf0113c
Author:     Pino Toscano <ptoscano>
AuthorDate: Wed Mar 18 10:46:55 2020 +0100
Commit:     Pino Toscano <ptoscano>
CommitDate: Thu Mar 19 11:25:33 2020 +0100

    vmx: make 'fileName' optional for CD-ROMs
    
    It seems like CD-ROMs may have no 'fileName' property specified in case
    there is nothing configured as attachment for the drive. Hence, make
    sure that virVMXParseDisk() do not consider it mandatory anymore,
    considering it an empty block cdrom device. Sadly virVMXParseDisk() is
    used also to parse disk and floppies, so make sure that a NULL fileName
    is handled in cdrom- and floppy-related paths.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1808610
    
    Signed-off-by: Pino Toscano <ptoscano>
    Reviewed-by: Ján Tomko <jtomko>
    Tested-by: Richard W.M. Jones <rjones>

Comment 35 mxie@redhat.com 2020-03-27 12:55:52 UTC
Verify the bug with below builds:
virt-v2v-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64
libguestfs-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64
libvirt-6.0.0-15.module+el8.2.0+6106+b6345808.x86_64
qemu-kvm-4.2.0-16.module+el8.2.0+6092+4f2391c1.x86_64
nbdkit-1.16.2-2.module+el8.2.0+5664+dd92f997.x86_64

Steps:
1.Prepare a guest,set its CD-DVD type as Host device on VMware environment, then related file name for CD-DVD will be created automatically, check guest's vmx file on ESXi host as below:
#cat Auto-esx6.7-rhel7.7-host_cd-without-filename/Auto-esx6.7-rhel7.7-host_cd-without-filename.vmx 
ide0:0.startConnected = "FALSE"
ide0:0.deviceType = "atapi-cdrom"
ide0:0.fileName = "/vmfs/devices/cdrom/mpx.vmhba33:C0:T0:L0"
ide0:0.present = "TRUE"

2.Modify guest vmx file on ESXi host to delete ide0:0.fileName 
ide0:0.startConnected = "FALSE"
ide0:0.deviceType = "atapi-cdrom"
ide0:0.present = "TRUE"

3.Convert the guest from VMware via vSphere client by virt-v2v
# virt-v2v  -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 Auto-esx6.7-rhel7.7-host_cd-without-filename -o null --password-file /home/passwd
[   0.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 Auto-esx6.7-rhel7.7-host_cd-without-filename
[   1.8] Creating an overlay to protect the source from being modified
[   2.3] Opening the overlay
[  25.1] Inspecting the overlay
[ 188.0] Checking for sufficient free disk space in the guest
[ 188.0] Estimating space required on target for each disk
[ 188.0] Converting Red Hat Enterprise Linux Server 7.7 Beta (Maipo) to run on KVM
virt-v2v: warning: guest tools directory ‘linux/el7’ is missing from 
the virtio-win directory or ISO.

Guest tools are only provided in the RHV Guest Tools ISO, so this can 
happen if you are using the version of virtio-win which contains just the 
virtio drivers.  In this case only virtio drivers can be installed in the 
guest, and installation of Guest Tools will be skipped.
virt-v2v: This guest has virtio drivers installed.
[1852.9] Mapping filesystem data to avoid copying unused and blank areas
[1855.9] Closing the overlay
[1856.0] Assigning disks to buses
[1856.0] Checking if the guest needs BIOS or UEFI to boot
[1856.0] Initializing the target -o null
[1856.0] Copying disk 1/1 to qemu URI json:{ "file.driver": "null-co", "file.size": "1E" } (raw)
    (100.00/100%)
[2287.9] Creating output metadata
[2287.9] Finishing off


4.Convert the guest from ESXi host via vddk by virt-v2v and checkpoints of guest are passed after finishing conversion
# virt-v2v  -ic esx://root.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=89:89:AE:6D:DE:B2:89:01:B0:CF:FC:D3:C8:A8:1A:5E:14:E4:B4:54 -o rhv-upload -os nfs_data -of raw -b ovirtmgmt -n ovirtmgmt -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oo rhv-verifypeer=true -ip /home/esxpw Auto-esx6.7-rhel7.7-host_cd-without-filename
[   0.6] Opening the source -i libvirt -ic esx://root.75.219/?no_verify=1 Auto-esx6.7-rhel7.7-host_cd-without-filename -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=89:89:AE:6D:DE:B2:89:01:B0:CF:FC:D3:C8:A8:1A:5E:14:E4:B4:54
[   1.9] Creating an overlay to protect the source from being modified
[   5.5] Opening the overlay
[  13.3] Inspecting the overlay
[  33.8] Checking for sufficient free disk space in the guest
[  33.8] Estimating space required on target for each disk
[  33.8] Converting Red Hat Enterprise Linux Server 7.7 Beta (Maipo) to run on KVM
virt-v2v: warning: guest tools directory ‘linux/el7’ is missing from 
the virtio-win directory or ISO.

Guest tools are only provided in the RHV Guest Tools ISO, so this can 
happen if you are using the version of virtio-win which contains just the 
virtio drivers.  In this case only virtio drivers can be installed in the 
guest, and installation of Guest Tools will be skipped.
virt-v2v: This guest has virtio drivers installed.
[ 155.9] Mapping filesystem data to avoid copying unused and blank areas
[ 157.1] Closing the overlay
[ 157.4] Assigning disks to buses
[ 157.4] Checking if the guest needs BIOS or UEFI to boot
[ 157.4] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -os nfs_data
[ 158.6] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.ibAikN/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[ 681.5] Creating output metadata
[ 683.1] Finishing off


5.Convert the guest from VMX file by virt-v2v
#virt-v2v -i vmx Auto-esx6.7-rhel7.7-host_cd-without-filename/Auto-esx6.7-rhel7.7-host_cd-without-filename.vmx -o null
[   0.0] Opening the source -i vmx Auto-esx6.7-rhel7.7-host_cd-without-filename/Auto-esx6.7-rhel7.7-host_cd-without-filename.vmx
[   0.0] Creating an overlay to protect the source from being modified
[   0.1] Opening the overlay
[   3.9] Inspecting the overlay
[  21.6] Checking for sufficient free disk space in the guest
[  21.6] Estimating space required on target for each disk
[  21.6] Converting Red Hat Enterprise Linux Server 7.7 Beta (Maipo) to run on KVM
virt-v2v: warning: guest tools directory ‘linux/el7’ is missing from 
the virtio-win directory or ISO.

Guest tools are only provided in the RHV Guest Tools ISO, so this can 
happen if you are using the version of virtio-win which contains just the 
virtio drivers.  In this case only virtio drivers can be installed in the 
guest, and installation of Guest Tools will be skipped.
virt-v2v: This guest has virtio drivers installed.
[ 126.5] Mapping filesystem data to avoid copying unused and blank areas
[ 127.2] Closing the overlay
[ 127.3] Assigning disks to buses
[ 127.3] Checking if the guest needs BIOS or UEFI to boot
[ 127.3] Initializing the target -o null
[ 127.3] Copying disk 1/1 to qemu URI json:{ "file.driver": "null-co", "file.size": "1E" } (raw)
    (100.00/100%)
[ 176.5] Creating output metadata
[ 176.5] Finishing off


6.Convert the guest from VMX via ssh by virt-v2v
# virt-v2v -i vmx -it ssh ssh://root.75.219/vmfs/volumes/esx6.7-function/Auto-esx6.7-rhel7.7-host_cd-without-filename/Auto-esx6.7-rhel7.7-host_cd-without-filename.vmx -o null
[   0.0] Opening the source -i vmx ssh://root.75.219/vmfs/volumes/esx6.7-function/Auto-esx6.7-rhel7.7-host_cd-without-filename/Auto-esx6.7-rhel7.7-host_cd-without-filename.vmx
[   0.4] Creating an overlay to protect the source from being modified
[   0.6] Opening the overlay
[   4.6] Inspecting the overlay
[  26.6] Checking for sufficient free disk space in the guest
[  26.6] Estimating space required on target for each disk
[  26.6] Converting Red Hat Enterprise Linux Server 7.7 Beta (Maipo) to run on KVM
virt-v2v: warning: guest tools directory ‘linux/el7’ is missing from 
the virtio-win directory or ISO.

Guest tools are only provided in the RHV Guest Tools ISO, so this can 
happen if you are using the version of virtio-win which contains just the 
virtio drivers.  In this case only virtio drivers can be installed in the 
guest, and installation of Guest Tools will be skipped.
virt-v2v: This guest has virtio drivers installed.
[ 149.4] Mapping filesystem data to avoid copying unused and blank areas
[ 150.3] Closing the overlay
[ 150.4] Assigning disks to buses
[ 150.4] Checking if the guest needs BIOS or UEFI to boot
[ 150.4] Initializing the target -o null
[ 150.4] Copying disk 1/1 to qemu URI json:{ "file.driver": "null-co", "file.size": "1E" } (raw)
    (100.00/100%)
[ 568.1] Creating output metadata
[ 568.1] Finishing off


7.Convert the guest from ova by virt-v2v
# virt-v2v -i ova Auto-esx6_7-rhel7.7-host_cd-without-filename -o null
[   0.0] Opening the source -i ova Auto-esx6_7-rhel7.7-host_cd-without-filename
[   5.6] Creating an overlay to protect the source from being modified
[   5.6] Opening the overlay
[   9.2] Inspecting the overlay
[  26.1] Checking for sufficient free disk space in the guest
[  26.1] Estimating space required on target for each disk
[  26.1] Converting Red Hat Enterprise Linux Server 7.7 Beta (Maipo) to run on KVM
virt-v2v: warning: guest tools directory ‘linux/el7’ is missing from 
the virtio-win directory or ISO.

Guest tools are only provided in the RHV Guest Tools ISO, so this can 
happen if you are using the version of virtio-win which contains just the 
virtio drivers.  In this case only virtio drivers can be installed in the 
guest, and installation of Guest Tools will be skipped.
virt-v2v: This guest has virtio drivers installed.
[ 129.8] Mapping filesystem data to avoid copying unused and blank areas
[ 130.4] Closing the overlay
[ 130.5] Assigning disks to buses
[ 130.5] Checking if the guest needs BIOS or UEFI to boot
[ 130.5] Initializing the target -o null
[ 130.5] Copying disk 1/1 to qemu URI json:{ "file.driver": "null-co", "file.size": "1E" } (raw)
    (100.00/100%)
[ 157.5] Creating output metadata
[ 157.5] Finishing off

Comment 36 gaojianan 2020-03-30 01:52:35 UTC
Verified step is same with
https://bugzilla.redhat.com/show_bug.cgi?id=1754241#c49
on libvirt version:
libvirt-6.0.0-14.module+el8.2.0+6069+78a1cb09.x86_64

Comment 38 errata-xmlrpc 2020-05-05 09:57:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2017


Note You need to log in before you can comment on or make changes to this bug.