NOTE: CentOS Enterprise Linux 5 is built from the Red Hat Enterprise Linux source code. Other than logo and name changes CentOS Enterprise Linux 5 is compatible with the equivalent Red Hat version. This document applies equally to both Red Hat and CentOS Enterprise Linux 5.
You can use the virsh application to manage virtual machines. This utility is built around the libvirt management API and operates as an alternative to the xm tool or the graphical Virtual Machine Manager. Unprivileged users can employ this utility for read-only operations. If you plan on running xend/qemu, you should enable xend/qemu to run as a service. After modifying the respective configuration file, reboot the system, and xend/qemu will run as a service. You can use virsh to script vm work. Like the xm tool, you run virsh from the command line.
15.1. Connecting to a Hypervisor
You can use virsh to initiate a hypervisor session:
virsh connect <name>
Where <name> is the machine name of the hypervisor. If you want to initiate a read—only connection, append the above command with —readonly.