Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description
Duplicate ID set for scsi controller when adding the second scsi disk
Version:
virt-manager-0.9.5-1.el7.noarch
libvirt-1.0.3-1.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1.Make sure you have a guest installed using scsi disk.
# virsh dumpxml scsi
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/scsi.img'/>
<target dev='sda' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='scsi' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>
2.Add the second disk,choose disk "Device type" as virtio SCSI disk.
2013-04-08 14:36:24,829 (libvirtobject:135): Redefining 'scsi' with XML diff:
--- Original XML
+++ New XML
@@ -61,5 +61,6 @@
<memballoon model="virtio">
<address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/>
</memballoon>
+ <controller type="scsi" index="0" model="virtio-scsi"/>
</devices>
</domain>
2013-04-08 14:36:24,917 (libvirtobject:135): Redefining 'scsi' with XML diff:
--- Original XML
+++ New XML
@@ -64,5 +64,10 @@
<memballoon model="virtio">
<address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/>
</memballoon>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="raw"/>
+ <source file="/var/lib/libvirt/images/scsi-5.img"/>
+ <target dev="sdb" bus="scsi"/>
+ </disk>
</devices>
</domain>
3.Start the guest,error shows for Duplicate ID 'scsi0' for device.
2013-04-08 14:36:29,829 (error:80): dialog message: Error starting domain: internal error process exited while connecting to monitor: qemu-kvm: -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x8: Duplicate ID 'scsi0' for device
: Error starting domain: internal error process exited while connecting to monitor: qemu-kvm: -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x8: Duplicate ID 'scsi0' for device
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 117, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1160, in startup
self._backend.create()
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 692, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error process exited while connecting to monitor: qemu-kvm: -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x8: Duplicate ID 'scsi0' for device
4.Check the xml of guest,the index of controller scsi is the same.
# virsh dumpxml scsi
<controller type='scsi' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>
<controller type='scsi' index='0' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</controller>
5.If change the xml,modify index of the second scsi controller as a different value,guest can boot successfully.
<controller type='scsi' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>
<controller type='scsi' index='1' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</controller>
Actual results:
As describes.
Expected results:
Correct ID set for scsi controller when adding the second scsi disk
Additional info:
Comment 2Martin Kletzander
2013-04-09 10:32:19 UTC
This looks like a libvirt's problem. Even though virt-manager could change the model of the scsi controller which is not virtio-serial, this should work also and needs to be addressed in libvirt. Reassigning.
Well, libvirt should have refuse to add a new scsi controller with the same index (0). But it's virt-manager's fault that it even tried to add a second scsi controller with index='0'.
Comment 4Martin Kletzander
2013-04-10 06:13:06 UTC
You're right, I missed the fact that both controllers have the index already specified. So there are two problems here, both libvirt and virt-manager should prevent this situation.
Comment 5Martin Kletzander
2013-05-30 07:46:49 UTC
Moving to MODIFIED as this was fixed with commit v1.0.4-273-g2bbbf0b:
commit 2bbbf0beb82dabac379770b61b619fbdddaae8c6
Author: Ján Tomko <jtomko>
Date: Tue Apr 23 14:24:32 2013 +0200
conf: reject controllers with duplicate indexes
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.
Description Duplicate ID set for scsi controller when adding the second scsi disk Version: virt-manager-0.9.5-1.el7.noarch libvirt-1.0.3-1.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Make sure you have a guest installed using scsi disk. # virsh dumpxml scsi <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/scsi.img'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='scsi' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> 2.Add the second disk,choose disk "Device type" as virtio SCSI disk. 2013-04-08 14:36:24,829 (libvirtobject:135): Redefining 'scsi' with XML diff: --- Original XML +++ New XML @@ -61,5 +61,6 @@ <memballoon model="virtio"> <address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/> </memballoon> + <controller type="scsi" index="0" model="virtio-scsi"/> </devices> </domain> 2013-04-08 14:36:24,917 (libvirtobject:135): Redefining 'scsi' with XML diff: --- Original XML +++ New XML @@ -64,5 +64,10 @@ <memballoon model="virtio"> <address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/> </memballoon> + <disk type="file" device="disk"> + <driver name="qemu" type="raw"/> + <source file="/var/lib/libvirt/images/scsi-5.img"/> + <target dev="sdb" bus="scsi"/> + </disk> </devices> </domain> 3.Start the guest,error shows for Duplicate ID 'scsi0' for device. 2013-04-08 14:36:29,829 (error:80): dialog message: Error starting domain: internal error process exited while connecting to monitor: qemu-kvm: -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x8: Duplicate ID 'scsi0' for device : Error starting domain: internal error process exited while connecting to monitor: qemu-kvm: -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x8: Duplicate ID 'scsi0' for device Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 117, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/domain.py", line 1160, in startup self._backend.create() File "/usr/lib64/python2.7/site-packages/libvirt.py", line 692, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: internal error process exited while connecting to monitor: qemu-kvm: -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x8: Duplicate ID 'scsi0' for device 4.Check the xml of guest,the index of controller scsi is the same. # virsh dumpxml scsi <controller type='scsi' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <controller type='scsi' index='0' model='virtio-scsi'> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </controller> 5.If change the xml,modify index of the second scsi controller as a different value,guest can boot successfully. <controller type='scsi' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <controller type='scsi' index='1' model='virtio-scsi'> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </controller> Actual results: As describes. Expected results: Correct ID set for scsi controller when adding the second scsi disk Additional info: