1、查看虚拟机运行状态以及配置文件
1
2
3
4
5
6
7
8
|
[root@KVM-01 ~] # cd /etc/libvirt/qemu
[root@KVM-01 qemu] # virsh list --all
Id Name State
---------------------------------------------------- 10 centos65 running
11 centos65_clone running
[root@KVM-01 qemu] # ls
autostart centos65_clone.xml centos65.xml networks |
2、修改配置文件信息:
1
2
3
4
5
|
[root@KVM-01 qemu] # cp centos65_clone.xml centos65_clone.xml.bk
[root@KVM-01 qemu] # virsh dumpxml centos65_clone>a2.xml
[root@KVM-01 qemu] # vi a2.xml
[root@KVM-01 qemu] # virsh undefine centos65_clone
Domain centos65_clone has been undefined |
3、加载配置文件,并启动虚拟机
1
2
3
4
|
[root@KVM-01 qemu] # virsh define a2.xml
Domain a2 defined from a2.xml [root@KVM-01 qemu] # virsh start a2
Domain a2 started |
4、观察虚拟机状态
1
2
3
4
5
|
[root@KVM-01 qemu] # virsh list --all
Id Name State
---------------------------------------------------- 10 centos65 running
12 a2 running
|
本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/1673487,如需转载请自行联系原作者