KVM Virtual Machine Basic Management

Source: Internet
Author: User


The previous article details the installation configuration of the KVM virtual machine http://msiyuetian.blog.51cto.com/8637744/1707539

The following article mainly introduces the basic management of the KVM virtual machine






V. Virsh Command Common operation

1. Open and log into the sub-machine
[Email protected] ~]# Virsh start TPP1

[[email protected] ~]# ssh 192.168.0.10

You can also enter the sub-machine at the same time as open:
[Email protected] ~]# Virsh start Tpp1--console

2. Turn off the sub-machine
[Email protected] ~]# Virsh shutdown TPP1//Off

Note: This need to rely on the Acpid service on the sub-machine, if the sub-machine does not turn on the Acpid service, although the display is closed successfully, but the view is still running status, we need to install on the sub-machine to open the Acpid service

[email protected] ~]# Yum install-y acpid

[[email protected] ~]#/etc/init.d/acpid start

[Email protected] ~]# Virsh destroy TPP1//Another method is to remove it directly from the list


3, Jeanzi with the machine boot automatically start
[[email protected] ~]# Virsh autostart TPP1//Auto-start
[[email protected] ~]# Virsh autostart--disable tpp1//release auto-start

4, List the sub-machine
[[email protected] ~]# Virsh list//can only list the started sub-machine
[[email protected] ~]# Virsh list--all//list all the sub-machines

5. Delete the sub-machine
[Email protected] ~]# Virsh destroy TPP1
[Email protected] ~]# Virsh undefine TPP1
[[email protected] ~]# rm-f/data/tpp1.img//If qcow2 format, delete tpp2.qcow2

6. Suspend and resume the sub-machine
[[email protected] ~]# Virsh suspend TPP1//Hang
[[email protected] ~]# Virsh resume TPP1//recovery


7. Exit the sub-machine

Press CTRL +]



This article is from the "M April Days" blog, please be sure to keep this source http://msiyuetian.blog.51cto.com/8637744/1711927

KVM Virtual Machine Basic Management

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.