QEMU: a Multihost, Multitarget Emulator
To install QEMU, download the source package from the main QEMU Web site (see Resources) and the binary kqemu package. There is also a binary QEMU package available. If you download and install the binary, you will not be able to use KQEMU, because it needs to be compiled into QEMU to work. KQEMU, unlike QEMU, is available only as a binary package. It is not open source. See the KQEMU sidebar for more information. At the time of this writing, QEMU is at version 0.8.0, and KQEMU is at version 0.7.2. Because they are under active development, there may be updated versions available by the time you read this.
Once I had downloaded the two packages, I first untarred QEMU with:
tar -zxvf qemu-0.8.0.tar.gz
Next, I changed directories into the qemu-0.8.0 directory I had just created and did:
tar -zxvf ../path/to/kqemu-0.7.2.tar.gz
This created a kqemu directory inside of my qemu-0.8.0 directory.
When I compile applications from source, a ./configure, make, make install at this point is usually all that I need to do to get a piece of software installed. QEMU needed a bit more hand holding.
In order to have QEMU compile successfully on my machine, I had to make a few changes to the configure script. The changes themselves were quite simple. First, QEMU does not get along with 4.x versions of gcc, so I had to change the cc= and host_cc= lines to use gcc-3.4 specifically. Then, I had to change kqemu="no" to kqemu="yes". Finally, it was necessary to enter the path to my kernel source tree in kernel_path="". One note: QEMU uses SDL for output, so although I did not need to install anything extra for my particular setup, others may have to install some SDL libraries before the configure script will be happy.
Once I was able to run ./configure without it complaining, I ran make and then make install to install QEMU to my /usr/local/ directory. To install the KQEMU accelerator kernel module, I typed the following into an open terminal:
modprobe kqemu
About KQEMU
Unlike QEMU, which is open source, KQEMU is a closed-source, proprietary product. The reason for this is money. QEMU developer Fabrice Bellard has stated that he would be willing to open-source KQEMU on one condition: if a corporate sponsor picked up the tab for its continued development. Until then, although you can download it without cost, KQEMU will remain a proprietary component in an otherwise open-source product.
There is a project to create an open-source drop-in replacement to KQEMU called qvm86 (see Resources). I have not used it, but I have read statements that say it works as well as or better than KQEMU.
Once I had installed QEMU, I wanted to see it in action. The easiest way to try it out was to boot a live CD ISO image like KNOPPIX, Ubuntu, SimplyMepis, DSL, Puppy or one of the scores of others. To boot QEMU off a bootable CD image, I simply entered the following at the command line:
qemu -boot d -cdrom path/to/distro.iso
The -boot d parameter tells QEMU to boot from the CD drive, and -cdrom path/to/distro.iso tells QEMU where the CD-ROM “drive” is, which in this example, is simply an ISO image. I also could have pointed QEMU at my actual CD-ROM drive—/dev/cdrom—and when I installed Windows, that is what I did.
Before I could install an operating system, I first needed to prepare a virtual hard disk in which to install. QEMU understands various disk image formats, including VMware's vmdk, which would have come in handy if I had some of them lying around. As it turned out, the default, “raw” format worked well. A raw format disk image acts like an unformatted hard drive, which was perfect for my needs.
I used the following command to create an image named winxp.img, 5GB in size, which I figured was big enough to install Windows XP and Outlook and give me plenty of e-mail storage:
qemu-img create winxp.img 5120M
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Designing Electronics with Linux
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Dynamic DNS—an Object Lesson in Problem Solving
- New Products
- Using Salt Stack and Vagrant for Drupal Development
- Validate an E-Mail Address with PHP, the Right Way
- Build a Skype Server for Your Home Phone System
- A Topic for Discussion - Open Source Feature-Richness?
- Tech Tip: Really Simple HTTP Server with Python
- Why Python?
- Not free anymore
2 hours 2 min ago - Great
5 hours 49 min ago - Reply to comment | Linux Journal
5 hours 57 min ago - Understanding the Linux Kernel
8 hours 12 min ago - General
10 hours 42 min ago - Kernel Problem
20 hours 45 min ago - BASH script to log IPs on public web server
1 day 1 hour ago - DynDNS
1 day 4 hours ago - Reply to comment | Linux Journal
1 day 5 hours ago - All the articles you talked
1 day 7 hours ago





Comments
qvm86 is officially (?) obsolete
From qvm86's project site on Savannah a post from the admin:
-- BEING POST --
qvm86 is obsolete
posted by pbrook, Sunday 01/21/07 at 16:16 UTC - 4 replies
InnoTek have released their VirtualBox code under the GPL.
As far as I'm concerned this obsoletes qvm86, and I see no point continuing development. I recommend anyone interested in qvm86 use VirtualBox ...
-- END POST --
QEMU is alive
Actually, QEMU and VirtualBox are different products.
VirtualBox has a very nice GUI and is available both for Linux and Windows.
On the other hande, I find using QEMU very simple ;-)
BTW, great magazine article.