Quick Start
KVM, with its small yet great set of command-line tools, lets you quickly start virtual machines without having to click through cumbersome menus.
|
KVM, with its small yet great set of command-line tools, lets you quickly start virtual machines without having to click through cumbersome menus.
Virtual machines are just practical. You can use virtual computers to test new distributions, start Windows or revive older operating systems. One of the most popular open source virtualization software tools goes by the somewhat unwieldy name "Kernel-based Virtual Machine" (KVM [1] for short). Although primarily driven by Red Hat, it's the preferred virtualization solution in almost all major distributions.
KVM consists of several components (Figure 1). The base is the kernel module that ensures that the virtual machine can access the actual hardware efficiently without getting in the way. This kind of a manager is called a hypervisor [2] or virtual machine manager (VMM). As of version 2.6.20, the KVM module is a standard component of the Linux kernel, which makes it a part of every current distribution.
In the "old days," the module services loaded virtualization software and most distributions used QEMU [3]. The program is considerably older then KVM and would build a complete PC, inclusive of processors. Nowadays, QEMU can use the KVM module and, thus, the physical PC's vital hardware components. The result is a considerably faster execution of the operating systems and programs that QEMU launches.
Some current distributions separate QEMU and its helper programs into multiple packages. OpenSUSE users need only the kvm package; but for Ubuntu 13.04 you need the qemu (or qemu-system ) package from Software Center. If in doubt, search for the kvm package for your distribution in the package manager.
The installation itself is easy as pie. All you need is to integrate the KVM package through package manager. However, you can start a virtual machine easily if you simply meet a couple requirements on the actual computer.
First, the processor must be an Intel or AMD model that supports virtualization with special command extensions. Intel calls this technology VT; AMD calls it AMD-V. Most desktop and notebook processors in the past five years support this technology. An exception is a particularly underperforming processor, such as some from the Atom series. Intel provides its own list [4] of compatible architectures.
To test whether your PC supports virtualization, use the lsmod | grep kvm command, which should output two lines, one beginning with kvm and another with kvm_intel or kvm_amd , depending on your setup. If these two lines don't show up, you can try starting the module manually with the following two commands for Intel processors:
$ sudo modprobe kvm $ sudo modprobe kvm_intel
You may also first need to activate the functions in the computer's BIOS or the firmware. If the CPU lacks the hardware virtualization functionality, you can still start the virtual machine, but the guest system it runs will crawl along at a snail's pace.
Next, you need as much main memory as possible, because now it needs to accommodate not only the host operating system but also the virtual machine. The absolute minimum is 2GB. However, the more RAM you have, the more virtual machines of memory-hungry operating systems you can start. Pay particular attention to the requirements of the host operating system. If you want to run 64-bit programs later in the virtual machine, the host Linux needs to be 64-bit. You can run 32-bit programs on a 64-bit host, but not the other way round.
Finally, test that QEMU is correctly installed by using the qemu -version command. If you get an error message in place of a version number, try qemu-kvm -version instead. Some distributions, openSUSE among them, call the associated QEMU qemu-kvm , in which case substitute qemu with qemu-kvm .
Pages: 5
Clear Linux is an innovative cloud operating system optimized for the Intel architecture.
Flash chips are now used as storage devices for operating systems. MultiSystem lets you pack as many operating systems as you want on a USB stick.
We show you how to use VirtualBox to set up a Windows XP virtual machine on your existing Linux system.
We show you how to use VirtualBox to set up a Windows XP virtual machine on your existing Linux system.
© 2024 Linux New Media USA, LLC – Legal Notice