Sign In

    Enjoy FOSSwire's content? Have it delivered! Subscribe

    Speed up QEMU with KVM

    If you have been using QEMU for emulating other operating systems, you will find that it runs fairly slow. QEMU does not take advantage of your hardware to speed anything up, so all of the load comes from translating between processors. On average, QEMU will only run at about 20% of the speed of your host system.

    Obviously, this is a problem. If you want reliable testing of any OS in a virtual machine, you'll want it to run at near-full speed. This is where KVM comes in. No, not those hardware input switches, but rather the Kernel-based Virtual Machine. KVM allows you to take advantage of your processor to achieve near-native speeds.

    None of this comes without a catch, however. First off, KVM only allows you to emulate and run on x86 and x86_64 systems. Second, your processor must support it. To check, run the following command, taken from the KVM package itself:

    egrep '^flags.*(vmx|svm)' /proc/cpuinfo

    If you don't get anything from that command, you might as well stop reading. But if you get a line or two with a bunch of seemingly random words, then you're all set to run KVM.

    The neat thing about KVM is that it works as a drop-in replacement for QEMU. So, if you were running QEMU from the terminal to begin with, all you have to do is replace qemu with kvm.

    When running kvm in a terminal, you may get a "permission denied" error. To fix this, add yourself to the kvm group:

    adduser username kvm

    You can also chmod 0777 /dev/kvm if you are the only user on the system or do not care who has access to it.

    If you are using Qemu Launcher or another GUI, all you have to do is change the path to QEMU from /usr/bin/qemu to /usr/bin/kvm. There you have it, now go run your VMs in full speed!


    Qemu Launcher: A Free Frontend

    If you need an open-source virtualizing solution, VMware is not really an option. If you are on a KDE system, VirtualBox is the way to go. But, if you are an avid GNOME user and don't like running Qt apps in your GTK+ environment, then Qemu Launcher is the end-all solution.

    qemu-launcher.png

    Qemu Launcher is exactly what it says it is: a launcher for Qemu. Qemu, for the uninitiated, is an open-source virtualization system. Qemu itself only has a CLI interface, hence this frontend.

    The frontend itself seems a little cluttered, however everything is presented in an overall clean fashion. Basically, there are a lot of buttons, but there are not enough to be overwhelming. Options exist for just about the CLI Qemu can do: memory, network interfaces, graphic options, among others.

    Qemu Launcher can also store different profiles for different OS configurations so that you don't have to input them every time. Once an image is launched, the Qemu platform is started. Anything from here on out is unrelated to the launcher.

    It's a nice interface for just getting the job done. It isn't too intuitive, but not too complex. Qemu Launcher "just works," and does so pretty well.

    A small note about the ratings here: We are using the point system, meaning that a 6 out of 10 is above average (pretty good), not that a 6 out of 10 is a failing grade.