Backup and restoration of KVM Virtual Machine II Snapshot

Source: Internet
Author: User

Assume that you have installed and run the VM1 VM.

Create an XML file vmdesksnapshot.xml with the following content:

<domainsnapshot>   <name>vm1_snapshot</name>   <description>Ubuntu 12.10 AMD64 server</description></domainsnapshot>

Run the following command to create the snapshot of VM1:

virsh snapshot-create vm1 ./vm1_snapshot.xmlDomain snapshot vm1_snapshot created from './vm1_snapshot.xml'

Check the snapshot of VM1.

virsh snapshot-list vm1 Name                 Creation Time             State------------------------------------------------------------ vm1_snapshot         2012-11-14 14:46:44 +0800 running

Now, log on to the running VM1 and add a file under/root /.

Touch XY

Well, use vm1_snapshot to replace the current VM1 (or restore VM1 to the State saved by vm1_snapshot)

virsh snapshot-revert vm1 vm1_snapshot

Log on to VM1 again, and the XY file does not exist under/root. Restored successfully.

If you do not need this vm1_snapshot, you can use the following command to delete it:

virsh snapshot-delete vm1 vm1_snapshotDomain snapshot vm1_snapshot deletedroot@host2:~/kvm# virsh snapshot-list vm1 Name                 Creation Time             State------------------------------------------------------------

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.