Bug 804601
| Summary: | Controllers do not support virsh attach/detach-device --persistent | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Paolo Bonzini <pbonzini> | 
| Component: | libvirt | Assignee: | Osier Yang <jyang> | 
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | 
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.2 | CC: | acathrow, bsarathy, dallan, dyuan, mzhan, pbonzini, rwu, weizhan, whuang, zhpeng | 
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-0.10.0-0rc1.el6 | Doc Type: | Bug Fix | 
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-02-21 07:08:43 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 804821, 840699 | ||
| 
 
        
          Description
        
        
          Paolo Bonzini
        
        
        
        
        
          2012-03-19 11:44:07 UTC
        
       
      
      
      
    v2 posted upstream. https://www.redhat.com/archives/libvir-list/2012-July/msg01179.html Author: Osier Yang <jyang>
Date:   Mon Jul 23 16:18:57 2012 +0800
    qemu: Allow to attach/detach controller device persistently
    Verify pass on
libvirt-0.10.0-0rc1.el6.x86_64
kernel-2.6.32-289.el6.x86_64
qemu-kvm-0.12.1.2-2.302.el6.x86_64
1. Start a guest named rhel6u3
2. Prepare a controller xml
# cat controller.xml 
<controller type='scsi' model='virtio-scsi'/>
3. # virsh attach-device --persistent rhel6u3 controller.xml 
Device attached successfully
# virsh dumpxml rhel6u3
...
    <controller type='scsi' index='0' model='virtio-scsi'>
...
# virsh dumpxml rhel6u3 --inactive
...
    <controller type='scsi' index='0' model='virtio-scsi'>
...
# cat scsi-disk.xml
 <disk type='file' device='disk'>
 <driver name='qemu' type='raw' cache='none'/>
 <source file='/var/lib/libvirt/images/local.img'/>
 <target dev='sdb' bus='scsi'/>
  </disk>
# virsh attach-device rhel6u3 scsi-disk.xml
Device attached successfully
# virsh detach-device --persistent rhel6u3 controller.xml 
error: Failed to detach device from controller.xml
error: operation failed: device cannot be detached: device is busy
# virsh detach-device rhel6u3 scsi-disk.xml 
Device detached successfully
# virsh detach-device --persistent rhel6u3 controller.xml 
Device detached successfully
# virsh dumpxml rhel6u3
no scsi controller
# virsh dumpxml rhel6u3 --inactive
no scsi controller
    Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0276.html  |