Virtualization with KVM

All for One

Conclusions

Qemu supports many more parameters and commands both at the command line and in the monitoring tool, most of which are interesting if you're involved in hosting servers. For example, you can suppress screen output from the virtual machines (»-nographic« parameter), thus restricting the guest systems to text-only output; you can even reroute the output using VNC.

Multiple virtual machines can be grouped on a separate virtual network, which is really useful to test a new infrastructure. All of the functions referred to in this article are also explained in the extremely long manual on the Qemu website [4]. If the command line is too complicated for your liking, you can easily load a graphical front end like AQemu (see the "Push the Mouse" box).

Figure 7: AQemu gives you a fast point-and-click approach to building a virtual machine.

Push the Mouse

The Qt AQemu program is an alternative to Virtmanager. Because the repositories of the major distributions all offer obsolete versions, you should download the latest version off the project website or from SourceForge [7]. You will find both deb packages and .tar.gz archives with a prebuilt AQemu. If in doubt, you can use one of the variants with static in its name and unpack the archive in the root directory:

sudo tar xvfj aqemu-<version>-bin- static-qt-linux-<bit>.tar.bz2 -C /

When AQemu is first launched (by typing aqemu), the First Start Wizard pops up to ask for a couple of basic settings. Press Next to confirm English as your choice of language. Then, in the second window, check Use Device Manager and click Search in the third. The list should now container the current Qemu and KVM versions. Otherwise, you will need to Set Versions Manually.

The main window that then appears looks very much like VirtualBox (Figure 7). In the left-hand column, AQemu lists all your virtual machines, while the tabs on the right show their virtual hardware. To create a new machine, click the green plus sign and assign a name. Then, ensure that the machine is selected in the list and check the tabs from left to right. In the General tab, the Emulator Type must be set to KVM; otherwise, the virtual machine will run at a snail's pace.

The boot order is set in Boot Priority; you can easily set the RAM size using the slider. The value next to Free memory shows you the physical limit. To avoid forcing the host systems to its knees, you should never assign the full amount of physical memory. If the guest system is having trouble with graphics, you can also replace the Video Card.

Then move on to the Device Manager tab, where you can click the hard disk icon and then Create New to create a new image. In the window that then appears, type the file name, set the Size, and click Create. After returning to the main window, you can click the CD icon to add a virtual CD-ROM drive. To do so, either type the device name of the physical CD drive, or the filename of an ISO image, in the box.

After completing the changes, press Apply at the bottom of the screen and then select VM | Start in the menu to launch the virtual machine. If the operating system doesn't want to start, you can try a couple of other KVM functions in the Other tab below KVM Options. You can also disable ACPI power management in Advanced.@KE:

Buy this article as PDF

Related content

comments powered by Disqus