Virtual Machine Snapshot

Source: Internet
Author: User

A snapshot is a copy of a virtual disk at a specific time point. The status and data of the VM are retained when the snapshot is executed. The Snapshot can be used to recover to the snapshot after a system problem occurs, so as to effectively protect the memory data of the file system and virtual machine on the disk. Although VMware snapshot is not very suitable for data protection, it is also a very useful tool as long as it is used properly. Basically, VMWare's snapshots are suitable for two situations: 1. Isolate the disk of a virtual machine and no data is written, so that the backup can be performed; 2. A short-term automatic recovery function is provided during patching and software upgrade. In the development environment, you may often see the use of snapshots to save images in real time, but this method is not available in a performance-sensitive production environment.

(1) Execution Snapshot

The following is a snapshot of a Windows 2003 virtual machine. Before executing a snapshot, let's take a look at the files on the VM before the snapshot,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/94/wKiom1RTidCyvht1AAN5cHCId3o572.jpg "Title =" qq20151130205433.png "alt =" wkiom1rtidcyvht1aan5chcid3o572.jpg "/> Start the snapshot now. Select the virtual machine to be snapshot, right-click, and select "snapshot", "execute snapshot" from the shortcut menu,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/94/wKioL1RTiqWiAIxJAATgJ8FDoa0601.jpg "Title =" qqimage 20151130205523.jpg "alt =" wkiol1rtiqwiaixjaatgj8fdoa0601.jpg "/> name and describe the snapshot, select to capture the virtual machine memory status, the Snapshot retains the real-time status of the VM. If the memory status is not captured, the snapshot will not save the real-time status of the Virtual Machine. Unless the disk is silent, the disk will crash. When the client file system is silent, VMware Tools silts the virtual machine's file system. Silent Operations ensure that the snapshot disk represents the consistent state of the client's file system. If the VM power is off or VMware Tools is unavailable, the quiesce parameter is ignored.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/94/wKiom1RTim3hzMrWAADFHQpz6K4425.jpg "Title =" qq20151130205746.png "alt =" wkiom1rtim3hzmrwaadfhqpz6k42.16.jpg "/>

After the snapshot is complete, you can access the storage to view the changes in the file.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/94/wKioL1RTitby7pfYAAQScd5bn54303.jpg "Title =" qq20151130210043.png "alt =" wkiol1rtitby7pfyaaqd85bn54303.jpg "/> after the snapshot is completed, compare the previous snapshot file, found more. vmdk ,. vmsn files .. Vmdk is a snapshot file that stores the current status of the virtual disk and the status when the snapshot was last executed. vmsn is the file of the memory status of the virtual machine when the snapshot is executed. The file name uses the syntax slvm. snapshotl. vmsn, where slvm is the name of the Virtual Machine and snapshot1 is the first snapshot.

Of course, in addition to these two files, the snapshot format may be different for different disk formats or different data storage. vmsd, flat. vmdk file, where. vmsd is a database that contains VM snapshot information and is the main information source of the snapshot manager.

(2) snapshot hierarchy

You can take multiple snapshots of the same virtual machine. The relationship between snapshots is similar to the parent-child relationship. In a linear process, Each snapshot has a parent snapshot and a subsnapshot, except that the last snapshot does not have a subsnapshot. Each parent snapshot can have multiple sub-snapshots. You can recover to the current parent snapshot or restore any parent or child snapshot in the snapshot tree, and create multiple snapshots from the snapshot. Each time a snapshot is restored and another snapshot is executed, a branch or sub-snapshot is created.

The first VM snapshot created by the user is the basic parent snapshot. The parent snapshot is the current status of the recently saved virtual machine version. Executing a snapshot will create an incremental disk file and an optional memory file for each disk connected to the virtual machine. Incremental disk files and memory files are stored together with virtual machine files. The parent snapshot is always close to the snapshot above the "you are here" icon in the "snapshot manager. If a snapshot is restored, the snapshot becomes the parent snapshot of the current "you are here" status.

The snapshot that the sub-Snapshot does not execute to the same virtual machine after the parent snapshot is executed. The incremental files of each virtual disk connected to each sub-Snapshot and the optional memory files that point to the current status of the Virtual Disk ("you are here. The incremental files of each sub-Snapshot are merged with the previous sub-Snapshot until they reach the parent disk. A sub-disk can later become the parent disk of a sub-disk,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/94/wKioL1RTivfgYHX_AAD3pGNXm_g992.jpg "Title =" qq20141031205510.jpg "alt =" wkiol1rtivfgyhx_aad3pgnxm_g992.jpg "/>

(3) Restore snapshots

When a system problem occurs or you need to perform a rollback operation, you can restore the system by restoring the snapshot. When a snapshot is restored, the memory, settings, and disk status of the VM are restored to the status before the snapshot is executed, if you want to suspend, power on, or power off a VM when it is started, make sure that the VM is in the correct state when the snapshot is executed.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/94/wKiom1RTisqTFCHiAAaTduVzgcA318.jpg "Title =" qq 41031211220.jpg "alt =" wkiom1rtisqtfchiaaatduvzgca318.jpg "/>

Restoring to the current snapshot is to restore from the current location to the upper-level structure, that is, to the time point at which the last snapshot was taken. Restoring to the current snapshot will activate the parent snapshot of the VM, the current disk and memory status will be discarded, and the virtual opportunity will be restored to the disk and memory status of the parent snapshot.

After "Restore to current snapshot" is selected, the "OK" dialog box is displayed, asking you to confirm whether to restore to the latest snapshot,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/94/wKiom1RTizHDYvVIAACxqe41QJo205.jpg "Title =" qq20141031211317.jpg "alt =" wkiom1rtizhdyvviaacxqe41qjo205.jpg "/>

Click "yes" to restore the snapshot. Snapshot recovery will be completed soon,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/94/wKioL1RTi5mSZzzhAABcwb05P7o894.jpg "Title =" qq20141031211344.jpg "alt =" wkiol1rti5mszzzhaabcwb05p7o894.jpg "/>

(4) snapshot Manager

After you take a snapshot of a VM, you can view and manage the snapshot in the snapshot manager,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/94/wKioL1RTi9KQSm3UAAbhZVyAsuc082.jpg "Title =" qq 41031211512.jpg "alt =" wkiol1rti9kqsm3uaabhzvyasuc082.jpg "/> you can use the snapshot manager to restore any snapshot, the "you are here" icon represents the current activity status of the virtual machine. When you open "snapshot manager", the "you are here" icon is always in the selected and visible status,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/94/wKiom1RTjP6gDbv5AAEJEJuFTlk069.jpg "Title =" qq20141031211923.jpg "alt =" wkiom1rtjp6gdbv5aaejejuftlk069.jpg "/>

You can use the snapshot manager to restore snapshots at any time. To restore a snapshot, select the snapshot and click "go,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/94/wKioL1RTjWXzhBBSAAEVnoG0vX8894.jpg "Title =" qq20141031211948.jpg "alt =" wkiol1rt1_xzhbbsaaevno1_vx8894.jpg "/>

(5) snapshot Integration

If the snapshot integration command does not violate the data dependency, search for the level or incremental disk to be combined. After integration, redundant disks are removed, which improves the performance of virtual machines and saves storage space.

Right-click the menu bar of any virtual machine column and select the "integrate" command from the shortcut menu,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/94/wKiom1RTjVGwFN8FAAA6RvEP6f4025.jpg "Title =" qq20141031212307.jpg "alt =" wkiom1rtjvgwfn8faaa6rvep6f4025.jpg "/>

The "Confirm integration" dialog box is displayed. Click "yes" for integration,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/94/wKioL1RTjeLDQVPWAACjsGvvi8I152.jpg "Title =" qq201410312345.jpg "alt =" wkiol1rtjeldqvpwaacjsgvvi8i152.jpg "/>

After the integration is confirmed, VMWare vcenter combines all snapshots into one snapshot. The integration process is very rapid,

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/94/wKioL1RTjezDhUUoAAAnXjGH55k259.jpg "Title =" qq20141031212407.jpg "alt =" wkiol1rtjezdhuuoaaanxjgh55k259.jpg "/>


This article is from "Zhao Guangsheng's blog", please be sure to keep this source http://capfzgs.blog.51cto.com/7729146/1570547

Virtual Machine Snapshot

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.