1, view must first shut down the sub-machine is not running
[email protected] qemu]# Virsh list--all
Id Name State
----------------------------------------------------
-Caimz1 shut off
-CAIMZ2 shut off
2. Cancellation of CAIMZ2
[Email protected] qemu]# Virsh undefine caimz2
Domain CAIMZ2 has been undefined
Where the undefine is the actual deletion of its corresponding sub-machine configuration file. That is, delete/etc/libvirt/qemu/caimz2.xml.
[[email protected] qemu]# ls
Autostart caimz1.xml Caimz2.xml.bak Networks
Restoring caimz2 at this point requires redefining its configuration file.
3, find a similar configuration file backup is CP
[Email protected] qemu]# Virsh dumpxml caimz1 >/etc/libvirt/qemu/caimz2.xml
[[email protected] qemu]# ls
Autostart Caimz1.xml caimz2.xml Caimz2.xml.bak Networks
4. Edit its configuration file
Vim/etc/libvirt/qemu/caimz2.xml
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/93/wKioL1YiXfbDXVD9AAM_kQHeor0553.jpg "title=" Image.png "alt=" Wkiol1yixfbdxvd9aam_kqheor0553.jpg "/>
Check its
[Email protected] qemu]# Virsh list--all
Id Name State
----------------------------------------------------
-Caimz1 shut off
Need to be redefined before warehousing
5. Redefining
[Email protected] qemu]# Virsh define/etc/libvirt/qemu/caimz2.xml
Domain CAIMZ2 defined From/etc/libvirt/qemu/caimz2.xml
6. View
[Email protected] qemu]# Virsh list--all
Id Name State
----------------------------------------------------
-Caimz1 shut off
-Caimz2 shut off
At this time caimz2 and storage.
At this point into the Discovery network is gone. Has changed. This method of recovery cannot be restored to a completely pre-condition, which is equivalent to a backup at this time.
KVM----Recover virtual machines from virtual disks