15.16. Displaying the Virtual Machines

15.16. Displaying the Virtual Machines

You can use virsh to display the virtual machine list and the current state:

virsh list domain-name [ ——inactive  |  —— -all]

The ——inactive option lists inactive domains (domains that have been defined but are not currently active). The — -all domain lists all domains, whether active or not. Your output should resemble the this example:

ID                 Name                 State
————————————————
0                   Domain0             running
1                   Domain202           paused
2                   Domain010           inactive
3                   Domain9600          crashed

Here are the six domain states:

running  lists domains currently active on the CPU

blocked  lists domains that are blocked

paused   lists domains that are suspended

shutdown lists domains that are in process of shutting down
 
shutoff  lists domains that are completely down.

crashed  lists domains that are crashed

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.