Description of problem:
Libvirt is spawning several qemu-kvm processes per guest, repeatedly gathering information such as 'qemu -help' output. Caching this information will make libvirtd restarts faster. Additionally, since this was one of the first patch series applied after upstream 0.10.2, and has a rather large refactoring effect on how qemu capabilities are managed, backporting the series now will make future backporting efforts easier to manage, as the upstream code base using capabilities will be similar to the RHEL 6.4 code base where fixes are being backported to.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. start libvirtd with logging set to inspect all virCommand calls
2. start several guests running
3. notice how many times 'qemu-kvm -help' is executed
libvirt execs qemu-kvm several times per guest
qemu-kvm -help should be executed just once, at least until the qemu-kvm binary is updated
Backporting should pick up lots of danpb's patch series; for example, look at 'git log --oneline 1b21351b' for an idea of the patches in the series, which mixed two concepts of qemu-kvm capability caching and QMP capability determination. We can't switch entirely to QMP parsing unless qemu also backports several new monitor commands, but Dan's code has been tested upstream to work even with older qemu. So although it is not immediately obvious how easy it would be to disentangle the qemu capability caching from the interleaved commits related to dealing with the new monitor commands when present, it may make sense to backport even those patches that parse new monitor commands, even if that code isn't used on RHEL, just to minimize backport churn.
Verify it as follows.The result is expected. So move its status to VERIFIED.
1.# rpm -q libvirt qemu-kvm
2.Start two guests.
# virsh list
Id Name State
1 rhel6.3 running
2 rhel6.3-new running
3.Check debug log , the qemu-kvm -help only be executed once.
2012-10-16 08:56:02.469+0000: 20566: debug : virCommandRunAsync:2209 : About to run LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/libexec/qemu-kvm -help
(In reply to comment #4)
> Verify it as follows.The result is expected. So move its status to VERIFIED.
> 1.# rpm -q libvirt qemu-kvm
> 2.Start two guests.
> # virsh list
> Id Name State
> 1 rhel6.3 running
> 2 rhel6.3-new running
> 3.Check debug log , the qemu-kvm -help only be executed once.
2012-10-16 08:56:02.469+0000: 20566: debug : virCommandRunAsync:2209 : About
to run LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/libexec/qemu-kvm -help
Fix a typo as above .
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.