kvm日常维护

1.列出物理机器上安装的虚拟
[root@localhost ~]# virsh list --all
Id Name State
----------------------------------------------------
2 kvm-CentOS-7-119 running
3 kvm-CentOS-7-120 running
4 kvm-CentOS-7-121 running
9 kvm-CentOS-7-118 running

启动其中一个虚拟机
virsh start kvm-CentOS-7-136


2.暴力关机重启动
virsh destroy kvm-CentOS-7-118
virsh start kvm-CentOS-7-118


3.关闭虚拟机
virsh shutdown kvm-CentOS-7-118

4.彻底删除虚拟机
4.1. 删除虚拟机 virsh destroy kvm-CentOS-7-118
4.2. 解除标记 virsh undefine kvm-CentOS-7-118
4.3. 删除虚拟机文件
rm /home/kvm/kvm-CentOS-7-118.img

上一篇:npm不是以管理身份运行遇到的问题


下一篇:some logo.