SUSE Linux Enterprise Server

Virtualization with KVM

12/15/2010

All content is copyright © 2006– 2010 Novell, Inc. All rights reserved.

Legal Notice

This manual is protected under Novell intellectual property rights. By reproducing, duplicating or distributing this manual you explicitly agree to conform to the terms and conditions of this license agreement.

This manual may be freely reproduced, duplicated and distributed either as such or as part of a bundled package in electronic and/or printed format, provided however that the following conditions are fulfilled:

That this copyright notice and the names of authors and contributors appear clearly and distinctively on all reproduced, duplicated and distributed copies. That this manual, specifically for the printed format, is reproduced and/or distributed for noncommercial use only. The express authorization of Novell, Inc must be obtained prior to any other use of any manual or part thereof.

For Novell trademarks, see the Novell Trademark and Service Mark list http://www.novell.com/company/legal/trademarks/tmlist.html. Linux* is a registered trademark of Linus Torvalds. All other third party trademarks are the property of their respective owners. A trademark symbol (®, ™ etc.) denotes a Novell trademark; an asterisk (*) denotes a third party trademark.

All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither Novell, Inc., SUSE LINUX Products GmbH, the authors, nor the translators shall be held liable for possible errors or the consequences thereof.


Contents

About This Manual
1. Available Documentation
2. Feedback
3. Documentation Conventions
I. Requirements, Limitations, and Support Status
1. KVM Installation and Requirements
1.1. The kvm package
1.2. Installing KVM
1.3. Hardware Requirements
1.4. Supported Guest Operating Systems
2. KVM Limitations
2.1. General Limitations
2.2. Hardware Limitations
2.3. Performance Limitations
3. KVM Support Status
3.1. Supported Features and Tools
3.2. Unsupported Features and Tools
II. Managing Virtual Machines with libvirt
4. Overview
5. Guest Installation
5.1. Guest Installation with Virtual Machine Manager
5.2. Installing from the Command Line with vm-install
5.3. Advanced Guest Installation Scenarios
6. Basic VM Guest Management
6.1. Listing VM Guests
6.2. Opening a Graphical Console
6.3. Changing a VM Guest's State: Start, Stop, Pause
6.4. Saving and Restoring VM Guests
6.5. Deleting a VM Guest
7. Connecting and Authorizing
7.1. Authentication
7.2. Configuring Remote Connections
7.3. Connecting to a VM Host Server
8. Managing Storage
8.1. Managing Storage with Virtual Machine Manager
9. Configuring Virtual Machines
9.1. Adding a CD/DVD-ROM Device with Virtual Machine Manager
9.2. Adding a Floppy Device with Virtual Machine Manager
9.3. Ejecting and Changing Floppy or CD/DVD-ROM Media with Virtual Machine Manager
9.4. Clock Settings
10. Administrating VM Guests
10.1. Migrating VM Guests
10.2. Monitoring
III. Managing Virtual Machines with QEMU
11. Overview
12. Guest Installation
12.1. Basic Installation with qemu-kvm
12.2. Managing Disk Images with qemu-img
13. Running Virtual Machines with qemu-kvm
13.1. Basic qemu-kvm Invocation
13.2. General qemu-kvm Options
13.3. QEMU Virtual Devices
13.4. Networking with QEMU
13.5. Viewing VM Guest with VNC
14. Administrating Virtual Machines with QEMU Monitor
A. Appendix
A.1. Installing Para-Virtualized Drivers
A.2. Generating x509 Client/Server Certificates
A.3. qemu Command Line Options

List of Figures

12.1. New 2GB Partition in Guest YaST Partitioner
13.1. QEMU Window with SLES 11 SP1 as VM Guest
13.2. Configuring Network Bridge with YaST
13.3. QEMU VNC Session
13.4. Authentication Dialog in Vinagre

List of Examples

5.1. Interactive Setup on the Command Line Using vm-install
5.2. vm-install command line switches
10.1. Typical Output of kvm_stat
13.1. Restricted User-mode Networking
13.2. User-mode Networking with Custom IP Range
13.3. User-mode Networking with Network-boot and TFTP
13.4. User-mode Networking with Host Port Forwarding
13.5. Password Authentication
13.6. x509 Certificate Authentication
13.7. x509 Certificate and Password Authentication
13.8. SASL Authentication