Virsh is a tool for managing virtual machines, you can perform virsh into a bash-like virtual machine management interface, or you can execute the following command at the command line to complete a series of managed virtual machine operations.
List virtual machines
Virsh list [--all]
List all virtual machines that include shutdown when using--all
Login
Remote Login
# SSH [email protected]
Log on Locally
# Virsh Console CentOs6.7
Before switching the machine, you need to install power management software on the client Acpid
# yum Install-y acpid
# service Acpid Start
Boot
# Virsh start CentOs6.7 [--console]
Use--console to open a virtual machine and access the console
Shutdown
# Virsh Shutdown CentOs6.7
When Acpid is not used
# Virsh Destroy CentOs6.7
Hang Up
# Virsh Suspend CentOs6.7
Recovery
# Virsh Resume CentOs6.7
Boot up the virtual machine automatically
# Virsh Autostart [--disable] CentOs6.7
--disable option to turn off auto -on
Deleting a virtual machine
Shutdown State Execution
# Virsh Undefine CentOs6.7
From for notes (Wiz)
This article is from the "Hiyang" blog, make sure to keep this source http://hiyang.blog.51cto.com/10728919/1793797
3 KVM Virsh Management commands