Xen virtual machine practice: how to use Linux commands to create snapshots

Source: Internet
Author: User
Article title: Xen virtual machine practice: how to create a snapshot using Linux commands. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

A vm snapshot is a good function that can save the status of the current VM. Unfortunately, open-source Xen does not support snapshots, but Linux does. Because open-source Xen usually uses Linux as its privileged domain, you can use Linux commands to create snapshots.

One byte snapshot

One way to create a snapshot in Xen is to use Linux dd after saving the current status of the VM. This includes the following steps:

1. use the xm save command to disable the current virtual machine status and write it to a disk file. This only writes the machine status to a file, not the current state of the Xen disk file or partition. Use the name linux01 and xm save linux01 linux01.sav. Note that this command will stop the VM.

2. now, dd is used to convert the current status of the disk image file to a backup file. The following example shows the logical volume of LVM:

Dd if =/dev/xenvols/linux01_root of =/data/xen_linux01_root.img

3. run the xm restore command to restart the VM.

The main disadvantage of this solution is time consumption. The dd command replicates Virtual Machine disk files one byte at a time, so it takes a lot of time. Therefore, this solution is not very practical.

[1] [2] Next page

Related Article

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.