Red Hat Bugzilla – Bug 502586
RHEL5.4: qemu-kvm should not fall back to TCG if KVM is not available
Last modified: 2014-03-25 20:56:57 EDT
If you run qemu-kvm on a machine which doesn't support KVM, it will fallback to CPU emulation using TCG:
$> mv /dev/kvm /dev/kvm.orig
$> qemu-kvm -drive file=/var/lib/libvirt/images/test3.img -net none \
-monitor stdio -serial telnet::4444,server,nowait -nographic
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
We don't want to support TCG, so we should disable this fallback.
In theory, building with --disable-cpu-emulation does just that, but it doesn't build right now, even upstream.
IMHO disabling this is a bad idea - just consider the needs of libguestfs as one example. Its RPM build process runs KVM. The RHEL/Fedora mock/koji environment runs inside a virtual machine. Ergo, there is no hardware virt available during builds. So if we remove the fallback for TCG, it'll unnecessarily cause the builds to fail.
Well, there's two issues:
1) What to do long term - the fallback will probably disappear as part of
merging KVM upstream things like libguestfs will have to explicitly
fall back themselves.
2) Whether we want to support TCG in 5.4 - IMHO, we don't and people who
want TCG (for whatever reason) should use qemu from EPEL
Alternative discussed solution is:
1) Move /usr/bin/qemu-kvm to /usr/libexec/qemu-kvm
2) Make /usr/bin/qemu-kvm a script which checks whether KVM is available
and and, if not, warns that TCG is not supported
Rationale is that TCG *is* needed for RHEV-M - apparently it uses qemu -no-kvm for some use cases
(In reply to comment #3)
> Alternative discussed solution is:
> 1) Move /usr/bin/qemu-kvm to /usr/libexec/qemu-kvm
> 2) Make /usr/bin/qemu-kvm a script which checks whether KVM is available
> and and, if not, warns that TCG is not supported
> Rationale is that TCG *is* needed for RHEV-M - apparently it uses qemu -no-kvm
> for some use cases
Since I have an open bug that should do exactly that + rhev-M needs -no-kvm mode
I'm closing this bug.
*** This bug has been marked as a duplicate of bug 489654 ***