What does virtual machine snapshot mean?
A virtual machine snapshot is a read-only image of a specific file system within a specific period of time, which means that when the user needs to repeatedly return to a certain system state, When you don’t want to create multiple virtual machines, you can use the virtual machine snapshot function.
Virtual machine principle
The essence of taking a snapshot of a virtual machine is to record the disk data of the virtual machine at a certain point in time. Take KVM as an example. The virtual machine disk in KVM uses the image file in qCow2 format. How many disks a virtual machine has will have several qCow2 files. Therefore, recording the disk data of the virtual machine at a certain point in time is to record the qCow2 file. Snapshot the image file. The data generated by the virtual machine snapshot is stored in the same qCow2 image file as the virtual machine disk data, so the storage location is the storage location of the virtual machine itself. That is, if the storage location of the virtual machine cannot be accessed, its snapshot cannot be restored. qCow2 snapshot uses the "Copy On Write" technology. The implementation principle is relatively simple. When taking a snapshot, a copy of the index of the original disk is copied. The actual data pointed to is the data of the original disk. Only when the original mirror is When the data changes, a copy of the data before the change in the changed area is copied to the corresponding location of the snapshot. Therefore, the data is relatively small when taking a snapshot, and will become larger and larger later.
Recommended tutorial: "PHP"
The above is the detailed content of What does virtual machine snapshot mean?. For more information, please follow other related articles on the PHP Chinese website!