Comment 0 for bug 1823676

Revision history for this message
bugproxy (bugproxy) wrote :

== Comment: #0 - SRIKANTH AITHAL - 2019-03-28 05:10:54 ==
---Problem Description---
Failed to attach scsi contr. with opt. "--config --live" when index attribute isn't specified in XML

---Steps to Reproduce---
 1. Use below guest:
# virsh list
 Id Name State
----------------------------------------------------
 11 srik_ubuntu running

2.Use below xml for controller attach
# cat /home/srikanth/controller_scsi.xml
<controller type='scsi' model='virtio-scsi' />

3. Check for any previous controllers attached:
# virsh dumpxml srik_ubuntu | grep controller.*scsi

4.Issue with persistent hot-attach:
# virsh attach-device srik_ubuntu /home/***/controller_scsi.xml --persistent
error: Failed to attach device from /home/***/controller_scsi.xml
error: internal error: Cannot parse controller index -1

5.Issue with persistent live-config:
# virsh attach-device srik_ubuntu /home/***/controller_scsi.xml --live --config
error: Failed to attach device from /home/***/controller_scsi.xml
error: internal error: Cannot parse controller index -1

6. Where as index is getting auto generated for live attach, as well as config attach
# virsh attach-device srik_ubuntu /home/***/controller_scsi.xml --live
Device attached successfully
# virsh dumpxml test_vm1 | grep controller.*scsi
    <controller type='scsi' index='0' model='virtio-scsi'>

Expected result:

From Libvirt >=1.3.5 all attach varients of hot controller attach should generate the controller index automatically if not given explicitly.

Machine Type = witherspoon

---uname output---
Linux ltcgen6 4.15.0-1017.19-bz175922-ibm-gt #bz175922 SMP Thu Mar 21 09:34:09 CDT 2019 ppc64le ppc64le ppc64le GNU/Linux

---Debugger---
A debugger is not configured

Userspace tool common name: libvirt-bin 4.0.0-1ubuntu8.6

The userspace tool has the following bit modes: 64

Userspace rpm: libvirt-bin