Bug 950330
| Summary: | Duplicate ID set for scsi controller when adding the second scsi disk | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Martin Kletzander <mkletzan> |
| Component: | virt-manager | Assignee: | Martin Kletzander <mkletzan> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | acathrow, codong, cwei, dallan, jdenemar, lagarcia, lcui, mjenner, mkletzan, mzhan, shyu, tzheng |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | virt-manager-0.10.0-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 949810 | Environment: | |
| Last Closed: | 2014-06-13 10:04:50 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 949810 | ||
| Bug Blocks: | |||
|
Description
Martin Kletzander
2013-04-10 06:15:24 UTC
Moving to MODIFIED, this was fixed upstream with commit RELEASE-0.9.5-1-266-gc457363:
commit c457363f5a7402d77b43787bb0c84b68bd11cdda
Author: Martin Kletzander <mkletzan>
Date: Tue Jun 18 16:12:39 2013 +0200
Don't duplicate SCSI controller IDs and assign proper addresses
and picked up in virt-manager-0.10.0.
I tried the bug with: virt-manager-0.10.0-1.el7.noarch libvirt-1.0.6-1.el7.x86_64 However,I found that scsi disk has hidden from virt-manager,would you pls help to check this issue? Be sure that the host supports KVM and the guest is created for KVM, not qemu without KVM. virt-manager check that and doesn't offer 'Virtio SCSI disk' and others on non-KVM hosts. For the installation you can choose whatever you want and then change it with virsh to: ... <target dev='sda' bus='scsi'/> </disk> <controller type='scsi' index='0'> ... Just to match the specific criteria. Then run virt-manager again and follow the steps to reproduce the bug. (In reply to Martin Kletzander from comment #3) > Be sure that the host supports KVM and the guest is created for KVM, not > qemu without KVM. virt-manager check that and doesn't offer 'Virtio SCSI > disk' and others on non-KVM hosts. 'Virtio SCSI disk' is among 'device type',I mean 'SCSI disk' is not there,I remember the bug can only be reproduced with first 'SCSI disk' then add 'Vritio SCSI disk' or vice versa. 'SCSI disk' and 'USB disk' aren't supported on virt-manager in RHEL due to various reasons. However, you can install the machine as usual (or take any defined machine already), edit the XML so there is only one scsi controller, it has index='0' and no model specified. Then if you try to add SCSI disk in virt-manager, the machine shouldn't start with virt-manager-0.9.5-1, but should start with virt-manager-0.10.0-1. Let me know if I can help you with anything else. (In reply to Martin Kletzander from comment #5) > 'SCSI disk' and 'USB disk' aren't supported on virt-manager in RHEL due to > various reasons. However, you can install the machine as usual (or take any > defined machine already), edit the XML so there is only one scsi controller, > it has index='0' and no model specified. Then if you try to add SCSI disk > in virt-manager, the machine shouldn't start with virt-manager-0.9.5-1, but > should start with virt-manager-0.10.0-1. > > Let me know if I can help you with anything else. As discussed on IRC,when I edit the xml of guest to add a scsi disk and scsi controller. <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/demo.img'/> <target dev='sda' bus='scsi'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> <controller type='scsi' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </controller> I will get xml error from libvirt: error: internal error Unable to determine model for scsi controller Failed. Try again? [y,n,f,?]: If I add model='virtio-scsi',then I can edit the xml successfully. That is libvirt error which is part of bug 974943, not caused by virt-manager. You can get around this by downgrading qemu (for the purpose of this bug's verification). Tested with:
virt-manager-0.10.0-1.el7.noarch
qemu-kvm-1.3.0-5.el7.x86_64
Steps:
1.Update xml to add a scsi disk and scsi controller.
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/test.img'/>
<target dev='sda' bus='scsi'/>
<alias name='scsi0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='scsi' index='0'>
<alias name='scsi0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller>
2.Launch virt-manager,add a virtio scsi disk.
3.Boot the guest,the guest can be started successfully.
Check the xml of the guest,it has added:
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/var/lib/libvirt/images/test-1.img'/>
<target dev='sdb' bus='scsi'/>
<alias name='scsi1-0-0-0'/>
<address type='drive' controller='1' bus='0' target='0' unit='0'/>
</disk>
<controller type='scsi' index='1' model='virtio-scsi'>
<alias name='scsi1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</controller>
So refer to the above comments,move the bug to VERIFIED.
Hi Martin,
I met below problem by chance
when there is an virtio scsi disk, then add second one by virt-manager will met an similar problem like "Duplicate ID 'drive-scsi0-0-0-0' for drive"
Versions:
libvirt-1.1.1-13.el7.x86_64
virt-manager-0.10.0-7.el7.noarch
Steps:
1. define an guest with virtio scsi disk.
# virsh dumxpml rhel6
..
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/kvm-rhel6.5-x86_64-qcow2.img'/>
<target dev='sda' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='scsi' index='0' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>
..
2. add second by virt-manager. choose disk "Device type" as virtio SCSI disk.
3. check the guest xml.
# virsh dumpxml rhel6
...
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/kvm-rhel6.5-x86_64-qcow2.img'/>
<target dev='sda' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/test.img'/>
<target dev='sdb' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
...
sda and sdb have same
"<address type='drive' controller='0' bus='0' target='0' unit='0'/>"
Should reopen this bug or file new one?
Additional info:
Error starting domain: internal error: process exited while connecting to monitor: qemu-kvm: -drive file=/var/lib/libvirt/images/test.img,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none: Duplicate ID 'drive-scsi0-0-0-0' for drive
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 100, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 122, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1220, in startup
self._backend.create()
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 698, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: process exited while connecting to monitor: qemu-kvm: -drive file=/var/lib/libvirt/images/test.img,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none: Duplicate ID 'drive-scsi0-0-0-0' for drive
Thanks for finding that out, please file a new one, both for virt-manager and libvirt, since the error comes from qemu. Thank you. (In reply to Martin Kletzander from comment #10) > Thanks for finding that out, please file a new one, both for virt-manager > and libvirt, since the error comes from qemu. Thank you. Thanks, file two track this. 1036715 1036716 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. |