A drawback of using the domain XML on the engine side is that the logic for correlating the devices reported by libvirt with those that exist in the database moved to the engine side. The current correlation logic uses mac addresses as an identifier of NICs and absolute paths as an identifier of disks. This is problematic when hooks are used to change mac addresses or disk paths. Recent versions of libvirt allows us to provide an alias for devices when starting a VM. This ability should be used to improve that correlation logic.
Verify with: Software Version:4.2.2.2-0.1.el7 VM xml device section, see element alias for device/s: <devices> <input type="mouse" bus="ps2"/> <channel type="unix"> <target type="virtio" name="ovirt-guest-agent.0"/> <source mode="bind" path="/var/lib/libvirt/qemu/channels/6e3b374e-4799-4081-9d1e-00efe9e1c6d2.ovirt-guest-agent.0"/> </channel> <channel type="unix"> <target type="virtio" name="org.qemu.guest_agent.0"/> <source mode="bind" path="/var/lib/libvirt/qemu/channels/6e3b374e-4799-4081-9d1e-00efe9e1c6d2.org.qemu.guest_agent.0"/> </channel> <controller type="usb" model="piix3-uhci" index="0"> <alias name="ua-0ad47487-21fa-4cd5-b414-3c1ec74657bc"/> <address bus="0x00" domain="0x0000" function="0x2" slot="0x01" type="pci"/> </controller> <memballoon model="virtio"> <stats period="5"/> <alias name="ua-1194330c-5c04-4a22-9052-351335ae8300"/> <address bus="0x00" domain="0x0000" function="0x0" slot="0x08" type="pci"/> </memballoon> <video> <model type="qxl" vram="8192" heads="1" ram="65536" vgamem="16384"/> <alias name="ua-304bea45-6b0d-4fb6-82d5-b8938b9b04d2"/> <address bus="0x00" domain="0x0000" function="0x0" slot="0x02" type="pci"/> </video> <controller type="ide" index="0"> <address bus="0x00" domain="0x0000" function="0x1" slot="0x01" type="pci"/> </controller> <sound model="ich6"> <alias name="ua-72e38eee-a526-4d93-afa1-c45f971aa46f"/> <address bus="0x00" domain="0x0000" function="0x0" slot="0x04" type="pci"/> </sound> <controller type="virtio-serial" index="0" ports="16"> <alias name="ua-80e7a0c1-ced4-4f9c-bb1c-6de526d0d20b"/> <address bus="0x00" domain="0x0000" function="0x0" slot="0x06" type="pci"/> </controller> <controller type="scsi" model="virtio-scsi" index="0"> <alias name="ua-9bd70eca-3ad8-4423-a5f0-22300870bfac"/> <address bus="0x00" domain="0x0000" function="0x0" slot="0x05" type="pci"/> </controller> <rng model="virtio"> <backend model="random">/dev/urandom</backend> <alias name="ua-e46a6434-d11a-4429-b84f-4cfac016e6a0"/> </rng> <graphics type="spice" port="-1" autoport="yes" passwd="*****" passwdValidTo="1970-01-01T00:00:01" tlsPort="-1"> <channel name="main" mode="secure"/> <channel name="inputs" mode="secure"/> <channel name="cursor" mode="secure"/> <channel name="playback" mode="secure"/> <channel name="record" mode="secure"/> <channel name="display" mode="secure"/> <channel name="smartcard" mode="secure"/> <channel name="usbredir" mode="secure"/> <listen type="network" network="vdsm-ovirtmgmt"/> </graphics> <channel type="spicevmc"> <target type="virtio" name="com.redhat.spice.0"/> </channel> <interface type="bridge"> <model type="virtio"/> <link state="up"/> <source bridge="ovirtmgmt"/> <alias name="ua-e1134495-e1e9-4f9f-b00b-8a2561989998"/> <address bus="0x00" domain="0x0000" function="0x0" slot="0x03" type="pci"/> <boot order="2"/> <mac address="00:1a:4a:16:10:60"/> <filterref filter="vdsm-no-mac-spoofing"/> <bandwidth/> </interface> <disk type="file" device="cdrom" snapshot="no"> <driver name="qemu" type="raw" error_policy="report"/> <source file="" startupPolicy="optional"/> <target dev="hdc" bus="ide"/> <readonly/> <alias name="ua-41cc82e6-8556-47c7-80e0-dd6434120068"/> <address bus="1" controller="0" unit="0" type="drive" target="0"/> </disk> <disk type="file" device="floppy" snapshot="no"> <source file="/rhev/data-center/mnt/mantis-nfs-lif1.lab.eng.tlv2.redhat.com:_iso__domain/d31037e5-0d45-4306-975b-73eea845ae86/images/11111111-1111-1111-1111-111111111111/1.vfd" startupPolicy="optional"/> <target dev="fda" bus="fdc"/> <readonly/> <alias name="ua-8395438b-4284-4121-ac57-052328520959"/> </disk> <disk snapshot="no" type="file" device="disk"> <target dev="vda" bus="virtio"/> <source file="/rhev/data-center/f53a3c55-843f-4cf8-8f7e-410ffbae73b2/e030832d-48ef-4f79-8fd6-6fc8a990f83c/images/5f00d2ba-a040-4dc4-8e52-f0e3c916bae6/8b89ad0a-2813-4d63-846e-530b3cc020a6"/> <driver name="qemu" io="threads" type="qcow2" error_policy="stop" cache="none"/> <alias name="ua-5f00d2ba-a040-4dc4-8e52-f0e3c916bae6"/> <address bus="0x00" domain="0x0000" function="0x0" slot="0x07" type="pci"/> <boot order="1"/> <serial>5f00d2ba-a040-4dc4-8e52-f0e3c916bae6</serial> </disk> </devices>
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.