I've installed Fedora 11 Beta x86_64, updated to development. kernel-2.6.29.1-46.fc11.x86_64 qemu-0.10-6.fc11.x86_64 I decided to create a RHEL5 virtual server to do some testing. I'm quite familiar with Xen and plain qemu, but hadn't used KVM before. I used the GNOME VM applet to run the Virtual Machine Manager and create the guest. It installed very slowly. Checking the system, the kvm_intel module wasn't loaded. Even after loading the module, the qemu-system-x86_64 command forked by the Virtual Machine Manager doesn't use /dev/kvm (checked with lsof). The same command run manually still doesn't use /dev/kvm. But if running qemu-kvm manually (and removing the unrecognised -no-kqemu option), then the virtual server is fast and lsof does report the process having /dev/kvm open at last. From what I've read in various places, the idea is basically to seamlessly use KVM from qemu. My problem here is that apparently the default way of creating virtual machines does not make use of KVM. Nor do I see an easy way of changing that anywhere in the GUI options or even the xml configuration. My current workaround is to run qemu-kvm from a terminal. I've checked the open qemu/kvm reports but haven't seen any about this issue, which is why I'm reporting it. (FWIW, I have also seen an unrelated SDL crash issue, but that one has been reported and apparently a fix should show up tomorrow, which is great news) Other than that, the virtual machine seems to be working great.
(In reply to comment #0) > Checking the system, the kvm_intel module wasn't loaded. Even after loading > the module, the qemu-system-x86_64 command forked by the Virtual Machine > Manager doesn't use /dev/kvm (checked with > lsof). Okay, the first thing to figure out is why kvm_intel isn't loaded at boot time. See /etc/sysconfig/modules/kvm.modules: if [ $(grep -c vmx /proc/cpuinfo) -ne 0 ]; then modprobe kvm-intel >/dev/null 2>&1 fi What is the content of /proc/cpuinfo? There is a known issue that libvirtd needs to be re-started if you load kvm_intel after libvirtd has been started. See bug #460649
(In reply to comment #1) > Okay, the first thing to figure out is why kvm_intel isn't loaded at boot time. I think I can easily answer that one : [root@fusion ~]# rpm -qf /etc/sysconfig/modules/kvm.modules qemu-system-x86-0.10-6.fc11.x86_64 I installed qemu, then did all my testing without having rebooted, which explains. I just rebooted now and the module is properly loaded. Now that this part is understood, I tried running my virtual machine from the Virtual Machine Manager, but it's still horribly slow and lsof confirms that kvm isn't being used. I found nothing in the preferences nor the virtual machine's Details about enabling KVM. I did however edit the virtual machine's xml file in /etc/libvirt/qemu/ in order to switch to "/usr/bin/qemu-kvm" and that fixed everything (after restarting libvirtd just in case). This all seems quite fragile. I'm assuming the ideal solution would be a single qemu executable which would detect kvm at runtime, as even if libvirtd does it at last, it seems like virtual machines created when kvm wasn't available will keep running without using it. Thanks for your help! :-) Feel free to do what you want with this report.
Actually, I still have a problem : Even though I've now set <emulator>/usr/bin/qemu-kvm</emulator> inside the /etc/libvirt/qemu/vm1.xml file, I found the virtual server to be quite slow, and a quick check shows that qemu-kvm is being run with the -no-kvm option! I've searched a bit everywhere, but didn't manage to find what was causing this. Again, it seems like there are lots of creation time hardcoded values here and there, which if changed to runtime detections would save a lot of hassles (at least in my case).
Typical : Search for 1h, nothing, press then Send button here, then find the solution in the next minute. I just had to replace <domain type='qemu'> with <domain type='kvm'> in the XML file and restart libvirtd. I found no way of doing this using a GUI, though.
There was a bug here after all, fixed with: %post system-x86 -%ifarch %{ix86} +%ifarch %{ix86} x86_64 # load kvm modules now, so we can make sure no reboot is needed. # If there's already a kvm module installed, we don't mess with it sh /%{_sysconfdir}/sysconfig/modules/kvm.modules Thanks Matthias * Sun Apr 19 2009 Mark McLoughlin <markmc> - 2:0.10-10 - Run sysconfig.modules from %post on x86_64 too (#494739) Building in dist-f11-updates-candidate, will request it be tagged into dist-f11 soon
Indeed! And with this fix, the VM I created would have been kvm enabled from the very start, so this does indeed solve the situation which lead to my problems.
qemu-0.10-11.fc11 now tagged in dist-f11