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:
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>
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.
*** Bug 482876 has been marked as a duplicate of this bug. ***
(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
Two semi-evil options - kvm's %post could conditionally do 'service libvirtd reload' - libvirt RPM could have %trigger kvm and do the same
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"
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
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.
Upstream now: http://git.et.redhat.com/?p=libvirt.git;a=commit;h=66b9412493fee500c8678df514b518c2baf5160c
Being built into libvirt-0.6.2-6.fc11 atm.
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)
Tagged now