If you've been reading the Linux section of Ghacks long enough then you most likely have come across a few articles about virtual machines (see articles covering VirtualBox here on Ghacks.) And if you've read enough of these articles, you know how important virtual machines can be to a developer, administrator, or even a user.
There are a few methods of running virtual machines on a Linux host: VirtualBox, VMWare, KVM, and QEMU are four of the most popular. Each method has it's pros and cons. One of the cons of trying to use straight-up QEMU is that you're going to be dealing with a command line method of creating and running a virtual machine. That's not a bad option if you don't mind a lot of typing at the command line. If you want to go the QEMU route, but don't want to have to have depend upon the command line to do so, you can opt to use a GUI tool QTEMU. This tool is an easy to use graphical front end for the QEMU virtual machine tool. In this tutorial you are going to learn how to create a virtual machine using QTEMU. But why use QTEMU? QTEMU will work as a front end for either QEMU or KVM. So if you have the hardware to support KVM you can go that route and have a much more efficient virtual machine.
For the purposes of this article, I am installing and using QTEMU on a Debian system, so the installation will be done via Synaptic. To be safe you will want to search for (and select for installation) the following applications:
The above list will install more than you might need, but there are tools that can be taken advantage of later on. After you have selected all of these applications for installation, click Apply to install.
When all of the installation is done you will be ready to run QTEMU for the first time. If using KDE 4.x, you will find QTEMU in the System Tools sub-menu labeled Virtual Machine Manager. Fire that up and get ready to create your first virtual machine.
Creating a machine
From the main window (see Figure 1) you will want to click the "Create a new virtual machine..." button. You might think this would start up a wizard, but it doesn't - sort of. Instead, when you create a new virtual machine, a single window opens up asking a couple of simple questions. The first question is what type of operating system you want to install. From the drop down you can select from Linux, Windows, ReactOS, or Other. For our example we will create a Linux virtual machine. Once you select that click the Next button to open up a new window asking for a name and a location for the new machine. The location is just the path that will store the new machine file. Fill that information out and click Next. The final window requires you to specify the size of the disk image. Enter the size for the image and click Finish. Now the real work begins.
As you can see, in Figure 2, I have created an image for an OpenSuSE virtual machine. As of this point all that is done is the virtual machine file has been created. What has to happen now is to click on each of the following buttons and configure the respective sections as needed for the virtual machine.
Once you have all of that configured you just need to click the Start button to start up your virtual machine. It's that simple.
You now have yet another tool in your toolbox to enable virtual machines. QTEMU makes easy the task of creating virtual machines using QEMU or KVM. Give this a try and see if you prefer it over either Virtualbox or VMWare.Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.