Product SiteDocumentation Site

Red Hat Enterprise Linux 6

Virtualization Administration Guide

Virtualization Documentation

Edition 0.1

Red Hat Engineering Content Services

Legal Notice

Copyright © 2011 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
All other trademarks are the property of their respective owners.


1801 Varsity Drive
RaleighNC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701

Abstract
The Virtualization Administration Guide covers administration of hosts, networking, storage, device and guest management, and troubleshooting.

Preface
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. Getting Help and Giving Feedback
2.1. Do You Need Help?
2.2. We Need Feedback!
1. Server best practices
2. Security for virtualization
2.1. Storage security issues
2.2. SELinux and virtualization
2.3. SELinux
2.4. Virtualization firewall information
3. sVirt
3.1. Security and Virtualization
3.2. sVirt labeling
4. KVM live migration
4.1. Live migration requirements
4.2. Shared storage example: NFS for a simple migration
4.3. Live KVM migration with virsh
4.4. Migrating with virt-manager
5. Remote management of guests
5.1. Remote management with SSH
5.2. Remote management over TLS and SSL
5.3. Transport modes
6. Overcommitting with KVM
7. KSM
8. Advanced virtualization administration
8.1. Control Groups (cgroups)
8.2. Hugepage support
9. Miscellaneous administration tasks
9.1. Automatically starting guests
9.2. Using qemu-img
9.3. Verifying virtualization extensions
9.4. Setting KVM processor affinities
9.5. Generating a new unique MAC address
9.6. Improving guest response time
9.7. Disable SMART disk monitoring for guests
9.8. Configuring a VNC Server
9.9. Gracefully shutting down guests
9.10. Virtual machine timer management with libvirt
10. Storage concepts
10.1. Storage pools
10.2. Volumes
11. Storage pools
11.1. Creating storage pools
11.1.1. Dedicated storage device-based storage pools
11.1.2. Partition-based storage pools
11.1.3. Directory-based storage pools
11.1.4. LVM-based storage pools
11.1.5. iSCSI-based storage pools
11.1.6. NFS-based storage pools
12. Volumes
12.1. Creating volumes
12.2. Cloning volumes
12.3. Adding storage devices to guests
12.3.1. Adding file based storage to a guest
12.3.2. Adding hard drives and other block devices to a guest
12.4. Deleting and removing volumes
13. N_Port ID Virtualization (NPIV)
13.1. Enabling NPIV on the switch
13.1.1. Identifying HBAs in a Host System
13.1.2. Verify NPIV is used on the HBA
14. The Virtual Host Metrics Daemon (vhostmd)
14.1. Installing vhostmd on the host
14.2. Configuration of vhostmd
14.3. Starting and stopping the daemon
14.4. Verifying that vhostmd is working from the host
14.5. Configuring guests to see the metrics
14.6. Using vm-dump-metrics in Red Hat Enterprise Linux guests to verify operation
15. Managing guests with virsh
15.1. virsh command quick reference
15.2. Attaching and updating a device with virsh
15.3. Connecting to the hypervisor
15.4. Creating a virtual machine XML dump (configuration file)
15.5. Suspending, resuming, saving and restoring a guest
15.6. Shutting down, rebooting and force-shutdown of a guest
15.7. Retrieving guest information
15.8. Retrieving host information
15.9. Storage pool information
15.10. Displaying per-guest information
15.11. Managing virtual networks
15.12. Migrating guests with virsh
15.13. Guest CPU model configuration
15.13.1. Introduction
15.13.2. Learning about the host CPU model
15.13.3. Determining a compatible CPU model to suit a pool of hosts
15.13.4. Configuring the guest CPU model
16. Managing guests with the Virtual Machine Manager (virt-manager)
16.1. Starting virt-manager
16.2. The Virtual Machine Manager main window
16.3. The virtual hardware details window
16.4. Virtual Machine graphical console
16.5. Adding a remote connection
16.6. Displaying guest details
16.7. Performance monitoring
16.8. Displaying CPU usage
16.9. Displaying Disk I/O
16.10. Displaying Network I/O
17. Guest disk access with offline tools
17.1. Introduction
17.2. Terminology
17.3. Installation
17.4. The guestfish shell
17.4.1. Viewing file systems with guestfish
17.4.2. Modifying files with guestfish
17.4.3. Other actions with guestfish
17.4.4. Shell scripting with guestfish
17.4.5. Augeas and libguestfs scripting
17.5. Other commands
17.6. virt-rescue: The rescue shell
17.6.1. Introduction
17.6.2. Running virt-rescue
17.7. virt-df: Monitoring disk usage
17.7.1. Introduction
17.7.2. Running virt-df
17.8. virt-resize: resizing guests offline
17.8.1. Introduction
17.8.2. Expanding a disk image
17.9. virt-inspector: inspecting guests
17.9.1. Introduction
17.9.2. Installation
17.9.3. Running virt-inspector
17.10. virt-win-reg: Reading and editing the Windows Registry
17.10.1. Introduction
17.10.2. Installation
17.10.3. Using virt-win-reg
17.11. Using the API from Programming Languages
17.11.1. Interaction with the API via a C program
17.12. Troubleshooting
17.13. Where to find further documentation
18. Virtual Networking
18.1. Virtual network switches
18.1.1. Network Address Translation
18.2. DNS and DHCP
18.3. Other virtual network switch routing types
18.4. The default configuration
18.5. Examples of common scenarios
18.5.1. Routed mode
18.5.2. NAT mode
18.5.3. Isolated mode
18.6. Managing a virtual network
18.7. Creating a virtual network
18.8. Attaching virtual network to host
19. libvirt configuration reference
20. Creating custom libvirt scripts
20.1. Using XML configuration files with virsh
21. qemu-kvm Whitelist
21.1. Introduction
21.2. Basic options
21.3. Disk options
21.4. Display options
21.5. Network options
21.6. Device options
21.7. Linux/Multiboot boot
21.8. Expert options
21.9. Help and information options
21.10. Miscellaneous options
22. Troubleshooting
22.1. Debugging and troubleshooting tools
22.2. kvm_stat
22.3. Troubleshooting with serial consoles
22.4. Virtualization log files
22.5. Loop device errors
22.6. Enabling Intel VT-x and AMD-V virtualization hardware extensions in BIOS
22.7. KVM networking performance
A. Additional resources
A.1. Online resources
A.2. Installed documentation
B. Revision History
Index