1、查看虚拟机运行状态以及配置文件
[[email protected] ~]# cd /etc/libvirt/qemu [[email protected] qemu]# virsh list --all Id Name State ---------------------------------------------------- 10 centos65 running 11 centos65_clone running [[email protected] qemu]# ls autostart centos65_clone.xml centos65.xml networks
2、修改配置文件信息:
[[email protected] qemu]# cp centos65_clone.xml centos65_clone.xml.bk [[email protected] qemu]# virsh dumpxml centos65_clone>a2.xml [[email protected] qemu]# vi a2.xml [[email protected] qemu]# virsh undefine centos65_clone Domain centos65_clone has been undefined
3、加载配置文件,并启动虚拟机
[[email protected] qemu]# virsh define a2.xml Domain a2 defined from a2.xml [[email protected] qemu]# virsh start a2 Domain a2 started
4、观察虚拟机状态
[[email protected] qemu]# virsh list --all Id Name State ---------------------------------------------------- 10 centos65 running 12 a2 running
时间: 2024-09-28 13:40:53