一、查看虛擬機運行狀態以及配置文件centos
[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
二、修改配置文件信息:bash
[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
三、加載配置文件,並啓動虛擬機ide
[root@KVM-01 qemu]# virsh define a2.xml Domain a2 defined from a2.xml [root@KVM-01 qemu]# virsh start a2 Domain a2 started
四、觀察虛擬機狀態spa
[root@KVM-01 qemu]# virsh list --all Id Name State ---------------------------------------------------- 10 centos65 running 12 a2 running