Virtualization Guide

Virtualization Guide

Red Hat Virtualization

Legal Notice
Revision History
Revision 5.0.0-6 Thu Jan 31 2007
Resolves: #224220 #225169
Modify troubleshoot command
Revision 5.0.0-3 Thu Jan 11 2007
Resolves: #221137
Fix to broken rpm


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

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 Secuirty
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. SELinux Considerations
19.10. Accessing Data on Guest Disk Image
19.11. Common Troubleshooting Situations
19.12. Loop Device Errors
19.13. Guest Creation Errors
19.14. Serial Console Errors
19.15. Network Bridge Errors
19.16. Laptop Configurations
19.17. Starting Domains Automatically During System Boot
19.18. Modifying Domain0
19.19. Guest Configuration Files
19.20. Cloning the Guest Configuration Files
19.21. Creating a Script to Generate MAC Addresses
19.22. Configuring Virtual Machine Live Migration
19.23. Interpreting Error Messages
19.24. Online Troubleshooting Resources
20. Additional Resources
20.1. Useful Websites
20.2. Installed Documentation
A. Lab 1
B. Lab 2

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.