Virtual machine confirmation method and device, computer equipment and storage medium
By obtaining the load information of the physical machine's processor and network port during the operation of the virtual machine, and calculating the load value to judge the ownership of the virtual machine, the problem that the physical machine cannot judge the ownership of the virtual machine under the virtual machine application is solved, and more accurate software authorization and resource management are achieved.
Patent Information
- Application Number
- CN202411577134.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-28
AI Technical Summary
The application of virtual machines causes the physical machine to be unable to pass the serial number authorization of components such as CPU, and it is impossible to accurately determine whether the virtual machine belongs to a physical machine, which in turn affects software authorization and resource management.
By controlling the target virtual machine to run under a specific load, obtain the load information of the processor and network port associated with the target physical machine, calculate the load value of the target physical machine, and then determine whether the virtual machine belongs to the physical machine.
It realizes accurate judgment of the attribution relationship between virtual machines and physical machines, solves problems in software authorization and resource management, and improves the accuracy and efficiency of authorization.
Smart Images

Figure CN119536905A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of evaluation technology, and in particular to a virtual machine confirmation method, device, computer equipment and storage medium. Background Art
[0002] Generally, a computer is characterized by component serial numbers such as CPU serial numbers and motherboard serial numbers. These component serial numbers are different and unique. The most commonly used serial number is the CPU serial number, because the CPU serial number is basically unchangeable, and the life cycle of the CPU is the same as that of the computer. The industry often implements authorization based on the CPU serial number. Only computers with matching CPU serial numbers can run the software, which is an important way to control the permissions of commodity software.
[0003] However, the application of virtual machines has created obstacles to this software licensing method. Due to the isolation of virtual machine management software (such as VMWare software, KVM software, etc.), physical machines and virtual machines cannot obtain each other's component serial numbers, and the serial numbers of virtual machine components are either created by virtual machine management software or blank. Therefore, the serial numbers of virtual machine components have no association with the serial numbers of physical machine components. Physical machines and virtual machines cannot determine whether a virtual machine belongs to a physical machine based on various serial numbers. That is, a physical machine cannot determine whether a virtual machine belongs to itself, and a virtual machine cannot determine whether it belongs to a physical machine. Summary of the invention
[0004] Based on this, it is necessary to provide a virtual machine confirmation method, device, computer equipment and storage medium that can accurately determine whether a virtual machine belongs to a target physical machine in response to the above technical problems.
[0005] In a first aspect, the present application provides a virtual machine confirmation method, which is applied to a target physical machine, and the method includes:
[0006] Controlling the target virtual machine to run under the first target load, and obtaining first load information of the target processor associated with the target physical machine and second load information of the target network port during the running of the target virtual machine;
[0007] Determining a first load value of the target physical machine according to the first load information and the second load information;
[0008] It is determined whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
[0009] In one embodiment, determining a first load value of a target physical machine according to the first load information and the second load information includes:
[0010] Using a first weight value of the first load information, weighting the first load information to obtain first weighted load information;
[0011] Using a second weight value of the second load information, weighting the second load information to obtain second weighted load information;
[0012] The sum of the first weighted load information and the second weighted load information is used as the first load value of the target physical machine.
[0013] In one embodiment, controlling the target virtual machine to run under the first target load, and obtaining first load information of the target processor associated with the target physical machine and second load information of the target network port during the running of the target virtual machine, includes:
[0014] Sending a first operation instruction to the target virtual machine; wherein the first operation instruction is used to instruct the target virtual machine to operate for a first preset time under a first target load;
[0015] During the operation of the target virtual machine, first load information of a target processor and second load information of a target network port associated with the target physical machine are collected according to a collection period.
[0016] In one embodiment, determining whether a target virtual machine belongs to a target physical machine according to a first load value of the target physical machine includes:
[0017] After the target virtual machine finishes running, obtaining third load information of the target processor and fourth load information of the target network port;
[0018] Determining an end load value of the target physical machine according to the third load information and the fourth load information;
[0019] Whether the target virtual machine belongs to the target physical machine is determined according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state.
[0020] In one embodiment, determining whether the target virtual machine belongs to the target physical machine according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state includes:
[0021] Two different third weights are used to weight the normal load values of the target physical machine in a normal state, respectively, to obtain a first load threshold and a second load threshold; wherein the second load threshold is less than the first load threshold;
[0022] Whether the target virtual machine belongs to the target physical machine is determined according to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold.
[0023] In one of the embodiments, when the number of the first load value and the number of the end load value are both at least two, determining whether the target virtual machine belongs to the target physical machine according to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold, includes:
[0024] When each of the first load values is greater than the first load threshold, and each of the end load values is less than the second load threshold, it is determined that the target virtual machine belongs to the target physical machine.
[0025] In one of the embodiments, before controlling the target virtual machine to run under the first target load and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the running of the target virtual machine, the method further includes:
[0026] Sending a second operation instruction to the target virtual machine; wherein the second operation instruction is used to instruct the target virtual machine to operate for a second preset time period under a second target load;
[0027] During the operation of the target virtual machine, obtaining fifth load information of each candidate processor and sixth load information of each candidate network port associated with the target physical machine;
[0028] The candidate processor with the largest fifth load information is used as the target processor associated with the target physical machine, and the candidate network port with the largest sixth load information is used as the target network port associated with the target physical machine.
[0029] In one embodiment, the method further comprises:
[0030] After the target virtual machine finishes running, obtaining seventh load information of the target processor and eighth load information of the target network port;
[0031] A normal load value of the target physical machine is determined according to the seventh load information and the eighth load information.
[0032] In one embodiment, the first load information includes processor utilization; the second load information includes network port utilization.
[0033] In a second aspect, the present application provides a virtual machine confirmation device, which is configured on a target physical machine, and the device includes:
[0034] A control module, used to control the target virtual machine to run under the first target load, and to obtain first load information of the target processor associated with the target physical machine and second load information of the target network port during the running of the target virtual machine;
[0035] A first determination module, configured to determine a first load value of a target physical machine according to the first load information and the second load information;
[0036] The second determination module is used to determine whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
[0037] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:
[0038] Controlling the target virtual machine to run under the first target load, and obtaining first load information of the target processor associated with the target physical machine and second load information of the target network port during the running of the target virtual machine;
[0039] Determining a first load value of the target physical machine according to the first load information and the second load information;
[0040] It is determined whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0042] Controlling the target virtual machine to run under the first target load, and obtaining first load information of the target processor associated with the target physical machine and second load information of the target network port during the running of the target virtual machine;
[0043] Determining a first load value of the target physical machine according to the first load information and the second load information;
[0044] It is determined whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
[0045] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0046] Controlling the target virtual machine to run under the first target load, and obtaining first load information of the target processor associated with the target physical machine and second load information of the target network port during the running of the target virtual machine;
[0047] Determining a first load value of the target physical machine according to the first load information and the second load information;
[0048] It is determined whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
[0049] The above-mentioned virtual machine confirmation method, device, computer equipment and storage medium control the target virtual machine to run under the first target load, and during the operation of the target virtual machine, obtain the first load information of the target processor associated with the target physical machine and the second load information of the target network port. According to the first load information and the second load information, the first load value of the target physical machine is determined. According to the first load value of the target physical machine, it is determined whether the target virtual machine belongs to the target physical machine. In this embodiment, the target virtual machine can be controlled to run under the first target load, and the first load value of the target physical machine can be determined according to the first load information and the second load information. And according to the first load value of the target physical machine, an accurate judgment can be made to determine whether the target virtual machine belongs to the target physical machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A diagram of an application environment of a virtual machine confirmation method provided in this embodiment;
[0051] Figure 2 A schematic diagram of a flow chart of a first virtual machine confirmation method provided in this embodiment;
[0052] Figure 3 A schematic diagram of a process for determining a first load value of a target physical machine provided in this embodiment;
[0053] Figure 4 A schematic diagram of a process for determining whether a target virtual machine belongs to a target physical machine provided in this embodiment;
[0054] Figure 5 A schematic diagram of a flow chart of a second virtual machine confirmation method provided in this embodiment;
[0055] Figure 6 A structural block diagram of a virtual machine confirmation device provided in this embodiment;
[0056] Figure 7 This is a diagram of the internal structure of the computer device provided in this embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] Computers generally use component serial numbers such as CPU serial numbers, motherboard serial numbers, etc. to identify themselves. These component serial numbers are different and unique. The most commonly used serial number is the CPU serial number, because the CPU serial number is basically unchangeable, and the life cycle of the CPU is the same as the life cycle of the computer. Authorization is implemented based on the CPU serial number. Only computers with matching CPU serial numbers can run the software. This is an important way to control the permissions of commodity software.
[0059] However, the use of virtual machines has created obstacles to this software licensing method. Due to the isolation of virtual machine management software (such as VMWare software, KVM software, etc.), physical machines and virtual machines cannot obtain each other's component serial numbers, and the serial numbers of virtual machine components are either created by the virtual machine management software or blank, and have no connection with the serial numbers of physical machine components. The applications of physical machines and virtual machines cannot determine whether a virtual machine belongs to a physical machine based on various serial numbers.
[0060] Therefore, in the virtual machine application scenario, it is impossible to authorize by serial number of components such as CPU. The physical machine cannot determine whether a virtual machine belongs to itself, and the virtual machine cannot determine whether it belongs to a physical machine. Therefore, the software can only be prohibited from running on the virtual machine. However, in the production environment, physical machines generally only run virtual machines and no longer run other software. This loses an important software authorization method. The only way is to directly authorize the virtual machine. At this time, only the authorized virtual machine can run the software, and other unauthorized virtual machines, even if they are on the same physical machine, cannot run the software. The resources owned by a virtual machine are only a small part of the entire physical machine. It is unreasonable to allow only a certain virtual machine to run the software. In addition, the virtual machine will migrate. During the migration, especially when migrating to a physical machine with a CPU from a different manufacturer, the serial number may change, which will cause the software authorization to become invalid and need to be re-authorized, which brings great trouble to both software manufacturers and users.
[0061] The virtual machine confirmation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in FIG. 1 , the target physical machine 104 controls the target virtual machine 102 to run under the first target load, and obtains the first load information of the target processor and the second load information of the target network port associated with the target physical machine 104 during the operation of the target virtual machine 102. The target physical machine 104 determines the first load value of the target physical machine 104 according to the first load information and the second load information. And according to the first load value of the target physical machine 104, it is determined whether the target virtual machine 102 belongs to the target physical machine 104.
[0062] The target physical machine refers to the physical machine that needs to be determined for the target virtual machine. A physical machine refers to a computer that has created a virtual machine using virtual machine management software. Sometimes when it is used together with the term virtual machine, a computer that has not created a virtual machine is also called a physical machine to distinguish it from a virtual machine.
[0063] The target virtual machine refers to the virtual machine that needs to be judged whether it belongs to the target physical machine. A virtual machine (VM) is a special software that can simulate one or more complete computer systems on a computer platform. Through virtual machine technology, users can run multiple operating systems (such as Windows, Linux or macOS) on a physical computer, and each operating system runs in a completely isolated environment, just like an independent computer.
[0064] In one embodiment, Figure 2 is a flow chart of a virtual machine confirmation method provided according to an embodiment of the present application, in which the method is applied to Figure 1 Taking the target physical machine in as an example, the method includes the following steps:
[0065] S201, controlling a target virtual machine to run under a first target load, and obtaining first load information of a target processor associated with a target physical machine and second load information of a target network port during the running of the target virtual machine.
[0066] Among them, the first target load refers to the load applied to the target virtual machine. In this application, the first target load is preferably the maximum load that the target virtual machine can support. The target physical machine refers to the physical machine that needs to be judged for the target virtual machine. A physical machine refers to a computer that has created a virtual machine using virtual machine management software. Sometimes when it is used together with the term virtual machine, a computer that has not created a virtual machine is also called a physical machine to distinguish it from a virtual machine. The target virtual machine refers to a virtual machine that needs to be judged whether it belongs to the target physical machine. A virtual machine is a special software that can simulate one or more complete computer systems on a computer platform. Through virtual machine technology, users can run multiple operating systems on a physical computer, and each operating system runs in a completely isolated environment, just like an independent computer. The target processor refers to the processor in the target physical machine. The target network port refers to the network port of the target physical machine. The first load information refers to the load of the target processor collected when the target virtual machine runs under the first target load. The second load information refers to the load of the target network port collected when the target virtual machine runs under the first target load.
[0067] Optionally, in the embodiment, the first load information includes but is not limited to the processor utilization of the target processor. The second load information includes but is not limited to the network port utilization of the target network port.
[0068] Optionally, in this embodiment, the target virtual machine establishes a connection with the target physical machine (for example, establishing a TCP (Transmission Control Protocol) connection). After the TCP connection is established, the target physical machine can act as a server and the virtual machine can communicate as a client. After the TCP connection is established, the target physical machine controls the target virtual machine to run under the first target load, and during the operation of the target virtual machine, obtains the first load information of the target processor associated with the target physical machine and the second load information of the target network port.
[0069] Optionally, in this embodiment, the first load information of the target processor associated with the target physical machine and the second load information of the target network port may be obtained through a monitoring tool.
[0070] As an optional implementation of the embodiment of the present application, in this embodiment, the target virtual machine is controlled to run under a first target load, and during the operation of the target virtual machine, at any time, the first load information of the target processor associated with the target physical machine and the second load information of the target network port are obtained.
[0071] As an optional implementation of the embodiment of the present application, a first operation instruction is sent to the target virtual machine. The first operation instruction is used to instruct the target virtual machine to run for a first preset time under the first target load. During the operation of the target virtual machine, the first load information of the target processor associated with the target physical machine and the second load information of the target network port are collected according to the collection cycle. Exemplarily, the first preset duration may be 15s. The collection cycle may be 1s. During the operation of the target virtual machine, a group of first load information of the target processor associated with the target physical machine and the second load information of the target network port are collected at intervals of 1s. That is to say, in this embodiment, multiple groups of the first load information and the second load information can be collected, and the corresponding first load value needs to be determined for each group of the first load information and the second load information later.
[0072] S202: Determine a first load value of a target physical machine according to the first load information and the second load information.
[0073] The first load value is a load value of the target physical machine determined based on the first load information and the second load information.
[0074] As an optional implementation of the embodiment of the present application, the first load information and the second load information are input into a load assessment model, and the load assessment model outputs a first load value for determining the target physical machine.
[0075] As another optional implementation of the embodiment of the present application, based on the table lookup method, the first score is determined according to the first load information. The second score is determined according to the second load information. The first score and the second score are fused to determine the first load value of the target physical machine. The fusion processing method includes but is not limited to one of summing, weighted summing and multiplying.
[0076] S203: Determine whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
[0077] Optionally, whether the target virtual machine belongs to the target physical machine may be determined based on a magnitude relationship between the first load value and the load threshold.
[0078] Exemplarily, if the first load value is greater than the load threshold, it is determined that the target virtual machine belongs to the target physical machine. If the first load value is not greater than the load threshold, it is determined that the target virtual machine does not belong to the target physical machine.
[0079] The above-mentioned virtual machine confirmation method controls the target virtual machine to run under the first target load, and during the operation of the target virtual machine, obtains the first load information of the target processor associated with the target physical machine and the second load information of the target network port. According to the first load information and the second load information, the first load value of the target physical machine is determined. According to the first load value of the target physical machine, it is determined whether the target virtual machine belongs to the target physical machine. In this embodiment, the target virtual machine can be controlled to run under the first target load, and the first load value of the target physical machine can be determined according to the first load information and the second load information. And according to the first load value of the target physical machine, an accurate judgment can be made to determine whether the target virtual machine belongs to the target physical machine.
[0080] In one embodiment, in order to more accurately determine the first load value, such as Figure 3 As shown, an optional implementation of S202 includes:
[0081] S301, using a first weight value of first load information to weight the first load information to obtain first weighted load information.
[0082] The first weight refers to the weight corresponding to the first load information.
[0083] Optionally, in this embodiment, the product result of the first load information and the first weight value may be used as the first weighted load information.
[0084] S302: Use a second weight of the second load information to weight the second load information to obtain second weighted load information.
[0085] The second weight refers to the weight corresponding to the second load information.
[0086] Optionally, in this embodiment, the product result of the second load information and the second weight value may be used as the second weighted load information.
[0087] S303: Taking the sum of the first weighted load information and the second weighted load information as the first load value of the target physical machine.
[0088] Optionally, in this embodiment, the first load value of the target physical machine may be determined by the following formula (1):
[0089] P = P_cpu + 3*P_net (1)
[0090] In formula (1), P represents the first load value; P_cpu represents the processor utilization of the target processor (i.e., the first load information); the first weight corresponding to P_cpu is 1; P_net represents the network port utilization of the target network port (i.e., the second load information); 3 represents the second weight. In the implementation process, since it is easier for the target virtual machine to maximize the network port utilization, it is difficult to maximize the processor utilization after the network port utilization is maximized. Therefore, the second weight corresponding to the network port utilization is set to 3.
[0091] In this embodiment, the first weight of the first load information is used to weight the first load information to obtain the first weighted load information. The second weight of the second load information is used to weight the second load information to obtain the second weighted load information. The sum of the first weighted load information and the second weighted load information is used as the first load value of the target physical machine, which effectively improves the accuracy of determining the obtained first load value, thereby increasing the confirmation result of whether the target virtual machine belongs to the target physical machine.
[0092] In one embodiment, in order to further increase the accuracy of attribution to the target virtual machine, as Figure 4 As shown, an optional implementation of S203 includes:
[0093] S401, after the target virtual machine finishes running, obtain third load information of the target processor and fourth load information of the target network port.
[0094] Among them, after the target virtual machine runs, it means that the target virtual machine runs under the first target load. The third load information refers to the processor utilization of the target processor obtained after the target virtual machine runs under the first target load. The fourth load information refers to the network port utilization of the target network port obtained after the target virtual machine runs under the first target load.
[0095] Optionally, after the target virtual machine ends its operation, the third load information of the target processor and the fourth load information of the target network port are acquired according to the acquisition cycle. Exemplarily, the acquisition cycle may be 1 second. After the target virtual machine ends its operation, a group of the third load information of the target processor and the fourth load information of the target network port are acquired every 1 second, for a total of 5 seconds. That is, in this embodiment, multiple groups of the third load information and the fourth load information may be acquired, and subsequently, the corresponding first load value needs to be determined for each group of the first load information and the second load information.
[0096] S402: Determine an end load value of the target physical machine according to the third load information and the fourth load information.
[0097] The end load value refers to a load value of the target physical machine determined after the target virtual machine finishes running under the first target load.
[0098] Optionally, in this embodiment, the first weight of the third load information is used to weight the third load information to obtain third weighted load information. The second weight of the fourth load information is used to weight the fourth load information to obtain fourth weighted load information. The sum of the third weighted load information and the fourth weighted load information is used as the first load value of the target physical machine.
[0099] S403: Determine whether the target virtual machine belongs to the target physical machine according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state.
[0100] The normal load value refers to the load value of the target physical machine in a normal state.
[0101] Optionally, in this embodiment, two different third weights are used to weight the normal load value of the target physical machine in a normal state, respectively, to obtain a first load threshold and a second load threshold; wherein the second load threshold is less than the first load threshold. According to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold, it is determined whether the target virtual machine belongs to the target physical machine.
[0102] Optionally, in this embodiment, two different third weights are used to weight the normal load value of the target physical machine in a normal state respectively, and an optional implementation method for obtaining the first load threshold and the second load threshold is to use the product of one of the third weights and the normal load value as the first load threshold, for example, the first load threshold is 1.7*P0, 1.7 is the third weight, and P0 is the normal load value. Use the product of another third weight and the normal load value as the second load threshold, for example, the second load threshold is 1.2*P0, 1.2 is the third weight, and P0 is the normal load value.
[0103] Optionally, in this embodiment, based on the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold, an optional implementation method for determining whether the target virtual machine belongs to the target physical machine is, when the first load value is greater than the first load threshold and the end load value is less than the second load threshold, it is determined that the target virtual machine belongs to the target physical machine; otherwise, it is determined that the target virtual machine does not belong to the target physical machine.
[0104] Optionally, in the present embodiment, another optional implementation method for determining whether the target virtual machine belongs to the target physical machine based on the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold is, when the number of first load values and end load values are both at least two, when each first load value is greater than the first load threshold, and when each end load value is less than the second load threshold, it is determined that the target virtual machine belongs to the target physical machine.
[0105] Optionally, in the present embodiment, another optional implementation method for determining whether the target virtual machine belongs to the target physical machine based on the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold is, when the number of first load values and the end load values are both at least two, and when the average of each first load value is greater than the first load threshold, and the average of each end load value is less than the second load threshold, it is determined that the target virtual machine belongs to the target physical machine.
[0106] On the basis of the above embodiment, before controlling the target virtual machine to run under the first target load and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the operation of the target virtual machine, an optional implementation method of a virtual machine determination method is to send a second operation instruction to the target virtual machine; wherein the second operation instruction is used to instruct the target virtual machine to run for a second preset time under the second target load. During the operation of the target virtual machine, the fifth load information of each candidate processor associated with the target physical machine and the sixth load information of the candidate network port are obtained. The candidate processor with the largest fifth load information is used as the target processor associated with the target physical machine, and the candidate network port with the largest sixth load information is used as the target network port associated with the target physical machine. Among them, the fifth load information refers to the processor utilization of each candidate processor collected during the operation of the target virtual machine under the second target load. The sixth load information refers to the processor utilization of each candidate network port collected during the operation of the target virtual machine under the second target load. The candidate processor refers to all processors in the target physical machine, that is, CPU. The candidate network port refers to all network ports of the target virtual machine. The second preset time can be 30s.
[0107] On the basis of the above-mentioned embodiment, an optional implementation method of a virtual machine confirmation method is to obtain the seventh load information of the target processor and the eighth load information of the target network port after the target virtual machine ends its operation. According to the seventh load information and the eighth load information, the normal load value of the target physical machine is determined. Among them, after the virtual machine ends its operation, it means that the target virtual machine ends its operation at the second target load, which also means after the second preset time. The seventh load information refers to the processor utilization of the target processor collected after the target virtual machine ends its operation with the second target load. The eighth load information refers to the network port utilization of the target network port collected after the target virtual machine ends its operation with the second target load.
[0108] Optionally, in this embodiment, an optional implementation method for determining the normal load value of the target physical machine based on the seventh load information and the eighth load information is to use the first weight of the seventh load information to weight the seventh load information to obtain the fifth weighted load information. Use the second weight of the eighth load information to weight the eighth load information to obtain the sixth weighted load information. The sum of the fifth weighted load information and the sixth weighted load information is used as the normal load value of the target physical machine. It should be noted that when collecting the seventh load information and the eighth load information, multiple groups can be collected. For each group, the normal load value of the target physical machine needs to be determined, and the finally determined normal load values are averaged as the final required normal load value.
[0109] In this embodiment, after the target virtual machine ends running, the third load information of the target processor and the fourth load information of the target network port are obtained. The end load value of the target physical machine is determined based on the third load information and the fourth load information. Finally, based on the first load value, the end load value and the normal load value of the target physical machine in a normal state, it is determined whether the target virtual machine belongs to the target physical machine, which effectively increases the accuracy of the confirmation result.
[0110] In one embodiment, if Figure 5 As shown, an optional implementation of a virtual machine confirmation method includes:
[0111] S501: Send a second operation instruction to a target virtual machine, wherein the second operation instruction is used to instruct the target virtual machine to operate for a second preset time period under a second target load.
[0112] S502 : During the operation of the target virtual machine, fifth load information of each candidate processor and sixth load information of each candidate network port associated with the target physical machine are obtained.
[0113] S503 , using the candidate processor with the largest fifth load information as the target processor associated with the target physical machine, and using the candidate network port with the largest sixth load information as the target network port associated with the target physical machine.
[0114] S504: After the target virtual machine finishes running based on the second running instruction, obtain seventh load information of the target processor and eighth load information of the target network port.
[0115] S505: Determine a normal load value of the target physical machine according to the seventh load information and the eighth load information.
[0116] S506: Send a first operation instruction to the target virtual machine, wherein the first operation instruction is used to instruct the target virtual machine to operate for a first preset time period under a first target load.
[0117] S507 , during the operation of the target virtual machine, first load information of the target processor and second load information of the target network port associated with the target physical machine are collected according to a collection period.
[0118] S508: Use a first weight value of the first load information to weight the first load information to obtain first weighted load information.
[0119] S509: Use the second weight of the second load information to weight the second load information to obtain second weighted load information.
[0120] S510: Taking the sum of the first weighted load information and the second weighted load information as a first load value of a target physical machine.
[0121] S511, after the target virtual machine finishes running based on the first running instruction, obtain third load information of the target processor and fourth load information of the target network port.
[0122] S512: Determine an end load value of the target physical machine according to the third load information and the fourth load information.
[0123] S513: Use two different third weights to weight the normal load value of the target physical machine in a normal state, respectively, to obtain a first load threshold and a second load threshold, wherein the second load threshold is smaller than the first load threshold.
[0124] S514: When the number of the first load values and the number of the end load values are both at least two, and each of the first load values is greater than the first load threshold, and each of the end load values is less than the second load threshold, it is determined that the target virtual machine belongs to the target physical machine.
[0125] It should be noted that the first load information, the third load information, the fifth load information and the seventh load information are all processor utilizations, and the second load information, the fourth load information, the sixth load information and the eighth load information are all network port utilizations.
[0126] In this embodiment, the target virtual machine is controlled to run under the first target load, and during the operation of the target virtual machine, the first load information of the target processor associated with the target physical machine and the second load information of the target network port are obtained. According to the first load information and the second load information, the first load value of the target physical machine is determined. According to the first load value of the target physical machine, it is determined whether the target virtual machine belongs to the target physical machine. In this embodiment, the target virtual machine can be controlled to run under the first target load, and the first load value of the target physical machine can be determined according to the first load information and the second load information. And according to the first load value of the target physical machine, an accurate judgment can be made to determine whether the target virtual machine belongs to the target physical machine.
[0127] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0128] Based on the same inventive concept, the embodiment of the present application also provides a virtual machine confirmation device for implementing the virtual machine confirmation method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more virtual machine confirmation device embodiments provided below can refer to the limitations of the virtual machine confirmation method above, and will not be repeated here.
[0129] In one embodiment, by Figure 6 FIG. 2 shows a structural block diagram of a virtual machine confirmation device in an embodiment. Figure 6 As shown, a virtual machine confirmation device 1 is provided, the device comprising: a control module 10, a first determination module 20 and a second determination module 30, wherein:
[0130] The control module 10 is used to control the target virtual machine to run under the first target load, and to obtain the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the operation of the target virtual machine;
[0131] A first determination module 20, configured to determine a first load value of a target physical machine according to the first load information and the second load information;
[0132] The second determination module 30 is configured to determine whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
[0133] The above-mentioned virtual machine confirmation device 1 controls the target virtual machine to run under the first target load, and obtains the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the operation of the target virtual machine. According to the first load information and the second load information, the first load value of the target physical machine is determined. According to the first load value of the target physical machine, it is determined whether the target virtual machine belongs to the target physical machine. In this embodiment, the target virtual machine can be controlled to run under the first target load, and the first load value of the target physical machine can be determined according to the first load information and the second load information. And according to the first load value of the target physical machine, an accurate judgment can be made to determine whether the target virtual machine belongs to the target physical machine.
[0134] In one embodiment, the Figure 6 The first determining module 10 is further specifically used for:
[0135] Using a first weight value of the first load information, weighting the first load information to obtain first weighted load information;
[0136] Using a second weight value of the second load information, weighting the second load information to obtain second weighted load information;
[0137] The sum of the first weighted load information and the second weighted load information is used as the first load value of the target physical machine.
[0138] In one embodiment, the Figure 6 The control module 20 is also specifically used for:
[0139] Sending a first operation instruction to the target virtual machine; wherein the first operation instruction is used to instruct the target virtual machine to operate for a first preset time under a first target load;
[0140] During the operation of the target virtual machine, first load information of a target processor and second load information of a target network port associated with the target physical machine are collected according to a collection period.
[0141] In one embodiment, the Figure 6 The second determining module 30 is further specifically used for:
[0142] After the target virtual machine finishes running, obtaining third load information of the target processor and fourth load information of the target network port;
[0143] Determining an end load value of the target physical machine according to the third load information and the fourth load information;
[0144] Whether the target virtual machine belongs to the target physical machine is determined according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state.
[0145] In one embodiment, the Figure 6 The second determining module 30 is further specifically used for:
[0146] Two different third weights are used to weight the normal load values of the target physical machine in a normal state, respectively, to obtain a first load threshold and a second load threshold; wherein the second load threshold is less than the first load threshold;
[0147] Whether the target virtual machine belongs to the target physical machine is determined according to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold.
[0148] In one embodiment, when the number of the first load value and the number of the end load value are both at least two, Figure 6 The second determining module 30 is further specifically used for:
[0149] When each of the first load values is greater than the first load threshold, and each of the end load values is less than the second load threshold, it is determined that the target virtual machine belongs to the target physical machine.
[0150] In one embodiment, before controlling the target virtual machine to run under the first target load and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the running of the target virtual machine, a virtual machine determination device further includes:
[0151] A sending module, configured to send a second operation instruction to the target virtual machine; wherein the second operation instruction is used to instruct the target virtual machine to operate for a second preset time period under a second target load;
[0152] A first acquisition module is used to acquire fifth load information of each candidate processor and sixth load information of each candidate network port associated with the target physical machine during the operation of the target virtual machine;
[0153] The third determination module is used to use the candidate processor with the largest fifth load information as the target processor associated with the target physical machine, and to use the candidate network port with the largest sixth load information as the target network port associated with the target physical machine.
[0154] In one embodiment, a virtual machine determination device further includes:
[0155] A second acquisition module is used to acquire seventh load information of the target processor and eighth load information of the target network port after the target virtual machine ends running;
[0156] The fourth determination module is used to determine the normal load value of the target physical machine according to the seventh load information and the eighth load information.
[0157] In one embodiment, the first load information includes processor utilization; the second load information includes network port utilization.
[0158] Each module in the above-mentioned virtual machine confirmation device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0159] In one embodiment, a computer device is provided. The computer device may be a platform side, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store virtual machine confirmation information. The network interface of the computer device is used to communicate with an external user side through a network connection. When the computer program is executed by the processor, a virtual machine confirmation method is implemented.
[0160] Those skilled in the art will understand that Figure 7 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. Specifically, the computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0161] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0162] Controlling the target virtual machine to run under the first target load, and obtaining first load information of the target processor associated with the target physical machine and second load information of the target network port during the running of the target virtual machine;
[0163] Determining a first load value of the target physical machine according to the first load information and the second load information;
[0164] It is determined whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
[0165] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining a first load value of the target physical machine according to the first load information and the second load information, including:
[0166] Using a first weight value of the first load information, weighting the first load information to obtain first weighted load information;
[0167] Using a second weight value of the second load information, weighting the second load information to obtain second weighted load information;
[0168] The sum of the first weighted load information and the second weighted load information is used as the first load value of the target physical machine.
[0169] In one embodiment, when the processor executes the computer program, the following steps are further implemented: controlling the target virtual machine to run under the first target load, and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the running of the target virtual machine, including:
[0170] Sending a first operation instruction to the target virtual machine; wherein the first operation instruction is used to instruct the target virtual machine to operate for a first preset time under a first target load;
[0171] During the operation of the target virtual machine, first load information of a target processor and second load information of a target network port associated with the target physical machine are collected according to a collection period.
[0172] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine, including:
[0173] After the target virtual machine finishes running, obtaining third load information of the target processor and fourth load information of the target network port;
[0174] Determining an end load value of the target physical machine according to the third load information and the fourth load information;
[0175] Whether the target virtual machine belongs to the target physical machine is determined according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state.
[0176] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining whether the target virtual machine belongs to the target physical machine according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state, including:
[0177] Two different third weights are used to weight the normal load values of the target physical machine in a normal state, respectively, to obtain a first load threshold and a second load threshold; wherein the second load threshold is less than the first load threshold;
[0178] Whether the target virtual machine belongs to the target physical machine is determined according to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold.
[0179] In one embodiment, when the processor executes the computer program, the following steps are further implemented: when the number of the first load value and the number of the end load value are both at least two, determining whether the target virtual machine belongs to the target physical machine according to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold, including:
[0180] When each of the first load values is greater than the first load threshold, and each of the end load values is less than the second load threshold, it is determined that the target virtual machine belongs to the target physical machine.
[0181] In one embodiment, when the processor executes the computer program, the following steps are further implemented: before controlling the target virtual machine to run under the first target load and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the running of the target virtual machine, the method further includes:
[0182] Sending a second operation instruction to the target virtual machine; wherein the second operation instruction is used to instruct the target virtual machine to operate for a second preset time period under a second target load;
[0183] During the operation of the target virtual machine, obtaining fifth load information of each candidate processor and sixth load information of each candidate network port associated with the target physical machine;
[0184] The candidate processor with the largest fifth load information is used as the target processor associated with the target physical machine, and the candidate network port with the largest sixth load information is used as the target network port associated with the target physical machine.
[0185] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0186] After the target virtual machine finishes running, obtaining seventh load information of the target processor and eighth load information of the target network port;
[0187] A normal load value of the target physical machine is determined according to the seventh load information and the eighth load information.
[0188] In one embodiment, when the processor executes the computer program, the following steps are further implemented: the first load information includes processor utilization; the second load information includes network port utilization.
[0189] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0190] Controlling the target virtual machine to run under the first target load, and obtaining first load information of the target processor associated with the target physical machine and second load information of the target network port during the running of the target virtual machine;
[0191] Determining a first load value of the target physical machine according to the first load information and the second load information;
[0192] It is determined whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
[0193] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining a first load value of the target physical machine according to the first load information and the second load information, including:
[0194] Using a first weight value of the first load information, weighting the first load information to obtain first weighted load information;
[0195] Using a second weight value of the second load information, weighting the second load information to obtain second weighted load information;
[0196] The sum of the first weighted load information and the second weighted load information is used as the first load value of the target physical machine.
[0197] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: controlling the target virtual machine to run under the first target load, and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the running of the target virtual machine, including:
[0198] Sending a first operation instruction to the target virtual machine; wherein the first operation instruction is used to instruct the target virtual machine to operate for a first preset time under a first target load;
[0199] During the operation of the target virtual machine, first load information of a target processor and second load information of a target network port associated with the target physical machine are collected according to a collection period.
[0200] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine, including:
[0201] After the target virtual machine finishes running, obtaining third load information of the target processor and fourth load information of the target network port;
[0202] Determining an end load value of the target physical machine according to the third load information and the fourth load information;
[0203] Whether the target virtual machine belongs to the target physical machine is determined according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state.
[0204] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining whether the target virtual machine belongs to the target physical machine according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state, including:
[0205] Two different third weights are used to weight the normal load values of the target physical machine in a normal state, respectively, to obtain a first load threshold and a second load threshold; wherein the second load threshold is less than the first load threshold;
[0206] Whether the target virtual machine belongs to the target physical machine is determined according to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold.
[0207] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when the number of the first load value and the number of the end load value are both at least two, determining whether the target virtual machine belongs to the target physical machine according to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold, including:
[0208] When each of the first load values is greater than the first load threshold, and each of the end load values is less than the second load threshold, it is determined that the target virtual machine belongs to the target physical machine.
[0209] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: before controlling the target virtual machine to run under the first target load and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the running of the target virtual machine, the method further includes:
[0210] Sending a second operation instruction to the target virtual machine; wherein the second operation instruction is used to instruct the target virtual machine to operate for a second preset time period under a second target load;
[0211] During the operation of the target virtual machine, obtaining fifth load information of each candidate processor and sixth load information of each candidate network port associated with the target physical machine;
[0212] The candidate processor with the largest fifth load information is used as the target processor associated with the target physical machine, and the candidate network port with the largest sixth load information is used as the target network port associated with the target physical machine.
[0213] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0214] After the target virtual machine finishes running, obtaining seventh load information of the target processor and eighth load information of the target network port;
[0215] A normal load value of the target physical machine is determined according to the seventh load information and the eighth load information.
[0216] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: the first load information includes processor utilization; the second load information includes network port utilization.
[0217] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0218] Controlling the target virtual machine to run under the first target load, and obtaining first load information of the target processor associated with the target physical machine and second load information of the target network port during the running of the target virtual machine;
[0219] Determining a first load value of the target physical machine according to the first load information and the second load information;
[0220] It is determined whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
[0221] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining a first load value of the target physical machine according to the first load information and the second load information, including:
[0222] Using a first weight value of the first load information, weighting the first load information to obtain first weighted load information;
[0223] Using a second weight value of the second load information, weighting the second load information to obtain second weighted load information;
[0224] The sum of the first weighted load information and the second weighted load information is used as the first load value of the target physical machine.
[0225] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: controlling the target virtual machine to run under the first target load, and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the running of the target virtual machine, including:
[0226] Sending a first operation instruction to the target virtual machine; wherein the first operation instruction is used to instruct the target virtual machine to operate for a first preset time under a first target load;
[0227] During the operation of the target virtual machine, first load information of a target processor and second load information of a target network port associated with the target physical machine are collected according to a collection period.
[0228] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine, including:
[0229] After the target virtual machine finishes running, obtaining third load information of the target processor and fourth load information of the target network port;
[0230] Determining an end load value of the target physical machine according to the third load information and the fourth load information;
[0231] Whether the target virtual machine belongs to the target physical machine is determined according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state.
[0232] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining whether the target virtual machine belongs to the target physical machine according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state, including:
[0233] Two different third weights are used to weight the normal load values of the target physical machine in a normal state, respectively, to obtain a first load threshold and a second load threshold; wherein the second load threshold is less than the first load threshold;
[0234] Whether the target virtual machine belongs to the target physical machine is determined according to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold.
[0235] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when the number of the first load value and the number of the end load value are both at least two, determining whether the target virtual machine belongs to the target physical machine according to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold, including:
[0236] When each of the first load values is greater than the first load threshold, and each of the end load values is less than the second load threshold, it is determined that the target virtual machine belongs to the target physical machine.
[0237] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: before controlling the target virtual machine to run under the first target load and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the running of the target virtual machine, the method further includes:
[0238] Sending a second operation instruction to the target virtual machine; wherein the second operation instruction is used to instruct the target virtual machine to operate for a second preset time period under a second target load;
[0239] During the operation of the target virtual machine, obtaining fifth load information of each candidate processor and sixth load information of each candidate network port associated with the target physical machine;
[0240] The candidate processor with the largest fifth load information is used as the target processor associated with the target physical machine, and the candidate network port with the largest sixth load information is used as the target network port associated with the target physical machine.
[0241] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0242] After the target virtual machine finishes running, obtaining seventh load information of the target processor and eighth load information of the target network port;
[0243] A normal load value of the target physical machine is determined according to the seventh load information and the eighth load information.
[0244] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: the first load information includes processor utilization; the second load information includes network port utilization.
[0245] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0246] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0247] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A virtual machine confirmation method, characterized in that: Applied to a target physical machine, the method comprises: Controlling the target virtual machine to run under the first target load, and obtaining first load information of the target processor associated with the target physical machine and second load information of the target network port during the running of the target virtual machine; Determining a first load value of the target physical machine according to the first load information and the second load information; It is determined whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
2. The method according to claim 1, characterized in that: The determining, according to the first load information and the second load information, a first load value of the target physical machine includes: weighting the first load information using a first weight value of the first load information to obtain first weighted load information; weighting the second load information using a second weight value of the second load information to obtain second weighted load information; The sum of the first weighted load information and the second weighted load information is used as a first load value of the target physical machine.
3. The method according to claim 1, characterized in that The controlling the target virtual machine to run under the first target load, and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the running of the target virtual machine, includes: Sending a first operation instruction to the target virtual machine; wherein the first operation instruction is used to instruct the target virtual machine to operate for a first preset time under a first target load; During the operation of the target virtual machine, first load information of a target processor and second load information of a target network port associated with the target physical machine are collected according to a collection period.
4. The method according to claim 1, characterized in that The determining, according to the first load value of the target physical machine, whether the target virtual machine belongs to the target physical machine includes: After the target virtual machine ends running, obtaining third load information of the target processor and fourth load information of the target network port; Determining an end load value of the target physical machine according to the third load information and the fourth load information; It is determined whether the target virtual machine belongs to the target physical machine according to the first load value, the end load value, and a normal load value of the target physical machine in a normal state.
5. The method according to claim 4, characterized in that The determining whether the target virtual machine belongs to the target physical machine according to the first load value, the end load value, and the normal load value of the target physical machine in a normal state includes: Two different third weights are used to weight the normal load value of the target physical machine in a normal state, respectively, to obtain a first load threshold and a second load threshold; wherein the second load threshold is less than the first load threshold; Whether the target virtual machine belongs to the target physical machine is determined according to the size relationship between the first load value and the first load threshold, and the size relationship between the end load value and the second load threshold.
6. The method according to claim 5, characterized in that In a case where the number of the first load value and the number of the end load values are both at least two, determining whether the target virtual machine belongs to the target physical machine according to a size relationship between the first load value and the first load threshold, and a size relationship between the end load value and the second load threshold, includes: When each first load value is greater than the first load threshold and each end load value is less than the second load threshold, it is determined that the target virtual machine belongs to the target physical machine.
7. The method according to claim 4, characterized in that Before controlling the target virtual machine to run under the first target load and obtaining the first load information of the target processor associated with the target physical machine and the second load information of the target network port during the running of the target virtual machine, the method further includes: Sending a second operation instruction to the target virtual machine; wherein the second operation instruction is used to instruct the target virtual machine to operate for a second preset time period under a second target load; During the operation of the target virtual machine, obtaining fifth load information of each candidate processor and sixth load information of each candidate network port associated with the target physical machine; The candidate processor with the largest fifth load information is used as the target processor associated with the target physical machine, and the candidate network port with the largest sixth load information is used as the target network port associated with the target physical machine.
8. The method according to claim 7, characterized in that The method further comprises: After the target virtual machine ends running, obtaining seventh load information of the target processor and eighth load information of the target network port; A normal load value of the target physical machine is determined according to the seventh load information and the eighth load information.
9. The method according to any one of claims 1 to 8, characterized in that: The first load information includes processor utilization; the second load information includes network port utilization.
10. A virtual machine confirmation device, characterized in that: Configured on a target physical machine, the device includes: A control module, used to control the target virtual machine to run under the first target load, and to obtain first load information of the target processor associated with the target physical machine and second load information of the target network port during the operation of the target virtual machine; A first determining module, configured to determine a first load value of the target physical machine according to the first load information and the second load information; The second determination module is used to determine whether the target virtual machine belongs to the target physical machine according to the first load value of the target physical machine.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.