当前位置:网站首页>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
边栏推荐
猜你喜欢
黑體輻射初探
数字电路学习笔记(一)
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3
vscode中出现无法在只读编辑器中编辑
第14章 AC-DC电源前级电路 笔记一
[graduation season] graduate summary
开启创客教育造物学的领域
工业物联网将取代人工发展吗?
English语法_形容词/副词3级-比较级_常用短语
What is the core problem to be solved in the East and West?
随机推荐
Lamaba表达式学习及常用函数式接口
Floating point and complex type of go data type (4)
Research and arrangement of electronic map coordinate system
No  result  defined& nbsp…
"Five layer" architecture of cloud applications and services
Does the applet input box flash?
A pit filling trip based on LNMP to build a personal website
uni-app 如何根据环境自动切换请求的地址
Object floating tool
月赛补题
"9 No" principle and "5 measurement dimensions" of extensible system
Documentation issues
applicationContext.getBeansOfType 获取一个接口下所有实现类 执行方法或者获取实现类对象等 操作应用场景学习总结
Go 數據類型篇(四)之浮點型與複數類型
Establishment of SSH Framework (Part I)
数字有为,易步到位 华为携“5极”明星产品加速布局商业市场
小程序输入框闪动?
双亲委派机制的理解学习
解决跨域
资源管理、高可用与自动化(中)