Method, device, equipment and product for verifying operating environment of virtual machine

By measuring the status of the kernel, hardware devices and software components in the virtual machine and verifying the virtual machine operating environment, it solves the problem that the cloud platform provider cannot ensure the security and performance of the virtual machine, and realizes the security of the virtual machine and its components. Dynamic management of reliability and performance reduces the risk of container failure and optimizes operating efficiency.

CN118585285APending Publication Date: 2024-09-03BEIJING VOLCANO ENGINE TECH CO LTD

Patent Information

Application Number
CN202410599359.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-14
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing technology cannot ensure the security and performance trustworthiness of the virtual machine operating environment of the cloud platform provider. In particular, the status of hardware and software components cannot be verified in real time when the container is started, making it difficult to identify and solve potential problems and performance bottlenecks.

Method used

By measuring the status of the kernel, hardware devices (such as accelerators and network cards) and software components in the virtual machine, we comprehensively verify the virtual machine's operating environment to ensure its security and performance, dynamically identify and solve potential problems, and optimize operating efficiency.

Benefits of technology

It achieves a safe and trusted state of virtual machines and related components, reduces the risk of container startup and running failures, improves user experience, discovers and solves potential performance bottlenecks, and optimizes operating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585285A
    Figure CN118585285A
Patent Text Reader

Abstract

The embodiment of the invention relates to a method, a device, equipment and a product for verifying a running environment of a virtual machine. The method includes determining a first metric result of a kernel of a virtual machine in response to receiving a request to launch a container in the virtual machine. The method further includes determining a second metric result of a hardware device associated with the virtual machine and a third metric result of a software component associated with the virtual machine, where the hardware device includes at least an accelerator device and a network card, and the software component includes at least a management component that manages the container. In addition, the method further comprises the step of verifying the running environment of the virtual machine based on the first measurement result, the second measurement result and the third measurement result. Through the method, not only can the kernel of the virtual machine be dynamically verified, but also hardware equipment and software components related to the virtual machine can be verified, so that the virtual machine and related hardware and software thereof can be ensured to meet safety requirements, the safety of an operating environment is ensured, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of computers, and more specifically, to a method, apparatus, device, and product for verifying an operating environment of a virtual machine. Background Art

[0002] With the booming development of cloud computing and big data technology, more and more businesses are choosing to migrate their businesses to the cloud to enjoy efficient and flexible resource utilization and data processing capabilities. Businesses can quickly deploy and expand their businesses through cloud services without worrying about the limitations of physical equipment and focus on the business itself.

[0003] At the same time, container technology, as an emerging virtualization technology, has brought new application deployment and management methods to businesses. It decouples applications from the underlying operating system by packaging applications and their related dependencies into an independent executable unit, namely a container. In cloud container services, the security of the service's operating environment is the cornerstone of ensuring service stability, data security, and business continuity. Summary of the invention

[0004] Embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a product for verifying an operating environment of a virtual machine.

[0005] According to a first aspect of the present disclosure, a method for verifying the operating environment of a virtual machine is provided. The method includes determining a first measurement result of a kernel of the virtual machine in response to receiving a request to start a container in the virtual machine. The method also includes determining a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine, wherein the hardware device includes at least an accelerator device and a network card, and the software component includes at least a management component for managing the container. In addition, the method also includes verifying the operating environment of the virtual machine based on the first measurement result, the second measurement result, and the third measurement result.

[0006] In a second aspect of the present disclosure, a device for verifying the operating environment of a virtual machine is provided. The device includes a first measurement result determination module, which is configured to determine a first measurement result of a kernel of the virtual machine in response to receiving a request to start a container in the virtual machine. The device also includes a second measurement result determination module, which is configured to determine a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine, wherein the hardware device includes at least an accelerator device and a network card, and the software component includes at least a management component for managing the container. In addition, the device also includes a virtual machine verification module, which is configured to verify the operating environment of the virtual machine based on the first measurement result, the second measurement result, and the third measurement result.

[0007] In a third aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory coupled to the processor, wherein the memory has instructions stored therein, and when the instructions are executed by the processor, the electronic device executes the method according to the first aspect.

[0008] In a fourth aspect of the present disclosure, a computer program product is provided, on which computer executable instructions are stored, wherein the computer executable instructions are executed by a processor to implement the method of the first aspect.

[0009] The purpose of this Summary is to introduce a selection of concepts in a simplified form that are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0011] Figure 1 A schematic diagram showing an example environment in which some embodiments of the present disclosure may be implemented;

[0012] Figure 2 A flowchart of a method for verifying an operating environment of a virtual machine according to some embodiments of the present disclosure is shown;

[0013] Figure 3 A schematic diagram for constructing a secure and trusted execution environment according to some embodiments of the present disclosure is shown;

[0014] Figure 4 A schematic diagram showing the architecture of a kernel of a virtual machine, hardware devices of the virtual machine, and software components that need to be verified during the process of starting a container in some embodiments of the present disclosure is shown;

[0015] Figures 5A-5D A schematic diagram showing an example process for verifying the operating environment of a virtual machine when starting a container according to some embodiments of the present disclosure;

[0016] Figure 6 A block diagram showing an apparatus for verifying an operating environment of a virtual machine according to some embodiments of the present disclosure; and

[0017] Figure 7 A block diagram of an electronic device according to some embodiments of the present disclosure is shown.

[0018] Throughout the drawings, the same or similar reference numbers denote the same or similar elements. DETAILED DESCRIPTION

[0019] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, but rather these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0021] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects, unless explicitly stated. Other explicit and implicit definitions may also be included below.

[0022] In the mode of providing model services for multiple users, users can use the machine learning model provided by the model provider to carry out model training, reasoning, evaluation, and fine-tuning tasks on the cloud platform provider's platform. Generally, the cloud platform provider needs to ensure that its basic settings are secure and reliable. In the related art, in order to ensure the security of the operating environment, a static measurement method is adopted, that is, the relevant data and configuration files are placed in the image of the virtual machine, so that these data and files can be directly measured. However, this method cannot ensure that the loading process of the executable file each time the task is started is also reliable. Moreover, this static measurement method cannot ensure that the hardware related to the operating environment is also reliable. In addition, there is no universal method in the related art to measure the credibility of the entire environment.

[0023] According to an embodiment of the present disclosure, when a request to start a container is received, the kernel of the virtual machine will be measured, such as measuring the state and performance of the kernel, so that the health information of the virtual machine infrastructure can be identified, thereby helping to identify potential problems or performance bottlenecks. Then, the hardware devices associated with the virtual machine can also be measured, such as measuring the performance and state of accelerator devices and network cards, so as to ensure that these hardware devices are in normal working state. Software components associated with the virtual machine can also be measured, such as measuring software components for managing and orchestrating containers, so as to help identify potential configuration problems to ensure the normal operation of the container. Then, all the previous measurement results are combined to dynamically and comprehensively verify the operating environment of the virtual machine.

[0024] This comprehensive and universal verification method helps to dynamically ensure that the virtual machine and its related components meet the container's operating requirements, thereby reducing the risk of container startup and operation failure. In addition, through the method of early measurement and verification, potential problems can be discovered and resolved before the container runs, ensuring the security of the operating environment and improving the user experience. In addition, this dynamic method can also discover potential performance bottlenecks, thereby optimizing operating efficiency.

[0025] Figure 1 1 is a schematic diagram of an example environment 100 in which some embodiments of the present disclosure may be implemented. Figure 1 As shown, the example environment 100 includes at least a model provider 110, a cloud platform provider 120, and a client 130. Users can rent the facilities of the cloud platform provider 120 through the client 130 to carry out their tasks, such as model reasoning tasks or model training tasks and fine-tuning tasks. The model provider 110 can provide models related to its tasks to the client 130 (for example, these models can be machine learning models), and the model provider 110 can package and publish these machine learning models so that other users can access and use them through the cloud platform provider 120. The cloud platform provider 120 is used to provide users with the infrastructure for running these models, and can also provide users with a friendly user interface and management tools so that users can use and manage their rented computing resources, so that users can focus on professional model tasks through the client 130 without the effort of building hardware equipment and building machine learning models.

[0026] Continue to refer Figure 1 In order to make the model provider 110 and the client 130 trust the infrastructure provided by the cloud platform provider 120, the cloud platform provider 120 can use a verification mechanism to verify that the operating environment of the infrastructure it provides and its components 122 are trustworthy. The cloud platform provider 120 can verify the credibility of the operating environment it provides, such as a virtual machine, and send it to the client 130 and the model provider 110, so that the two parties can safely upload relevant data to the cloud platform provider 120 platform to perform model tasks. In order to further ensure the credibility of the operating environment, the cloud platform provider 120 can also verify the software components and hardware components in the trusted environment. Through this comprehensive verification method, it can provide a strong guarantee for the smooth progress of the machine learning model tasks initiated by users.

[0027] The following will combine Figures 2 to 7The process according to the embodiment of the present disclosure is described in detail. For ease of understanding, the specific data mentioned in the following description are exemplary and are not intended to limit the scope of protection of the present disclosure. It is understood that the embodiments described below may also include additional actions not shown and / or the actions shown may be omitted, and the scope of the present disclosure is not limited in this respect.

[0028] Figure 2 A flowchart of a method 200 for verifying the operating environment of a virtual machine according to some embodiments of the present disclosure is shown. The method 200 may be referred to as Figure 1 The cloud platform provider 200 shown is executed. In box 202, in response to receiving a request to start a container in a virtual machine, a first measurement result of the kernel of the virtual machine is determined. The user can use the client 130 to rent the model of the model provider 110 on the platform provided by the cloud platform provider 120 to carry out the model task. When the user initiates a model task request through the client 130, the cloud platform provider 120 can receive the request initiated by the user and evaluate the kernel in the operating environment of the virtual machine according to the user's request. The kernel is a key element in the operating environment of the virtual machine, and its performance directly affects the execution efficiency of the task, so that a measurement result about the kernel can be obtained.

[0029] In box 204, determine the second measurement result of the hardware device associated with the virtual machine and the third measurement result of the software component associated with the virtual machine, wherein the hardware device includes at least an accelerator device and a network card, and the software component includes at least a management component for managing the container. In some embodiments, a request to verify the measurement state of the current hardware device can be sent to the manufacturer of the hardware device, and the measurement result of the hardware device is determined according to the response of the manufacturer of the hardware device. For example, in some embodiments, the accelerator device can be a homogeneous or heterogeneous graphics acceleration unit (GPU), etc. In some embodiments, the network card can be a remote network interface network card (RNIC). In some embodiments, the management component of the management container can be a node agent or a life cycle management component of the container. In some embodiments, the measurement value of the software component can be calculated to determine the measurement result of the software component.

[0030] In block 206, the operating environment of the virtual machine is verified based on the first measurement result, the second measurement result, and the third measurement result. In some embodiments, the operating environment of the virtual machine is comprehensively verified based on the measurement results of the kernel of the virtual machine, the measurement results of the hardware devices associated with the virtual machine, and the measurement results of the software components associated with the virtual machine. In some embodiments, the above measurement results can be integrated into a measurement report to verify the credibility of the operating environment of the virtual machine by a third party.

[0031] In an embodiment of the present disclosure, when a request to start a container is received, the kernel of the virtual machine will be measured, such as the state and performance of the kernel, which can help identify information about the virtual machine infrastructure and thus identify potential problems. At the same time, the performance and state of hardware devices associated with the virtual machine, such as accelerator devices and network cards, can also be comprehensively and dynamically measured to ensure that these hardware devices are in a normal state. In addition, software components associated with the virtual machine can also be measured, such as software components that manage and orchestrate containers, to help identify potential configuration problems and avoid vulnerabilities in software components to ensure that the container works properly. Next, all the previous measurement results are combined to dynamically and comprehensively verify the operating environment of the virtual machine.

[0032] In this way, not only can the virtual machine operating environment be verified in real time, ensuring that the virtual machine and its related hardware and software components are in a secure and trustworthy state, but it can also effectively resist potential security threats within the virtual machine. At the same time, this method can also prompt potential performance bottlenecks or risk points, providing support for early performance optimization or fault repair, thereby significantly improving the overall user experience. In summary, this comprehensive and dynamic security and performance management strategy can ensure the stable operation of virtual machines.

[0033] Figure 3 FIG. 3 is a schematic diagram of a method for constructing a secure and trusted execution environment 300 according to some embodiments of the present disclosure. Figure 3 , the host (CPU) 302 is embedded with a special trusted module 304, which shares the physical platform with the host (CPU) 302. The trusted module 304 has the ability to define a security area on the host operating system / virtual machine monitor 306, which can ensure that the virtual machines (such as virtual machine 308) running in this security area maintain credibility, and any unauthorized interface or program cannot access this security area. In contrast, the virtual machine 310 is an ordinary virtual machine and does not have such a feature, and there is a risk of external attacks.

[0034] Continue to refer Figure 3 , the trusted module 304 can not only divide the security area to defend against external attacks, but also be responsible for the interaction check between the trusted virtual machine 308 and the ordinary virtual machine 310. Unlike the container group 316, the container group 312 and the container group 314 run in the trusted virtual machine 308, which can make the data running in the container group 312 and the container group 314, such as the machine learning model file, in a safe state and not be maliciously stolen, tampered or unauthorized access, while the data running in the container group 316 has a high risk of being stolen and tampered.

[0035] In some embodiments, the cloud platform provider 120 can create a trusted virtual machine using a host (CPU) architecture of different manufacturers. In some embodiments, the cloud platform provider 120 can create a trusted virtual machine using a host (CPU) architecture of the same manufacturer. In some embodiments, the machine learning model file provided by the model provider 110 is loaded into the container group 312 or container group 314 in the trusted virtual machine 308 provided by the cloud platform provider 120 for operation. By dividing the secure area of ​​the trusted virtual machine by the trusted module, the risk of the machine learning model running in the virtual machine being stolen can be reduced, and the security of the operating environment can be improved.

[0036] Figure 4 FIG. 4 is a schematic diagram showing an architecture 400 of a virtual machine kernel, a virtual machine hardware device, and software components that need to be verified in some embodiments of the present disclosure. Figure 4 , Figure 4 The architecture of firmware 410, boot loader 420, hardware component 430, kernel 440 and software component 450 is shown, and these components or architectures are associated with the operating environment of the virtual machine when the container is started. During the startup process, the boot loader 420 runs first, loads and starts the kernel 440 or firmware 410. The kernel 440 then takes over the control of the system, manages the hardware 430 and software resources 450, to ensure the stable operation of the system. The firmware 410 provides hardware support and interfaces throughout the process, so that the kernel 440 and the boot loader 420 can interact with the hardware 430. Among them, the firmware 410 is a program written into the hardware device 430, which is responsible for initializing the hardware 430 and providing an interface for the operating system to interact with the hardware 430. The firmware 410 is the basis for the normal operation of the hardware device 430 and determines the function and performance of the hardware device 430. In some embodiments, the firmware 410 can be an open virtual firmware (OVMF).

[0037] Continue to refer Figure 4 , the boot loader 420 is the first program that runs after the computer is turned on. Its main task is to initialize the system hardware 430 and the software environment 450, load and start the kernel 440 or the firmware 410. Specifically, the boot loader 420 will initialize and configure the hardware device 430, set the memory map, load the kernel image 440 or the firmware 410 into the memory, and jump to the entry point of the kernel 440 or the firmware 410. The existence of the boot loader 420 ensures that the operating system can be loaded and run correctly. In some embodiments, the boot loader 420 can be a multi-operating system boot program (GRUB) and a verification component (such as Shim) in a secure boot environment, and the two work together to ensure correct loading.

[0038] Continue to refer Figure 4, kernel 440 is an operating system (e.g., Figure 3 The host operating system / virtual machine monitor 306 shown in FIG. 4 is a core component of the host operating system / virtual machine monitor 306, which is responsible for managing the hardware 430 and software resources 450 of the virtual machine. In some embodiments, the hardware device 430 includes at least a (remote) network interface card 431 and its driver 432, a GPU device 433 and its driver 434, and other accelerator devices 435 and their drivers 436. Among them, the (remote) network interface card 431 is responsible for transmitting data related to the container startup request, and the GPU device 433 and other accelerator devices 435 are used to calculate data related to the container startup request.

[0039] Continue to refer Figure 4 In some embodiments, the software components include at least a node agent 453, a lifecycle management component (Containerd) 452, and a container runtime class (Runc) 451 of the container. Among them, the node agent 453 is mainly responsible for managing the containers on the node and communicating with the main control plane. The lifecycle management component 452 is responsible for managing the lifecycle of the container, including the creation and deletion of the container. As a container runtime, the lifecycle management component 452 will call the container runtime class 451 to actually create and run the container. The container runtime class 451 is a command line tool that creates and runs containers according to the OCI (Open Container Interface) standard.

[0040] like Figure 4As shown, in some embodiments, in order to ensure the credibility of the operating environment of the virtual machine started by the container, the kernel 440 can be measured to obtain the measurement results of the kernel 440 of the virtual machine. In an embodiment of the present disclosure, in order to ensure the credibility of the operating environment started by the container, the hardware device 430 can also be measured to obtain the measurement results of the hardware device 430 of the virtual machine. For example, it can be measured whether the version installed by the driver 434 of the GPU device 433 is correct or the security vulnerability has been patched, and whether the GPU device 433 performs normally. In an embodiment of the present disclosure, in order to ensure the credibility of the operating environment started by the container, the upper-layer software component 450 can also be measured to obtain the measurement results of the software component 450. In some embodiments, the integrity and measurement architecture (IMA) 441 can be used to implement integrity checks and measurements of the software components 450 at runtime, so as to ensure that these software components 450 have not been tampered with or replaced. In some embodiments, the above-mentioned measurement results of the kernel, hardware and software are combined and sent to a third party to verify the credibility of the operating environment of the virtual machine running the container. In some embodiments, it can be measured from the underlying firmware 410 upward. This bottom-up approach of measuring the virtual machine's kernel, hardware devices, and software components can fully ensure the credibility of the virtual machine's operating environment, thereby avoiding the risk of data loss.

[0041] The following will be combined Figures 5A-5D To illustrate an example process for verifying a virtual machine operating environment when starting a container according to some embodiments of the present disclosure. Figure 5A FIG. 5 is a schematic diagram showing an example process 500A for verifying an operating environment when starting a container according to some embodiments of the present disclosure. Figure 5A As shown, at 510A, a request to start a container is received. In some embodiments, a user can Figure 1 The client 130 initiates a request for a machine learning model task to the cloud platform provider 120, so that the cloud platform provider 120 can analyze the task request initiated by the user to arrange appropriate computing resources for the task. Figure 1 After receiving the request to start the container initiated by the user through the client 130, the cloud platform provider 120 can verify whether the operating environment of the virtual machine to be used by the user is credible, so that Figure 1 The model provider 110 and the virtual machine of the user-trusted cloud platform provider 120 are shown. Figure 5A At 520A, a measurement report is obtained, and the measurement report 522A is composed of kernel measurement results, hardware measurement results, and measurement results of software components.

[0042] The following will be combined Figure 5BTo illustrate the steps of obtaining a metric report in some embodiments of the present disclosure. Figure 5B A schematic diagram of an example architecture 500B for verifying an operating environment when starting a container in some embodiments of the present disclosure is shown. Figure 5B , a trusted virtual machine 504B is built on the virtual machine monitor 502B. In some embodiments, after receiving a request initiated by a user, the node agent 506B of the container in the virtual machine 504B can initiate a verification instruction to the verification agent 508 through 531B, so that the verification agent 508B will obtain a measurement report from the firmware 510B through 532B. This measurement report includes kernel measurement results, hardware device measurement results, and software component measurement results. In some embodiments, the measurement can be carried out upward from the firmware 510B as a starting point.

[0043] The following will be combined Figure 5C-5D To illustrate the method for users to obtain hardware device measurement results and software component measurement results in some embodiments of the present disclosure. Figure 5C 500C is a schematic diagram of a measurement hardware device according to some embodiments of the present disclosure. Figure 5C As shown, at 510C, a measurement request is sent to the hardware device manufacturer. In some embodiments, if the hardware device is a GPU device, the hardware failure of the GPU device or the presence of a potential security vulnerability can be measured through the diagnostic tool or firmware update of the GPU device manufacturer. For example, a request to measure the GPU device can be sent to the GPU device manufacturer through the diagnostic tool. For example, a confirmation request can also be sent to the device manufacturer to determine whether the driver of the GPU is the latest version of the driver. In some embodiments, a request to measure the performance of the GPU device can also be sent to the device manufacturer. In some embodiments, the content of the hardware measurement request can include parameters such as the attributes of the device, the functions and performance of the device, and the version information of the device.

[0044] Continue to refer Figure 5C , at 520C, a response to the measurement request is received from the manufacturer. In some embodiments, when a confirmation request is sent to the device manufacturer to determine whether the driver of the GPU is the latest version of the driver, the manufacturer may respond that it is the latest version of the driver or not. In some embodiments, when a request is sent to the device manufacturer to measure the performance of the GPU device, the device manufacturer may return the current performance parameters of the GPU device.

[0045] Continue to refer Figure 5C, at 530C, the measurement result of the hardware device is determined based on the response to the measurement request. In some embodiments, when a confirmation request is sent to the device manufacturer as to whether the driver of the GPU is the latest version of the driver, the manufacturer can respond that it is the latest version of the driver or not, so that the measurement result of the GPU device can be generated according to the received response of the manufacturer to its request. In some embodiments, when a request is sent to the device manufacturer about measuring the performance of the GPU device, the device manufacturer can return the current performance parameters of the GPU device, so that the measurement result of the current GPU device can be determined according to the received response of the manufacturer to the performance parameters. Through this method of measuring the hardware devices related to the virtual machine, potential security threats such as malicious hardware, hardware failures or tampered hardware components can be discovered and prevented in a timely manner, so as to avoid attacks from the hardware devices in the virtual machine running environment. Alternatively, the physical bandwidth, transmission delay, and transmission error rate of the network card can also be evaluated to determine the measurement result of the network card.

[0046] Figure 5D 500D is a schematic diagram of a measurement software component of some embodiments of the present disclosure. In some embodiments, the method of measuring software components can be designed based on the integrity measurement architecture. Figure 5D As shown, at 510D, a measurement algorithm is selected for the software component. In some embodiments, a suitable measurement algorithm (such as SHA-256, SHA-512) can be selected to calculate the hash value or other types of digital fingerprints of the software component. These suitable measurement algorithms can ensure that even small changes in files will cause significant changes in the measurement results. With the help of a suitable measurement algorithm, malicious changes in software components can be accurately identified, thereby improving security.

[0047] Continue to refer Figure 5D At 520D, the metric value of each file in the software component installation directory is calculated according to the predefined evaluation strategy. In some embodiments, in order to ensure the flexibility and portability of the measurement of the operating environment, after traversing each file in the software installation directory, only the hash value of the file of the software component in the predefined evaluation strategy can be calculated. For example, the predefined evaluation strategy specifies that the metric value of each file in the software component installation directory must be calculated. Figure 4 If the node agent 453, cycle management component 452 and container runtime class 451 shown in the figure are measured, the hash values ​​of these software components must be calculated, and the files of other software components are flexibly selected to be measured or not measured. These predefined software components are associated with container startup. By this flexible way of only calculating the measurement values ​​of predefined software components, computing power can be saved, thereby improving operating performance and efficiency.

[0048] Continue to refer Figure 5D , at 530D, the measurement values ​​are compared to determine the measurement results of the software components in the predefined evaluation strategy. In some embodiments, when measuring the predefined files in the software component, the hash value (and the related file or directory identifier) ​​calculated after the traversal can be compared with the corresponding hash value stored in the database. If the calculated hash value matches the hash value in the database, then it can be considered that the software component is complete and has not been tampered with. If it does not match, it means that the file has been modified or damaged. In this way, the integrity and security of the files of the software components in the predefined evaluation strategy can be ensured, thereby ensuring that the insertion of malicious software can be prevented.

[0049] return Figure 5A At 530A, the resulting measurement report is sent to a third party for verification. Figure 5B After obtaining the measurement report including kernel measurement results, hardware measurement results and software measurement results, the verification agent 508B can send it to the third party 512B through 533B to obtain the verification result on the credibility of the virtual machine's operating environment. The third party 512B is outside the virtual machine 504B, which can ensure the objectivity and authenticity of the verification report generated by the third party 512B. In some embodiments, the third party 512B is configured with a key proxy service and a verification service 514B, wherein the key proxy service is a security-centric service used to store, manage and back up encryption keys used by applications and users, and can usually distribute corresponding keys when the verification is successful. In some embodiments, when it is confirmed that the operating environment of the virtual machine 504B is trustworthy, it can be sent to the third party 512B. Figure 1 The model provider 110 and the client 130 in the example send an indication that the cloud platform provider 120 is trustworthy.

[0050] Continue to refer Figure 5A At 540A, a verification report is received, and if the third party verification is correct, the key of the container image can be returned. Figure 5B , when the verification service 514B of the third party 512B determines the authenticity of the measurement report according to the predefined evaluation strategy, the third party 512B can send the confirmation details of the measurement report and the key of the container image repository 518B related to the startup container to the verification agent 508B through 534B.

[0051] Return to reference Figure 5A , at 550A, the container image is downloaded and the container image is decrypted using the obtained key. Figure 5B, when the verification agent 508B receives the verification result that the operating environment of the virtual machine 504B is credible and the key for decrypting the container image, the node agent 506B can download the corresponding container image from the container image repository 518B at 535B through the container cycle management component 516B, and decrypt the encrypted container image through 536B, so that the decrypted container image 520B can be obtained. In some embodiments, the downloaded decrypted container image 520B can be backed up to the local storage device 524B. In some embodiments, the local storage device 524B is a random access device with a certain structure. The reading and writing of this device are performed in blocks. The buffer can be used to store temporary data. When the conditions are ripe, it is written from the cache to the device at one time or read from the device to the buffer at one time.

[0052] Continue to refer Figure 5A , at 560A, start the container. Combine Figure 5B , after obtaining the decrypted container image 520B, the container cycle management component 516B can call the container runtime class 522B through 537B to create a new container process according to the configuration information of the container (for example, the container image 520B, etc.), and set the container namespace, control group and other necessary isolation measures to actually create and run the container. In some embodiments, when the operating environment 504B of the virtual machine is confirmed to be credible, the machine learning model file can be loaded into the already started container for operation. In some embodiments, the inference, fine-tuning and other tasks of the machine learning model file can be performed by an accelerator device.

[0053] Figure 6 FIG. 6 is a block diagram of an apparatus 600 for verifying the operating environment of a virtual machine according to some embodiments of the present disclosure. Figure 6 As shown, the device 600 includes a first measurement result determination module 602, which is configured to determine a first measurement result of the kernel of the virtual machine in response to receiving a request to start a container in the virtual machine. The device 600 also includes a second measurement result determination module 604, which is configured to determine a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine, wherein the hardware device includes at least an accelerator device and a network card, and the software component includes at least a management component for managing the container. In addition, the device 600 also includes a virtual machine verification module 606, which is configured to verify the operating environment of the virtual machine based on the first measurement result, the second measurement result, and the third measurement result.

[0054] Figure 7 1 is a block diagram of an electronic device 700 of some embodiments of the present disclosure, and the device 700 may be a device or apparatus described in the embodiments of the present disclosure. Figure 7As shown, the device 700 includes a central processing unit (CPU) and / or a graphics processing unit (GPU) 701, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 702 or computer program instructions loaded from a storage unit 708 to a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The CPU / GPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704. Although not shown in FIG. Figure 7 As shown in FIG. 7 , device 700 may further include a coprocessor.

[0055] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0056] The various methods or processes described above may be performed by the CPU / GPU 701. For example, in some embodiments, the methods may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the CPU / GPU 701, one or more steps or actions in the methods or processes described above may be performed.

[0057] In some embodiments, the methods and processes described above may be implemented as a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0058] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0059] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0060] The computer program instructions for performing the disclosed operation may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, programming languages ​​including object-oriented programming languages, and conventional procedural programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In certain embodiments, by utilizing the state information of a computer-readable program instruction to customize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute a computer-readable program instruction, thereby realizing various aspects of the present disclosure.

[0061] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0062] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0063] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the equipment, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each frame in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the frame can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous frames can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the functions involved. It should also be noted that each frame in the block diagram and / or flow chart, and the combination of frames in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0064] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

[0065] Some example implementations of the present disclosure are listed below.

[0066] Example 1. A method for verifying an operating environment of a virtual machine, comprising:

[0067] In response to receiving a request to start a container in a virtual machine, determining a first measurement result of a kernel of the virtual machine;

[0068] Determine a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine, the hardware device including at least an accelerator device and a network card, and the software component including at least a management component that manages the container; and

[0069] The operating environment of the virtual machine is verified based on the first measurement result, the second measurement result, and the third measurement result.

[0070] Example 2. The method of Example 1, wherein determining a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine comprises:

[0071] Sending a measurement request for requesting determination of a measurement status of the hardware device to a manufacturer of the hardware device; and

[0072] The second measurement result is determined based on a response to the measurement request.

[0073] Example 3. The method according to any one of Examples 1-2, wherein determining a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine further comprises:

[0074] Based on a predefined evaluation strategy, traverse a plurality of files in an installation directory of the software component;

[0075] Determining a metric value for each of the plurality of files based on a metric algorithm; and

[0076] The third measurement result is determined based on the determined measurement value and the corresponding measurement value stored in the database.

[0077] Example 4. The method according to any one of Examples 1-3, wherein the first measurement result, the second measurement result, and the third measurement result constitute a measurement report, and based on the first measurement result, the second measurement result, and the third measurement result, verifying the operating environment of the virtual machine includes:

[0078] The credibility of the operating environment is verified based on the measurement report by a third party, where the third party is outside the operating environment and is configured with a key proxy service and a verification service.

[0079] Example 5. The method of any one of Examples 1-4, wherein verifying the credibility of the measurement report based on the measurement report by a third party comprises:

[0080] Obtaining the measurement report through a verification agent;

[0081] sending the metric report to the third party; and

[0082] The verification service of the third party evaluates the measurement report based on the predefined evaluation policy to determine the credibility of the operating environment.

[0083] Example 6. The method according to any one of Examples 1-5, further comprising:

[0084] In response to the execution environment being trusted, receiving a key of the image associated with the container from the key proxy service.

[0085] Example 7. The method according to any one of Examples 1-6, further comprising

[0086] Downloading the image associated with the container from a container image repository; and

[0087] Based on the key, the image associated with the container is decrypted.

[0088] Example 8. The method of any one of Examples 1-7, wherein based on the key, decrypting the image associated with the container comprises:

[0089] Back up the decrypted image to a local storage device.

[0090] Example 9. The method according to any one of Examples 1-8, further comprising:

[0091] In response to the operating environment of the virtual machine being credible, sending an indication to the client and the model provider that the service platform of the machine learning model is credible; and

[0092] The container is started in the virtual machine.

[0093] Example 10. The method according to any one of Examples 1-9, further comprising:

[0094] receiving a machine learning model file for the container from a model provider; and

[0095] The machine learning model file for the container is run in the accelerator device.

[0096] Example 11. An apparatus for verifying an operating environment of a virtual machine, comprising:

[0097] A first measurement result determination module is configured to determine a first measurement result of a kernel of the virtual machine in response to receiving a request to start a container in the virtual machine;

[0098] a second measurement result determination module configured to determine a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine, the hardware device comprising at least an accelerator device and a network card, and the software component comprising at least a management component for managing the container; and

[0099] The virtual machine verification module is configured to verify the operating environment of the virtual machine based on the first measurement result, the second measurement result and the third measurement result.

[0100] Example 12. The apparatus of Example 11, wherein the second metric result determination module comprises:

[0101] a request sending module, configured to send a measurement request for requesting determination of a measurement status of the hardware device to a manufacturer of the hardware device; and

[0102] The third measurement result determination module is configured to determine the second measurement result based on a response to the measurement request.

[0103] Example 13. The apparatus of any one of Examples 11-12, wherein the second metric result determination module further comprises:

[0104] A traversal module is configured to traverse a plurality of files in the installation directory of the software component based on a predefined evaluation strategy;

[0105] a metric value determination module configured to determine a metric value for each of the plurality of files based on a metric algorithm; and

[0106] The fourth measurement result determination module is configured to determine the third measurement result based on the determined measurement value and the corresponding measurement value stored in the database.

[0107] Example 14. The apparatus according to any one of Examples 11-13, wherein the first measurement result, the second measurement result, and the third measurement result constitute a measurement report, and the virtual machine verification module includes:

[0108] The credibility verification module is configured to verify the credibility of the operating environment based on the measurement report through a third party, the third party is outside the operating environment, and the third party is configured with a key agency service and a verification service.

[0109] Example 15. The apparatus of any one of Examples 11-14, wherein the credibility verification module comprises:

[0110] an acquisition module, configured to acquire the measurement report through a verification agent;

[0111] a sending module, configured to send the measurement report to the third party; and

[0112] An evaluation module is configured to evaluate the measurement report based on the predefined evaluation policy by the verification service of the third party to determine the credibility of the operating environment.

[0113] Example 16. The apparatus of any one of Examples 11-15, further comprising:

[0114] The receiving module is configured to receive, in response to the operating environment being trusted, a key of the image associated with the container from the key proxy service.

[0115] Example 17. The apparatus according to any one of Examples 11-16, further comprising

[0116] A download module, configured to download the image associated with the container from a container image repository; and

[0117] The decryption module is configured to decrypt the image associated with the container based on the key.

[0118] Example 18. The apparatus of any of Examples 11-17, wherein the decryption module comprises:

[0119] The backup module is configured to back up the decrypted image to a local storage device.

[0120] Example 19. The apparatus of any one of Examples 11-18, further comprising:

[0121] an indication sending module, configured to send an indication that the service platform of the machine learning model is credible to the client and the model provider in response to the operating environment of the virtual machine being credible; and

[0122] A startup module is configured to start the container in the virtual machine.

[0123] Example 20. The apparatus of any one of Examples 11-19, further comprising:

[0124] A file receiving module, configured to receive a machine learning model file for the container from a model provider; and

[0125] A running module is configured to run the machine learning model file for the container in the accelerator device.

[0126] Example 21. An electronic device comprising:

[0127] Processor; and

[0128] A memory coupled to the processor, the memory having instructions stored therein, wherein when the instructions are executed by the processor, the electronic device performs actions, the actions comprising:

[0129] In response to receiving a request to start a container in a virtual machine, determining a first measurement result of a kernel of the virtual machine;

[0130] Determine a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine, the hardware device including at least an accelerator device and a network card, and the software component including at least a management component that manages the container; and

[0131] Based on the first measurement result, the second measurement result, and the third measurement result, the operating environment of the virtual machine is verified.

[0132] Example 22. The electronic device of Example 21, wherein determining a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine comprises:

[0133] Sending a measurement request for requesting determination of a measurement status of the hardware device to a manufacturer of the hardware device; and

[0134] The second measurement result is determined based on a response to the measurement request.

[0135] Example 23. The electronic device of any of Examples 21-22, wherein determining a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine further comprises:

[0136] Based on a predefined evaluation strategy, traverse a plurality of files in an installation directory of the software component;

[0137] Determining a metric value for each of the plurality of files based on a metric algorithm; and

[0138] The third measurement result is determined based on the determined measurement value and the corresponding measurement value stored in the database.

[0139] Example 24. The electronic device according to any one of Examples 21-23, wherein the first measurement result, the second measurement result, and the third measurement result constitute a measurement report, and based on the first measurement result, the second measurement result, and the third measurement result, verifying the operating environment of the virtual machine includes:

[0140] The credibility of the operating environment is verified based on the measurement report by a third party, where the third party is outside the operating environment and is configured with a key proxy service and a verification service.

[0141] Example 25. The electronic device of any of Examples 21-24, wherein verifying, by a third party, the credibility of the measurement report based on the measurement report comprises:

[0142] Obtaining the measurement report through a verification agent;

[0143] sending the metric report to the third party; and

[0144] The verification service of the third party evaluates the measurement report based on the predefined evaluation policy to determine the credibility of the operating environment.

[0145] Example 26. The electronic device of any of Examples 21-25, further comprising:

[0146] In response to the execution environment being trusted, receiving a key of the image associated with the container from the key proxy service.

[0147] Example 27. An electronic device according to any one of Examples 21-26, further comprising

[0148] Downloading the image associated with the container from a container image repository; and

[0149] Based on the key, the image associated with the container is decrypted.

[0150] Example 28. The electronic device of any of Examples 21-27, wherein based on the key, decrypting the image associated with the container comprises:

[0151] Back up the decrypted image to a local storage device.

[0152] Example 29. The electronic device of any of Examples 21-28, further comprising:

[0153] In response to the operating environment of the virtual machine being credible, sending an indication to the client and the model provider that the service platform of the machine learning model is credible; and

[0154] The container is started in the virtual machine.

[0155] Example 30. The electronic device of any of Examples 21-29, further comprising:

[0156] receiving a machine learning model file for the container from a model provider; and

[0157] The machine learning model file for the container is run in the accelerator device.

[0158] Example 31. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions are executed by a processor to implement a method according to any one of Examples 1 to 10.

[0159] Example 32. A computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed by a device, cause the device to perform a method according to any one of Examples 1 to 10.

[0160] Although the disclosure has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Instead, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for verifying the operating environment of a virtual machine, include: In response to receiving a request to start a container in a virtual machine, determining a first measurement result of a kernel of the virtual machine; Determine a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine, the hardware device comprising at least an accelerator device and a network card, and the software component comprising at least a management component for managing the container; as well as Based on the first measurement result, the second measurement result, and the third measurement result, the operating environment of the virtual machine is verified.

2. The method according to claim 1, wherein determining a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine include: Sending a measurement request for requesting determination of a measurement status of the hardware device to a manufacturer of the hardware device; as well as The second measurement result is determined based on a response to the measurement request.

3. The method according to claim 1, wherein determining a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine further comprises: include: Based on a predefined evaluation strategy, traverse a plurality of files in an installation directory of the software component; Determining a metric value for each of the plurality of files based on a metric algorithm; as well as The third measurement result is determined based on the determined measurement value and the corresponding measurement value stored in the database.

4. The method according to claim 3, wherein the first measurement result, the second measurement result and the third measurement result constitute a measurement report, and based on the first measurement result, the second measurement result and the third measurement result, the operating environment of the virtual machine is verified. include: The credibility of the operating environment is verified based on the measurement report by a third party, where the third party is outside the operating environment and is configured with a key proxy service and a verification service.

5. The method according to claim 4, wherein the credibility of the measurement report is verified by a third party based on the measurement report. include: Obtaining the measurement report through a verification agent; sending the metric report to the third party; as well as The verification service of the third party evaluates the measurement report based on the predefined evaluation policy to determine the credibility of the operating environment.

6. The method according to claim 5, further comprising: include: In response to the execution environment being trusted, receiving a key of the image associated with the container from the key proxy service.

7. The method according to claim 6, further comprising Downloading the image associated with the container from a container image repository; and Based on the key, the image associated with the container is decrypted.

8. The method of claim 7, wherein based on the key, the image associated with the container is decrypted include: Back up the decrypted image to a local storage device.

9. The method according to claim 1, further comprising: include: In response to the operating environment of the virtual machine being credible, sending an indication to the client and the model provider that the service platform of the machine learning model is credible; as well as The container is started in the virtual machine.

10. The method according to claim 9, further comprising: include: receiving a machine learning model file for the container from a model provider; as well as The machine learning model file for the container is run in the accelerator device.

11. A device for verifying the operating environment of a virtual machine, include: A first measurement result determination module is configured to determine a first measurement result of a kernel of the virtual machine in response to receiving a request to start a container in the virtual machine; a second measurement result determination module, configured to determine a second measurement result of a hardware device associated with the virtual machine and a third measurement result of a software component associated with the virtual machine, the hardware device comprising at least an accelerator device and a network card, and the software component comprising at least a management component for managing the container; as well as The virtual machine verification module is configured to verify the operating environment of the virtual machine based on the first measurement result, the second measurement result and the third measurement result.

12. An electronic device, include: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, wherein when the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 10.

13. A computer program product comprising computer executable instructions, wherein the computer executable instructions are executed by a processor to implement the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Virtual machine startup method, device, equipment and storage medium

    CN109101284A

  • Trusted virtualization platform management system and method

    CN111475813A

  • Data processing method and device, equipment and storage medium

    CN116680687A

  • Implementation method of trusted confidential virtual machine system

    CN117113332A

  • Method and device for verifying credibility, electronic equipment and medium

    CN117574384A

Cited By

  • Model service verification method and model service system

    CN120832681A