QEMU and Kernel-based - Wiki - -kvm & http://qemu-buch.de/de/index.php?title=QEMU-KVM-Book/_Content&pri...

QEMU and Kernel-based Virtual Machine - Wiki (Link zu dieser Seite als [[QEMU-KVM-Book/ Content]])

Order (print version) | Recommendation | The Authors | Imprint, Contact

Introduction

Basics

Installation

Quick Start

QEMU-Monitor

Storage Media

Virtual Hardware Warnke, Ritzau qemu-kvm & libvirt Network Options 4. Edition 2010 ISBN: 978-3-8370-0876-0 Special Options 276 Pages, 27,27 EUR Management Tools Order

Host-Systems

QEMU and KQEMU under QEMU ist running not only on Linux. QEMU under and QEMU under OS/2 Warp 4 and eComstation QEMU under DOS QEMU under Mac OS X QEMU under BSD (Solaris, FreeBSD, NetBSD, OpenBSD)

Guest Systems

Appendix

Archive of the old unofficial Wiki of QEMU

Order (print version) | Recommendation | The Authors | Imprint, Contact Von ‚http://qemu-buch.de/de/index.php/QEMU-KVM-Book/_Content— Diese Seite wurde bisher 50.097 mal abgerufen. Diese Seite wurde zuletzt am 30. Juli 2010 um 06:08 Uhr geändert. Inhalt ist verfügbar unter der GNU Free Documentation License 1.2.

1 of 1 1/29/2011 8:40 PM Emulation computer literature training materials - libvirt qe... http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=...

Emulation virtualization computer literature training materials (Link to this page as [[QEMU-KVM-Buch / General / Introduction]])

| # # # | >>> | English

Introduction Virtual machines provide defined system environments. For templates with a specific version of an and a desired patch level virtual machines are generated. Snapshots save states of a virtual machine. When an unwanted change can be restored to their former condition. Virtualization and emulation allow the independence of the hardware. Thus, for example, to run old versions of an application to develop new hardware or software for non-existing hardware. These are the strengths of QEMU. QEMU is free and runs on many systems (Linux, BSD, Mac OS X, Microsoft Windows, eComStation or DOS). Virtualization brings a number of advantages, depending on the type are weighted differently. Given that several guest systems can run on a parallel computer, increases hardware utilization is possible. Previously, for critical applications used in each case a physical computer. The result is a large machine park with a correspondingly high cost (acquisition, maintenance, power, air conditioning). If, however, individual applications running in a virtual machine, the applications are decoupled from each other and the hardware is better utilized. Besides security, the availability is increased, because virtual machines can be transferred in case of hardware problems on a different hardware. This optimization of the data center through virtualization solutions are called server consolidation. The Kernel-based Virtual Machine (KVM) is an appropriate virtualization solution. KVM is open source and runs on Linux. The management of virtual machines is done under different virtualization solutions is very different. In a heterogeneous data center, it is often impossible to control with a tool more virtualization solutions. To solve this problem, the library is designed libvirt. It provides standard interfaces for managing different virtualization solutions.

The print edition QEMU, the Kernel-based Virtual Machine (KVM) and the C library in the libvirt wiki http://qemu-buch.de described in detail. All text is available under the GNU Free Documentation License. The lyrics of this Wiki have been adjusted for this book. This book is both a workbook and a reference book. It is aimed at (Linux) system administrators, software developers, software testers, and students interested in technology. The many examples of applications and the license used, it is particularly suitable as training material. It uses the following notations.

Courier font

For console commands and source code.

~ # Command

For console commands as system administrator (root).

~ $ Command

For Unix console commands as normal user.

Host ~ # command

For Unix console commands as system administrator (root) on the host computer.

~ $ Host command

1 of 2 1/29/2011 6:27 PM Emulation virtualization computer literature training materials - libvirt qe... http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=...

For Unix console commands as normal user on the host computer.

Host C: \> command

For DOS / Windows console commands on the host computer. As the options regardless of the operating system, here is usually the spelling for the Unix console uses.

Host ~ # command

For Unix console commands as system administrator (root) on the host system.

Guest ~ $ command

For Unix console commands as a normal user on the host system.

Guest C: \> command

For DOS / Windows console commands on the host computer.

(Qemu) command

For orders of the QEMU monitor.

virsh # command

For instructions of the program virsh (libvirt library).

Host A long ~ $ command, \ the line can not be listed in a.

If a command can not be represented in a line, the line break is represented by a backslash. The command is entered in one line. In http://qemu-buch.de/d/Anhang/_Nützliche_Tools KVM are some useful tools for working with QEMU and explained. This overview also serves to get along with less well-known guest systems. Most of the described tools are easy to use as a command-line commands, and come from the Unix environment. They are also on other platforms such as Microsoft Windows released. | # # # | >>> http://qemu-buch.de Retrieved from " http://qemu-buch.de/de/index.php/QEMU-KVM-Buch/_Allgemeines/_Einleitung " This page has been accessed 25,187 times. This page was last updated on 23 March 2010 at 14:11 clock changed. Content is available under GNU Free Documentation License 1.2 .

2 of 2 1/29/2011 6:27 PM QEMU-KVM libvirt virtualization hardware emulation Native virtualizatio... http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=...

QEMU-KVM libvirt virtualization hardware emulation Native virtualization, , , , Single Kernel Image (Link to this page as [[QEMU-KVM-Buch / basis]])

<<< | # # # | >>> | English

1 of 6 1/29/2011 6:29 PM QEMU-KVM libvirt virtualization hardware emulation Native virtualizatio... http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=...

OS / 2 and Microsoft to run in QEMU on Solaris 10 on SPARC processor architecture.

The graphical front end AQEMU.

Microsoft Windows 7 as a guest system under QEMU / KVM.

The .

2 of 6 1/29/2011 6:29 PM QEMU-KVM libvirt virtualization hardware emulation Native virtualizatio... http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=...

Contents

1 Basics 1.1 Virtualization 1.1.1 Hardware Emulation 1.1.2 Native Virtualization 1.1.3 paravirtualization / Full Virtualization 1.1.4 operating system level virtualization The Qemu Manager for 2.1 Emulation 1.2.1 Hardware Emulation Windows on Mac OS X. 1.2.2 API emulation WineBottle 1.3 The versatile QEMU 1.4 The Kernel-based Virtual Machine on the rise 1.5 The libvirt library

Virtualization The primary goal of virtualization is the decoupling of software from the available hardware resources to allocate them optimally to the isolated individual systems. It is all about the core components of CPU, memory, disk space and network connectivity. Virtualization allows the placement of specific virtual machines, each containing only the necessary services for their task. Thus, for although on a physical machine both a Web server, a mail server and an FTP server running simultaneously, but for security reasons it is not recommended. If one of the three services is compromised, the entire machine is affected. however, these services are in each virtual machine isolated from each other on the system operated, Warnke, Ritzau only the affected virtual machine to be replaced. Another advantage is the qemu-kvm and libvirt server consolidation. The virtual machines are assigned exactly the 4. Edition 2010 resources needed for a particular task. If the requirements will be modified ISBN: 978-3-8370-0876-0 as resources without changing the hardware. 276 pages, 27.27 EUR Order Hardware Emulation In hardware emulation, the entire hardware of a computer is simulated. It is possible to install and run on operating systems that are designed for other processors. This is simulated including the full instruction set of the host processor via the host processor. The emulation but has a cost. Since each CPU instruction of the host system CPU into corresponding commands on the host system must be translated, the execution speed of programs is low. Another disadvantage is the lack of a dynamic resource management. That is, during the term can host systems resources are not allocated variable. Without QEMU accelerator is a hardware .

Native Virtualization The Native Virtualization, also known as , the guest operating system parts of the physical hardware is in the form of virtual hardware. To ensure that only guests are served that are compatible with the CPU of the host. The privileged CPU instructions, the guest systems are directly managed by the kernel while the host system. In contrast hits on devices (, network card, etc.) made via emulated standard components. Known members of this virtualization approach is VirtualBox, VMware Player, VMware Server, VMware Workstation and Desktop / Workstation. The execution speed of the guest systems, this method is high. QEMU supports up to version 0.11 the optional accelerator KQEMU and thus the Native Virtualization.

paravirtualization / Full Virtualization In contrast to hardware emulation and the Native Virtualization offers paravirtualization only similar interface as the physical hardware. The critical CPU commands that directly address the hardware, must first be rewritten in the host system and therefore need not be intercepted and replaced by more complicated procedures. A sleek program, the hypervisor (virtual machine monitor), does the scheduling

3 of 6 1/29/2011 6:29 PM QEMU-KVM libvirt virtualization hardware emulation Native virtualizatio... http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=...

tasks for the resources of virtual machines. The disadvantage is that the guest operating systems must be adapted. Only processors with hardware virtualization technology (Intel's Vanderpool, AMD Pacifica) enable you to run unmodified guest systems. This is called the Full Virtualization, or the hardware- assisted virtualization. The latter is not to be confused with the hardware emulation. One advantage of paravirtualization and full virtualization is the much higher execution speed. Another advantage is the live migration, which is transmitted to the virtual machines on the fly from a host system to another. The host systems are continuously available, even if one of the hosts are shut down for maintenance work. There are two types of hypervisor: Type 1 hypervisor: The hypervisor runs directly on the hardware and provides the guest systems, the resources available. Typical examples are (open source) and VMware ESX (i). With Xen and VMware ESX Hypervisor is above a privileged virtual machine (Linux) to control. Type 2 hypervisor: The hypervisor runs on an operating system that the I / O resources provide. A typical example of the Kernel-based Virtual Machine (KVM) is. KVM supports full virtualization. Further support VirtualBox, VMware Player, VMware Workstation and VMware Server Full Virtualization.

OS-level virtualization When virtualization at the OS level, divide the host and guest systems with kernel (single kernel image - SKI). Here, the virtualized operating system and not the hardware. The host operating system generates more instances of itself this reason only guest systems with the same kernel as the host system supported. Since the overhead is low, the execution speed is high. Typical representatives of this category, the Solaris Zones, BSD jails, Linux Containers (LXC) are OpenVZ and Linux-VServer. QEMU does not have this type of KVM virtualization are assigned.

Emulation In connection with virtualization is often called the term emulation. As emulation is referred to in computing the functional simulating a system by another. Recreate the system receives the same data, executes the same programs and achieve the same results as the original system. An emulator is a system that imitates another. the emulated system is operated isolated present, it is not a virtualization.

Hardware Emulation In the section virtualization has already described the hardware emulation. Since the emulated computers are isolated from each host system, this type of emulation virtualization. The hardware emulation is not to be confused with the hardware-assisted virtualization. QEMU without acceleration, is described as a hardware emulator. KVM can not be assigned to the hardware emulation.

API emulation and libraries of another operating system modeled - In this type of emulation interfaces (API Application Programming Interface). This can run programs of the other operating system. This type of emulation is not necessarily isolated to running programs. They run along with emulation libraries directly in the host system. This is not a virtualization. A typical example is . Cygwin on Windows provides the API functions of Linux. Under Cygwin you have full access to the host system. Cygwin is therefore not a virtualization solution. The versatile QEMU under Linux, BSD and Mac OS X / Darwin also an OS API emulation. The emulation allows execution of programs (binaries) that are compiled for other libraries. The user space emulation QEMU is used by the software under the PowerPC architecture. Darwin, now WineBottle is a port of Wine (Wine Is Not an Emulator, see http://qemu-buch.de/d/Anhang /_Nützliche_Tools/_Wine ) on Mac OS X. The goal is to run Windows applications on Mac OS X.

The versatile QEMU Websites: http://wiki.qemu.org The free, open-source QEMU emulates the entire hardware of a computer's CPU (hardware emulation). QEMU is not, such as VMware, on the architecture is limited. QEMU achieved by the Dynamic translation is a good speed. QEMU accelerator 0.11.x to the optional KQEMU was supported (Native Virtualization). The development of KQEMU has been set. 12:12 From QEMU building on the advantages

4 of 6 1/29/2011 6:29 PM QEMU-KVM libvirt virtualization hardware emulation Native virtualizatio... http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=...

of the Kernel-based Virtual Machine (see below). QEMU runs on many operating systems (Linux, BSD, Mac OS X, Microsoft Windows, eComStation, DOS) and processor architectures and is easy to install. To install QEMU accelerator without any administrator privileges. Thus, a virtual machine, including QEMU be burned to a DVD and started on another computer. QEMU allows you to save states of the virtual machine several times. These VM snapshots, changes to the system can be reversed. QEMU has features not found in other virtualization software. For example, QEMU supports live migration, debugging the system and boot from older disk formats. It can emulate hardware failure. It is also possible to set the system time of the host system as desired. Live-CD/DVDs- and boot floppy to start with QEMU, without restarting the computer. For QEMU package includes the powerful tool qemu-. It is used to create, convert, and encrypt an image file (virtual hard disks) in various formats. QEMU can boot a virtual machine image files directly from other virtualization software. Using QEMU, you can move virtual machines for the Kernel-based Virtual Machine. It is thus possible in hardware on the Kernel-based Virtual Machine is not running. Furthermore, part of the package, the tool QEMU qemu-nbd. It is used to export of image files over the network using the NDB Protocol (Network Block Device). Under Linux, BSD and Mac OS X QEMU also supports user-space emulation. This API emulation that allows executable programs compiled for other dynamic libraries, operate in user space. Here, the processors x86, PowerPC, ARM, MIPS 32-bit, Sparc32/64, ColdFire (m68k), ETRAX CRIS support and MicroBlaze. QEMU is developed under Linux and open source software. There are ports for many operating systems. Many other virtualization (KVM, Sun xVM VirtualBox, Xen, FAUmachine, Win4BSD, Win4Solaris, , and Darwin) use parts of the source code of QEMU. In return, the source code of these products will be re-integrated into QEMU. Thanks to the openness of the source code and configuration options start with the development of additional tools is problematic.

Kernel-based Virtual Machine on the rise Websites: http://www.linux-kvm.org http://www.linux-kvm.com The Kernel-based Virtual Machine (KVM) is considered to whiz in the virtualization solutions. One reason for this is that KVM consistently on the benefits of processors with hardware virtualization technology (AMD Pacifica, Intel's Vanderpool) sets. The Kernel-based Virtual Machine that is used in the Full Virtualization (type 2 hypervisor). KVM support usually is not the paravirtualization. There is a patch that enables the paravirtualization of Linux guests. This patch was not included in the . The use of paravirtualized device drivers for guest systems, however, is possible. The advantage of this driver is the lower overhead and higher performance. KVM supports other CPU extensions such as page tables (Nested Page Tables - AMD Extended Paging Tables - Intel) and IOMMU (I / O Memory Mapping Unit). Page tables are used for translation of guest in host addresses. Thus, the hypervisor is the task of each address request from a host system relieves a shadow page table to be determined. For KVM, the Kernel Merging Same Page (KSM) in the Linux kernel has been integrated as of version 2.6.32. KSM consolidates identical memory areas. This is more memory to virtual machines made available as a physical memory available. KVM and this CPU extensions enable the Nested Virtualization. That is, in a virtual environment in turn virtualization solutions. A Kernel-based Virtual Machine can therefore under a Kernel-based Virtual Machine to be started and contain virtual machines. Components of the KVM kernel modules kvm.ko, the hardware-specific modules or kvm-kvm-intel.ko amd.ko and the device file / dev / kvm. After loading the modules of the Linux kernel itself works as a hypervisor. The KVM kernel modules prevent the execution of other virtualization solutions, such as Sun xVM VirtualBox and VMware Server, Workstation and Player. Xen is an advantage over the use of only a privileged system. Xen privileged requires two systems: the hypervisor and the special guest system domain 0 (Linux). First, because the installation of KVM is easier than Xen, the other is a privileged system to secure more than two. KVM is not a virtual hardware. This does QEMU. The development of KVM and QEMU is merged. Why KVM is described here together with QEMU. Many Linux distributions include QEMU and KVM KVM) as a

5 of 6 1/29/2011 6:29 PM QEMU-KVM libvirt virtualization hardware emulation Native virtualizatio... http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=...

package (one of qemu. Unlike QEMU KVM only supports host systems with x86 processors. KVM is open source and runs on Linux kernel version 2.6.20. KVM Qumranet is developed by Israeli companies. Qumranet has since been bought by Red Hat, the KVM said the focus of its virtualization strategy. Based on KVM, Red Hat Red Hat Enterprise complete virtualization solution for Server Virtualization developed. The operational area of the Kernel-based Virtual Machine, the Server Consolidation (Data Center Virtualization) is. However, KVM used on the desktop and replaces KQEMU.

The libvirt library Website: http://libvirt.org While many virtualization solutions are now free, appropriate management tools are usually expensive. Furthermore, in a heterogeneous data center management tools are often several different virtualization solutions are required. To solve these problems, the library developed libvirt. Libvirt, a virtualization layer between software and management tools. Building on this layer manage appropriate management tools (Virtual Machine Manager virsh) the different virtualization solutions. already supports QEMU, KVM, Xen, VirtualBox, VMware ESX, LXC Linux container system, OpenVZ Linux container system, and Mode Linux. libvirt is released as open source users. For various Linux distributions are applicable software packages. The library can be Cygwin and MinGW under Microsoft Windows to compile. <<< | # # # | >>> http://qemu-buch.de Retrieved from " http://qemu-buch.de/de/index.php/QEMU-KVM-Buch/_Grundlagen " This page has been accessed 32,978 times. This page was last updated on 27 September 2010 at 17:40 clock changed. Content is available under GNU Free Documentation License 1.2 .

6 of 6 1/29/2011 6:29 PM Google Translate http://translate.google.com/translate?hl=en&ie=UTF-8&sl=de&tl=en&u=h...

Translate from: Translate into:

KVM QEMU download installation: qemu-kvm qemu-kvm-extras build Linux, Kernel Same Page Merging KSM (Link to this page as [[QEMU-KVM-Buch / installation]])

<<< | # # # | >>> | English

Contents

1 Installation of QEMU 1.1 QEMU on Linux 1.1.1 Software packages 1.1.2 compile from source 1.1.2.1 QEMU on 0.13.0 1.1.3 KVM kernel modules The installation of QEMU 1.1.4 Problems can be tested in a virtual machine. Installation of QEMU

The installation of QEMU is easy for the major operating systems and is made with the usual methods. Installation instructions can be found at each of the specified URL.

Microsoft Windows and http://qemu-buch.de Wine /d/QEMU_unter_Microsoft_Windows Debian / Ubuntu - Use OS / 2 Warp 4 and http://qemu-buch.de eComStation /d/QEMU_unter_eComstation Synaptic to install software packages. DOS http://qemu-buch.de/d/QEMU_unter_DOS http://qemu-buch.de Mac OS X (x86) /d/QEMU_unter_Mac_OS_X FreeBSD, OpenBSD, http://qemu-buch.de/d/QEMU_unter_BSD NetBSD, Solaris

QEMU on Linux OpenSuSE - software sources. The support for the QEMU accelerator KQEMU ends with 12:11 .*. From QEMU 0.12.0, only the Kernel-based Virtual Machine (KVM) is supported. On computers without hardware virtualization technology is KVM but not used. Who would not buy any new hardware and accelerate QEMU will still need to install QEMU 00:11 .* or older. A guide can be found at the URL http://qemu-buch.de/d/QEMU+KQEMU_unter_Linux . The support of the hardware virtualization is disabled in the BIOS usually. This prevents rootkits that use the hardware virtualization. be activated for use of the KVM kernel modules must support hardware virtualization (example): OpenSuSE - software that d d is installed with YAST

1 of 1 1/29/2011 6:32 PM