Bug 502095 - RHEL5.4: libvirt QEMU driver is using old pci_add/pci_del syntax
RHEL5.4: libvirt QEMU driver is using old pci_add/pci_del syntax
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
:
: 511831 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-21 16:22 EDT by Mark McLoughlin
Modified: 2009-12-14 16:09 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 499669
Environment:
Last Closed: 2009-09-02 05:21:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix disk hotplug for KVM (4.58 KB, patch)
2009-07-20 16:02 EDT, Daniel Berrange
no flags Details | Diff
Trivial rediff of upstream patch to RHEL5 tree (4.24 KB, patch)
2009-07-22 06:17 EDT, Daniel Berrange
no flags Details | Diff

  None (edit)
Description Mark McLoughlin 2009-05-21 16:22:29 EDT
+++ This bug was initially created as a clone of Bug #499669 +++

Description of problem:

Hot-removing a virtio-blk device succeeds even if the guest did not remove
it, because device was in use. 

...

Actually, it was working with kvm-74 installed. After the upgrade to the new 
qemu packages in FC11 PCI hot-add broke:

pci_add 0 storage file=/tmp/file10,if=scsi
Invalid pci address^
info balloon

Which is the old syntax for pci_add.

The RHEL5 version of kvm has required this syntax since Marcelo backported it; kvm-83-20.el5ovirt was the first version that included this backport
Comment 1 Daniel Berrange 2009-07-10 08:23:11 EDT
Possible patch posted upstream, not yet merged though.

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


Hotplug is completely broken for libvirt KVM without this fix.
Comment 3 Daniel Berrange 2009-07-20 15:57:03 EDT
*** Bug 511831 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Berrange 2009-07-20 16:02:47 EDT
Created attachment 354385 [details]
Fix disk hotplug for KVM

Patch from upstream

http://libvirt.org/git/?p=libvirt.git;a=commit;h=326ecb78145cfeb7706ef0dcd521b19d934950e7
Comment 8 Daniel Berrange 2009-07-22 06:17:59 EDT
Created attachment 354661 [details]
Trivial rediff of upstream patch to RHEL5 tree
Comment 9 Daniel Veillard 2009-07-22 07:38:25 EDT
libvirt-0.6.3-16.el5 was built in dist-5E-qu-candidate with the fix,

Daniel
Comment 12 Nan Zhang 2009-07-24 05:58:17 EDT
This bug has been verified with libvirt 0.6.3-16.el5 on RHEL-5.4. Set status to VERIFIED.

[root@dhcp-66-70-85 ~]# cat disk1.xml
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/RHEL-Server-5.4-64.raw'/>
      <target dev='sdb' bus='scsi'/>
    </disk>

[root@dhcp-66-70-85 ~]# cat disk2.xml
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/RHEL-Server-5.4-64-virtio.qcow2'/>
      <target dev='vdc' bus='virtio'/>
    </disk>

[root@dhcp-66-70-85 ~]# virsh start demo
Domain demo started

[root@dhcp-66-70-85 ~]# virsh list --all
 Id Name                 State
----------------------------------
  1 demo                 idle
  - foo                  shut off

[root@dhcp-66-70-85 ~]# virsh attach-device demo disk1.xml
Device attached successfully

[root@dhcp-66-70-85 ~]# virsh attach-device demo disk2.xml
Device attached successfully

[root@dhcp-66-70-85 ~]# virsh dumpxml demo
--- snip ---
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/demo.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/RHEL-Server-5.4-64.raw'/>
      <target dev='sdb' bus='scsi'/>
    </disk>
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/RHEL-Server-5.4-64-virtio.qcow2'/>
      <target dev='vdc' bus='virtio'/>
    </disk>
--- snip ---

[root@dhcp-66-70-85 ~]# virsh detach-device demo disk1.xml
Device detached successfully

[root@dhcp-66-70-85 ~]# virsh detach-device demo disk2.xml
Device detached successfully

[root@dhcp-66-70-85 ~]# virsh dumpxml demo
--- snip ---
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/demo.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
--- snip ---
Comment 14 errata-xmlrpc 2009-09-02 05:21:22 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1269.html

Note You need to log in before you can comment on or make changes to this bug.