In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
How to interpret the virtual machine snapshot, in view of this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
What is a snapshot?
Snapshots save the state and data of the virtual machine at a specific time.
"status includes the power status of the virtual machine (for example, power on, power off, suspend)."
The data includes all the files that make up the virtual machine. This includes disks, memory, and other devices (such as virtual network interface cards).
Virtual machines provide several operations for creating and managing snapshots and snapshot chains. With these operations, you can create snapshots, restore to any snapshot in the chain, and remove snapshots. You can create layers of snapshot trees.
Second, create a snapshot
It is easy to create a snapshot
Note: the dump of the internal state of the virtual machine will be included in the snapshot. Memory snapshots take longer to create, but allow the virtual machine to revert to the running state it was in when the snapshot was created. This option is selected by default. "if this option is not selected and silence is not selected, the snapshot creates a file that remains consistent after the crash, which can be used to reboot the virtual machine."
However, if it is a stand-alone disk, you cannot create a memory snapshot, and NBU cannot create a backup of a virtual machine of a stand-alone disk.
Note: when creating a memory snapshot, the virtual machine is completely stopped
Silent state: the virtual machine is powered on when the snapshot is taken, and VMware Tools will leave the file system in the virtual machine in a silent state. Silent file system is the process of bringing disk data from a physical or virtual computer into a state suitable for backup. This process may include flushing dirty buffers from the operating system memory cache to disk, as well as other higher-level application-specific tasks.
Note: silence means pausing or changing the state of processes running on your computer, especially those that may modify information stored on disk during backup to ensure consistent availability of backups. Memory snapshots do not require silence and are mainly used for backups.
Snapshot commands and file parsing
When you create a snapshot, the snapshot consists of the following files:
-. Vmdk and-- delta.vmdk
The collection of .vmdk and-delta.vmdk files for each virtual disk is connected to the virtual machine when the snapshot is generated. These files can be called subdisks, redo log, or incremental links. These child disks can later be regarded as the parents of future child disks. In the original parent disk, each child disk will build a redo log (one step at a time) that refers back to the original state from the current state of the virtual disk.
Note:
Values may be inconsistent across all subdisks of the same snapshot. File names are selected based on the availability of file names.
If the size of the virtual disk is larger than 2TB, the redo log file is in-- sesparse.vmdk format.
.vmsd
The .vmsd file is the database that stores virtual machine snapshot information and is the main source of snapshot manager information. This file contains line entries that define the relationship between snapshots and between the subdisks of each snapshot.
Snapshot.vmsn
The .vmsn file contains the current configuration of the virtual machine (which can also contain the active status of the virtual machine). Capturing the memory state of a virtual machine allows you to revert to the state of an open virtual machine. When using non-memory snapshots, you can only restore to the state of a virtual machine that has been turned off. It takes longer to create a memory snapshot than a non-memory snapshot.
Note: the older the snapshot, the slower the deletion and the longer the time.
IV. In-depth analysis
Which products use the snapshot feature?
In addition to creating snapshots using Snapshot Manager, many VMware and third-party products and features also use snapshots. Some VMware products that make extensive use of snapshots include:
VMware Data Recovery
VMware Lab Manager
VMware vCenter and VMware Infrastructure Client (snapshot manager, Storage vMotion)
Note: the above is not an exhaustive list.
How does a snapshot work?
Our VMware API allows VMware and third-party products to perform operations using virtual machines and their snapshots. The following is a list of common actions that can be performed on virtual machines and snapshots using our API:
CreateSnapshot: create a new virtual machine snapshot. As a side effect, this operation updates the current snapshot.
RemoveSnapshot: removes the snapshot and deletes any associated storage.
RemoveAllSnapshots: removes all snapshots associated with the virtual machine. If the virtual machine does not have any snapshots, the operation will only return successfully.
RevertToSnapshot: changes the execution state of the virtual machine to the state of this snapshot. This is equivalent to the go option under Snapshot Manager when using vSphere/VI Client GUI.
Consolidate: merges the hierarchy of redo log. This operation is only available in vSphere 5.0 and later.
The following is a high-level overview of how to create, remove, or restore snapshot requests in a VMware environment:
Requests to create, remove, or restore virtual machine snapshots are sent from the client to the server using VMware API.
The request will be forwarded to the VMware ESX host that currently hosts the virtual machine in question.
Note: this occurs only if the original request is sent to another server, such as the vCenter that manages the ESX host.
If the snapshot includes a memory option, the ESX host writes virtual machine memory to disk.
Note: the virtual machine will be stopped during the entire write to memory. The length of the stop time cannot be calculated in advance, which depends on the performance of the disk in question and the amount of memory written. ESXi/ESXi version 4.x and later have a shorter stop time when writing to memory. For more information, see Taking a snapshot with virtual machine memory stuns the virtual machine while the memory is written to disk (1013163).
If the snapshot includes the quiesce option, the ESX host requests the client operating system to quiesce the disk through VMware Tools.
Note: depending on the client operating system, silent operations can be done through a synchronous driver, a vmsync module, or the Microsoft Volume Shadow copy Service (VSS). For more information about silence, see Troubleshooting Volume Shadow Copy (VSS) quiesce related issues (1007696) for information about VSS, or A virtual machine can freeze under load when you take quiesced snapshots or use custom quiescing scripts (5962168) for information about SYNC drivers.
The ESX host makes appropriate changes to the virtual machine snapshot database (. Vmsd file), which are reflected in the snapshot manager of the virtual machine.
Note: when you remove a snapshot, the snapshot entity in the snapshot manager is removed before changes are made to the subdisk. When you continue to run the virtual machine from the subdisk, the snapshot manager does not contain any snapshot entries. For more information, see Committing snapshots when there are no snapshot entries in the snapshot manager (1002310).
The ESX host calls functions similar to the virtual disk API function to make changes to the subdisks (- delta.vmdk and .vmdk files) and the disk chain.
Note: during snapshot removal, if the subdisk is large, the operation may take a long time. This may result in a timeout error message in VirtualCenter or VMware Infrastructure Client. For more information about timeout error messages, see vCenter operation times out with the error:Operation failed since another task is in progress (1004790).
Subdisk
Subdisks created with snapshots are sparse. Sparse disks use a copy-on-write (COW) mechanism, in which the virtual disk does not contain any data until the data is copied to the disk by a write operation. This optimization saves storage space. Granularity is the unit of measurement in which sparse disks use the replication mechanism on write. Each granularity is a sector block that contains virtual disk data. The default size is 128 sectors or 64 KB.
Note: sparse disks are usually created as VMFSSPARSE types. As of vSphere 5.5, for any vmdk of size 2TB or greater, the type of sparse disk is SESPARSE.
Subdisk and disk usage
It is important to note the following points about subdisk space utilization:
If the virtual machine is running a snapshot, it is making changes to the subdisk or sparse disk. The more writes are performed to the disk, the larger the disk becomes until it reaches the upper limit (the sum of the underlying disk size and a small amount of overhead).
Among the space requirements of a child disk, there are additional requirements in addition to the space requirements of the parent disk on which it depends. If the virtual machine has a 10 GB disk with a subdisk, the space used is 10 GB + the size of the subdisk + .vmsn file size + overhead.
Subdisks can grow so large that they fill the entire data store, but this is because the LUN that contains the data store is not large enough to accommodate the underlying disk, the number of snapshots created, the associated overhead, and the .vmsn files created.
The growth rate of the subdisk is directly determined by the amount of Iscrap O performed on the disk.
The size of the subdisk directly affects the time it takes to delete the snapshot associated with the subdisk.
Disk chain
Typically, the first child disk is created from the parent disk when the snapshot is first created. A continuous snapshot generates a new subdisk from the last subdisk in the chain. If there are multiple branches in the snapshot chain, the relationship may change.
The answer to the question on how to interpret the virtual machine snapshot is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.