Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 511831

Summary: Failed to attach-device (scsi and virtio) on kvm
Product: Red Hat Enterprise Linux 5 Reporter: zhanghaiyan <yoyzhang>
Component: libvirtAssignee: Daniel Berrangé <berrange>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: berrange, llim, syeghiay, virt-maint, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-20 19:57:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhanghaiyan 2009-07-15 09:41:27 UTC
Description of problem:
Attach-device (scsi and virtio) from xml file failed on KVM 

Version-Release number of selected component (if applicable):
- libvirt-0.6.3-14.el5
- kvm-83-84.el5
- RHEL5.4-Server-x86_64 

How reproducible:
100%


Steps to Reproduce:
1. # virsh define rhel5u4.xml
2. # virsh start rhel5u4
3. # cat disk1.xml
          <disk type='file' device='disk'>
             <source file='/mnt/RHEL-Server-5.4-64.raw'/>
             <target dev='sdb' bus='scsi'/>
           </disk>
    # virsh attach-device rhel5u4 disk1.xml
4. # cat disk2.xml
          <disk type='file' device='disk'>
             <source file='/mnt/RHEL-Server-5.4-64-virtio.qcow2'/>
             <target dev='vdc' bus='virtio'/>
           </disk>
   # virsh attach-device rhel5u4 disk2.xml 
  
Actual results:
   3. [root@dhcp-66-70-82 Desktop]# virsh attach-device rhel5u4 disk1.xml
       error: Failed to attach device from disk1.xml
       error: operation failed: adding scsi disk failed
   4. [root@dhcp-66-70-82 Desktop]# virsh attach-device rhel5u4 disk2.xml
       error: Failed to attach device from disk2.xml
       error: operation failed: adding virtio disk failed 

Expected results:
    3. Attached device successfully
    4. Attached device suscessfully 

Additional info:

Comment 1 Daniel Berrangé 2009-07-15 19:51:36 UTC
FYI a potential patch is available upstream

http://www.redhat.com/archives/libvir-list/2009-July/msg00115.html

Comment 3 Daniel Berrangé 2009-07-20 19:57:03 UTC

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