3 KVM Virsh Management commands

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.