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

Through the virtual machine startup method based on memory snapshots, the memory snapshot data of the virtual machine is directly loaded and run, which solves the problem of too long startup time of traditional virtual machines and realizes a more efficient startup process.

CN119127383APending Publication Date: 2024-12-13ALIBABA (CHINA) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310696590.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-12
Publication Date
2024-12-13

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 in the traditional startup process, directly allocate the client's physical address space to shorten the startup by loading the page data in the memory snapshot and running while loading at runtime. time.

Benefits of technology

It significantly shortens the startup time of the virtual machine, improves the startup efficiency, avoids the tedious steps in traditional methods, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127383A_ABST
    Figure CN119127383A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a virtual machine starting method, a host, a cloud service system and a storage medium. In the embodiment of the invention, a scheme for starting the VM based on the memory snapshot is provided, so that the steps of mirror image loading, OS initialization, service or application initialization and the like in the traditional VM starting process are skipped, and the VM starting efficiency can be improved. Furthermore, in the process of starting the VM based on the memory snapshot, page data in the missing memory snapshot can be loaded based on the page loading sequence record information of the memory snapshot when the GPA is accessed to generate missing page information, so that the page data in the memory snapshot can be loaded while running instead of loading all the page data before running, and the page data loading efficiency is improved. The starting efficiency of the VM is further improved, and the starting time of the VM is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] 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

[0002] 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 related images; image loading; operating system (OS) initialization; initialization of related services or applications.

[0003] 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, which results in a long startup time and affects the user experience. Summary of the invention

[0004] Multiple 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.

[0005] An embodiment of the present application provides a virtual machine startup method, which is applied to a virtual machine management program running on a host, the method comprising: 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 management program, 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 when accessing the GPA, loading target page data from the target memory space into the GPA according to the page loading sequence record information; running 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.

[0006] The embodiment of the present application also provides a cloud service system, including: 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 demand 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 the page loading record information corresponding to the target memory snapshot is obtained, directly access the GPA, and when a page fault information is generated when 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 is the page data in the target memory snapshot corresponding to the page fault information.

[0007] 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 for the first container; 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 when accessing the GPA, loading the target page data from the target memory space into the GPA according to the page loading sequence record information; running the target page data in the GPA to start the first container, the target page data being the page data corresponding to the page fault information in the target memory snapshot.

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

[0009] 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.

[0010] In the embodiment of the present application, a scheme for starting a VM based on a memory snapshot is proposed to skip the steps of image loading, OS initialization, and service or application initialization in the traditional VM startup process, which can improve the VM startup efficiency. Further, in the process of starting a VM based on a memory snapshot, the page loading sequence record information based on the memory snapshot can load the missing page data in the memory snapshot when the GPA generates a page fault information, so that the page data in the memory snapshot can be loaded while running, instead of loading all the page data first and then running, which further improves the startup efficiency of the VM and shortens the VM startup time. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] 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:

[0012] Figure 1 A schematic diagram of the structure of a cloud service system provided for an exemplary embodiment of the present application;

[0013] Figure 2 A schematic diagram of a virtual machine startup process provided by an exemplary embodiment of the present application;

[0014] Figure 3a A flowchart of a method for starting a virtual machine provided by an exemplary embodiment of the present application;

[0015] Figure 3b A simplified flowchart of a method for starting a virtual machine provided by an exemplary embodiment of the present application;

[0016] Figure 3c A schematic diagram of a process of starting a container provided by an exemplary embodiment of the present application;

[0017] Figure 4 A schematic diagram of the structure of a virtual machine startup device provided for an exemplary embodiment of the present application;

[0018] Figure 5 A schematic diagram of the structure of a host provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0020] 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 the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0021] In view of the technical problem that the traditional VM startup process needs to go through image loading, OS initialization, and initialization operations of related services or applications, resulting in a long startup time, in the embodiment of the present application, a solution for VM startup based on memory snapshot is proposed to skip the steps of image loading, OS initialization, and service or application initialization in the traditional VM startup process, which can improve the VM startup efficiency. Furthermore, in the process of VM startup based on memory snapshot, the page loading sequence recording information based on the memory snapshot can load the missing page data in the memory snapshot when the GPA of the VM is accessed and a page fault information is generated, so that the page data in the memory snapshot can be loaded while running, instead of loading all the page data first and then running, which further improves the startup efficiency of the VM and shortens the VM startup time.

[0022] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0023] Figure 1 The following is a schematic diagram of the structure of a cloud service system provided by an exemplary embodiment of the present application. Figure 1 As shown, 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 .

[0024] In this embodiment, the host 102 can be any physical device that can provide hardware resources, such as a mobile phone, a notebook, 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 VM to run, such as but not limited to: a processor (CPU), a memory (such as memory), a network card, a persistent memory, an input / output device, and other devices with specific processing functions, such as an input / output memory management unit (IOMMU), wherein the IOMMU can be used for the conversion between the virtual machine physical address and the host physical address.

[0025] The host 102 has not only hardware resources, but also an operating system on top of the hardware resources. A virtual machine hypervisor 103 runs on top of the operating system. Figure 1 In the figure, a host computer is shown with a hypervisor 103 running on it as an example. The hypervisor 103 is used to create an isolated operating environment on the host computer, and to start or create and manage VMs in the isolated operating environment. The hypervisor 103 can be any software program, component or module that can create an isolated operating environment on the host computer, and to start or create and manage VMs in the isolated operating environment, without limitation. Optionally, the hypervisor 103 can be implemented as a virtual operating system emulator (Quick EMUlator, QEMU) or a hyper-function manager (Hypervisor), etc., without limitation. Among them, Hypervisor is also called Virtual Machine Monitor (VMM).

[0026] On a host 102, the hypervisor 103 can create one or more VMs. In this embodiment, VMs are divided into types, and VMs of the same type can be started using the same memory snapshot. For example, VMs of the same type can be VMs that provide the same function or service. VMs of the same type can be deployed on the same host 102 or on different hosts 102, and there is no limitation on this.

[0027] In this embodiment, the control node 101 is used to sense the startup or creation requirements of 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 is a VM that can be started based on a memory snapshot. For example, for a VM of the same type before the first VM (for example, it can be but not limited to the first VM started for the first time), it can be started in a traditional startup manner, and after starting, a memory snapshot is created according to the memory state of the VM, so that the same type of VM started after the VM can be started according to the memory snapshot, reducing the VM startup time and improving the VM startup efficiency. Optionally, the control node is also responsible for various management and control of the VM that has been started on at least one host, for example, responsible for monitoring the running status of the VM, responsible for allocating service requests to the VM, performing various configurations on the VM, and responsible for shutting down, migrating or pausing the VM, etc.

[0028] 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. 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.

[0029] There is no limitation on which virtual machine hypervisor among at least one virtual machine hypervisor the control node sends the VM start instruction to, that is, the implementation method of determining the target virtual machine hypervisor from at least one virtual machine hypervisor is not limited. For example, the amount of resources on the host where at least one virtual machine hypervisor is located can be obtained, the target host whose resource amount exceeds the set resource amount threshold can be determined, the virtual machine hypervisor on the target host can be used as the target virtual machine hypervisor, and a VM start request can be sent to the target virtual machine hypervisor so that the target virtual machine hypervisor can start the first VM on the target host. For another example, a virtual machine hypervisor can be randomly selected from at least one virtual machine hypervisor as the target virtual machine hypervisor, and a VM start request can be sent to the target virtual machine hypervisor so that the target virtual machine 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, the target host with better network performance can be selected, the virtual machine hypervisor on the target host can be used as the target virtual machine hypervisor, and a VM start request can be sent to the target virtual machine hypervisor so that the target virtual machine hypervisor can start the first VM on the target host.

[0030] In this embodiment, the target virtual machine hypervisor has a corresponding target memory space on the host where it is located. The target memory space is applied by the target virtual machine hypervisor from the memory space of the host and is used to store various data required by the target virtual machine hypervisor during operation, for example, including but not limited to the 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 also 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, and there is no limitation on this. Among them, 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: CPU, timer (timer), interrupt information, random access memory (RAM) and external devices, etc. The target virtual machine hypervisor can respond to the 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.

[0031] In this embodiment, in a virtualized environment, the physical storage space of the host is used by multiple VMs at the same time, but the host actually has only one physical storage space, and the starting address 0 of the physical address is also only one, which cannot meet the requirement that the physical addresses of all VMs start from 0. In this case, what the virtual machine hypervisor needs to do is to "cheat" the VM, that is, to allocate a physical address starting from address 0 to each VM through memory virtualization, and perform address conversion between the physical address of the VM and the physical address of the host, and finally access the physical address of the host.

[0032] The physical address allocated to each VM can be implemented as a guest physical address space (Guest Physical Address, GPA), which corresponds to a host physical address space (Host Physical Address, HPA). Each VM corresponds to a page table (Page Table), which is used to record the mapping relationship between GPA and host physical address (such as HPA). The page table can be implemented as an extended page table (Extended Page Tables, EPT) or a nested page table (Nested Page Tables, NPT). 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. 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.

[0033] In this embodiment, the target virtual machine hypervisor allocates a GPA for the first VM, and loads the target memory snapshot in the target memory space into the GPA to run the page data in the target memory snapshot in the GPA to achieve the purpose of starting 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 virtual machine hypervisor may attempt to obtain the page loading record information corresponding to the target memory snapshot, for example, obtaining the page loading record information from the VM startup instruction, or obtaining the page loading record information 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 in 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 In the example, the target memory snapshot includes 9 pages of data, each of which is A1, A2, A3, ..., A9. The order in which these pages 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 in which these pages are loaded and run form the page loading order record information.

[0034] 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.

[0035] Among them, if the page loading record information corresponding to the target memory snapshot is obtained, the target virtual machine management program can directly access the GPA, and in the process of accessing the GPA, according to the generated page fault information, the page data in the target memory space can be loaded while the loaded memory page data is run, and finally all the page data in the target memory snapshot are loaded into the GPA and completed to start the first VM. Specifically, if in the process of accessing the GPA, the GPA lacks the page data in the target memory snapshot required for the first VM to start, then the page fault information is generated, and the missing page data is determined according to the page loading sequence record information. For the convenience of description, the missing page data is referred to as the target page data, and then the target page data is loaded from the target memory space to the GPA, wherein the target page data is the page data corresponding to the page fault information in the target memory snapshot. Further, in the case of generating the page fault information, the EPT table corresponding to the first VM can be queried, and the GPA address of the target page data can be converted into the HPA address of the host, and then the memory position corresponding to the HPA address in the target memory space is determined, and the target page data is read from the memory position and written into the GPA. As the GPA is continuously accessed, page fault information is continuously generated, and eventually all the page data in the target memory snapshot can be loaded into the GPA and run 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, so that the missing page data can be loaded while the loaded page data is run, rather than loading all the page data into the GPA at one time and then running all the page data on demand, which is conducive to further improving the startup efficiency of the VM and shortening the VM startup time.

[0036] exist Figure 2 A method of starting the first VM is shown in an exemplary manner, but is not limited to this. Figure 2In the figure, the number of times the target memory snapshot is restored is used as an example for illustration. The target memory snapshot is restored once, which means that a VM is started. Different recovery processes may be used to start different VMs, or they may be multiple starts of the same VM. During the first recovery process of the target memory snapshot, all page data in the target memory snapshot are loaded into the GPA of the corresponding VM at one time, and the page data in the GPA is run in sequence according to the loading to complete the first recovery process of the target memory snapshot. During the first recovery process, the page loading sequence record information corresponding to the target memory snapshot is formed at the same time, and the page loading sequence record information is stored in the memory recovery database. In this way, when the target memory snapshot is restored for the Nth time (N>1, and N is a positive integer), that is, when the VM is started based on the target memory snapshot for the Nth time, the virtual machine hypervisor can obtain the page loading sequence record information corresponding to the target memory snapshot. The page loading sequence record information is illustrated using A4->A6->A3... as an example. The loading order of subsequent page data is not in Figure 2 embodied in. Among them, when the GPA is initially accessed, page fault information can be generated, and according to the page loading sequence recording 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 run; or, before accessing the GPA, the page loading sequence recording information is firstly recorded, 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 run. Then, in the process of running page data A4 in the GPA, page fault information is generated, and according to the page loading sequence recording 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 run. Further, in the process of running page data A6 in the GPA, page fault information is generated, and according to the page loading sequence recording 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 run, until all page data in the target memory snapshot are loaded into the GPA and run to completion, at which time, the first VM is started. In this embodiment, the Nth restoration process of the target memory snapshot is used to start the first VM. In addition, in this embodiment, the page loading sequence record information is generated in the first restoration process of the target memory snapshot as an example, but it is not limited to this. The page loading sequence record information can be generated in any restoration process before the Nth restoration process.

[0037] 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.

[0038] Further optionally, the target virtual machine hypervisor may also record the order in which the page data in the target memory snapshot is loaded into the GPA to obtain the page loading sequence record information corresponding to the target memory snapshot; the page loading sequence record information is stored 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 the subsequent startup process. Among them, 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 the first time that all the page data in the target memory snapshot is 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 is loaded into the GPA is not recorded in the process of starting the VM before this. At this time, the page loading sequence record information is also unknown.

[0039] like Figure 2 As shown, during the first memory snapshot recovery process, page data A4, A6 and A3... in the target memory space are all loaded into the GPA, and then the GPA is accessed and the loaded page data A4, A6 and A3... are run as needed. In this process, the loaded page data can be marked, and the order in which the page data is loaded is recorded to generate page loading sequence record information A4->A6->A3..., and other page data are not displayed, and the page loading sequence record information is stored 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 during the startup process.

[0040] The implementation method of storing the page loading sequence record information in the memory recovery database is not limited. For example, the target virtual machine management program sends the page loading sequence record information to the control node, and the control node stores the page loading 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 management program, and the target virtual machine management program accesses the address information and stores the page loading sequence record information in the memory recovery database.

[0041] In an optional embodiment, when the target virtual machine manager obtains the page loading sequence record information, the implementation method for the target virtual machine manager to obtain the page loading sequence record information is not limited. For example, when the control node senses that the first VM needs to be started, in addition to sending a VM startup instruction to the target virtual machine manager 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 manager. 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 manager. For the target virtual machine manager, it can determine whether the VM startup instruction contains the page loading sequence record information; if the VM startup instruction contains the 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.

[0042] 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 may 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 may 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 may actively initiate an acquisition request to the control node, and may 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.

[0043] In the above embodiments of the present application, the 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 the 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.

[0044] 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, and can determine the loading address of the first cloud disk of the target memory snapshot based on the description information of the target memory snapshot and in combination with the correspondence, establish an association relationship between the loading address of the first cloud disk and the first VM, obtain the target memory snapshot from the first cloud disk based on the loading address of the first cloud disk, and store the target memory snapshot in the target memory space.

[0045] 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 for generating system disk snapshots is used, the system disk snapshot can be stored as cloud disk data. For example, the EBS technology is used to store the system disk snapshot in the cloud disk to obtain the EBS cloud disk data of the system disk snapshot. For the sake of distinction and description, the cloud disk storing the system disk snapshot is referred to as the second cloud disk.

[0046] Based on this, the target virtual machine 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 during the operation of the first VM and is responsible for storing data generated during the operation of the first VM. For example, the VM startup instruction may include description information of the system disk snapshot. The description information of the system disk snapshot may be the ID, status information or save time information of the system. Based on the description 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.

[0047] 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 through shared 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 to avoid reading operations on the shared GPA and destroying 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 can be first determined whether the shared GPA already has 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 the same type of VM 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 also 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.

[0048] Furthermore, during the operation of the first VM, a private GPA may 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. Among them, by using the same memory snapshot in the shared GPA to start the VM with the same type of VM on the same host, duplicate storage space occupation is eliminated, and there is no need to repeatedly load the memory snapshot into the GPA, thereby reducing the loading time of the memory snapshot. The loading time of the memory snapshot can be reduced from the time complexity O(N) to the time complexity 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.

[0049] Figure 3a A flowchart of a virtual machine startup method provided by an exemplary embodiment of the present application is provided. The virtual machine startup method is applied to a virtual machine management program running on a host, such as Figure 3a As shown, the method includes:

[0050] 301a, responding to a virtual machine VM startup instruction, loading a target memory snapshot required for starting a first VM on a host into a target memory space of a virtual machine hypervisor, and allocating a client physical address space GPA for the first VM;

[0051] 302a. 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 into the GPA according to the page loading sequence record information;

[0052] 303a. 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.

[0053] 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 are 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.

[0054] 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.

[0055] 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.

[0056] In an optional embodiment, in response to a virtual machine VM startup instruction, a target memory snapshot required to start a first VM is loaded into a target memory space corresponding to a 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; mounting a first cloud disk storing the target memory snapshot to the first VM according to the description information; obtaining the target memory snapshot from the first cloud disk and storing it in the target memory space.

[0057] In an optional embodiment, 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 also includes: during the operation of the first VM, allocating a private GPA to the first VM to store page data that has changed relative to a target memory snapshot generated by the first VM.

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

[0059] In an optional embodiment, before loading the target memory snapshot and the system disk, the method further includes: creating a target memory snapshot and a system disk snapshot, and creating the two into a cloud disk. Figure 3b The figure shows a process diagram of creating a target memory snapshot and a system disk snapshot, loading the target memory snapshot, mounting the system disk, and restoring the target memory snapshot.

[0060] 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.

[0061] Figure 3c A flowchart of a container startup method provided for an exemplary embodiment of the present application is provided, and the method is applied to a container management program running on a host, such as Figure 3c As shown, the method includes:

[0062] 301c, in response to the container start instruction, loading the target memory snapshot required for starting the first container on the host into the target memory space of the container management program, and allocating the client physical address space GPA for the first container;

[0063] 302c. 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 into the GPA according to the page loading sequence record information;

[0064] 303c. 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.

[0065] 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 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.

[0066] Among them, the detailed implementation content and effect description of the upper container starting method can be found in the above-mentioned embodiment, which will not be repeated here.

[0067] It should be noted that the execution subject 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 subject of steps 301 to 303 can be device A; for another example, the execution subject of steps 301 and 302 can be device A, and the execution subject of step 303 can be device B; and so on.

[0068] 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 executed in parallel, and 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., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0069] Figure 4 A structural diagram of a virtual machine startup device provided for an exemplary embodiment of the present application, the device is applied to a virtual machine management program running on a host, and the device includes: a loading module 41, an allocation module 42, an access module 43 and an operation module 44.

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

[0071] 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 the 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 through the loading module 41;

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

[0073] 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 to 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.

[0074] 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 the 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 during the startup process.

[0075] 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 contained, 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.

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

[0077] 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.

[0078] In an optional embodiment, the allocation module is specifically used to: allocate a shared GPA to the first VM, the shared GPA is shared by the first VM and other VMs of the same type on the host; during the operation of the first VM, allocate 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.

[0079] Figure 4 The device shown can also be applied to a container management program on a host, specifically,

[0080] A loading module, configured to respond to a container startup instruction, load a target memory snapshot required for starting the first container on the host into a target memory space of the container management program, and allocate a client physical address space GPA to the first container through an allocation module;

[0081] 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 the page fault information is generated when the loading module accesses the GPA, the target page data is loaded from the target memory space into the GPA according to the page loading sequence record information;

[0082] 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.

[0083] 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 here.

[0084] Figure 5 The schematic diagram of the structure of a host provided by the exemplary embodiment of the present application. Figure 5 As shown, the host includes: a memory 54 and a processor 55.

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

[0086] The memory 54 can be implemented by any type of volatile or nonvolatile 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 storage, flash memory, magnetic disk or optical disk.

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

[0088] 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.

[0089] 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.

[0090] In an optional embodiment, the processor 55 is also 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.

[0091] In an optional embodiment, when the processor 55 responds to a 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 a VM startup instruction sent by a 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.

[0092] In an optional embodiment, the processor 55 is further used to: respond to the VM startup instruction and mount a system disk 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.

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

[0094] Further, if Figure 5 As shown, the host also includes other components such as a communication component 56 or a power component 58. Figure 5 Only some components are shown schematically, which does not mean that the host only includes Figure 5 Components shown.

[0095] 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 here.

[0096] The embodiment of the present application also provides a host, the implementation structure of the host is similar to Figure 5 The implementation structure of the host shown is the same or similar, please refer to Figure 5 The host provided in this embodiment is implemented as shown in the structure of the host. Figure 5The difference between the hosts in the illustrated embodiments mainly lies in that: the container management program is stored in the processor execution memory. For the host provided in this embodiment, the container management program stored in the processor execution memory 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, directly access the GPA, and when the page fault information is generated when accessing the GPA, load the target page data from the target memory space to 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.

[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 here.

[0098] Accordingly, the embodiment of the present application further provides a computer-readable storage medium storing a computer program, which can achieve the above-mentioned Figure 3a and Figure 3c The steps in the method embodiment shown can be performed by a processor. 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.

[0099] 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 based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

[0100] The above-mentioned display includes a screen, and the screen 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 a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0101] The power supply assembly provides power to various components of the device where 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 where the power supply assembly is located.

[0102] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. 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 an audio signal.

[0103] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may 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 may adopt the form of a computer program product implemented in one or more computer-readable storage media (including but not limited to disk storage, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage, etc.) containing computer-usable program code.

[0104] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented 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 processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing 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 an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0106] 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, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

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

[0108] 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.

[0109] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by 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 technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape 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 temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0110] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0111] The above are only 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 modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should 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 hypervisor; 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 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.

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

Cited By

  • Dynamic mapping method and system for cloud host with direct connection equipment

    CN119960902A