Bug 676548

Summary: Fail to "attach-disk", "attach-interface", "attach-device" for a guest.
Product: Red Hat Enterprise Linux 6 Reporter: Cui Chun <ccui>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.1CC: dyuan, eblake, jdenemar, llim, xen-maint, yoyzhang
Target Milestone: rcKeywords: Regression, TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-11 07:56:20 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 Cui Chun 2011-02-10 08:00:43 UTC
Description of problem:

When try to attach a disk for a guest on libvirt-0.8.7-5.el6, it is failed. Redo the same steps on libvirt-0.8.7-5.el6, it is successful. 

"attach-interface", "attach-device" are also failed on  libvirt-0.8.7-5.el6.


Version-Release number of selected component (if applicable):

libvirt-0.8.7-5.el6
qemu-kvm-0.12.1.2-2.144.el6
kernel-2.6.32-94.el6

How reproducible:
always.

Steps to Reproduce:

1.Create a disk
# qemu-img create -f raw foo.img 10M

2.Start a guest
#virsh start cc

#virsh dumpxml cc
.......
<disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/test.img'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>

.......


3.Attach the disk
# virsh attach-disk test /var/lib/libvirt/images/foo.img vdb
error: Failed to attach disk
error: internal error unable to execute QEMU command 'device_add': Bus 'pci' not found

4.Check  "attach-interface", "attach-device"

# virsh attach-interface cc network default vnet1
error: Failed to attach interface
error: internal error unable to execute QEMU command 'device_add': Bus 'pci' not found

# cat disk.xml 
<disk type="file" device="disk">
  <source file="/var/lib/libvirt/images/foo.img"/>
  <target dev="vdc" bus="virtio"/>
</disk>

# virsh attach-device cc disk.xml
error: Failed to attach device from disk.xml
error: internal error unable to execute QEMU command 'device_add': Bus 'pci' not found

  
Actual results:

Please refer to step3,steo4

Expected results:

Fix it.

Additional info:

Comment 2 Jiri Denemark 2011-02-10 15:11:35 UTC
Patches addressing this issue were sent upstream:

https://www.redhat.com/archives/libvir-list/2011-February/msg00291.html

Comment 4 Jiri Denemark 2011-02-11 07:56:20 UTC
Bug 676686 was reported later than this one but it is already in POST, I'm closing this as a duplicate...

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