当前位置:网站首页>Detailed explanation of KVM common commands
Detailed explanation of KVM common commands
2022-06-28 03:52:00 【Life is in a hurry】
Today I will continue to introduce Linux Operation and maintenance related knowledge , The main content of this paper is KVM Common commands .
This article takes centos7-1、centos7-2 Take a virtual machine , Introduce the common KVM The order is as follows :
1、 Virtual machine view
Carry out orders :
virsh list
You can view the virtual machines that have been opened .
Carry out orders :
virsh list --all
You can view all virtual machines ( Including opened and unopened )
Carry out orders :
virsh version
You can see virsh Version of
The execution result of the above command is as follows :
Virtual machine startup and shutdown
Carry out orders :
virsh start centos7-1
You can open the virtual machine .
Carry out orders :
virsh shutdown centos7-1
You can shut down the virtual machine .
Carry out orders :
virsh destroy centos7-1
You can forcibly shut down the virtual machine , It's equivalent to forced power failure , This method is often used when the virtual machine cannot shut down normally .
3、 Virtual machine configuration file export
Carry out orders :
virsh dumpxml centos7-2 > /tmp/centos7-2.xml
You can export the configuration file of the virtual machine to /tmp/ Under the table of contents , And named it centos7-2.xml, The execution result of this command is as follows :
4、 Virtual machine suspend and restore
Carry out orders :
virsh suspend centos7-1
You can suspend the virtual machine .
Carry out orders :
virsh resume centos7-1
The virtual machine can be restored .
5、 Virtual machine session link
Carry out orders :
virsh console centos7-1
6、 Virtual machine revocation and recovery
Carry out orders :
virsh undefine centos7-2
You can remove the virtual machine from the virtual machine manager , The configuration file of the virtual machine will be deleted , But the virtual machine disk file was not deleted , Therefore, the virtual machine can also recover , But the premise is that the configuration file of the virtual machine has been exported and backed up .
Carry out orders :
virsh define /tmp/centos7-2.xml
You can restore the deleted virtual machine .
7、 Virtual machine self startup and self startup revocation
Carry out orders :
virsh autostart centos7-1
It can make the virtual machine self start at the beginning .
Carry out orders :
virsh autostart --disable centos7-1
边栏推荐
- Circular sliding auto adsorption UI tool that monkeys can use
- Scalable storage system (I)
- Custom controls under WPF and adaption of controls in Grid
- STM32 peripheral SDIO and SD card configuration
- Typescript union type
- WebSocket(简单体验版)
- Unity C# 网络学习(十一)——自定义协议生成工具
- 机器人编程教育的市场竞争力
- Go speed
- 多线程与高并发三:AQS底层源码分析及其实现类
猜你喜欢

MySQL 主从复制、分离解析

Resource management, high availability and automation (Part 2)

开口式霍尔电流传感器如何助力直流配电改造?

Several ways of sharing printers in LAN

荣耀v8 真机调试时不显示 Logcat 日志的解决办法

第九章 APP项目测试(3) 测试工具

多线程与高并发四:VarHandle与强软弱虚引用和ThreadLocal

可扩展系统的“9不”原则和“5个”衡量维度

A preliminary study of blackbody radiation

一文告诉你什么是 Kubernetes
随机推荐
TypeError: 'module&#03…
Principle and Simulation of switching power supply buck circuit
数据库系列之MySQL中的分页查询优化
Learning - useful resources
SSH框架的搭建(上)
Change of monitoring documents and folders of "operation and maintenance department"
Documentation issues
数字电路学习笔记(一)
PyCharm设置仿sublime配色方案
"9 No" principle and "5 measurement dimensions" of extensible system
[graduation season] graduate summary
从遇见大咖到成为大咖,昇腾AI开发者创享日给开发者带来无限可能
使用信号分析器
Execution plan in MySQL of database Series
Resource management, high availability and automation (Part 2)
What is the difference between slice and array in go question bank 12?
nn. Parameter and torch nn. Init series of functions to initialize model parameters
可扩展存储系统(上)
机器人编程教育的市场竞争力
How the uni app automatically switches the requested address according to the environment