Bug 494739
Summary: | KVM isn't used by qemu launched by Virtual Machine Manager | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Matthias Saou <matthias> |
Component: | qemu | Assignee: | David Woodhouse <dwmw2> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | dwmw2, gandr, gcosta, markmc, moneta.mace, virt-maint |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-04-21 08:52:21 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Matthias Saou
2009-04-07 22:49:00 UTC
(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 |