Method and apparatus for loading virtual machine snapshot data

By configuring a distributed snapshot cache within the EBS cluster to cache and distribute snapshot data, the slow loading speed caused by traffic amplification during lazy loading is resolved, achieving more efficient data loading.

CN118796356BActive Publication Date: 2025-11-07BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410869965.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2025-11-07
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

During lazy loading, the amount of traffic that the virtual machine uses to read snapshot data increases significantly, resulting in slower loading speeds.

Method used

By configuring multiple snapshot cache nodes within the EBS cluster to form a distributed snapshot cache, snapshot data is cached and distributed. The processing power of multiple snapshot cache nodes is utilized to reduce the access frequency and traffic bottleneck of the mirror center.

Benefits of technology

It improved the loading speed of virtual machine snapshot data, avoided traffic bottlenecks, and improved data loading efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796356B_ABST
    Figure CN118796356B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure provides a kind of virtual machine snapshot data loading method and equipment, the method comprises: in response to receiving the start instruction of multiple virtual machines, select the target mirror file corresponding to multiple virtual machines from the multiple mirror files stored in mirror center, and by the first strip size of pre-set, multiple snapshot data in target mirror file is cached in the form of strip data in multiple snapshot cache nodes in elastic block storage (EBS) cluster;Wherein, EBS cluster is configured with the snapshot distributed cache formed by multiple snapshot cache nodes to be responsible for caching and distributing snapshot data;Create the data loading cloud disk corresponding to each virtual machine, for each virtual machine, the snapshot data required for starting virtual machine is loaded from the snapshot storage space of multiple snapshot cache nodes by the data loading cloud disk corresponding to virtual machine.The method can improve the loading speed of snapshot data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of cloud computing, and particularly relate to a method and device for loading snapshot data of a virtual machine. BACKGROUND

[0002] Virtualization technology is a basic technology in the cloud computing industry. There are a large number of elastic demands in current cloud computing services. For example, an ECS (Elastic Computing Service) cluster can quickly start a large number of virtual machines according to user demands.

[0003] In the prior art, a lazy loading technology can be used to create a large number of virtual machines by batch cloning snapshot data. When a virtual machine needs to use a certain snapshot data during the startup process of the virtual machine, the virtual machine can be directly started without waiting for the snapshot data to be loaded to a cloud disk.

[0004] However, the inventors have found that the prior art at least has the following technical problem: Because each virtual machine needs to read a copy of snapshot data from an image center during the lazy loading process, the traffic of reading snapshot data is greatly amplified during the lazy loading process, resulting in a low loading speed of the snapshot data. SUMMARY

[0005] Embodiments of the present disclosure provide a method and device for loading snapshot data of a virtual machine, which can improve the loading speed of the snapshot data.

[0006] In a first aspect, embodiments of the present disclosure provide a method for loading snapshot data of a virtual machine, comprising:

[0007] In response to receiving a startup instruction of a plurality of virtual machines, selecting target image files corresponding to the plurality of virtual machines from a plurality of image files stored in an image center, and caching a plurality of snapshot data in the target image files in the form of strip data to a plurality of snapshot cache nodes in an EBS (Elastic Block Store) cluster according to a preset first strip size; wherein the EBS cluster is configured with a snapshot distributed cache formed by the plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data.

[0008] Creating a data loading cloud disk corresponding to each virtual machine, and loading, for each virtual machine, snapshot data required for starting the virtual machine from a snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine.

[0009] In a second aspect, embodiments of the present disclosure provide a device for loading snapshot data of a virtual machine, comprising:

[0010] The cache unit is configured to, in response to receiving a start instruction of a plurality of virtual machines, select target image files corresponding to the plurality of virtual machines from a plurality of image files stored in the image center, and cache a plurality of snapshot data in the target image files in the form of strip data to a plurality of snapshot cache nodes in an elastic block storage (EBS) cluster according to a preset first strip size; wherein the EBS cluster is configured with a plurality of snapshot cache nodes to form a snapshot distributed cache for caching and distributing snapshot data.

[0011] The loading unit is configured to create a data loading cloud disk corresponding to each virtual machine, and load snapshot data required for starting each virtual machine from a snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine.

[0012] In a third aspect, an electronic device is provided, which includes a processor and a memory.

[0013] The memory stores computer-executable instructions.

[0014] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the virtual machine snapshot data loading method as described in the first aspect and various possible designs of the first aspect.

[0015] In a fourth aspect, a computer-readable storage medium is provided, which stores computer-executable instructions. When a processor executes the computer-executable instructions, the virtual machine snapshot data loading method as described in the first aspect and various possible designs of the first aspect is implemented.

[0016] In a fifth aspect, a computer program product is provided, which includes a computer program. When a processor executes the computer program, the virtual machine snapshot data loading method as described in the first aspect and various possible designs of the first aspect is implemented.

[0017] The embodiment provides a virtual machine snapshot data loading method and device, the method comprises the following steps: in response to receiving a start instruction of a plurality of virtual machines, selecting target image files corresponding to the plurality of virtual machines from a plurality of image files stored in a mirror center, and buffering a plurality of snapshot data in the target image files in the form of strip data to a plurality of snapshot cache nodes in an elastic block storage (EBS) cluster according to a preset first strip size; wherein the EBS cluster is configured with a snapshot distributed cache formed by the plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data; a data loading cloud disk corresponding to each virtual machine is created, and for each virtual machine, the snapshot data required for starting the virtual machine is loaded from the snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine. In the technical solution, since the EBS cluster is configured with the snapshot distributed cache formed by the plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data, when starting the plurality of virtual machines, the snapshot data corresponding to the virtual machines can be cached through the plurality of snapshot cache nodes in the EBS cluster configuration, and the snapshot data can be distributed to the data loading cloud disk corresponding to the virtual machines through the plurality of snapshot cache nodes in the EBS cluster configuration, so that the processing capacity of the plurality of snapshot cache nodes of the elastic block storage (EBS) cluster can be fully utilized, and therefore the data loading speed is improved. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0019] Figure 1 The schematic diagram of the virtual machine snapshot data loading method provided by the prior art Figure One

[0020] Figure 2 The flow of the virtual machine snapshot data loading method provided by the embodiment of the present disclosure Figure One

[0021] Figure 3 The schematic diagram of the virtual machine snapshot data loading method provided by the embodiment of the present disclosure Figure One

[0022] Figure 4 The flow of the virtual machine snapshot data loading method provided by the embodiment of the present disclosure Figure Two

[0023] Figure 5 The schematic diagram of the virtual machine snapshot data loading method provided by the embodiment of the present disclosure Figure Two ​​​​​

[0024] Figure 6 A schematic diagram of the structure of a device for loading virtual machine snapshot data provided in this embodiment of the disclosure;

[0025] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0027] The following explains some terms used in the embodiments of this disclosure:

[0028] ECS (Elastic Computing Service) cluster: Elastic computing services provided by cloud vendors, which can include multiple virtual machines.

[0029] EBS (Elastic Block Storage) cluster: Elastic block storage service provided by a cloud provider, which may include multiple servers. In this embodiment of the disclosure, the EBS cluster may be an Elastic Block Storage EBS cluster, which includes multiple snapshot cache nodes, and each snapshot cache node is also a server.

[0030] Availability Zone (AZ): In cloud computing, an Availability Zone is a management unit for a user's independent power and network resources, which may include multiple ECS clusters and multiple EBS clusters.

[0031] Region: In cloud computing, a single region is a management unit that contains multiple availability zones.

[0032] Cloud disk: A virtual block device provided by the EBS cluster, including empty disks and snapshot clone cloud disks. In this embodiment, an empty disk can be a snapshot copy storage cloud disk used to store snapshot copies. A snapshot clone cloud disk can be a data loading cloud disk corresponding to a virtual machine.

[0033] Cloud disk segmentation (DeviceSegment): A cloud disk can be divided into multiple cloud disk segments of a fixed size. For example, a 128GB cloud disk can be divided into four 32GB cloud disk segments.

[0034] Snapshot: A value-added service of EBS cluster, which saves the snapshot data of cloud disk in the object storage of image center.

[0035] SnapshotCopy: The storage form of snapshot data after downloading to EBS cluster.

[0036] SnapshotSegment: SnapshotCopy can be divided into multiple SnapshotSegment according to fixed size. For example, SnapshotCopy is 32GB, which can be divided into 4 SnapshotSegment of 8GB.

[0037] Image: A single snapshot or a group of snapshots used to start a virtual machine, and the data is stored in the format of snapshot.

[0038] ImageCenter: A module responsible for managing the images of multiple virtual machines in ECS cluster.

[0039] BatchClone: Create cloud disks in batches through an image, and run virtual machine instances in batches based on the cloud disks.

[0040] Lazyload: In the process of creating cloud disks and starting virtual machines through images, there is no need to wait for image data to be loaded to cloud disks, but the necessary data can be read through cloud disks to start virtual machines directly.

[0041] There are a large number of elastic requirements in the current cloud computing service. For example, ECS (Elastic Computing Service) cluster can quickly start a large number of virtual machines according to the user's demand. In this way, users do not need to prepare a large number of virtual machine resources in advance, but only need to purchase computing resources when needed. Considering that the user's business may have a large number of unpredictable business peaks, the elastic capability of ECS cluster is required to be very high, which requires a large number of virtual machines to be created in a very short time.

[0042] In the prior art, when creating a large number of virtual machines through batch cloning, it is a big problem to quickly batch clone cloud disks through snapshots. In order to be able to quickly clone a large number of cloud disks and immediately start virtual machines, it is not possible to wait for all snapshot data to be downloaded from the image center to the cloud disk before starting the virtual machine, but lazy load technology needs to be used. When the virtual machine needs to use a certain block of data during the startup process, the virtual machine reads the snapshot data on demand through the lazy load technology. Figure One is a technical schematic diagram of cloud computing batch cloning multiple virtual machines through lazy load technology.

[0043] For example, Figure 1As shown, the data flow process in snapshot data distribution is as follows:

[0044] 1. A virtual machine (VM) in a compute cluster sends a request (lazy loading request in the figure) for reading snapshot data to a data loading cloud disk (Device) in a storage cluster.

[0045] 2. The data loading cloud disk (Device) in the storage cluster sends a request for reading snapshot data to an image center (ImageCenter).

[0046] 3. The snapshot copy storage cloud disk in the storage cluster downloads a snapshot copy from the image center (ImageCenter).

[0047] When cloud computing clones multiple virtual machines in batches through lazy loading technology, the inventors have found that the prior art at least has the following technical problems:

[0048] 1. Since each virtual machine needs to read a copy of snapshot data during the lazy loading process, the snapshot data reading traffic during the lazy loading process is greatly amplified.

[0049] 2. Snapshot data needs to be downloaded to an EBS cluster and stored in the format of a snapshot copy (SnapshotCopy), and each EBS cluster may need to download multiple copies of data, and the snapshot data traffic is also greatly amplified.

[0050] For example, if an image clones 1000 virtual machines (VMs), the snapshot data that needs to be read from the image center (ImageCenter) during the startup of the virtual machines (VMs) will be amplified by 1000 times, and multiple snapshot copies need to be downloaded from the image center (ImageCenter) to multiple EBS clusters. In this case, the traffic of the image center (ImageCenter) will become a bottleneck.

[0051] In view of the technical problems in the prior art, the technical concept of the inventors is as follows: form an independent lazy loading distributed cache layer in the EBS cluster, which is responsible for distributing and caching snapshot data. The snapshot data loaded by snapshot lazy loading and the snapshot data downloaded by snapshot copy are all read from this distributed cache layer. Through the independent lazy loading distributed cache, the data can be efficiently striped, so that the processing capacity of all nodes of the EBS cluster can be fully utilized, and the data loading speed can be improved.

[0052] Correspondingly, the specific steps can comprise: first, in response to receiving a start instruction of a plurality of virtual machines, selecting a target image file corresponding to the plurality of virtual machines from a plurality of image files stored in an image center, and caching a plurality of snapshot data in the target image file in the form of strip data to a plurality of snapshot cache nodes in an elastic block storage (EBS) cluster according to a preset first strip size; wherein the EBS cluster is configured with a snapshot distributed cache formed by a plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data. Then, a data loading cloud disk corresponding to each virtual machine is created, and for each virtual machine, the snapshot data required for starting the virtual machine is loaded from the snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine.

[0053] In the technical solution, the EBS cluster is configured with a snapshot distributed cache formed by a plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data, and when starting a plurality of virtual machines, the snapshot data corresponding to the virtual machines can be cached through the plurality of snapshot cache nodes in the EBS cluster configuration, and the snapshot data can be distributed to the data loading cloud disk corresponding to the virtual machine through the plurality of snapshot cache nodes in the EBS cluster configuration, so that the processing capacity of the plurality of snapshot cache nodes of the elastic block storage (EBS) cluster can be fully utilized, and thus the data loading speed is improved.

[0054] The following is a specific implementation process of the virtual machine snapshot data loading method and device related to the embodiments of the present disclosure, and some examples are only for illustration and are not limited. The execution subject of the virtual machine snapshot data loading method related to the embodiments of the present disclosure is an electronic device, which can be a terminal, a server, etc.

[0055] Figure 2 The virtual machine snapshot data loading method flow provided by the embodiments of the present disclosure Figure One As shown in Figure 2 The virtual machine snapshot data loading method can comprise:

[0056] 201、in response to receiving a start instruction of a plurality of virtual machines, selecting a target image file corresponding to the plurality of virtual machines from a plurality of image files stored in an image center, and caching a plurality of snapshot data in the target image file in the form of strip data to a plurality of snapshot cache nodes in an elastic block storage (EBS) cluster according to a preset first strip size; wherein the EBS cluster is configured with a snapshot distributed cache formed by a plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data.

[0057] In the embodiments of the present disclosure, the plurality of snapshot data in the target image file can be of a fixed size. For example, each snapshot data is 2MB.

[0058] The preset first stripe size can be set independently to represent the size of the stripe data stored in the snapshot cache node. For example, the first stripe size could be 32KB, and the snapshot data could be 2MB. The 2MB of snapshot data is distributed across 64 snapshot cache nodes in the form of stripe data. In this case, a 2MB snapshot data set consists of 32KB*64 stripe data groups. To read a 2MB snapshot data set, 32KB of snapshot data needs to be read from each snapshot cache node.

[0059] In this embodiment of the disclosure, the snapshot data is cached in the form of striped data in multiple snapshot cache nodes within the Elastic Block Storage (EBS) cluster. These multiple snapshot cache nodes only need to download the data from the image center once, which greatly reduces the frequency of cloud disk access to the image center.

[0060] It should be noted that the EBS cluster is configured with a distributed snapshot cache consisting of multiple snapshot cache nodes to be responsible for caching and distributing snapshot data. Snapshot storage space for caching snapshot data can be configured in each snapshot cache node within the Elastic Block Storage EBS cluster, so that multiple snapshot cache nodes form an independent distributed snapshot cache within the Elastic Block Storage EBS cluster.

[0061] In this embodiment, the multiple snapshot cache nodes can be all snapshot cache nodes in the Elastic Block Storage (EBS) cluster, or only a portion of them. It should be noted that, to ensure a single snapshot can utilize the processing power of the entire cluster's storage nodes, the number of snapshot cache nodes is generally close to or the same as the cluster size. For example, the number of snapshot cache nodes is 64, representing all snapshot cache nodes in the EBS cluster.

[0062] In some embodiments, such as Figure 3 As shown, a snapshot storage space shared by all snapshots is established within each snapshot cache node. Snapshot data can be retrieved from the cached snapshots at the image center through this storage space. The data loading cloud disk corresponding to each virtual machine can read snapshot data from the snapshot cache node instead of from the image center, thus reducing the frequency of cloud disk access to the image center.

[0063] It should be noted that, in this embodiment of the disclosure, the number of multiple snapshot cache nodes and the value of snapshot storage space within the Elastic Block Storage (EBS) cluster are not specifically limited, and can be set and modified as needed. For example, the number of multiple snapshot cache nodes is 64, with a 4GB snapshot storage space established within each snapshot cache node. The 64 snapshot cache nodes can cache a maximum of 256GB of snapshot data.

[0064] 202、create a data loading cloud disk corresponding to each virtual machine, for each virtual machine, load the snapshot data required to start the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine.

[0065] In the embodiments of the present disclosure, one virtual machine corresponds to one data loading cloud disk. For each virtual machine, the snapshot data required to start the virtual machine can be loaded from the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine, thereby completing the start of the plurality of virtual machines.

[0066] In this case, since the snapshot data is in the form of strip data and is cached in the plurality of snapshot cache nodes in the elastic block storage (EBS) cluster, when reading the snapshot data, the data can be loaded from the plurality of snapshot cache nodes, and by utilizing the data loading capability of the plurality of snapshot cache nodes, the problem of local overheat of access traffic is solved.

[0067] For example, 1000 virtual machines are started in batches, and 1000 data loading cloud disks are created. The snapshot data is in the form of strip data and is distributed in 64 snapshot cache nodes. Among them, the download speed of each snapshot cache node is 1 GB / s. The read and write speed of each data loading cloud disk is 30 MB / s.

[0068] If 1000 data loading cloud disks simultaneously access data in a 2MB logical address range, the read and write speed required by 1000 data loading cloud disks at this time is: 30MB / s*1000=30GB / s. The total loading speed that 64 snapshot cache nodes can provide is: 1GB / s*64=64GB / s. As can be seen, in the extreme scenario of concentratedly taking 2MB logical address snapshot data, by utilizing the data loading capability of 64 snapshot cache nodes, the traffic will not appear bottleneck, thereby solving the problem of local overheat of access traffic.

[0069] The embodiment of the present disclosure provides a virtual machine snapshot data loading method: in response to receiving a start instruction of a plurality of virtual machines, selecting target image files corresponding to the plurality of virtual machines from a plurality of image files stored in a mirror center, and buffering a plurality of snapshot data in the target image files in the form of strip data to a plurality of snapshot cache nodes in an elastic block storage (EBS) cluster according to a preset first strip size; wherein the EBS cluster is configured with a snapshot distributed cache formed by the plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data; a data loading cloud disk corresponding to each virtual machine is created, and for each virtual machine, the snapshot data required for starting the virtual machine is loaded from the snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine. In the technical solution, since the EBS cluster is configured with the snapshot distributed cache formed by the plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data, when starting the plurality of virtual machines, the snapshot data corresponding to the virtual machine can be cached through the plurality of snapshot cache nodes in the EBS cluster configuration, and the snapshot data can be distributed to the data loading cloud disk corresponding to the virtual machine through the plurality of snapshot cache nodes in the EBS cluster configuration, so that the processing capacity of the plurality of snapshot cache nodes of the elastic block storage (EBS) cluster can be fully utilized, and therefore the data loading speed is improved.

[0070] Figure 4 A virtual machine snapshot data loading method flow provided by the embodiment of the present disclosure Figure Two In the embodiment of the present disclosure, taking a data loading request as a lazy loading data reading request as an example, the method of loading the snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine in S203 is described in detail. As shown in Figure 4 The method can include the following steps:

[0071] S401, sending a lazy loading data reading request to the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine, and the lazy loading data reading request carries logical address information of the snapshot data required for starting the virtual machine.

[0072] In the embodiment of the present disclosure, the lazy loading data reading request can also carry size information of the snapshot data required for reading. For example, the lazy loading data reading request carries the logical address information of the snapshot data as offsetXXX, and the size information as 2MB.

[0073] S402, loading the snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes according to the logical address information through the data loading cloud disk corresponding to the virtual machine.

[0074] In the embodiments of the present disclosure, the snapshot storage space of the snapshot cache node stores a plurality of data and corresponding logical address information of each data. The data loaded cloud disk corresponding to the virtual machine can determine the snapshot data to be read according to the logical address information.

[0075] S403, according to the preset second strip size, the snapshot data required by the virtual machine is stored in the form of strip data in the plurality of data loaded cloud disk fragments of the data loaded cloud disk.

[0076] In the embodiments of the present disclosure, the data loaded cloud disk can be 128 GB, and the data loaded cloud disk includes four data loaded cloud disk fragments, each of which is 32 GB.

[0077] It should be noted that the second strip size is used to represent the size of the strip data stored in the data loaded cloud disk fragment. For example, the second strip size is 64 KB, and the number of the plurality of data loaded cloud disk fragments is 4. At this time, the snapshot data can be evenly distributed in the four data loaded cloud disk fragments, and the form of the strip data corresponding to the snapshot data is 64 KB*4.

[0078] Among them, since the size of the strip data stored in the data loaded cloud disk fragment is completely decoupled from the size of the strip data stored in the snapshot cache node, the flexibility of data storage is improved.

[0079] In the embodiments of the present disclosure, the lazy load IO of the cloud disk and the download of the snapshot copy can share the snapshot data distribution traffic provided by the plurality of snapshot cache nodes. Accordingly, the method further comprises: during the process of starting the plurality of virtual machines, creating at least one snapshot copy storage cloud disk corresponding to the plurality of virtual machines; for each snapshot copy storage cloud disk, loading a target image file corresponding to the plurality of virtual machines from the snapshot storage space of the plurality of snapshot cache nodes; according to the preset second strip size, storing a plurality of snapshot data in the target image file in the form of strip data in the plurality of snapshot copy cloud disk fragments of the snapshot copy storage cloud disk.

[0080] Among them, the size of the strip data stored in the snapshot copy cloud disk fragment is the same as the size of the strip data stored in the data loaded cloud disk fragment, so that the data loaded cloud disk can read the snapshot data from the snapshot copy stored in the snapshot copy storage cloud disk.

[0081] In some embodiments, as Figure 3As shown, the method further comprises: configuring the number of the plurality of snapshot copy cloud disk shards in the snapshot copy storage cloud disk to be consistent with the number of the plurality of data loading cloud disk shards in the data loading cloud disk; and establishing a data link between the snapshot copy storage cloud disk and the plurality of data loading cloud disks, wherein the data link is used for the data loading cloud disk to read snapshot data corresponding to a read-write request from the snapshot copy stored in the snapshot copy storage cloud disk when the read-write request is sent by a virtual machine.

[0082] It should be noted that one snapshot copy storage cloud disk can receive read-write requests of a plurality of data loading cloud disks. The number of the snapshot copy storage cloud disks is proportional to the number of the plurality of data loading cloud disks.

[0083] For example, the number of the data loading cloud disks is 1000; one snapshot copy storage cloud disk can receive read-write requests of 200 data loading cloud disks, and therefore 5 snapshot copy storage cloud disks need to be created.

[0084] The data loading speed of the snapshot copy storage cloud disk is 1 GB / s, and if 1000 data loading cloud disks and 5 snapshot copy storage cloud disks simultaneously access data in a 2MB logical address range, the read-write speed required by the 1000 data loading cloud disks is 30MB / s*1000=30GB / s. The read-write speed required by the 5 snapshot copy storage cloud disks is 1GB / s*5=5GB / s. The total loading speed provided by the 64 snapshot cache nodes is 1GB / s*64=64GB / s.

[0085] Therefore, by using the data loading capability of the 64 snapshot cache nodes, the lazy load IO of the cloud disk and the download of the snapshot copy can share the snapshot data distribution traffic provided by the plurality of snapshot cache nodes, and no traffic bottleneck occurs.

[0086] It should be noted that, in the embodiment of the present disclosure, the snapshot copy storage cloud disk is used to store snapshot copies, so that the snapshot cache node is only responsible for providing snapshot shard download and is not responsible for snapshot shard storage. In this case, if the snapshot cache node fails, the snapshot copy storage needs to be scheduled, thereby greatly reducing the delay glitch of the data read-write request sent by the data loading cloud disk to the snapshot cache node during the snapshot cache node downtime.

[0087] In some embodiments, the data loading cloud disk corresponding to the virtual machine loads snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes, including: if the data loading cloud disk corresponding to the virtual machine fails to send a data loading request to the first snapshot cache node within a time limit, sending a data loading request to the second snapshot cache node, and loading the snapshot data required for starting the virtual machine from the snapshot storage space of the second snapshot cache node.

[0088] The first snapshot cache node is a snapshot cache node that fails in the plurality of snapshot cache nodes, and the second snapshot cache node is a snapshot cache node other than the first snapshot cache node.

[0089] For example, as shown in FIG. 1, (1) the virtual machine of the computing cluster sends a data loading request to the data loading cloud disk shard 1 of the storage cluster. (2) The data loading cloud disk shard sends a data loading request to the snapshot cache node 1 (responsible for snapshot data 1) and the data loading request times out. (3) In this case, the data loading cloud disk shard can send a data loading request to the snapshot cache node 2, so that the snapshot cache node 2 temporarily takes over the service of the snapshot data 1 of the snapshot cache node 1, and the data loading request of the data loading cloud disk is resumed. Figure 5

[0090] In the embodiments of the present disclosure, when the snapshot cache node is down, any snapshot cache node in the plurality of snapshot cache nodes can be selected to provide services, without waiting for the management node to reassign a new snapshot cache node, so that the data loading request sent by the cloud disk can be processed in time, and the data loading request spike (i.e., loading delay) caused by the snapshot cache node being down is greatly reduced.

[0091] In some embodiments, the management node can also select a snapshot cache node with the smallest load pressure from the plurality of snapshot cache nodes, and the snapshot cache node with the smallest load pressure can replace the first snapshot cache node that fails. Optionally, the snapshot data required by the virtual machine includes a plurality of snapshot shards, and the node address of a snapshot cache node corresponds to a snapshot shard. The method further includes: sending, by the data loading cloud disk corresponding to the virtual machine, notification information that the first snapshot cache node fails to the management node of the plurality of snapshot cache nodes; selecting, by the management node, a target snapshot cache node with the smallest load pressure from the plurality of snapshot cache nodes, and assigning the first snapshot shard corresponding to the first snapshot cache node to the target snapshot cache node; and sending, by the data loading cloud disk corresponding to the virtual machine, a data loading request to the target snapshot cache node, and loading the first snapshot shard required for starting the virtual machine from the snapshot storage space of the target snapshot cache node.

[0092] ​In some embodiments, the allocation of the first snapshot shard corresponding to the first snapshot cache node to the target snapshot cache node comprises: obtaining, by the management node, a target node address corresponding to the target snapshot cache node, and associating and storing the target node address with the first snapshot shard; correspondingly, the data loading request sent by the data loading cloud disk corresponding to the virtual machine to the target snapshot cache node comprises: the data loading cloud disk corresponding to the virtual machine obtains the target node address corresponding to the first snapshot shard from the management node, and sends the data loading request to the target snapshot cache node through the target node address.

[0093] As shown in Figure 5 (4) The data loading cloud disk shard 1 reports to the management node (SM) an event that the first snapshot cache node is down. (5) The management node (SM) reassigns the snapshot cache node 3 to be responsible for the service of the snapshot data 1. (6) The data loading cloud disk shard 1 queries the new node address (the node address of the snapshot cache node 3) of the snapshot data 1 (Strip 1) from the management node (SM). (7) The data loading cloud disk shard 1 sends a data loading request to the snapshot cache node 3, so that the snapshot cache node 3 takes the place of the snapshot cache node 1 to be responsible for the service of the snapshot data 1, and the snapshot data distribution is restored to balance.

[0094] Figure 6 The structure diagram of the virtual machine snapshot data loading device provided by the embodiments of the present disclosure is shown in Figure 6 The virtual machine snapshot data loading device comprises:

[0095] The cache unit 601 is configured to, in response to receiving a start instruction of a plurality of virtual machines, select target image files corresponding to the plurality of virtual machines from a plurality of image files stored in an image center, and cache a plurality of snapshot data in the target image files in the form of strip data to a plurality of snapshot cache nodes in an elastic block storage (EBS) cluster according to a preset first strip size; wherein the EBS cluster is configured with a snapshot distributed cache formed by a plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data.

[0096] The loading unit 602 is configured to create a data loading cloud disk corresponding to each virtual machine, and load, for each virtual machine, snapshot data required for starting the virtual machine from a snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine.

[0097] According to one or more embodiments of the present disclosure, the loading unit 602 loads snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine, specifically comprising: sending a lazy loading data reading request to the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine, wherein the lazy loading data reading request carries logical address information of snapshot data required for starting the virtual machine; loading the snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes according to the logical address information through the data loading cloud disk corresponding to the virtual machine; and storing the snapshot data required for starting the virtual machine in the form of strip data into a plurality of data loading cloud disk fragments of the data loading cloud disk according to a preset second strip size.

[0098] According to one or more embodiments of the present disclosure, the loading unit 602 is further configured to, in the process of starting the plurality of virtual machines, create at least one snapshot copy storage cloud disk corresponding to the plurality of virtual machines; for each snapshot copy storage cloud disk, load a target image file corresponding to the plurality of virtual machines from the snapshot storage space of the plurality of snapshot cache nodes; and store a plurality of snapshot data in the target image file in the form of strip data into a plurality of snapshot copy cloud disk fragments of the snapshot copy storage cloud disk according to a preset second strip size.

[0099] According to one or more embodiments of the present disclosure, the device further comprises a configuration unit configured to configure the number of a plurality of snapshot copy cloud disk fragments in the snapshot copy storage cloud disk to be consistent with the number of a plurality of data loading cloud disk fragments in the data loading cloud disk, and establish a data link between the snapshot copy storage cloud disk and the plurality of data loading cloud disks, wherein the data link is used for the data loading cloud disk to read snapshot data corresponding to a read-write request from the snapshot copy stored in the snapshot copy storage cloud disk when the read-write request is received from the virtual machine.

[0100] According to one or more embodiments of the present disclosure, the loading unit 602 loads snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine, specifically comprising: if a data loading request sent by the data loading cloud disk corresponding to the virtual machine to a first snapshot cache node times out, sending a data loading request to a second snapshot cache node through the data loading cloud disk corresponding to the virtual machine to load the snapshot data required for starting the virtual machine from the snapshot storage space of the second snapshot cache node; wherein the first snapshot cache node is a snapshot cache node that fails in the plurality of snapshot cache nodes, and the second snapshot cache node is a snapshot cache node other than the first snapshot cache node.

[0101] According to one or more embodiments of the present disclosure, the snapshot data required by the virtual machine includes a plurality of snapshot fragments, and a node address of one snapshot cache node corresponds to one snapshot fragment; the device further includes a scheduling unit, configured to: send, by the data loading cloud disk corresponding to the virtual machine, notification information about the failure of the first snapshot cache node to a management node of the plurality of snapshot cache nodes; select, by the management node, a target snapshot cache node with the smallest load pressure from the plurality of snapshot cache nodes, and allocate the first snapshot fragment corresponding to the first snapshot cache node to the target snapshot cache node; and send, by the data loading cloud disk corresponding to the virtual machine, a data loading request to the target snapshot cache node, and load the first snapshot fragment required for starting the virtual machine from a snapshot storage space of the target snapshot cache node.

[0102] According to one or more embodiments of the present disclosure, the scheduling unit allocates the first snapshot fragment corresponding to the first snapshot cache node to the target snapshot cache node, and specifically includes: acquiring, by the management node, a target node address corresponding to the target snapshot cache node, and associating and storing the target node address with the first snapshot fragment; and correspondingly, the data loading request sent by the data loading cloud disk corresponding to the virtual machine to the target snapshot cache node includes: acquiring, by the data loading cloud disk corresponding to the virtual machine, the target node address corresponding to the first snapshot fragment from the management node, and sending the data loading request to the target snapshot cache node through the target node address.

[0103] Reference Figure 7 FIG. 7 shows a structural diagram of an electronic device 700 suitable for implementing embodiments of the present disclosure, which can be a terminal device or a server. The terminal device can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a Personal Digital Assistant (PDA), a Portable Android Device (PAD), a Portable Multimedia Player (PMP), a vehicle-mounted terminal (e.g., a vehicle-mounted navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functions and use range of embodiments of the present disclosure.

[0104] As Figure 7As shown, the electronic device 700 can include a processing device (e.g., a central processor, a graphics processor, etc.) 701 that can perform various suitable actions and processes according to programs stored in a Read Only Memory (ROM) 702 or loaded into a Random Access Memory (RAM) 703 from a storage device 708. Various programs and data required by the electronic device 700 for operation are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An Input / Output (I / O) interface 705 is also connected to the bus 704.

[0105] Generally, the following devices can be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication devices 709 can allow the electronic device 700 to communicate wirelessly or wired with other devices to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that not all of the shown devices are required to be implemented or present. More or fewer devices can alternatively be implemented or present.

[0106] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 709, or installed from the storage devices 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the methods of embodiments of the present disclosure are performed.

[0107] It should be noted that the computer-readable medium described above can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer-readable program code is contained. Such a propagated data signal can take any of a variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that is not a storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wire, cable, RF, etc., or any suitable combination of the foregoing.

[0108] The computer-readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and be connected to the electronic device through a communication network.

[0109] The computer-readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.

[0110] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0111] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It is also noted that each block in the block diagrams and / or flow diagrams and combinations of blocks in the block diagrams and / or flow diagrams can be implemented by special-purpose hardware-based systems that perform the specified functions or operations, or combinations of hardware and computer instructions.

[0112] The units described in the embodiments of the present disclosure can be implemented by software, or by hardware. In some cases, the name of the unit does not constitute a limitation on the unit itself. For example, the first obtaining unit can also be described as a unit for obtaining at least two Internet protocol addresses.

[0113] The functions described above in the specification of the present disclosure can be performed by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.

[0114] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0115] In a first aspect, according to one or more embodiments of the present disclosure, a method for loading virtual machine snapshot data is provided, comprising:

[0116] In response to receiving a start instruction of a plurality of virtual machines, target image files corresponding to the plurality of virtual machines are selected from a plurality of image files stored in an image center, and a plurality of snapshot data in the target image files are cached in a plurality of snapshot cache nodes in an elastic block storage (EBS) cluster in the form of strip data according to a preset first strip size. The EBS cluster is configured with a snapshot distributed cache formed by a plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data.

[0117] A data loading cloud disk corresponding to each virtual machine is created, and for each virtual machine, snapshot data required for starting the virtual machine is loaded from the snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine.

[0118] According to one or more embodiments of the present disclosure, the loading of the snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine comprises: sending a lazy loading data reading request to the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine, the lazy loading data reading request carrying logical address information of the snapshot data required for starting the virtual machine; loading the snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes according to the logical address information through the data loading cloud disk corresponding to the virtual machine; and storing the snapshot data required for starting the virtual machine in the form of strip data in a plurality of data loading cloud disk fragments of the data loading cloud disk according to a preset second strip size.

[0119] According to one or more embodiments of the present disclosure, the method further comprises: creating at least one snapshot copy storage cloud disk corresponding to the plurality of virtual machines during starting the plurality of virtual machines; loading, for each snapshot copy storage cloud disk, a target image file corresponding to the plurality of virtual machines from a snapshot storage space of the plurality of snapshot cache nodes; and storing, in a form of strip data, a plurality of snapshot data in the target image file into a plurality of snapshot copy cloud disk shards of the snapshot copy storage cloud disk according to a preset second strip size.

[0120] According to one or more embodiments of the present disclosure, the method further comprises: configuring a number of the plurality of snapshot copy cloud disk shards in the snapshot copy storage cloud disk to be consistent with a number of the plurality of data loading cloud disk shards in the data loading cloud disk; and establishing a data link between the snapshot copy storage cloud disk and the plurality of data loading cloud disks, wherein the data link is used for the data loading cloud disk to read snapshot data corresponding to a read-write request from a snapshot copy stored in the snapshot copy storage cloud disk when the data loading cloud disk receives the read-write request sent by the virtual machine.

[0121] According to one or more embodiments of the present disclosure, the loading, by the data loading cloud disk corresponding to the virtual machine, of the snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes comprises: if a data loading request sent by the data loading cloud disk corresponding to the virtual machine to a first snapshot cache node times out, sending, by the data loading cloud disk corresponding to the virtual machine, a data loading request to a second snapshot cache node to load the snapshot data required for starting the virtual machine from a snapshot storage space of the second snapshot cache node; wherein the first snapshot cache node is a snapshot cache node that fails in the plurality of snapshot cache nodes, and the second snapshot cache node is a snapshot cache node other than the first snapshot cache node.

[0122] According to one or more embodiments of the present disclosure, the snapshot data required for the virtual machine comprises a plurality of snapshot shards, and a node address of a snapshot cache node corresponds to a snapshot shard; the method further comprises: sending, by the data loading cloud disk corresponding to the virtual machine, notification information that the first snapshot cache node fails to a management node of the plurality of snapshot cache nodes; selecting, by the management node, a target snapshot cache node with the smallest load pressure from the plurality of snapshot cache nodes, and allocating a first snapshot shard corresponding to the first snapshot cache node to the target snapshot cache node; and sending, by the data loading cloud disk corresponding to the virtual machine, a data loading request to the target snapshot cache node to load the first snapshot shard required for starting the virtual machine from a snapshot storage space of the target snapshot cache node.

[0123] According to one or more embodiments of the present disclosure, the assigning the first snapshot shard corresponding to the first snapshot cache node to the target snapshot cache node comprises: obtaining, by the management node, a target node address corresponding to the target snapshot cache node, and associating and storing the target node address with the first snapshot shard; correspondingly, the data loading request sent by the data loading cloud disk corresponding to the virtual machine to the target snapshot cache node comprises: the data loading cloud disk corresponding to the virtual machine obtains the target node address corresponding to the first snapshot shard from the management node, and sends the data loading request to the target snapshot cache node through the target node address.

[0124] In a second aspect, according to one or more embodiments of the present disclosure, a virtual machine snapshot data loading device is provided, comprising:

[0125] The cache unit is configured to, in response to receiving a start instruction of a plurality of virtual machines, select target image files corresponding to the plurality of virtual machines from a plurality of image files stored in an image center, and cache a plurality of snapshot data in the target image files in the form of strip data to a plurality of snapshot cache nodes in an elastic block storage (EBS) cluster according to a preset first strip size; wherein the EBS cluster is configured with a snapshot distributed cache formed by the plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data.

[0126] The loading unit is configured to create a data loading cloud disk corresponding to each virtual machine, and load, for each virtual machine, snapshot data required for starting the virtual machine from a snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine.

[0127] According to one or more embodiments of the present disclosure, the loading unit loads, through the data loading cloud disk corresponding to the virtual machine, snapshot data required for starting the virtual machine from a snapshot storage space of the plurality of snapshot cache nodes, specifically comprising: sending, by the data loading cloud disk corresponding to the virtual machine, a lazy loading data reading request to the plurality of snapshot cache nodes, the lazy loading data reading request carrying logical address information of snapshot data required for starting the virtual machine; loading, by the data loading cloud disk corresponding to the virtual machine, the snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes according to the logical address information; and storing, according to a preset second strip size, the snapshot data required for starting the virtual machine in the form of strip data to a plurality of data loading cloud disk shards of the data loading cloud disk.

[0128] According to one or more embodiments of the present disclosure, the loading unit is further configured to, in the process of starting the plurality of virtual machines, create at least one snapshot copy storage cloud disk corresponding to the plurality of virtual machines; for each snapshot copy storage cloud disk, load a target image file corresponding to the plurality of virtual machines from a snapshot storage space of the plurality of snapshot cache nodes; and store a plurality of snapshot data in the target image file in the form of strip data into a plurality of snapshot copy cloud disk shards of the snapshot copy storage cloud disk according to a preset second strip size.

[0129] According to one or more embodiments of the present disclosure, the device further comprises a configuration unit configured to configure a number of the plurality of snapshot copy cloud disk shards in the snapshot copy storage cloud disk to be consistent with a number of the plurality of data loading cloud disk shards in the data loading cloud disk, and establish a data link between the snapshot copy storage cloud disk and the plurality of data loading cloud disks, wherein the data link is configured to enable the data loading cloud disk to read snapshot data corresponding to a read-write request from the snapshot copy stored in the snapshot copy storage cloud disk when the read-write request is received from the virtual machine.

[0130] According to one or more embodiments of the present disclosure, the loading unit loads the snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine, and specifically comprises: if a data loading request sent by the data loading cloud disk corresponding to the virtual machine to a first snapshot cache node times out, sending a data loading request to a second snapshot cache node through the data loading cloud disk corresponding to the virtual machine to load the snapshot data required for starting the virtual machine from a snapshot storage space of the second snapshot cache node; wherein the first snapshot cache node is a snapshot cache node that fails in the plurality of snapshot cache nodes, and the second snapshot cache node is another snapshot cache node except the first snapshot cache node.

[0131] According to one or more embodiments of the present disclosure, the snapshot data required for starting the virtual machine comprises a plurality of snapshot shards, and a node address of one snapshot cache node corresponds to one snapshot shard; the device further comprises a scheduling unit configured to send notification information about the failure of the first snapshot cache node to a management node of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine, select a target snapshot cache node with the smallest load pressure from the plurality of snapshot cache nodes through the management node, and allocate a first snapshot shard corresponding to the first snapshot cache node to the target snapshot cache node; and the data loading request sent by the data loading cloud disk corresponding to the virtual machine to the target snapshot cache node loads the first snapshot shard required for starting the virtual machine from a snapshot storage space of the target snapshot cache node.

[0132] According to one or more embodiments of the present disclosure, the scheduling unit assigns the first snapshot shard corresponding to the first snapshot cache node to the target snapshot cache node, specifically comprising: obtaining, by the management node, a target node address corresponding to the target snapshot cache node, and associating and storing the target node address with the first snapshot shard; accordingly, the data loading cloud disk corresponding to the virtual machine sends a data loading request to the target snapshot cache node, comprising: the data loading cloud disk corresponding to the virtual machine obtains the target node address corresponding to the first snapshot shard from the management node, and sends a data loading request to the target snapshot cache node through the target node address.

[0133] In a third aspect, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;

[0134] The memory stores computer-executable instructions;

[0135] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the virtual machine snapshot data loading method as described in the above first aspect and various possible designs of the first aspect.

[0136] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, and the computer-readable storage medium stores computer-executable instructions, when a processor executes the computer-executable instructions, the virtual machine snapshot data loading method as described in the above first aspect and various possible designs of the first aspect is implemented.

[0137] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, comprising a computer program, when a processor executes the computer program, the virtual machine snapshot data loading method as described in the above first aspect and various possible designs of the first aspect is implemented.

[0138] The above description is only the preferred embodiments of the present disclosure and the explanation of the applied technical principles. Those skilled in the art should understand that the disclosure range involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features disclosed in the present disclosure (but not limited to) having similar functions to form technical solutions.

[0139] Moreover, while operations are depicted in a particular order, this should not be understood as requiring such an order nor infringing on the scope of the disclosure. Certain of the operations described in the specification can be combined with one another and / or separated into different embodiments of the application. In addition, certain terminology can also be used throughout the specification and claims which shall not be interpreted in an overly restrictive manner. For example, terms such as "about" and "substantially" used in the description or claims should not be interpreted as meaning a strictly limited deviation. Rather, such terms are used to allow for some variation from the norm while still providing a reasonable understanding of the subject matter at hand. As used herein, the indefinite articles "a" and "an" are intended to mean zero or one or more of something. The words "comprising," "including," and "having" are intended to be open- ended and to mean including but not limited to. It is to be understood that any such open ended terms are to be interpreted in the context of this application.

[0140] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims

1. A method for loading virtual machine snapshot data, characterized by, The method comprises: in response to receiving a start instruction of a plurality of virtual machines, selecting a target image file corresponding to the plurality of virtual machines from a plurality of image files stored in an image center, and caching a plurality of snapshot data in the target image file in the form of strip data to a plurality of snapshot cache nodes in an elastic block storage (EBS) cluster according to a preset first strip size; wherein the EBS cluster is configured with a snapshot distributed cache formed by a plurality of snapshot cache nodes to be responsible for caching and distributing snapshot data; creating a data loading cloud disk corresponding to each virtual machine, and loading snapshot data required for starting each virtual machine from a snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine; wherein when a first snapshot cache node in the plurality of snapshot cache nodes is down, a target snapshot cache node with the smallest load pressure is selected by a management node to replace the first snapshot cache node for service.

2. The method of claim 1, wherein, The method further comprises: sending a lazy loading data reading request to the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine, wherein the lazy loading data reading request carries logical address information of snapshot data required for starting the virtual machine; loading the snapshot data required for starting the virtual machine from the snapshot storage space of the plurality of snapshot cache nodes according to the logical address information through the data loading cloud disk corresponding to the virtual machine; storing the snapshot data required for starting the virtual machine in the form of strip data to a plurality of data loading cloud disk fragments of the data loading cloud disk according to a preset second strip size.

3. The method of claim 2, wherein, The method further comprises: creating at least one snapshot copy storage cloud disk corresponding to the plurality of virtual machines during the process of starting the plurality of virtual machines; loading a target image file corresponding to the plurality of virtual machines from the snapshot storage space of the plurality of snapshot cache nodes for each snapshot copy storage cloud disk; storing a plurality of snapshot data in the target image file in the form of strip data to a plurality of snapshot copy cloud disk fragments of the snapshot copy storage cloud disk according to a preset second strip size.

4. The method of claim 3, wherein, The method further comprises: configuring the number of snapshot copy cloud disk fragments in the snapshot copy storage cloud disk to be consistent with the number of data loading cloud disk fragments in the data loading cloud disk; and establishing a data link between the snapshot copy storage cloud disk and the plurality of data loading cloud disks, wherein the data link is used to read snapshot data corresponding to a read-write request from a snapshot copy stored in the snapshot copy storage cloud disk by the data loading cloud disk when the data loading cloud disk receives the read-write request sent by the virtual machine.

5. The method of claim 1, wherein, The snapshot data required by the virtual machine comprises a plurality of snapshot fragments, and a node address of a snapshot cache node corresponds to a snapshot fragment; and when a first snapshot cache node in the plurality of snapshot cache nodes is down, a target snapshot cache node with the smallest load pressure is selected by a management node to replace the first snapshot cache node for service. The virtual machine corresponding to the data loading cloud disk loads a cloud disk corresponding to the virtual machine, and sends notification information that the first snapshot cache node fails to the management node of the plurality of snapshot cache nodes; The management node selects a target snapshot cache node with the smallest load pressure from the plurality of snapshot cache nodes, and allocates the first snapshot corresponding to the first snapshot cache node to the target snapshot cache node; The data loading request sent by the virtual machine corresponding to the data loading cloud disk to the target snapshot cache node loads the first snapshot required to start the virtual machine from the snapshot storage space of the target snapshot cache node.

6. The method of claim 5, wherein, The allocation of the first snapshot corresponding to the first snapshot cache node to the target snapshot cache node comprises: The management node obtains a target node address corresponding to the target snapshot cache node, and associates and stores the target node address with the first snapshot; Correspondingly, the data loading request sent by the virtual machine corresponding to the data loading cloud disk to the target snapshot cache node comprises: the data loading cloud disk corresponding to the virtual machine obtains the target node address corresponding to the first snapshot from the management node, and sends a data loading request to the target snapshot cache node through the target node address.

7. A virtual machine snapshot data loading apparatus, characterized by comprising: Comprise: The cache unit is configured to, in response to receiving a start instruction of a plurality of virtual machines, select target image files corresponding to the plurality of virtual machines from a plurality of image files stored in an image center, and cache a plurality of snapshot data in the target image files in the form of strip data to a plurality of snapshot cache nodes in an elastic block storage (EBS) cluster according to a preset first strip size; wherein the EBS cluster is configured with a plurality of snapshot cache nodes to form a snapshot distributed cache for caching and distributing snapshot data; The loading unit is configured to create a data loading cloud disk corresponding to each virtual machine, and load snapshot data required to start the virtual machine from a snapshot storage space of the plurality of snapshot cache nodes through the data loading cloud disk corresponding to the virtual machine; wherein when a first snapshot cache node in the plurality of snapshot cache nodes is down, a target snapshot cache node with the smallest load pressure is selected by a management node to replace the first snapshot cache node.

8. An electronic device, comprising: Comprise: A processor and a memory; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the virtual machine snapshot data loading method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and when the processor executes the computer execution instructions, the virtual machine snapshot data loading method according to any one of claims 1 to 6 is realized.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the virtual machine snapshot data loading method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Snapshot data reading method, device, system and equipment and storage medium

    CN114661232A