Virtualization Guide

Virtualization Guide

Red Hat Virtualization

Legal Notice


This Guide contains information on configuring, creating and monitoring guest operating systems on Red Hat Enterprise Linux 5, using virsh, xm, vmm and xend.

If you find an error in the Red Hat Enterprise Linux Virtualization Guide, or if you have thought of a way to make this manual better, we would like to hear from you! Submit a report in Bugzilla ( against the product Red Hat Enterprise Linux and the component Virtualization_Guide.

Table of Contents

1. Red Hat Virtualization System Architecture
2. Operating System Support
3. Hardware Support
4. Red Hat Virtualization System Requirements
5. Booting the System
6. Configuring GRUB
7. Booting a Guest Domain
8. Starting/Stopping a Domain at Boot Time
9. Configuration Files
10. Managing CPUs
11. Migrating a Domain
12. Configuring for Use on a Network
13. Securing Domain0
14. Storage
15. Managing Virtual Machines with virsh
15.1. Connecting to a Hypervisor
15.2. Creating a Virtual Machine
15.3. Configuring an XML Dump
15.4. Suspending a Virtual Machine
15.5. Resuming a Virtual Machine
15.6. Saving a Virtual Machine
15.7. Restoring a Virtual Machine
15.8. Shutting Down a Virtual Machine
15.9. Rebooting a Virtual Machine
15.10. Terminating a Domain
15.11. Converting a Domain Name to a Domain ID
15.12. Converting a Domain ID to a Domain Name
15.13. Converting a Domain Name to a UUID
15.14. Displaying Virtual Machine Information
15.15. Displaying Node Information
15.16. Displaying the Virtual Machines
15.17. Displaying Virtual CPU Information
15.18. Configuring Virtual CPU Affinity
15.19. Configuring Virtual CPU Count
15.20. Configuring Memory Allocation
15.21. Configuring Maximum Memory
16. Managing Virtual Machines Using xend
17. Managing Virtual Machines Using xm
17.1. xm Configuration File
17.1.1. Configuring vfb
17.2. Creating and Managing Domains with xm
17.2.1. Connecting to a Domain
17.2.2. Creating a Domain
17.2.3. Saving a Domain
17.2.4. Terminating a Domain ID
17.2.5. Shutting Down a Domain
17.2.6. Restoring a Domain
17.2.7. Suspending a Domain
17.2.8. Resuming a Domain
17.2.9. Rebooting a Domain
17.2.10. Renaming a Domain
17.2.11. Pausing a Domain
17.2.12. Unpausing a Domain
17.2.13. Converting a Domain Name to Domain ID
17.2.14. Converting a Domain ID to Domain Name
17.2.15. Configuring Memory Allocation
17.2.16. Configuring Maximum Memory
17.2.17. Configuring VCPU Count
17.2.18. Pinning a VCPU
17.2.19. Migrating a Domain
17.3. Monitoring and Diagnostics
17.3.1. Performing a Core Dump
17.3.2. Monitoring Domains in Real Time
17.3.3. Displaying Domain States
17.4. Displaying Uptime
17.5. Displaying VCPU Information
17.6. Displaying Domain Information
17.7. Displaying TPM Devices
17.8. Displaying the xend Log
17.9. Displaying the Message Buffer
17.10. Displaying ACM State Information
17.11. Displaying Vnets
17.12. Displaying Virtual Block Devices
17.13. Displaying Virtual Network Interfaces
17.14. Creating a New Virtual Network Device
17.15. Terminating a Virtual Network Device
17.16. Creating a New Vnet
17.17. Terminating a Vnet
17.18. Creating a Domain Security Label
17.19. Testing the Domain Resources
17.20. Displaying System Resources
17.21. Configuring Credit Scheduling
17.22. Creating a New Virtual Block Device
17.23. Terminating a Virtual Block Device
17.24. Security
17.24.1. Removing a Domain Security Label
17.24.2. Creating a Resource Security Label
17.24.3. Removing a Resource Security Label
17.24.4. Configuring Access Control
17.24.5. Creating a Policy
17.24.6. Loading a Policy
17.24.7. Creating a Policy for Boot Configuration
17.24.8. Creating a Label
17.24.9. Displaying Policy Labels
17.24.10. Displaying Domain Security Labels
17.24.11. Displaying Resource Security Labels
17.24.12. Configuring Access Control Security
17.24.13. Compiling a Security Policy
17.24.14. Loading the Security Policy
17.24.15. Configuring a Boot Security Policy
17.24.16. Displaying Security Labels
17.24.17. Attaching a Security Label
18. Managing Virtual Machines with Virtual Machine Manager
18.1. Virtual Machine Manager Architecture
18.2. The Open Connection Window
18.3. Virtual Machine Manager Window
18.4. Virtual Machine Details Window
18.5. Virtual Machine Graphical Console
18.6. Starting the Virtual Machine Manager
18.7. Creating a New Virtual Machine
18.8. Restoring A Saved Machine
18.9. Displaying Virtual Machine Details
18.10. Configuring Status Monitoring
18.11. Displaying Domain ID
18.12. Displaying Virtual Machine Status
18.13. Displaying Virtual CPUs
18.14. Displaying CPU Usage
18.15. Displaying Memory Usage
19. Red Hat Virtualization Troubleshooting
19.1. Logfile Overview and Locations
19.2. Logfile Descriptions
19.3. Important Directory Locations
19.4. Troubleshooting Tools
19.5. Troubleshooting with the Logs
19.6. Troubleshooting with the Serial Console
19.7. Paravirtualized Guest Console Access
19.8. Full Virtualization Guest Console Access
19.9. Implementing Lun Persistence
19.10. SELinux Considerations
19.11. Accessing Data on Guest Disk Image
19.12. Common Troubleshooting Situations
19.13. Loop Device Errors
19.14. Guest Creation Errors
19.15. Serial Console Errors
19.16. Network Bridge Errors
19.17. Laptop Configurations
19.18. Starting Domains Automatically During System Boot
19.19. Modifying Domain0
19.20. Guest Configuration Files
19.21. Cloning the Guest Configuration Files
19.22. Creating a Script to Generate MAC Addresses
19.23. Configuring Virtual Machine Live Migration
19.24. Interpreting Error Messages
19.25. Online Troubleshooting Resources
20. Additional Resources
20.1. Useful Websites
20.2. Installed Documentation
A. Revision History
B. Lab 1
C. Lab 2