Bug 1563769

Summary: XML error: Multiple 'scsi' controllers with index '0'
Product: [oVirt] ovirt-engine Reporter: spf <spfma.tech>
Component: GeneralAssignee: bugs <bugs>
Status: CLOSED DUPLICATE QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.2CC: bugs, michal.skrivanek, spfma.tech
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-16 12:59:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description spf 2018-04-04 16:07:25 UTC
Hi,

I read reports about the bug I opened : https://bugzilla.redhat.com/show_bug.cgi?id=1543833 and I have just updated all my infrastructure.

But the problem is still there unfortunately :

2018-04-04 17:05:17,470+0200 INFO  (vm/1658d6ce) [vds] prepared volume path: /rhev/data-center/mnt/10.100.2.132:_volume2_ovirt__vms__1/07efa4fe-06bc-498e-8f42-035461aef900/images/0ac062b0-dacf-4bc7-9508-a55cacf1fd89/82e5f383-ca32-4380-bf15-804f1981ad54 (clientIF:473)
2018-04-04 17:05:17,471+0200 INFO  (vm/1658d6ce) [virt.vm] (vmId='1658d6ce-4347-4686-9d6d-08dfba1528d6') Enabling drive monitoring (drivemonitor:53)
2018-04-04 17:05:17,631+0200 INFO  (vm/1658d6ce) [root] /usr/libexec/vdsm/hooks/before_vm_start/50_hostedengine: rc=0 err= (hooks:110)
2018-04-04 17:05:17,718+0200 INFO  (vm/1658d6ce) [root] /usr/libexec/vdsm/hooks/before_vm_start/50_vfio_mdev: rc=0 err= (hooks:110)
2018-04-04 17:05:17,790+0200 INFO  (vm/1658d6ce) [root] /usr/libexec/vdsm/hooks/before_vm_start/50_vhostmd: rc=0 err= (hooks:110)
2018-04-04 17:05:17,791+0200 INFO  (vm/1658d6ce) [virt.vm] (vmId='1658d6ce-4347-4686-9d6d-08dfba1528d6') <?xml version='1.0' encoding='utf-8'?>
<domain xmlns:ns0="http://ovirt.org/vm/tune/1.0" xmlns:ovirt-vm="http://ovirt.org/vm/1.0" type="kvm">
    <name>pfm-serv-9</name>
    <uuid>1658d6ce-4347-4686-9d6d-08dfba1528d6</uuid>
    <memory>2097152</memory>
    <currentMemory>2097152</currentMemory>
    <iothreads>1</iothreads>
    <maxMemory slots="16">8388608</maxMemory>
    <vcpu current="2">16</vcpu>
    <sysinfo type="smbios">
        <system>
            <entry name="manufacturer">oVirt</entry>
            <entry name="product">oVirt Node</entry>
            <entry name="version">7-4.1708.el7.centos</entry>
            <entry name="serial">4C4C4544-004B-5610-8042-B6C04F474D32</entry>
            <entry name="uuid">1658d6ce-4347-4686-9d6d-08dfba1528d6</entry>
        </system>
    </sysinfo>
    <clock adjustment="0" offset="variable">
        <timer name="rtc" tickpolicy="catchup" />
        <timer name="pit" tickpolicy="delay" />
        <timer name="hpet" present="no" />
    </clock>
    <features>
        <acpi />
    </features>
    <cpu match="exact">
        <model>Broadwell</model>
        <topology cores="1" sockets="16" threads="1" />
        <numa>
            <cell cpus="0,1" memory="2097152" />
        </numa>
    </cpu>
    <cputune />
    <devices>
        <input bus="ps2" type="mouse" />
        <channel type="unix">
            <target name="ovirt-guest-agent.0" type="virtio" />
            <source mode="bind" path="/var/lib/libvirt/qemu/channels/1658d6ce-4347-4686-9d6d-08dfba1528d6.ovirt-guest-agent.0" />
        </channel>
        <channel type="unix">
            <target name="org.qemu.guest_agent.0" type="virtio" />
            <source mode="bind" path="/var/lib/libvirt/qemu/channels/1658d6ce-4347-4686-9d6d-08dfba1528d6.org.qemu.guest_agent.0" />
        </channel>
        <video>
            <model heads="1" ram="65536" type="qxl" vgamem="16384" vram="8192" />
            <alias name="ua-05ea52c4-b98a-47b9-b0db-ebcf16506629" />
            <address bus="0x00" domain="0x0000" function="0x0" slot="0x02" type="pci" />
        </video>
        <controller index="0" model="piix3-uhci" type="usb">
            <address bus="0x00" domain="0x0000" function="0x2" slot="0x01" type="pci" />
        </controller>
        <rng model="virtio">
            <backend model="random">/dev/urandom</backend>
            <alias name="ua-66d6265f-6f98-4d61-bfba-84650c83db4a" />
        </rng>
        <graphics autoport="yes" passwd="*****" passwdValidTo="1970-01-01T00:00:01" port="-1" tlsPort="-1" type="spice">
            <channel mode="secure" name="main" />
            <channel mode="secure" name="inputs" />
            <channel mode="secure" name="cursor" />
            <channel mode="secure" name="playback" />
            <channel mode="secure" name="record" />
            <channel mode="secure" name="display" />
            <channel mode="secure" name="smartcard" />
            <channel mode="secure" name="usbredir" />
            <listen network="vdsm-ovirtmgmt" type="network" />
        </graphics>
        <controller index="0" type="ide">
            <address bus="0x00" domain="0x0000" function="0x1" slot="0x01" type="pci" />
        </controller>
        <memballoon model="virtio">
            <stats period="5" />
            <alias name="ua-9d4b41d5-0b0a-4e85-8652-95529140f98e" />
            <address bus="0x00" domain="0x0000" function="0x0" slot="0x05" type="pci" />
        </memballoon>
        <controller index="0" model="virtio-scsi" type="scsi">
            <driver iothread="1" />
            <alias name="ua-b66a0c5e-f80e-48e2-aeb7-799e9b658e64" />
        </controller>
        <controller index="0" type="scsi">
            <address bus="0x00" domain="0x0000" function="0x0" slot="0x03" type="pci" />
        </controller>
        <controller index="0" ports="16" type="virtio-serial">
            <alias name="ua-ce2c63c8-b180-43a1-8341-5aa48469e013" />
            <address bus="0x00" domain="0x0000" function="0x0" slot="0x04" type="pci" />
        </controller>
        <channel type="spicevmc">
            <target name="com.redhat.spice.0" type="virtio" />
        </channel>
        <disk device="cdrom" snapshot="no" type="file">
            <address bus="1" controller="0" target="0" type="drive" unit="0" />
            <source file="" startupPolicy="optional" />
            <target bus="ide" dev="hdc" />
            <readonly />
            <driver error_policy="report" name="qemu" type="raw" />
            <alias name="ua-a39abc74-da2c-4a35-bc40-5882df358a5c" />
        </disk>
        <disk device="disk" snapshot="no" type="file">
            <address bus="0" controller="0" target="0" type="drive" unit="0" />
            <source file="/rhev/data-center/mnt/10.100.2.132:_volume2_ovirt__vms__1/07efa4fe-06bc-498e-8f42-035461aef900/images/20133b0b-de1b-4e1d-946e-9185ed5ab24c/e69bfb71-07d1-46cf-a522-c3480770542e" />
            <target bus="scsi" dev="sda" />
            <serial>20133b0b-de1b-4e1d-946e-9185ed5ab24c</serial>
            <boot order="1" />
            <driver cache="none" error_policy="stop" io="threads" name="qemu" type="qcow2" />
            <alias name="ua-20133b0b-de1b-4e1d-946e-9185ed5ab24c" />
        </disk>
        <disk device="disk" snapshot="no" type="file">
            <address bus="0" controller="0" target="0" type="drive" unit="1" />
            <source file="/rhev/data-center/mnt/10.100.2.132:_volume2_ovirt__vms__1/07efa4fe-06bc-498e-8f42-035461aef900/images/e93dc2ac-1ef4-47ee-bfed-832bf1f267a1/d5394417-2432-4ebd-8307-eaac76c698aa" />
            <target bus="scsi" dev="sdb" />
            <serial>e93dc2ac-1ef4-47ee-bfed-832bf1f267a1</serial>
            <driver cache="none" error_policy="stop" io="threads" name="qemu" type="qcow2" />
            <alias name="ua-e93dc2ac-1ef4-47ee-bfed-832bf1f267a1" />
        </disk>
        <disk device="disk" snapshot="no" type="file">
            <address bus="0" controller="0" target="0" type="drive" unit="2" />
            <source file="/rhev/data-center/mnt/10.100.2.132:_volume2_ovirt__vms__1/07efa4fe-06bc-498e-8f42-035461aef900/images/89f71977-9445-4494-9e97-be63c1767391/42d3ca0f-700a-4ee0-ab25-f94db44901a8" />
            <target bus="scsi" dev="sdc" />
            <serial>89f71977-9445-4494-9e97-be63c1767391</serial>
            <driver cache="none" error_policy="stop" io="threads" name="qemu" type="qcow2" />
            <alias name="ua-89f71977-9445-4494-9e97-be63c1767391" />
        </disk>
        <disk device="disk" snapshot="no" type="file">
            <address bus="0" controller="0" target="0" type="drive" unit="4" />
            <source file="/rhev/data-center/mnt/10.100.2.132:_volume2_ovirt__vms__1/07efa4fe-06bc-498e-8f42-035461aef900/images/0ac062b0-dacf-4bc7-9508-a55cacf1fd89/82e5f383-ca32-4380-bf15-804f1981ad54" />
            <target bus="scsi" dev="sdd" />
            <serial>0ac062b0-dacf-4bc7-9508-a55cacf1fd89</serial>
            <driver cache="none" error_policy="stop" io="threads" name="qemu" type="qcow2" />
            <alias name="ua-0ac062b0-dacf-4bc7-9508-a55cacf1fd89" />
        </disk>
        <interface type="bridge">
            <address bus="0x00" domain="0x0000" function="0x0" slot="0x07" type="pci" />
            <mac address="00:1a:4a:16:01:0a" />
            <model type="virtio" />
            <source bridge="vmdata1" />
            <filterref filter="vdsm-no-mac-spoofing" />
            <alias name="ua-d571cc1a-3ef3-4b23-acde-3db19e9c3c53" />
        </interface>
    </devices>
    <pm>
        <suspend-to-disk enabled="no" />
        <suspend-to-mem enabled="no" />
    </pm>
    <os>
        <type arch="x86_64" machine="pc-i440fx-rhel7.3.0">hvm</type>
        <smbios mode="sysinfo" />
    </os>
    <metadata>
        <ns0:qos />
        <ovirt-vm:vm>
            <minGuaranteedMemoryMb type="int">2048</minGuaranteedMemoryMb>
            <clusterVersion>4.2</clusterVersion>
            <ovirt-vm:custom />
            <ovirt-vm:device mac_address="00:1a:4a:16:01:0a">
                <ovirt-vm:custom />
            </ovirt-vm:device>
            <ovirt-vm:device devtype="disk" name="sdb">
                <ovirt-vm:poolID>f72b3fee-30ee-11e8-9f5b-0800275239e5</ovirt-vm:poolID>
                <ovirt-vm:volumeID>d5394417-2432-4ebd-8307-eaac76c698aa</ovirt-vm:volumeID>
                <ovirt-vm:imageID>e93dc2ac-1ef4-47ee-bfed-832bf1f267a1</ovirt-vm:imageID>
                <ovirt-vm:domainID>07efa4fe-06bc-498e-8f42-035461aef900</ovirt-vm:domainID>
            </ovirt-vm:device>
            <ovirt-vm:device devtype="disk" name="sda">
                <ovirt-vm:poolID>f72b3fee-30ee-11e8-9f5b-0800275239e5</ovirt-vm:poolID>
                <ovirt-vm:volumeID>e69bfb71-07d1-46cf-a522-c3480770542e</ovirt-vm:volumeID>
                <ovirt-vm:imageID>20133b0b-de1b-4e1d-946e-9185ed5ab24c</ovirt-vm:imageID>
                <ovirt-vm:domainID>07efa4fe-06bc-498e-8f42-035461aef900</ovirt-vm:domainID>
            </ovirt-vm:device>
            <ovirt-vm:device devtype="disk" name="sdd">
                <ovirt-vm:poolID>f72b3fee-30ee-11e8-9f5b-0800275239e5</ovirt-vm:poolID>
                <ovirt-vm:volumeID>82e5f383-ca32-4380-bf15-804f1981ad54</ovirt-vm:volumeID>
                <ovirt-vm:imageID>0ac062b0-dacf-4bc7-9508-a55cacf1fd89</ovirt-vm:imageID>
                <ovirt-vm:domainID>07efa4fe-06bc-498e-8f42-035461aef900</ovirt-vm:domainID>
            </ovirt-vm:device>
            <ovirt-vm:device devtype="disk" name="sdc">
                <ovirt-vm:poolID>f72b3fee-30ee-11e8-9f5b-0800275239e5</ovirt-vm:poolID>
                <ovirt-vm:volumeID>42d3ca0f-700a-4ee0-ab25-f94db44901a8</ovirt-vm:volumeID>
                <ovirt-vm:imageID>89f71977-9445-4494-9e97-be63c1767391</ovirt-vm:imageID>
                <ovirt-vm:domainID>07efa4fe-06bc-498e-8f42-035461aef900</ovirt-vm:domainID>
            </ovirt-vm:device>
            <launchPaused>false</launchPaused>
            <resumeBehavior>auto_resume</resumeBehavior>
        </ovirt-vm:vm>
    </metadata>
</domain>
 (vm:2827)
2018-04-04 17:05:17,825+0200 ERROR (vm/1658d6ce) [virt.vm] (vmId='1658d6ce-4347-4686-9d6d-08dfba1528d6') The vm start process failed (vm:940)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 869, in _startUnderlyingVm
    self._run()
  File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 2829, in _run
    dom = self._connection.defineXML(domxml)
  File "/usr/lib/python2.7/site-packages/vdsm/common/libvirtconnection.py", line 130, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/common/function.py", line 92, in wrapper
    return func(inst, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3585, in defineXML
    if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
libvirtError: XML error: Multiple 'scsi' controllers with index '0'
2018-04-04 17:05:17,826+0200 INFO  (vm/1658d6ce) [virt.vm] (vmId='1658d6ce-4347-4686-9d6d-08dfba1528d6') Changed state to Down: XML error: Multiple 'scsi' controllers with index '0' (code=1) (vm:1677)

NODE:
ovirt-engine-appliance.noarch                           4.2-20180329.1.el7.centos                        @ovirt-4.2    
ovirt-engine-sdk-python.noarch                          3.6.9.1-1.el7                                    @ovirt-4.2    
ovirt-host.x86_64                                       4.2.2-2.el7.centos                               @ovirt-4.2-pre
ovirt-host-dependencies.x86_64                          4.2.2-2.el7.centos                               @ovirt-4.2-pre
ovirt-host-deploy.noarch                                1.7.3-1.el7.centos                               @ovirt-4.2-pre
ovirt-hosted-engine-ha.noarch                           2.2.9-1.el7.centos                               @ovirt-4.2    
ovirt-hosted-engine-setup.noarch                        2.2.15-1.el7.centos                              @ovirt-4.2    
ovirt-imageio-common.noarch                             1.2.2-0.el7.centos                               @ovirt-4.2-pre
ovirt-imageio-daemon.noarch                             1.2.2-0.el7.centos                               @ovirt-4.2-pre
ovirt-provider-ovn-driver.noarch                        1.2.9-1.el7.centos                               @ovirt-4.2-pre
ovirt-release42.noarch                                  4.2.2-2.el7.centos                               @ovirt-4.2    
ovirt-release42-pre.noarch                              4.2.2-2.el7.centos                               @ovirt-4.2    
ovirt-setup-lib.noarch                                  1.1.4-1.el7.centos                               @ovirt-4.2    
ovirt-vmconsole.noarch                                  1.0.4-1.el7                                      @ovirt-4.2    
ovirt-vmconsole-host.noarch                             1.0.4-1.el7                                      @ovirt-4.2  

ENGINE:
ovirt-ansible-cluster-upgrade.noarch                            1.1.6-1.el7.centos            @ovirt-4.2               
ovirt-ansible-disaster-recovery.noarch                          0.3-1.el7.centos              @ovirt-4.2               
ovirt-ansible-engine-setup.noarch                               1.1.0-1.el7.centos            @ovirt-4.2               
ovirt-ansible-image-template.noarch                             1.1.5-1.el7.centos            @ovirt-4.2               
ovirt-ansible-infra.noarch                                      1.1.4-1.el7.centos            @ovirt-4.2               
ovirt-ansible-manageiq.noarch                                   1.1.6-1.el7.centos            @ovirt-4.2               
ovirt-ansible-repositories.noarch                               1.1.0-1.el7.centos            @ovirt-4.2               
ovirt-ansible-roles.noarch                                      1.1.3-1.el7.centos            @ovirt-4.2               
ovirt-ansible-vm-infra.noarch                                   1.1.5-1.el7.centos            @ovirt-4.2               
ovirt-cockpit-sso.noarch                                        0.0.4-1.el7                   @ovirt-4.2-centos-ovirt42
ovirt-engine.noarch                                             4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-api-explorer.noarch                                0.0.2-1.el7.centos            @ovirt-4.2               
ovirt-engine-backend.noarch                                     4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-cli.noarch                                         3.6.9.2-1.el7.centos          @ovirt-4.2               
ovirt-engine-dashboard.noarch                                   1.2.2-3.el7.centos            @ovirt-4.2               
ovirt-engine-dbscripts.noarch                                   4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-dwh.noarch                                         4.2.2.2-1.el7.centos          @ovirt-4.2               
ovirt-engine-dwh-setup.noarch                                   4.2.2.2-1.el7.centos          @ovirt-4.2               
ovirt-engine-extension-aaa-jdbc.noarch                          1.1.7-1.el7.centos            @ovirt-4.2               
ovirt-engine-extensions-api-impl.noarch                         4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-lib.noarch                                         4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-metrics.noarch                                     1.1.3.4-1.el7.centos          @ovirt-4.2               
ovirt-engine-restapi.noarch                                     4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-sdk-python.noarch                                  3.6.9.1-1.el7                 @ovirt-4.2               
ovirt-engine-setup.noarch                                       4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-setup-base.noarch                                  4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-setup-plugin-ovirt-engine.noarch                   4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-setup-plugin-ovirt-engine-common.noarch            4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-setup-plugin-vmconsole-proxy-helper.noarch         4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-setup-plugin-websocket-proxy.noarch                4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-tools.noarch                                       4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-tools-backup.noarch                                4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-vmconsole-proxy-helper.noarch                      4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-webadmin-portal.noarch                             4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-websocket-proxy.noarch                             4.2.2.6-1.el7.centos          @ovirt-4.2               
ovirt-engine-wildfly.x86_64                                     11.0.0-1.el7.centos           @ovirt-4.2               
ovirt-engine-wildfly-overlay.noarch                             11.0.1-1.el7.centos           @ovirt-4.2               
ovirt-host-deploy.noarch                                        1.7.3-1.el7.centos            @ovirt-4.2               
ovirt-host-deploy-java.noarch                                   1.7.3-1.el7.centos            @ovirt-4.2               
ovirt-imageio-common.noarch                                     1.2.2-0.el7.centos            @ovirt-4.2               
ovirt-imageio-proxy.noarch                                      1.2.2-0.el7.centos            @ovirt-4.2               
ovirt-imageio-proxy-setup.noarch                                1.2.2-0.el7.centos            @ovirt-4.2               
ovirt-iso-uploader.noarch                                       4.2.0-1.el7.centos            @ovirt-4.2               
ovirt-js-dependencies.noarch                                    1.2.0-3.1.el7.centos          @ovirt-4.2               
ovirt-provider-ovn.noarch                                       1.2.9-1.el7.centos            @ovirt-4.2               
ovirt-release42.noarch                                          4.2.2-2.el7.centos            @ovirt-4.2               
ovirt-setup-lib.noarch                                          1.1.4-1.el7.centos            @ovirt-4.2               
ovirt-vmconsole.noarch                                          1.0.4-1.el7                   @ovirt-4.2               
ovirt-vmconsole-proxy.noarch                                    1.0.4-1.el7                   @ovirt-4.2               
ovirt-web-ui.noarch                                             1.3.7-2.el7.centos            @ovirt-4.2


Is there something I could tweak by hand to start this VM at least ?

Regards

Comment 1 Michal Skrivanek 2018-04-05 04:47:16 UTC
If that VM was incorrect before the problemativ device is already there. Try switching off virtio-scsi, run, turn it on again. Disable iothreads too. Give it a try, but it may be that a db update to drop that device is needed eventually.

Comment 2 spf 2018-04-05 08:59:25 UTC
Yes, this VM was incorrect before.

If I disable both virtio-scsi and iothreads, it can start.
With only iothreads, it can start too.
But if I also enable virtio-scsi, it fails.

Could you explain me what to modify in the database ?

Comment 3 spf 2018-04-11 08:19:46 UTC
I think I have found the required workaround that allows a VM with conflicting settings to be cured :

- In the "vm_static" table, find the "vm_guid" related to the known "vm_name"
- In the "vm_device" table, locate all "controller" devices related to this VM
(vm_id = 'VM_GUID_FROM_PREVIOUS_STEP' AND type ='controller')
- There will be a "device" record whose "value" is "scsi" : delete it

Then I was able to configure all disks as "VirtIO-SCSI" devices again, using IO Threads, and the VM started flawlessly

Comment 4 Michal Skrivanek 2018-04-16 12:59:15 UTC
should be fixed by bug 1535961

*** This bug has been marked as a duplicate of bug 1535961 ***