One of KVM Virtual Machine backup and restoration memory backup and Restoration

Source: Internet
Author: User

With the automated scripts for creating and deleting VMS, life is much simpler.

However, in a test scenario, we often need to constantly restore the VM to a starting point, and then re-start the test. It is still slow to delete/create a VM every time.

In this case, you can use the Save/restore method.

The Save/restore method only backs up and restores the memory status of the current system, and does not back up disk files. Therefore, it takes a very short time, but the use cases are limited. Pay special attention to this.

Virsh save -- bypass-Cache VM2/opt/vm2_save -- running

The above command saves the current status of VM2 to the/opt/vm2_save file. I have read this file, 597 M.

-- The running parameter indicates that VM2 can be automatically started when the next restore returns.

This command will disable VM2.

You can do some basic work before saving. For example, set ssh-authenticated password-less access first, set apt-Cache proxy, and upgrade the system to the latest version. Install Emacs. These will be available at the next restoration.

Restore now:

Virsh destroy vm2virsh restore/opt/vm2_save -- bypass-Cache -- running

You must first disable the VM.

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.