Virtual machine starting method, host, cloud service system, and storage medium

Through the virtual machine startup method based on memory snapshots, mirror loading and initialization are skipped, and information is recorded while loading and running, which solves the problem of too long startup time of traditional virtual machines and achieves a more efficient startup process.

WO2024255340A1PCT designated stage expired Publication Date: 2024-12-19CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/080638
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-12
Filing Date
2024-03-07
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

During the startup process of a traditional virtual machine, it is necessary to undergo mirror loading, OS initialization, and service or application initialization, resulting in too long startup time and affecting the user experience.

Method used

Using the virtual machine startup method based on memory snapshots, skip the mirror loading and initialization steps during the traditional startup process, improve the virtual machine by loading page data in memory snapshots and recording information according to the page loading order when accessing, Start-up efficiency.

Benefits of technology

It significantly shortens the startup time of the virtual machine, improves the startup efficiency, and avoids the problem of too long startup time in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024080638_19122024_PF_FP_ABST
    Figure CN2024080638_19122024_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a virtual machine (VM) starting method, a host, a cloud service system, and a storage medium. The embodiments of the present application provide a memory snapshot-based VM starting scheme, for use in skipping the steps, such as mirror image loading, OS initialization, and service or application initialization, in a conventional VM starting process, thereby improving the VM starting efficiency. Furthermore, in a memory snapshot-based VM starting process, on the basis of page loading sequence record information of a memory snapshot, missing page data in a memory snapshot can be loaded if page missing information is generated during the access of a GPA, thereby loading page data in the memory snapshot while running the page data, rather than loading all page data and then running same, thereby further improving the VM starting efficiency and reducing the VM starting time.
Need to check novelty before this filing date? Find Prior Art

Description

Virtual machine startup method, host, cloud service system and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 12, 2023, with application number CN 202310696590.5 and invention name “Virtual machine startup method, host, cloud service system and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of cloud computing technology, and in particular to a virtual machine startup method, a host, a cloud service system, and a storage medium. Background Art

[0003] With the development of cloud computing technology, various virtualization instances have emerged, such as virtual machines (VMs). The traditional VM startup steps are as follows: downloading the relevant image; loading the image; initializing the operating system (OS); and initializing related services or applications.

[0004] If multiple identical VMs need to be started, all VMs need to go through image loading, OS initialization, and initialization of related services or applications, resulting in a long startup time and affecting the user experience.

[0005] Summary of the Invention

[0006] Various aspects of the present application provide a virtual machine startup method, a host, a cloud service system, and a storage medium to shorten the startup time of a VM.

[0007] An embodiment of the present application provides a virtual machine startup method, which is applied to a virtual machine hypervisor running on a host. The method includes: responding to a virtual machine VM startup instruction, loading a target memory snapshot required for starting a first VM on the host into a target memory space of the virtual machine hypervisor, and allocating a client physical address space (GPA) for the first VM; if page loading sequence record information corresponding to the target memory snapshot is obtained, directly accessing the GPA, and when page fault information is generated during access to the GPA, loading target page data from a target memory space into the GPA according to the page loading sequence record information; and running the target page data in the GPA to start the first VM, where the target page data is page data corresponding to the page fault information in the target memory snapshot.

[0008] An embodiment of the present application also provides a cloud service system, comprising: a control node and at least one virtual machine hypervisor running on at least one host; the control node is used to sense the virtual machine VM startup requirement and send a VM startup instruction to a target virtual machine hypervisor in at least one virtual machine hypervisor, so that the target virtual machine hypervisor can start a first VM on the host where it is located; the target virtual machine hypervisor is used to respond to the virtual machine VM startup instruction, load the target memory snapshot required to start the first VM into the target memory space of the target virtual machine hypervisor, and allocate a client physical address space GPA for the first VM; if page loading record information corresponding to the target memory snapshot is obtained, directly access the GPA, and when page fault information is generated during access to the GPA, load the target page data from the target memory space into the GPA according to the page loading sequence record information; run the target page data in the GPA to start the first VM, the target page data being the page data corresponding to the page fault information in the target memory snapshot.

[0009] An embodiment of the present application also provides a container startup method, which is applied to a container management program running on a host, the method comprising: responding to a container startup instruction, loading a target memory snapshot required for starting a first container on the host into a target memory space of the container management program, and allocating a client physical address space (GPA) to the first container; if page loading sequence record information corresponding to the target memory snapshot is obtained, directly accessing the GPA, and when a page fault information is generated during access to the GPA, loading target page data from a target memory space into the GPA according to the page loading sequence record information; and running the target page data in the GPA to start the first container, where the target page data is page data corresponding to the page fault information in the target memory snapshot.

[0010] An embodiment of the present application also provides a host, comprising: a memory and a processor; a virtual machine hypervisor is stored in the memory, and the processor is coupled to the memory for running the virtual machine hypervisor to implement the steps in the virtual machine startup method provided in the embodiment of the present application.

[0011] An embodiment of the present application also provides a computer-readable storage medium storing a computer program, wherein the computer program is a virtual machine hypervisor. When the virtual machine hypervisor is executed by a processor, the processor implements the steps in the virtual machine startup method provided in the embodiment of the present application.

[0012] In an embodiment of the present application, a solution for VM startup based on a memory snapshot is proposed to skip steps such as image loading, OS initialization, and service or application initialization in the traditional VM startup process, thereby improving VM startup efficiency. Furthermore, during the VM startup process based on a memory snapshot, information about the page loading sequence of the memory snapshot is recorded. When a page fault is generated by accessing the GPA, the page data in the missing memory snapshot can be loaded. This allows the VM to load the page data in the memory snapshot while the VM is running, rather than loading all the page data first before running. This further improves VM startup efficiency and shortens VM startup time. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0014] FIG1 is a schematic structural diagram of a cloud service system provided by an exemplary embodiment of the present application;

[0015] FIG2 is a schematic diagram of a virtual machine startup process provided by an exemplary embodiment of the present application;

[0016] FIG3a is a flow chart of a method for starting a virtual machine according to an exemplary embodiment of the present application;

[0017] FIG3 b is a simplified flowchart of a method for starting a virtual machine provided by an exemplary embodiment of the present application;

[0018] FIG3 c is a schematic diagram of a process of starting a container according to an exemplary embodiment of the present application;

[0019] FIG4 is a schematic structural diagram of a virtual machine startup device provided by an exemplary embodiment of the present application;

[0020] FIG5 is a schematic structural diagram of a host provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0021] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0022] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0023] In order to address the technical problem that the traditional VM startup process requires image loading, OS initialization, and initialization of related services or applications, resulting in a long startup time, an embodiment of the present application proposes a solution for VM startup based on memory snapshots to skip the steps of image loading, OS initialization, and service or application initialization in the traditional VM startup process, thereby improving VM startup efficiency. Furthermore, during the VM startup process based on memory snapshots, the page loading sequence information based on the memory snapshot is recorded. When a page fault message is generated when accessing the VM's GPA, the page data in the missing memory snapshot can be loaded. This allows the page data in the memory snapshot to be loaded while the VM is running, rather than loading all the page data first before running, further improving VM startup efficiency and shortening VM startup time.

[0024] The following describes in detail the technical solutions provided by various embodiments of the present application in conjunction with the accompanying drawings.

[0025] FIG1 is a schematic diagram of the structure of a cloud service system provided by an exemplary embodiment of the present application. As shown in FIG1 , the system 100 includes: a management and control node 101 and at least one virtual machine hypervisor 103 running on at least one host 102 .

[0026] In this embodiment, the host 102 can be any physical device that can provide hardware resources, such as a mobile phone, a laptop, a storage device, a traditional server, or a cloud device with hardware resources such as a cloud server or a cloud host. In this embodiment, the host 102 is responsible for providing the hardware resources required for the operation of the VM, including but not limited to: a processor (CPU), a memory (such as memory), a network card, a persistent memory, input and output devices, and other devices with specific processing functions, such as an input / output memory management unit (IOMMU), wherein the IOMMU can be used to convert the physical address of the virtual machine and the physical address of the host.

[0027] The host 102 not only has hardware resources, but also includes an operating system on top of the hardware resources, and a virtual machine hypervisor 103 runs on top of the operating system. Figure 1 shows an example of a host running a virtual machine hypervisor 103. The virtual machine hypervisor 103 is used to create an isolated operating environment on the host where it is located, and to start or create and manage VMs in the isolated operating environment. The virtual machine hypervisor 103 can be any software program, component or module that can create an isolated operating environment on the host where it is located, and to start or create and manage VMs in the isolated operating environment, without limitation. Optionally, the virtual machine hypervisor 103 can be implemented as a virtual operating system emulator (Quick EMUlator, QEMU) or a hypervisor (Hypervisor), etc., without limitation. Among them, the hypervisor is also called a virtual machine monitor (VMM).

[0028] On a host 102, the hypervisor 103 can create one or more VMs. In this embodiment, VMs are categorized by type, and VMs of the same type can be started using the same memory snapshot. For example, VMs of the same type may provide the same functions or services. VMs of the same type can be deployed on the same host 102 or on different hosts 102, without limitation.

[0029] In this embodiment, the control node 101 is used to sense the need to start or create a VM, select a target virtual machine hypervisor from at least one virtual machine hypervisor 103, and send a VM startup instruction to the selected target virtual machine hypervisor so that the target virtual machine hypervisor can start the first VM on the host where it is located. The first VM can be any VM that needs to be started, and the first VM can be a VM that can be started based on a memory snapshot. For example, for a VM of the same type that precedes the first VM (for example, it can be but is not limited to the first VM started for the first time), it can be started using a traditional startup method, and after startup, a memory snapshot is created based on the memory state of the VM, so that all VMs of the same type started after the VM can be started based on the memory snapshot, thereby reducing VM startup time and improving VM startup efficiency. Optionally, the control node is also responsible for various management and control of the VMs that have been started on at least one host, such as monitoring the running status of the VM, allocating service requests to the VM, performing various configurations on the VM, and shutting down, migrating, or pausing the VM.

[0030] Among them, the implementation method of the control node 101 sensing the VM startup demand is not limited. In an optional embodiment, the control node 101 provides a human-computer interaction interface, and the user can request the control node 101 to start the VM through the human-computer interaction interface. Specifically, the user provides the startup demand information to the control node through the human-computer interaction interface. The startup demand information includes the type of VM to be started or the resources required to start the VM, etc. The resources required to start the VM may include computing resources such as CPU or GPU, network resources such as bandwidth, and storage resources such as hardware. In another optional embodiment, for virtual machines of the same type, the control node can continuously count the number of service requests corresponding to virtual machines of this type. When the number of service requests for virtual machines of this type exceeds the threshold value of the number of service requests that the currently started VM can bear, the control node perceives that in order to improve the quality of service, a new VM needs to be started to carry more service requests.

[0031] There is no limitation on which hypervisor among the at least one hypervisor the control node sends the VM startup instruction to, that is, there is no limitation on the implementation method for determining the target hypervisor from the at least one hypervisor. For example, the amount of resources on the host where the at least one hypervisor is located can be obtained, a target host whose resource amount exceeds a set resource amount threshold can be determined, the hypervisor on the target host can be used as the target hypervisor, and a VM startup request can be sent to the target hypervisor so that the target hypervisor can start the first VM on the target host. For another example, a hypervisor can be randomly selected from the at least one hypervisor as the target hypervisor, and a VM startup request can be sent to the target hypervisor so that the target hypervisor can start the first VM on the host where it is located. For another example, the network performance of at least one host can be obtained, a target host with better network performance can be selected, the hypervisor on the target host can be used as the target hypervisor, and a VM startup request can be sent to the target hypervisor so that the target hypervisor can start the first VM on the target host.

[0032] In this embodiment, the target virtual machine hypervisor has a corresponding target memory space on the host where it resides. This target memory space is requested by the target virtual machine hypervisor from the host's memory space and is used to store various data required by the target virtual machine hypervisor during operation, including, but not limited to, a target memory snapshot required to start the first VM. The target memory snapshot can be a memory snapshot obtained by saving the memory data of the first VM in a certain operating state during the historical operation of the first VM, or the target memory snapshot can be a memory snapshot obtained by saving the memory data of other VMs of the same type as the first VM in a certain operating state during the historical operation, without limitation. The target memory snapshot is the memory state information of the VM at a certain moment. For example, the memory state information can include, but is not limited to, the CPU, timer, interrupt information, random access memory (RAM), and external devices. The target virtual machine hypervisor can respond to a virtual machine VM startup instruction and load the target memory snapshot required to start the first VM into the target memory space of the target virtual machine hypervisor.

[0033] In this embodiment, in a virtualized environment, the host's physical storage space is used simultaneously by multiple VMs. However, the host actually has only one physical storage space, and the physical address starting address 0 is also the only one, which cannot meet the requirement that all VMs' physical addresses start at 0. In this case, the hypervisor needs to "trick" the VMs. That is, it uses memory virtualization to assign each VM a physical address starting at address 0, and then performs address translation between the VM's physical address and the host's physical address, ultimately allowing the hypervisor to access the host's physical address.

[0034] Among them, the physical address allocated to each VM can be implemented as a guest physical address space (GPA), which corresponds to the host physical address space (HPA). Each VM corresponds to a page table (Page Table), which is used to record the mapping relationship between the GPA and the host physical address (such as HPA). The page table can be implemented as an extended page table (EPT) or a nested page table (NPT). Among them, the hardware CPU of the host includes an IOMMU, which is mainly used to query the page table, convert the GPA into HPA, and complete the address mapping. Among them, when the VM accesses the GPA, if the GPA lacks the page data required by the VM, a page fault information will be generated, and the page fault information indicates that the GPA lacks the page data required by the VM.

[0035] In this embodiment, the target hypervisor allocates a GPA for the first VM and loads the target memory snapshot in the target memory space into the GPA, thereby executing the page data in the target memory snapshot in the GPA to boot the first VM based on the target memory snapshot. In this embodiment, before loading the target memory snapshot in the target memory space into the GPA, the target hypervisor may attempt to obtain page loading record information corresponding to the target memory snapshot, for example, by obtaining the page loading record information from a VM startup instruction or from a designated database. Among them, the target memory snapshot includes multiple page data, and the page loading sequence record information represents the order in which each page data in the target memory snapshot is loaded and run during the process of starting the first VM. The memory snapshot can be represented by the identifier of the memory snapshot (such as UID). For example, in Figure 2, the target memory snapshot includes 9 page data, and each page data is: A1, A2, A3,..., A9. The order in which these page data are loaded and run during the corresponding VM startup process is: A4->A6->A3->A1->A8->A2->A9->A7->A5. The UID and the order information of the order in which these page data are loaded and run form the page loading sequence record information.

[0036] In the embodiment of the present application, whether the target virtual machine hypervisor can obtain the page loading record information corresponding to the target memory snapshot will affect the implementation method of loading the target memory snapshot in the target memory space into the GPA.

[0037] If page load record information corresponding to the target memory snapshot is obtained, the target virtual machine hypervisor can directly access the GPA. During the GPA access process, based on the generated page fault information, the target virtual machine hypervisor can load the page data in the target memory space while executing the loaded memory page data. Ultimately, all page data in the target memory snapshot is loaded into the GPA and executed to start the first VM. Specifically, if, during the GPA access process, the GPA lacks page data from the target memory snapshot required for starting the first VM, a page fault is generated. Based on the page load sequence record information, the missing page data is determined. For ease of description, the missing page data is referred to as the target page data. The target page data is then loaded from the target memory space into the GPA. The target page data is the page data in the target memory snapshot corresponding to the page fault information. Furthermore, if the page fault information is generated, the EPT table corresponding to the first VM can be queried to convert the GPA address of the target page data into the host's HPA address. The memory location corresponding to the HPA address in the target memory space is then determined. The target page data is read from the memory location and written to the GPA. As the GPA is continuously accessed, page fault information is continuously generated, and eventually all page data in the target memory snapshot can be loaded into the GPA and executed to start the first VM. In the process of accessing the GPA, page fault information is continuously generated, and accordingly, the missing page data can be continuously loaded from the target memory space. This allows the missing page data to be loaded while the loaded page data is executed, rather than loading all page data into the GPA at once and then executing all page data on demand. This helps further improve VM startup efficiency and shorten VM startup time.

[0038] FIG2 illustrates an exemplary method for starting a first VM, but is not limited to this. FIG2 illustrates the number of times a target memory snapshot is restored, using the target memory snapshot as an example. Restoring the target memory snapshot once indicates that a VM has been started. Different restoration processes may be used to start different VMs or multiple starts of the same VM. During the first restoration of the target memory snapshot, all page data in the target memory snapshot is loaded into the corresponding VM's GPA at once, and the page data in the GPA is executed sequentially according to the load order to complete the first restoration of the target memory snapshot. During the first restoration, page loading sequence record information corresponding to the target memory snapshot is simultaneously generated and stored in the memory restoration database. Thus, when the target memory snapshot is restored for the Nth time (N > 1, and N is a positive integer), i.e., when a VM is started based on the target memory snapshot for the Nth time, the hypervisor can obtain the page loading sequence record information corresponding to the target memory snapshot. This page loading sequence record information is illustrated using A4 -> A6 -> A3, etc. as an example. The loading order of subsequent page data is not shown in FIG2. When initially accessing the GPA, a page fault message may be generated. Based on the page loading sequence record information, page data A4 is determined to be the target page data, page data A4 is loaded into the GPA, and page data A4 in the GPA is executed. Alternatively, before accessing the GPA, based on the page loading sequence record information, page data A4 is determined to be the target page data, page data A4 is loaded into the GPA, and page data A4 in the GPA is executed. Then, during the execution of page data A4 in the GPA, a page fault message may be generated. Based on the page loading sequence record information, page data A6 is determined to be the target page data, page data A6 is loaded into the GPA, and page data A6 in the GPA is executed. Furthermore, during the execution of page data A6 in the GPA, a page fault message may be generated. Based on the page loading sequence record information, page data A3 is determined to be the target page data, page data A3 is loaded into the GPA, and page data A3 in the GPA is executed. This process continues until all page data in the target memory snapshot is loaded into the GPA and executed. At this point, the first VM is started. In this embodiment, the Nth restoration process of the target memory snapshot is used to start the first VM. Furthermore, in this embodiment, the page loading sequence record information is generated during the first restoration process of the target memory snapshot, but the present invention is not limited thereto. The page loading sequence record information can also be generated during any restoration process prior to the Nth restoration process.

[0039] Among them, if the page loading sequence record information is not obtained, it means that the page data in the target memory snapshot cannot be loaded into the GPA in sequence according to the page loading sequence record information, and the page data in the GPA cannot be run concurrently. In this case, all the page data in the target memory snapshot can be loaded from the target memory space into the GPA; then the GPA is accessed, and the page data in the target memory snapshot in the GPA is run to start the first VM.

[0040] Further optionally, the target virtual machine hypervisor may also record the order in which the page data in the target memory snapshot are loaded into the GPA to obtain the page loading sequence record information corresponding to the target memory snapshot; and store the page loading sequence record information in the memory recovery database for the first VM to obtain the page loading sequence record information during the subsequent startup process or other VMs of the same type during the startup process. The situation where the page loading sequence record information is not obtained is not limited. For example, the situation where the page loading sequence record information is not obtained may be that it is the first time that all the page data in the target memory snapshot are used to start the VM. At this time, the loading order of each page data in the target memory snapshot is unknown; or the situation where the page loading sequence record information is not obtained may also be that although it is not the first time that the target memory snapshot is used to start the VM, the order in which the page data in the target memory snapshot are loaded into the GPA is not recorded in the process of starting the VM before. At this time, the page loading sequence record information is also unknown.

[0041] As shown in Figure 2, during the first memory snapshot recovery process, page data A4, A6 and A3... in the target memory space are all loaded into the GPA. Then, the GPA is accessed and the loaded page data A4, A6 and A3... are run on demand. In this process, the loaded page data can be marked, and the order in which the page data are loaded is recorded to generate page loading sequence record information A4->A6->A3..., and other page data are not displayed. The page loading sequence record information is stored in the memory recovery database for the first VM to obtain the page loading sequence record information during the subsequent startup process or other VMs of the same type during the startup process.

[0042] The implementation method for storing the page load sequence record information in the memory recovery database is not limited. For example, the target virtual machine hypervisor sends the page load sequence record information to the control node, and the control node stores the page load sequence record information in the memory recovery database. For another example, the control node provides the address of the memory recovery database to the target virtual machine hypervisor, and the target virtual machine hypervisor accesses the address information and stores the page load sequence record information in the memory recovery database.

[0043] In an optional embodiment, when the target virtual machine hypervisor obtains the page loading sequence record information, the implementation method for the target virtual machine hypervisor to obtain the page loading sequence record information is not limited. For example, when the control node senses that it is necessary to start the first VM, in addition to sending a VM startup instruction to the target virtual machine hypervisor and providing relevant information of the target memory snapshot required to start the first VM, it can also access the memory recovery database to query whether there is page loading sequence record information corresponding to the target memory snapshot, and when it is determined that there is page loading sequence record information, the page loading sequence record information or the access address of the page loading sequence record information in the memory recovery database is provided to the target virtual machine hypervisor. Optionally, the control node can add the page loading sequence record information or the access address of the page loading sequence record information in the memory recovery database to the VM startup instruction and provide it to the target virtual machine hypervisor. For the target virtual machine hypervisor, it can determine whether the VM startup instruction contains page loading sequence record information; if the VM startup instruction contains page loading sequence record information, the page loading sequence record information is obtained from the VM startup instruction. For another example, for the target virtual machine hypervisor, it can be determined whether the VM startup instruction contains the access address information of the page loading sequence record information; if the VM startup instruction contains the access address information of the page loading sequence record information, the page loading sequence record information is obtained according to the access address information in the VM startup instruction.

[0044] In addition to the above-mentioned provision of the page loading sequence record information corresponding to the target memory snapshot by the control node to the target virtual machine hypervisor, the target virtual machine hypervisor can also actively obtain the page loading sequence record information corresponding to the target memory snapshot. For example, after receiving the target startup instruction, the target virtual machine hypervisor can actively initiate an acquisition request to the control node to request the control node to query the memory recovery database and return the page loading sequence record information corresponding to the target memory snapshot. For another example, after receiving the target startup instruction, the target virtual machine hypervisor can actively initiate an acquisition request to the control node, and can actively query and obtain the page loading sequence record information corresponding to the target memory snapshot in the memory recovery database according to the address information of the memory recovery database and the UID of the target memory snapshot.

[0045] In the above embodiments of the present application, a target memory snapshot is saved during the historical operation of the first VM, or other VMs of the same type as the first VM generate target memory snapshots during operation. Regardless of which of the above methods of generating the target memory snapshot is used, the target memory snapshot can be stored as cloud disk data. For example, the target memory snapshot is stored in a cloud disk using Elastic Block Storage (EBS) technology to obtain the EBS cloud disk data of the target memory snapshot. For the sake of distinction and description, the cloud disk storing the target memory snapshot is referred to as the first cloud disk.

[0046] Based on the above, the target virtual machine hypervisor receives the VM startup instruction sent by the control node, and the VM startup instruction includes the description information of the target memory snapshot, such as the ID, time or memory status information of the target memory snapshot, or the identifier or address of the corresponding cloud disk. According to the description information, the first cloud disk storing the target memory snapshot is mounted on the first VM; the target memory snapshot is obtained from the first cloud disk and stored in the target memory space of the target virtual machine hypervisor. For example, in the case where the description information of the target memory snapshot is the ID, time or memory status information target of the target memory snapshot, the virtual machine hypervisor maintains a correspondence between the description information and the cloud disk loading address. Based on the description information of the target memory snapshot and the correspondence, the loading address of the first cloud disk of the target memory snapshot can be determined, and an association relationship between the loading address of the first cloud disk and the first VM is established. Based on the loading address of the first cloud disk, the target memory snapshot is obtained from the first cloud disk, and the target memory snapshot is stored in the target memory space.

[0047] In an optional embodiment, during the historical operation of the first VM, all data under the system disk of the first VM can also be saved to obtain a system disk snapshot. For example, the operating system of the first VM is implemented as a Windows system, and the system disk of the first VM is all the data under its C drive. Alternatively, during the operation of other VMs of the same type as the first VM, all data under the system disks of other VMs can also be saved to obtain system disk snapshots. Regardless of which of the above methods is used to generate a system disk snapshot, the system disk snapshot can be stored as cloud disk data. For example, using EBS technology, the system disk snapshot is stored in a cloud disk to obtain EBS cloud disk data of the system disk snapshot. For the sake of distinction and description, the cloud disk that stores the system disk snapshot is referred to as the second cloud disk.

[0048] Based on this, the target hypervisor can also respond to the VM startup instruction and mount the system disk for the first VM. The system disk is used to provide other data required by the first VM during operation and is responsible for storing data generated during the operation of the first VM. For example, the VM startup instruction may include descriptive information of the system disk snapshot. The descriptive information of the system disk snapshot may be the system ID, status information, or save time information. Based on the descriptive information of the system disk snapshot, the system disk snapshot can be obtained from the second cloud disk, and an association relationship between the system disk snapshot and the first VM is established, so that the first VM is mounted on the system disk.

[0049] In an optional embodiment, when multiple VMs need to be started on the same host, the storage resources occupied by the memory snapshots are reduced by sharing memory snapshots, and the loading time of the memory snapshots is reduced as a whole. Specifically, when allocating a GPA for the first VM, a shared GPA can be allocated to the first VM, and the page data in the target memory snapshot in the target memory space is loaded into the shared GPA and the operation is completed according to the load-first-then-run mode or the load-while-run mode provided in the aforementioned embodiment to start the first VM. The shared GPA is shared by the first VM and other VMs of the same type on the host. The first VM and other VMs of the same type on the host have read-only permissions to the shared GPA, avoiding read operations on the shared GPA and damaging the data on the shared GPA. Other VMs of the same type can also be started directly based on the target memory snapshot in the shared GPA. Specifically, taking the first VM as an example, after allocating a shared GPA for the first VM, before loading the page data in the target memory snapshot in the target memory space into the shared GPA, it is possible to first determine whether the shared GPA already contains the page data in the target memory snapshot. If so, the page data in the shared GPA can be directly run on demand, and the loading process of the page data from the target memory space to the shared GPA can be omitted, which can further improve the VM startup efficiency. Among them, the situation where the page data in the target memory snapshot already exists in the shared GPA indicates that a VM of the same type has been started based on the shared GPA, and the page data in the target memory snapshot has been loaded into the shared GPA during its startup process. This achieves the purpose of reducing the storage resources occupied by storing memory snapshots by multiple VMs through shared memory snapshots, and reducing the loading time of memory snapshots as a whole, thereby improving the VM startup efficiency.

[0050] Furthermore, during the operation of the first VM, a private GPA can be allocated to the first VM to store page data that has changed relative to the target memory snapshot during the operation of the first VM, that is, the private GPA is used to store differentiated memory data. By starting VMs of the same type on the same host using the same memory snapshot in the shared GPA, duplicate storage space usage is eliminated, and there is no need to repeatedly load memory snapshots into the GPA, thereby reducing the loading time of the memory snapshot. The loading time of the memory snapshot can be reduced from a time complexity of O(N) to a time complexity of O(1), where N is the number of VMs of the same type that share the memory snapshot, and N is an integer greater than 1.

[0051] FIG3a is a flow chart of a method for starting a virtual machine according to an exemplary embodiment of the present application. The method for starting a virtual machine is applied to a virtual machine hypervisor running on a host. As shown in FIG3a , the method includes:

[0052] 301a. In response to a virtual machine VM startup instruction, load a target memory snapshot required for starting a first VM on the host into a target memory space of a virtual machine hypervisor, and allocate a client physical address space (GPA) for the first VM.

[0053] 302a. If the page loading sequence record information corresponding to the target memory snapshot is obtained, the GPA is directly accessed. When a page fault is generated during the access to the GPA, the target page data is loaded from the target memory space into the GPA according to the page loading sequence record information.

[0054] 303a. Run the target page data in the GPA to start the first VM. The target page data is the page data corresponding to the page fault information in the target memory snapshot.

[0055] In an optional embodiment, the method provided in the embodiment of the present application also includes: if the page loading sequence record information is not obtained, all page data in the target memory snapshot is loaded from the target memory space into the GPA; accessing the GPA, and running the page data in the target memory snapshot in the GPA to start the first VM.

[0056] In an optional embodiment, the method provided by the embodiment of the present application also includes: recording the order in which page data in the target memory snapshot is loaded into the GPA to obtain page loading sequence record information corresponding to the target memory snapshot; storing the page loading sequence record information in a memory recovery database for the first VM to obtain the page loading sequence record information during subsequent startup or other VMs of the same type during startup.

[0057] In an optional embodiment, the method provided in the embodiment of the present application also includes: determining whether the VM startup instruction contains page loading sequence record information or access address information of the page loading sequence record information; if contained, obtaining the page loading sequence record information from the VM startup instruction, or obtaining the page loading sequence record information based on the access address information in the VM startup instruction; wherein the page loading sequence record information is generated during the historical startup process of the first VM or during the startup process of other VMs of the same type.

[0058] In an optional embodiment, in response to a virtual machine VM startup instruction, the target memory snapshot required to start the first VM is loaded into the target memory space corresponding to the virtual machine hypervisor, including: receiving a VM startup instruction sent by a control node, the VM startup instruction including description information of the target memory snapshot; according to the description information, mounting a first cloud disk storing the target memory snapshot to the first VM; obtaining the target memory snapshot from the first cloud disk and storing it in the target memory space.

[0059] In an optional embodiment, allocating a client physical address space (GPA) to a first VM includes: allocating a shared GPA to the first VM, where the shared GPA is shared by the first VM and other VMs of the same type on the host; and the method further includes: allocating a private GPA to the first VM during operation of the first VM to store page data generated by the first VM that has changed relative to a target memory snapshot.

[0060] In an optional embodiment, the method provided in the embodiment of the present application also includes: responding to the VM startup instruction, mounting a system disk for the first VM, the system disk is used to provide other data required during the operation of the first VM, and is responsible for storing data generated during the operation of the first VM.

[0061] In an optional embodiment, before loading the target memory snapshot and system disk, the process also includes: creating a target memory snapshot and a system disk snapshot, and then creating both as a cloud disk. Figure 3b shows a schematic diagram of the process from creating the target memory snapshot and system disk snapshot to the cloud disk, then loading the target memory snapshot, and finally mounting the system disk and restoring the target memory snapshot.

[0062] The detailed implementation and beneficial effects of each step in the method of this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated here.

[0063] FIG3c is a flow chart of a container startup method provided by an exemplary embodiment of the present application. The method is applied to a container management program running on a host. As shown in FIG3c , the method includes:

[0064] 301c. Responding to the container start instruction, loading the target memory snapshot required to start the first container on the host into the target memory space of the container hypervisor, and allocating the client physical address space (GPA) to the first container;

[0065] 302c. If the page loading sequence record information corresponding to the target memory snapshot is obtained, the GPA is directly accessed. When a page fault information is generated during the access to the GPA, the target page data is loaded from the target memory space into the GPA according to the page loading sequence record information.

[0066] 303c. Run the target page data in the GPA to start the first container. The target page data is the page data corresponding to the page fault information in the target memory snapshot.

[0067] In this embodiment, the container manager can run on the host, and one container manager can run on one host. The container manager is used to create an isolated operating environment on the host where it is located, and to start or create and manage containers in the isolated operating environment. The container manager can be any software program, component or module that can create an isolated operating environment on the host where it is located, and to start or create and manage containers in the isolated operating environment, without limitation. Optionally, the container manager can be implemented as K8s (Kubernetes), Podman, Apptainer or Docker, etc. Among them, Podman is a software for building, managing and running containers, Kubernetes is an open source container orchestration platform that can quickly and efficiently deploy, manage and scale containerized applications, Apptainer is a container system used in high-performance computing (HPC), and Docker is a standard container management technology.

[0068] Among them, the detailed implementation content and effect description of the upper container startup method can be found in the above embodiment and will not be repeated here.

[0069] It should be noted that the execution entity of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution entity of steps 301 to 303 can be device A; for another example, the execution entity of steps 301 and 302 can be device A, and the execution entity of step 303 can be device B; and so on.

[0070] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or may be executed in parallel. The sequence numbers of the operations, such as 301, 302, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to be different types.

[0071] FIG4 is a schematic structural diagram of a virtual machine startup device provided by an exemplary embodiment of the present application. The device is applied to a virtual machine management program running on a host. The device includes: a loading module 41 , an allocation module 42 , an access module 43 and an operation module 44 .

[0072] The loading module 41 is configured to respond to a virtual machine VM startup instruction, load a target memory snapshot required to start the first VM on the host into a target memory space of the virtual machine hypervisor, and allocate a client physical address space GPA to the first VM through the allocation module 42;

[0073] If the page loading sequence record information corresponding to the target memory snapshot is obtained, the GPA is directly accessed through the access module 43, and when a page fault information is generated when accessing the GPA, the target page data is loaded from the target memory space into the GPA according to the page loading sequence record information;

[0074] The running module 44 is configured to run the target page data in the GPA to start the first VM, where the target page data is the page data corresponding to the missing page information in the target memory snapshot.

[0075] In an optional embodiment, if the page loading sequence record information is not obtained, all page data in the target memory snapshot are loaded from the target memory space into the GPA through the loading module; the GPA is accessed through the access module, and the page data in the target memory snapshot in the GPA is run to start the first VM.

[0076] In an optional embodiment, the device also includes: a recording module and a storage module; the recording module is used to record the order in which the page data in the target memory snapshot is loaded into the GPA to obtain page loading sequence record information corresponding to the target memory snapshot; the storage module is used to store the page loading sequence record information in the memory recovery database, so that the first VM can obtain the page loading sequence record information during the subsequent startup process or other VMs of the same type can obtain the page loading sequence record information during the startup process.

[0077] In an optional embodiment, the device also includes: a judgment module and an acquisition module; the judgment module is used to judge whether the VM startup instruction contains page loading sequence record information or access address information of the page loading sequence record information; if it contains, the page loading sequence record information is obtained from the VM startup instruction through the acquisition module, or the page loading sequence record information is obtained according to the access address information in the VM startup instruction; wherein, the page loading sequence record information is generated during the historical startup process of the first VM or during the startup process of other VMs of the same type.

[0078] In an optional embodiment, the loading module is specifically used to: receive a VM startup instruction sent by the control node, the VM startup instruction including description information of the target memory snapshot; mount the first cloud disk storing the target memory snapshot to the first VM according to the description information; obtain the target memory snapshot from the first cloud disk and store it in the target memory space.

[0079] In an optional embodiment, the device also includes: a mounting module; the mounting module is used to respond to the VM startup instruction and mount the system disk for the first VM, the system disk is used to provide other data required during the operation of the first VM, and is responsible for storing data generated during the operation of the first VM.

[0080] In an optional embodiment, the allocation module is specifically used to: allocate a shared GPA to the first VM, where the shared GPA is shared by the first VM and other VMs of the same type on the host; and allocate a private GPA to the first VM during the operation of the first VM to store page data generated by the first VM that has changed relative to the target memory snapshot.

[0081] The apparatus shown in FIG4 can also be applied to a container management program on a host. Specifically,

[0082] A loading module is configured to respond to a container startup instruction, load a target memory snapshot required to start the first container on the host into a target memory space of the container hypervisor, and allocate a client physical address space (GPA) to the first container through an allocation module;

[0083] If the page loading sequence record information corresponding to the target memory snapshot is obtained, the GPA is directly accessed through the access module, and when a page fault information is generated during access to the GPA, the target page data is loaded from the target memory space into the GPA according to the page loading sequence record information;

[0084] The running module is used to run the target page data in the GPA to start the first container, where the target page data is the page data corresponding to the missing page information in the target memory snapshot.

[0085] The detailed implementation and beneficial effects of the virtual machine startup device provided in this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated on here.

[0086] FIG5 is a schematic diagram of the structure of a host provided by an exemplary embodiment of the present application. As shown in FIG5 , the host includes a memory 54 and a processor 55 .

[0087] The memory 54 is used to store the virtual machine management program and can be configured to store various other data to support operations on the host, such as instructions for any application or method operating on the host.

[0088] The memory 54 may be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0089] The processor 55 is coupled to the memory 54 and is configured to execute the virtual machine hypervisor in the memory 54, so as to: respond to a virtual machine VM startup instruction, load the target memory space of the target memory snapshot virtual machine hypervisor required to start the first VM on the host, and allocate a client physical address space (GPA) for the first VM; if page loading sequence record information corresponding to the target memory snapshot is obtained, directly access the GPA, and when a page fault information is generated by accessing the GPA, load the target page data from the target memory space into the GPA according to the page loading sequence record information; and run the target page data in the GPA to start the first VM, where the target page data is the page data corresponding to the page fault information in the target memory snapshot.

[0090] In an optional embodiment, the processor 55 is further used to: if the page loading sequence record information is not obtained, load all page data in the target memory snapshot from the target memory space into the GPA; access the GPA, and run the page data in the target memory snapshot in the GPA to start the first VM.

[0091] In an optional embodiment, the processor 55 is further used to: record the order in which the page data in the target memory snapshot is loaded into the GPA to obtain page loading sequence record information corresponding to the target memory snapshot; store the page loading sequence record information in the memory recovery database for the first VM to obtain the page loading sequence record information during subsequent startup or other VMs of the same type during startup.

[0092] In an optional embodiment, the processor 55 is further used to: determine whether the VM startup instruction contains page loading sequence record information or access address information of the page loading sequence record information; if contained, obtain the page loading sequence record information from the VM startup instruction, or obtain the page loading sequence record information based on the access address information in the VM startup instruction; wherein the page loading sequence record information is generated during the historical startup process of the first VM or during the startup process of other VMs of the same type.

[0093] In an optional embodiment, when the processor 55 responds to the virtual machine VM startup instruction and loads the target memory snapshot required to start the first VM into the target memory space corresponding to the virtual machine hypervisor, it is specifically used to: receive the VM startup instruction sent by the control node, the VM startup instruction including the description information of the target memory snapshot; according to the description information, mount the first cloud disk storing the target memory snapshot to the first VM; obtain the target memory snapshot from the first cloud disk and store it in the target memory space.

[0094] In an optional embodiment, the processor 55 is further configured to: respond to a VM startup instruction and mount a system disk for the first VM, where the system disk is configured to provide other data required during the operation of the first VM and to store data generated during the operation of the first VM.

[0095] In an optional embodiment, when allocating a client physical address space GPA for the first VM, the processor 55 is specifically configured to: allocate a shared GPA for the first VM, where the shared GPA is shared by the first VM and other VMs of the same type on the host; and the processor 55 is further configured to: allocate a private GPA for the first VM during the operation of the first VM to store page data generated by the first VM that has changed relative to the target memory snapshot.

[0096] Furthermore, as shown in Figure 5 , the host also includes other components such as a communication component 56 or a power supply component 58. Figure 5 only schematically shows some components, which does not mean that the host only includes the components shown in Figure 5 .

[0097] The detailed implementation and beneficial effects of the host provided in this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated on here.

[0098] The embodiment of the present application also provides a host, the implementation structure of the host is the same as or similar to the implementation structure of the host shown in Figure 5, and the structure of the host shown in Figure 5 can be referred to for implementation. The main difference between the host provided by this embodiment and the host in the embodiment shown in Figure 5 is that the processor executes a container management program stored in the memory. For the host provided by this embodiment, its processor executes the container management program stored in the memory, which can be used to: respond to the container startup instruction, load the target memory snapshot required to start the first container on the host into the target memory space of the container management program, and allocate the client physical address space GPA for the first container; if the page loading sequence record information corresponding to the target memory snapshot is obtained, the GPA is directly accessed, and when a page fault information is generated when accessing the GPA, the target page data is loaded from the target memory space into the GPA according to the page loading sequence record information; run the target page data in the GPA to start the first container, and the target page data is the page data corresponding to the page fault information in the target memory snapshot.

[0099] The detailed implementation and beneficial effects of the host provided in this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated on here.

[0100] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps that can be performed by the processor in the method embodiments shown in Figures 3a and 3c above. The above-mentioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random-access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0101] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0102] The above-mentioned display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundary of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0103] The power supply assembly provides power to various components of the device in which the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply assembly is located.

[0104] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as call mode, recording mode, and voice recognition mode, the microphone is configured to receive external audio signals. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0105] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) that contain computer-usable program code.

[0106] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.

[0107] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0109] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interfaces, network interfaces, and memory.

[0110] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0111] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.

[0112] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0113] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A method for starting a virtual machine, characterized in that: Applied to a virtual machine management program running on a host, the method comprises: In response to a virtual machine VM startup instruction, a target memory snapshot required for starting a first VM on a host is loaded into a target memory space of the virtual machine hypervisor, and a client physical address space GPA is allocated to the first VM; If the page loading sequence record information corresponding to the target memory snapshot is obtained, the GPA is directly accessed, and when page fault information is generated when accessing the GPA, the target page data is loaded from the target memory space to the GPA according to the page loading sequence record information; The target page data in the GPA is run to start the first VM, where the target page data is page data in the target memory snapshot corresponding to the missing page information.

2. The method according to claim 1, characterized in that Also includes: If the page loading sequence record information is not obtained, all page data in the target memory snapshot are loaded from the target memory space into the GPA; The GPA is accessed, and page data in the target memory snapshot in the GPA is executed to start the first VM.

3. The method according to claim 2, characterized in that Also includes: Recording the order in which the page data in the target memory snapshot is loaded into the GPA, so as to obtain page loading order record information corresponding to the target memory snapshot; The page loading sequence record information is stored in a memory recovery database, so that the first VM or other VMs of the same type can obtain the page loading sequence record information during a subsequent startup process.

4. The method according to claim 1, characterized in that: Also includes: Determining whether the VM startup instruction includes the page loading sequence record information or the access address information of the page loading sequence record information; If included, obtaining the page loading sequence record information from the VM startup instruction, or obtaining the page loading sequence record information according to the access address information in the VM startup instruction; The page loading sequence record information is generated during the historical startup process of the first VM or during the startup process of other VMs of the same type.

5. The method according to claim 1, characterized in that In response to a virtual machine VM startup instruction, loading a target memory snapshot required to start the first VM into a target memory space corresponding to the virtual machine hypervisor includes: Receive a VM startup instruction sent by the management and control node, wherein the VM startup instruction includes description information of the target memory snapshot; Mounting a first cloud disk storing the target memory snapshot to the first VM according to the description information; The target memory snapshot is obtained from the first cloud disk and stored in the target memory space.

6. The method according to any one of claims 1 to 5, characterized in that: Also includes: In response to the VM startup instruction, a system disk is mounted for the first VM, where the system disk is used to provide other data required during the operation of the first VM and is responsible for storing data generated during the operation of the first VM.

7. The method according to any one of claims 1 to 5, characterized in that: Allocating a client physical address space GPA to the first VM includes: allocating a shared GPA to the first VM, where the shared GPA is shared by the first VM and other VMs of the same type on the host; The method further includes: during the operation of the first VM, allocating a private GPA to the first VM to store page data generated by the first VM that has changed relative to the target memory snapshot.

8. A cloud service system, characterized in that: include: A management node and at least one hypervisor running on at least one host; The control node is configured to sense a virtual machine VM startup requirement and send a VM startup instruction to a target virtual machine hypervisor among the at least one virtual machine hypervisor, so that the target virtual machine hypervisor starts the first VM on the host where the target virtual machine hypervisor is located; The target virtual machine hypervisor is used to respond to a virtual machine VM startup instruction, load a target memory snapshot required to start the first VM into a target memory space of the target virtual machine hypervisor, and allocate a client physical address space GPA for the first VM; if page loading record information corresponding to the target memory snapshot is obtained, directly access the GPA, and when page fault information is generated by accessing the GPA, load the target page data from the target memory space into the GPA according to the page loading sequence record information; run the target page data in the GPA to start the first VM, the target page data being the page data in the target memory snapshot corresponding to the page fault information.

9. The system according to claim 8, characterized in that The control node is also used for: Acquire page loading sequence record information or access address information corresponding to the target memory snapshot from a memory recovery database; Carrying the page loading sequence record information or the access address information thereof in the VM startup instruction and sending it to the target virtual machine management program; The page loading sequence record information is generated during the historical startup process of the first VM or during the startup process of other VMs of the same type.

10. The system according to claim 8, characterized in that The target virtual machine hypervisor is further configured to: If the page loading sequence record information is not obtained, all page data in the target memory snapshot is removed from the target memory snapshot. The target memory space is loaded into the GPA; The GPA is accessed, and page data in the target memory snapshot in the GPA is executed to start the first VM.

11. The system according to claim 10, characterized in that The target virtual machine hypervisor is further configured to: Recording the order in which the page data in the target memory snapshot is loaded into the GPA, so as to obtain page loading order record information corresponding to the target memory snapshot; The page loading sequence record information is sent to the control node, and the control node stores the page loading sequence record information in the memory recovery database so that the first VM or other VMs of the same type can obtain the page loading sequence record information during subsequent startup.

12. A container startup method, characterized in that: Applied to a container management program running on a host, the method comprises: In response to the container start instruction, load a target memory snapshot required for starting the first container on the host into the target memory space of the container management program, and allocate a client physical address space GPA for the first container; If the page loading sequence record information corresponding to the target memory snapshot is obtained, the GPA is directly accessed, and when page fault information is generated when accessing the GPA, the target page data is loaded from the target memory space to the GPA according to the page loading sequence record information; The target page data in the GPA is run to start the first container, where the target page data is page data in the target memory snapshot corresponding to the missing page information.

13. A host, characterized in that: include: Memory and processor; The memory stores a virtual machine management program, and the processor is coupled to the memory and is used to run the virtual machine management program to implement the steps in the method according to any one of claims 1 to 7 and 12.

14. A computer-readable storage medium storing a computer program, characterized in that: The computer program is a virtual machine hypervisor, and when the virtual machine hypervisor is executed by a processor, the processor is caused to implement the steps in the method according to any one of claims 1 to 7 and 12.

Citation Information

Patent Citations

  • Method for supporting quick start of similar virtual machine

    CN101697134A

  • Shared library isolation protection method and system based on hardware virtualization technology

    CN107102888A

  • Memory management method and device of virtual machine and electronic equipment

    CN114880074A

  • Concurrent virtual machine snapshots and restore

    US20080022032A1

  • Memory space management method, data transfer method, and computer device for distributed computer system

    US6081833A