KVM----Recover virtual machines from virtual disks

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.