Bug 460649 - libvirtd requires restart in order to detect new capabilities like KVM support
Summary: libvirtd requires restart in order to detect new capabilities like KVM support
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 482876 (view as bug list)
Depends On:
Blocks: F11VirtTarget
TreeView+ depends on / blocked
 
Reported: 2008-08-29 13:43 UTC by Perry Myers
Modified: 2014-11-04 06:24 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-06 21:37:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Perry Myers 2008-08-29 13:43:06 UTC
Description of problem:
If libvirt daemon is started before KVM package is installed or before kvm_intel/kvm_amd is loaded it does not list KVM in the capabilities call (this is correct).

But after loading the modules or installing the kvm package, libvirtd requires a restart to pick up this change.  libvirt should be changed to pick this up dynamically (i.e. check on capabilities call perhaps)

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

How reproducible:
Every time

Steps to Reproduce:
1. rmmod kvm_intel (or rmmod kvm_amd)
2. service libvirtd restart
3. verify that qemu-kvm is not in capabilities
4. modprobe kvm_intel (or modprobe kvm_amd)
  
Actual results:
virsh capabilities will not list qemu-kvm even though the module is loaded and package is present

Expected results:
virsh capabilities lists qemu-kvm

Additional info:

Comment 1 Tomas Hoger 2008-10-03 17:02:23 UTC
Just a note, libvirtd reload does not refresh qemu/kvm capabilities as well:

# modprobe -r kvm-intel

# /etc/init.d/libvirtd start
Starting libvirtd daemon:                                  [  OK  ]

# virsh capabilities | grep kvm

# modprobe kvm-intel

# lsmod | grep kvm
kvm_intel              49953  0
kvm                   131889  1 kvm_intel

# virsh capabilities | grep kvm

# /etc/init.d/libvirtd reload
Reloading libvirtd configuration:                          [  OK  ]

# virsh capabilities | grep kvm

# /etc/init.d/libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]

# virsh capabilities | grep kvm
      <domain type='kvm'>
        <emulator>/usr/bin/qemu-kvm</emulator>

Comment 2 Daniel Berrangé 2009-01-22 12:48:18 UTC
The forthcoming 0.6.0 release will allow for a full restart of the libvirtd daemon without killing active guests. We do still need to make it re-probe on the reload operation though.

Comment 3 Daniel Berrangé 2009-01-28 17:22:12 UTC
*** Bug 482876 has been marked as a duplicate of this bug. ***

Comment 4 Mark McLoughlin 2009-01-28 17:35:17 UTC
(In reply to comment #2)
> We do still need to make it re-probe on the reload operation though.

I don't think re-probe on reload enough - it's not something we can expect anyone to think of doing really.

e.g. if you went to "Add/Remove Software", installed kvm and ran virt-manager, you'd never have any reason to think of restarting libvirtd

Comment 5 Daniel Berrangé 2009-01-28 17:43:55 UTC
Two semi-evil options

 - kvm's  %post could conditionally  do 'service libvirtd reload'
 - libvirt RPM could have  %trigger kvm  and do the same

Comment 6 Mark McLoughlin 2009-01-28 17:55:39 UTC
Or just re-probe when capabilities are queried?

If the concern is that capabilities might be queried often, we could rate-limit the re-probes with e.g. "re-probe at most every 5 seconds"

Comment 7 Mark McLoughlin 2009-04-30 06:56:43 UTC
Cole has posted a patch for this to libvir-list:

  http://www.redhat.com/archives/libvir-list/2009-April/msg00533.html

Cole - this bug is on the F11 target tracker. It'd be great to get your patch into F-11/F-12 libvirt once its committed upstream

Comment 8 Cole Robinson 2009-05-04 19:17:04 UTC
Updated patch posted:

https://www.redhat.com/archives/libvir-list/2009-May/msg00035.html

I agree it would be nice to have this for F11: I think it's pretty low risk for the usability gain. Just needs to be ACK'd upstream.

Comment 10 Cole Robinson 2009-05-06 16:37:15 UTC
Being built into libvirt-0.6.2-6.fc11 atm.

Comment 11 Mark McLoughlin 2009-05-06 20:17:32 UTC
Tag request: https://fedorahosted.org/rel-eng/ticket/1748

* Wed May  6 2009 Cole Robinson <crobinso> - 0.6.2-6.fc11
- Refresh qemu caps when getCapabilities is called (bug #460649)

Comment 12 Mark McLoughlin 2009-05-06 21:37:47 UTC
Tagged now


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