Virtual instance deployment method and device
By deploying resource update components and virtual instance management components on physical servers, hybrid scheduling of virtual machines and containers is achieved, which solves the problem of independent management of virtual machines and containers, improves scheduling efficiency and resource utilization, and reduces transition costs.
Patent Information
- Application Number
- CN202310231471.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2024-09-17
AI Technical Summary
The existing virtual machine scheduling architecture and container scheduling architecture manage physical machines independently, resulting in low scheduling efficiency and increased deployment costs. Multiple virtual instances cannot be deployed on the same physical server, which limits resource utilization.
Deploy the resource update component and multiple virtual instance management components on the physical server, obtain the amount of available resources through the resource update component, and provide the amount of available resources to the management component to achieve mixed scheduling of multiple virtual instances, allowing deployment in the same physical server Multiple virtual instances.
It improves the scheduling efficiency of virtual instances and the resource utilization of physical servers, simplifies implementation logic, and reduces the cost of transitioning virtual machines to containerization.
Smart Images

Figure CN118656168A
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud service technology, and in particular to a method and device for deploying a virtual instance. Background Art
[0002] With the trend of cloud native in the field of cloud computing, with the support of orchestration tools such as K8S, the efficiency of container operation and maintenance management such as development and online deployment has been greatly improved compared to virtualization. Applications used to implement user business are accelerating the transformation and migration from virtual machines to containerization. The usage of virtual machine resources will gradually decrease, while the usage of container resources will gradually increase.
[0003] Currently, the virtual machine scheduling architecture and the container scheduling architecture are two independent architectures that manage different physical machines. The virtual machine scheduling architecture can perform virtual machine scheduling in the physical machines it manages, and the container scheduling architecture can perform container scheduling in the physical machines it manages.
[0004] However, based on the current virtual machine scheduling architecture and container scheduling architecture, virtual machines and containers can only be deployed on different physical machines, resulting in low scheduling efficiency. Summary of the invention
[0005] The present application provides a method and device for deploying a virtual instance. The present application can schedule multiple virtual instances in the same physical server, realize mixed scheduling of multiple virtual instances, effectively improve the scheduling efficiency of virtual instances, and improve the resource utilization of physical servers. The technical solution provided by the present application is as follows:
[0006] In a first aspect, the present application provides a method for deploying a virtual instance, which is applied to a physical server, on which a resource update component and a management component for multiple virtual instances are deployed, and the management components for multiple virtual instances correspond to the management servers for multiple virtual instances. The method includes: the resource update component obtains the available resource amount of the physical server and provides the available resource amount to the management component; the management component receives a virtual instance deployment request sent by the corresponding management server, and deploys the virtual instance in the physical server based on the available resource amount and the virtual instance deployment request, wherein the virtual instance deployment request indicates the specifications of the virtual instance to be deployed.
[0007] In this method, since a management component of multiple virtual instances is deployed on a physical server, multiple virtual instances can be deployed in the physical server through the management component of the multiple virtual instances. In addition, since a resource update component is deployed in the physical server, the resource update component can obtain the available resource amount of the physical server and provide the available resource amount to the management component of the multiple virtual instances. In this way, the management component of the multiple virtual instances can know the available resource amount and deploy the corresponding virtual instances in the physical server based on the available resource amount, so that multiple virtual instances can be deployed in the physical server, and multiple virtual instances can be scheduled in the same physical server, and mixed scheduling of multiple virtual instances can be achieved, which effectively improves the scheduling efficiency of virtual instances and improves the resource utilization of the physical server. In addition, the implementation logic of the resource update component is simple, which makes the deployment method of the virtual instance provided in the embodiment of the present application easier to implement, and ensures the versatility of the deployment method.
[0008] In one implementation, the resource update component obtains the available resource amount of the physical server, including: the resource update component obtains the total resource amount of the physical server; the resource update component obtains the used resource amount of the physical server; the resource update component obtains the available resource amount based on the total resource amount and the used resource amount.
[0009] When a physical server is used as a resource pool for a virtual instance, the amount of resources used by the physical server is mainly affected by the amount of resources used by the virtual instance. The resource update component obtaining the amount of resources used by the physical server may include: the resource update component obtaining the amount of resources used by the virtual instance deployed in the physical server, and obtaining the amount of resources used by the physical server based on the amount of resources used by the virtual instance deployed. For example, the sum of the amounts of resources used by all virtual instances deployed in the physical server is determined as the amount of resources used. When the total amount of resources is the total amount of resources in the physical server that can be used to deploy virtual instances, the amount of resources used is the total amount of resources in the total amount of resources that have been used to deploy virtual instances.
[0010] In one implementation, since the management component of the virtual instance is used to manage the virtual instance, the management component of each virtual instance can know the total amount of resources used by all virtual instances managed by itself, then the resource update component can obtain the total amount of resources used by any virtual instance from the management component of any virtual instance, and obtain the used amount of resources of the physical server according to the total amount of resources used by multiple virtual instances. Wherein, when the management component deploys the virtual instance in the physical server, the management component can obtain the amount of resources used by the virtual instance, and add the amount of resources used by the virtual instance to the total amount of resources used by all virtual instances managed by it recorded by the management component, and update the total amount of resources. Similarly, when the management component deletes the virtual instance, the management component can obtain the amount of resources used by the virtual instance, and subtract the amount of resources used by the virtual instance from the total amount of resources used by all virtual instances managed by it originally recorded by the management component, and update the total amount of resources. Therefore, the resource update component obtains the used amount of resources of the physical server, including: the resource update component obtains the events of deploying and deleting virtual instances in the physical server, and obtains the used amount of resources of the physical server based on the events.
[0011] As the virtual instances in the physical server change, the amount of used resources will change accordingly. Considering that the main influencing factor of the used resources is the change of virtual instances, the resource update component can trigger the operation of obtaining the used resources based on the change of virtual instances. Considering that the changes in virtual instances that affect the used resources are mainly the deployment and deletion of virtual instances, the resource update component can obtain the events of deploying virtual instances and deleting virtual instances in the physical server, and obtain the used resources of the physical server when any of the events of deploying virtual instances and deleting virtual instances occurs. That is, the resource update component provides the management component with the amount of available resources, including: when any of the multiple virtual instances causes the amount of available resources of the physical server to change, the resource update component provides the management component with the amount of available resources.
[0012] For the management component of any virtual instance, it can be aware of the change in resource quantity caused by the change of the virtual instance it manages. Then, when the change of any virtual instance causes the change in available resource quantity, the resource update component can provide the available resource quantity to other management components after obtaining the available resource quantity, without providing the available resource quantity to the management component of any virtual instance. The other management component is the management component of the virtual instance other than any virtual instance among the multiple virtual instances.
[0013] In one implementation, the resource update component can provide the management component with the available resource amount by modifying the resource startup parameter of the management component. The resource startup parameter indicates the amount of resources that the management component can use when running. At this time, if the management component does not support dynamic refresh of resource startup parameters, the management component needs to be modified before updating the available resource amount, so that the modified management component supports dynamic refresh of resource startup parameters.
[0014] In one implementation, the multiple virtual instances include: virtual machines and containers.
[0015] In a second aspect, the present application provides a virtual instance deployment device. The device is applied to a physical server. The device includes: a resource update module and a management module for multiple virtual instances, and the management module for multiple virtual instances corresponds to the management server for multiple virtual instances. The resource update module is used to obtain the available resource amount of the physical server and provide the available resource amount to the management module. The management module is used to receive a virtual instance deployment request sent by the corresponding management server, and deploy the virtual instance in the physical server based on the available resource amount and the virtual instance deployment request, and the virtual instance deployment request indicates the specifications of the virtual instance to be deployed.
[0016] Optionally, the resource update module is specifically used to: obtain the total resource amount of the physical server; obtain the used resource amount of the physical server; and obtain the available resource amount based on the total resource amount and the used resource amount.
[0017] Optionally, the resource update module is specifically used to: obtain events of deploying and deleting virtual instances in the physical server, and obtain the amount of used resources of the physical server based on the events.
[0018] Optionally, the resource update module is specifically configured to provide the management module with the available resource amount when any one of the multiple virtual instances causes the available resource amount of the physical server to change.
[0019] Optionally, the resource update module is specifically used to provide available resource amounts to other management modules, where the other management modules are management modules of virtual instances other than any one of the multiple virtual instances.
[0020] Optionally, the resource update module is specifically used to: modify a resource startup parameter of the management module, where the resource startup parameter indicates the amount of resources that can be used by the management module to run.
[0021] Optionally, the multiple virtual instances include: virtual machines and containers.
[0022] In a third aspect, the present application provides a computing device including a memory and a processor, wherein the memory stores program instructions, and the processor runs the program instructions to execute the method provided in the first aspect of the present application and any possible implementation thereof.
[0023] In a fourth aspect, the present application provides a computer cluster, comprising multiple computing devices, the multiple computing devices including multiple processors and multiple memories, the multiple memories storing program instructions, and the multiple processors executing the program instructions, so that the computer cluster executes the method provided in the first aspect of the present application and any possible implementation thereof.
[0024] In a fifth aspect, the present application provides a computer-readable storage medium, which is a non-volatile computer-readable storage medium, and the computer-readable storage medium includes program instructions. When the program instructions are executed on a computing device, the computing device executes the method provided in the first aspect of the present application and any possible implementation thereof.
[0025] In a sixth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method provided in the first aspect of the present application and any possible implementation thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a structural diagram of an implementation environment involved in a method for deploying a virtual instance provided in an embodiment of the present application;
[0027] Figure 2 It is a flowchart of a method for deploying a virtual instance provided in an embodiment of the present application;
[0028] Figure 3 It is a flow chart of a resource update component obtaining the available resource amount of a physical server provided by an embodiment of the present application;
[0029] Figure 4 This is a flow chart of a resource update component updating available resource amounts to a management component, provided by an embodiment of the present application;
[0030] Figure 5 It is a schematic diagram of a process of transitioning a resource pool of a virtual machine to a container resource pool provided by an embodiment of the present application;
[0031] Figure 6 It is a schematic diagram of a deployment device of a virtual instance provided in an embodiment of the present application;
[0032] Figure 7 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0033] Figure 8 It is a structural diagram of a computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0035] To facilitate understanding, the technology and background involved in the embodiments of the present application are first explained below.
[0036] Virtualization is a resource management technology that abstracts and transforms the various physical resources of the host, such as computing resources, network resources, and storage resources, to break the inseparable barriers between the physical structures of the host, so that users can use these resources in a better way than the original configuration. The resources used through virtualization are called virtualized resources, which are not restricted by the construction method, setting region or physical configuration of existing physical resources.
[0037] Host (physical machine, PM): A physical resource used to carry virtualization technology. A host is also called a physical machine. Usually, a host used to deploy a virtual instance is a physical server. A physical machine has multiple physical devices. For example, a physical server has physical devices such as a processor and a memory. Multiple virtual instances can be deployed in a host, and multiple virtual instances deployed on the same host share the physical resources of the host. According to different usage scenarios, a host can deploy virtual instances belonging to only one user, or it can deploy virtual instances belonging to multiple users.
[0038] A resource pool is a collection of various hardware resources and software resources involved in a cloud computing data center. Generally, by resource type, resources in a resource pool can be divided into computing resources, storage resources, and network resources.
[0039] The virtual instance runs on the host's operating system, and the virtual instance itself is equipped with an operating system. The operating system of the virtual instance runs an application program, which is used to implement the user's business. The virtual instance can use the hardware resources of the host, and different virtual instances are isolated from each other. Generally, the virtual instance can be a virtual machine or a container.
[0040] Virtual machine (VM): refers to a complete computer system that is simulated by virtualization technology and has complete hardware system functions and runs in a completely isolated environment. Some instruction subsets of the virtual machine can be processed in the host machine, and other instructions can be executed in a simulated manner. A virtual machine is also called a virtual server.
[0041] A virtual machine can be considered as a collection of several virtual devices, which is a complete computer system with complete hardware system functions and running in a completely isolated environment. Virtual devices are virtualized on the basis of physical devices that can share resources by using virtualization technology. For example, a virtual processor virtualized on the basis of a processor using virtualization technology is a virtual device. For another example, a training card virtualized on the basis of a field-programmable gate array (FPGA) using virtualization technology is also a virtual device.
[0042] The container provides a lightweight virtual operating environment. The container can be obtained by packaging all the code, libraries, and dependencies of the user's application into an image. When the image is executed, the image runs in the virtual operating environment. At this time, the container is a runtime instance of the image, similar to a lightweight sandbox, which can be started, started, stopped, and deleted. The image will not share the host's memory, processor (such as the central processing unit (CPU)) and disk resources with other images, realizing container isolation between the image and the host, and between the image and other images, ensuring that the process in the container cannot monitor any process or resources outside the container.
[0043] Container technologies include Docker, Kubernetes, CoreOS, and other container technologies. The following uses Docker and Kubernetes container technologies as examples for explanation.
[0044] Docker is an open source application container engine. It is based on kernel lightweight virtualization technology. It can achieve resource isolation, configuration and security between applications, and can meet the resource requirements of applications for on-demand allocation, as well as the isolation and availability of applications. Before using Docker to run applications, you need to create a corresponding container on the container management device and run the application in the container. The component that manages the container using Docker container technology is called the Docker management component. The container implemented by Docker container technology is called the Docker container. The Docker management component uses containers to run and isolate applications, so that each container is isolated from each other and ensures security.
[0045] Kubernetes is an open source container orchestration engine from Google that supports automated deployment, large-scale scalability, and containerized application management. In Kubernetes, you can create multiple containers and run an application instance in each container. When deploying an application in a production environment, you can usually deploy multiple application instances of the application, and then manage, discover, and access multiple application instances through the built-in load balancing strategy, and the implementation of these details does not require complex manual configuration and processing by operation and maintenance personnel. The component that manages the container using Kubernetes container technology can be called the Kubernetes management component (K8S management component for short). The container implemented by Kubernetes container technology can be called the Kubernetes container (K8S container for short).
[0046] With the trend of cloud native in the field of cloud computing, with the support of orchestration tools such as K8S, the efficiency of container operation and maintenance management such as development and online deployment has been greatly improved compared to virtualization. Applications used to implement user business are accelerating the transformation and migration from virtual machines to containerization. The usage of virtual machine resources will gradually decrease, while the usage of container resources will gradually increase.
[0047] Currently, the virtual machine scheduling architecture and the container scheduling architecture are two independent architectures that manage different physical machines. The virtual machine scheduling architecture can perform virtual machine scheduling in the physical machines it manages, and the container scheduling architecture can perform container scheduling in the physical machines it manages.
[0048] However, based on the current virtual machine scheduling architecture and container scheduling architecture, virtual machines and containers can only be deployed on different physical machines, resulting in low scheduling efficiency and increasing the deployment cost of physical machines.
[0049] An embodiment of the present application provides a method for deploying a virtual instance. The method is applied to a physical server. A resource update component and management components of multiple virtual instances are deployed on the physical server, and the management components of the multiple virtual instances correspond to the management servers of the multiple virtual instances. For example, at least a management component of a virtual machine and a management component of a container are deployed on the physical server. The management component of the virtual machine corresponds to the management server of the virtual machine, and the management component of the container corresponds to the management server of the container. The method includes: the resource update component obtains the available resources of the physical server and provides the available resources to the management component; after any management component receives the virtual instance deployment request sent by the corresponding management server, the virtual instance is deployed in the physical server based on the available resources and the virtual instance deployment request. Among them, the virtual instance deployment request indicates the specifications of the virtual instance to be deployed, that is, the virtual instance deployed in the physical server is the virtual instance indicated by the virtual instance deployment request.
[0050] In the deployment method, since the management components of multiple virtual instances are deployed on the physical server, multiple virtual instances can be deployed in the physical server through the management components of the multiple virtual instances. In addition, since the resource update component is deployed in the physical server, the resource update component can obtain the available resource amount of the physical server and provide the available resource amount to the management components of the multiple virtual instances. In this way, the management components of the multiple virtual instances can know the available resource amount and deploy the corresponding virtual instances in the physical server based on the available resource amount, so that multiple virtual instances can be deployed in the physical server, and multiple virtual instances can be scheduled in the same physical server, and mixed scheduling of multiple virtual instances can be achieved, which effectively improves the scheduling efficiency of virtual instances and improves the resource utilization of the physical server. In addition, the implementation logic of the resource update component is simple, which makes the deployment method of the virtual instance provided in the embodiment of the present application easier to implement, and ensures the versatility of the deployment method.
[0051] Furthermore, since a large number of applications are currently being transformed and migrated from virtual machines to containerization, the overall trend is that the number of virtual machines is gradually decreasing, and the number of containers is gradually increasing. From the perspective of the evolution trend of the application architecture, containers will eventually replace virtual machines. By using the virtual instance deployment method provided in the embodiment of the present application, multiple virtual instances are deployed in the same physical server, and containers can be deployed using the resource pool of the virtual machine, gradually converting the resource pool of the virtual machine into the resource pool of the container, providing a solution for transitioning applications from virtual machines to containerization. In addition, in this solution, by deploying a resource update component in the physical server and using the resource update component to update the available resources, on the one hand, there is no need to create a container resource pool separately, and on the other hand, the original virtual machine management component and the container management component do not need to be changed or only need to be changed slightly, and the workload of transforming the resource pool of the virtual machine is small, which reduces the cost of transitioning from virtual machines to containerization.
[0052] Figure 1 Schematic diagram of the structure of the implementation environment involved in a method for deploying a virtual instance provided in an embodiment of the present application. Figure 1 As shown, the implementation environment includes: a physical server 10, a client 20 and a management server 30. The management server 30 can schedule multiple physical servers 10, and each physical server 10 can establish a communication connection with the management server 30. The client 20 can establish a communication connection with the management server 30. For example, a communication connection can be established between the client 20 and the management server 30 through a network. Optionally, the network can be a local area network, the Internet, or other networks, which is not limited in the embodiments of the present application.
[0053] In this implementation environment, the user can interact with the management server 30 through the client 20. For example, the user can send a business instruction to the management server 30 through the client 20 to instruct the management server 30 to deploy a virtual instance for the user, so as to implement the user's business through the virtual instance. After receiving the business instruction sent by the client 20, the management server 30 determines the virtual instance specifications that implement the user's business needs based on the business instruction, performs resource scheduling based on the virtual instance specifications, determines the physical server 10 for deploying the virtual instance, and sends a virtual instance deployment request to the physical server 10. After receiving the virtual instance deployment request, the physical server 10 adopts the virtual instance deployment method provided in the embodiment of the present application to deploy the virtual instance using the resources of the physical server 10.
[0054] In one implementation, the virtual instance deployment method provided in the embodiment of the present application can be implemented by running an executable program on the physical server 10. For example, the executable program of the virtual instance deployment method can be presented in the form of an application installation package, and after the application installation package is installed in the physical server 10, the virtual instance deployment method can be implemented by running the executable program.
[0055] It should be noted that the functions of the management server 30 may also be implemented by the physical server 10, that is, the application scenario may not include the management server 30. For example, the resource pool may include multiple physical servers 10, one of which may have the functions of the management server 30 described above in addition to the functions of the physical server 10 described above. At this time, the physical server 10 is used to receive the business instruction sent by the client 20, and select a physical server 10 for deploying a virtual instance from the multiple physical servers 10 in the resource pool according to the business instruction, so as to deploy the virtual instance in the selected physical server 10.
[0056] Optionally, the client 20 can be a computer, a personal computer, a laptop computer, a mobile phone, a smart phone, a tablet computer, a cloud host, a portable mobile terminal, a multimedia player, an e-book reader, a wearable device, a smart home appliance, an artificial intelligence device, a smart wearable device, a smart vehicle-mounted device or an Internet of Things device. The physical server 10 and the management server 30 can both be a server, or a server cluster consisting of several servers, or a cloud computing service center. Among them, a large number of basic resources owned by a cloud service provider are deployed in the cloud computing service center. For example, computing resources, storage resources, and network resources are deployed in the cloud computing service center. The cloud computing service center can use this large amount of basic resources to implement the deployment method of the virtual instance provided in the embodiment of the present application.
[0057] When the physical server 10 and the management server 30 are implemented through a cloud computing service center. The user can access the cloud platform through the client 20 and instruct the management server 30 to deploy a virtual instance for it through the cloud platform. Correspondingly, the management server 30 can schedule the physical server 10 through the cloud platform and deploy the virtual instance in the physical server 10. At this time, the function of the server to deploy a virtual instance for the user can be abstracted into a virtual instance deployment cloud service by the cloud service provider on the cloud platform. After the user purchases the virtual instance deployment cloud service on the cloud platform, the cloud platform can use the resources in the cloud computing center and use the virtual instance deployment method provided in the embodiment of the present application to deploy the virtual instance for the user. In addition, the deployment cloud service of the virtual instance can be provided as an independent cloud service or as an additional service of other cloud services. Optionally, the cloud platform can be a cloud platform of a central cloud, a cloud platform of an edge cloud, or a cloud platform including a central cloud and an edge cloud, and the embodiment of the present application does not specifically limit it.
[0058] It should be noted that in Figure 1 In the implementation environment shown, the physical server 10 can also be implemented by other resource platforms besides the cloud platform, which is not specifically limited in the present embodiment. At this time, the server can be implemented by resources in other resource platforms and provide users with related services for deploying virtual instances.
[0059] It should be understood that the above content is an illustrative description of the application scenarios of the virtual instance deployment method provided in the embodiments of the present application, and does not constitute a limitation on the application scenarios of the virtual instance deployment method. A person of ordinary skill in the art can know that as business needs change, its application scenarios can be adjusted according to application needs, and the embodiments of the present application do not list them one by one.
[0060] The implementation process of the virtual instance deployment method provided by the embodiment of the present application is described below. The method is applied to a physical server, on which a resource update component and a management component of multiple virtual instances are deployed, and the management components of the multiple virtual instances correspond to the management servers of the multiple virtual instances. By way of example, the multiple virtual instances may include virtual machines and containers. The implementation process of the virtual instance deployment method provided by the embodiment of the present application is described below, taking the multiple virtual instances as virtual machines and containers as an example. Figure 2 As shown, the deployment method of the virtual instance includes the following steps:
[0061] Step 201: The resource update component obtains the available resources of the physical server.
[0062] In one implementation, Figure 3 As shown, the implementation process of step 201 includes the following steps 2011 to 2013.
[0063] Step 2011: The resource update component obtains the total resource amount of the physical server.
[0064] The resource update component can obtain the total resources and used resources of the physical server respectively, and then obtain the available resources of the physical server based on the total resources and the used resources. In one implementation, the resource update component can call the operating system (OS) interface of the physical server, read the total resource information of the physical server through the OS interface, and obtain the total resources of the physical server. In another implementation, when a resource management component is deployed in the physical server, the resource management component is used to manage the resource scheduling of the physical server, and the resource management component records the total resources of the physical server. The resource update component can obtain the total resources from the resource management component. Among them, the total resources can be the total amount of resources in the resources of the physical server that can be used to deploy virtual instances. The total resources include the total amount of resources that have been used to deploy virtual instances and the total amount of resources that are not yet used and can be used to deploy virtual instances.
[0065] Step 2012: The resource update component obtains the used resources of the physical server.
[0066] When a physical server is used as a resource pool for a virtual instance, the amount of resources used by the physical server is mainly affected by the amount of resources used by the virtual instance. The resource update component obtaining the amount of resources used by the physical server may include: the resource update component obtaining the amount of resources used by the virtual instance deployed in the physical server, and obtaining the amount of resources used by the physical server based on the amount of resources used by the virtual instance deployed. For example, the sum of the amounts of resources used by all virtual instances deployed in the physical server is determined as the amount of resources used. When the total amount of resources is the total amount of resources in the physical server that can be used to deploy virtual instances, the amount of resources used is the total amount of resources in the total amount of resources that have been used to deploy virtual instances.
[0067] In one implementation, since the management component of the virtual instance is used to manage the virtual instance, the management component of each virtual instance can know the total amount of resources used by all virtual instances managed by it, then the resource update component can obtain the total amount of resources used by any virtual instance from the management component of any virtual instance, and obtain the used amount of resources of the physical server based on the total amount of resources used by multiple virtual instances. Among them, when the management component deploys the virtual instance in the physical server, the management component can obtain the amount of resources used by the virtual instance, and add the amount of resources used by the virtual instance to the total amount of resources used by all virtual instances managed by it recorded by the management component, and update the total amount of resources. Similarly, when the management component deletes the virtual instance, the management component can obtain the amount of resources used by the virtual instance, and subtract the amount of resources used by the virtual instance from the total amount of resources used by all virtual instances managed by it originally recorded by the management component, and update the total amount of resources. Optionally, the resource update component can call the interface of the management component to obtain the total amount of resources used by all virtual instances managed by the management component. For example, when a physical server is deployed with the virtual machine management component ecs client and the container management component kubelet, the resource update component can obtain the total amount of resources res_kubelet used to deploy containers in the physical server by calling the kubelet interface, and obtain the total amount of resources res_ecs used to deploy virtual machines in the physical server by calling the ecs client interface, and determine the sum of the total amount of resources used to deploy containers and the total amount of resources used to deploy virtual machines as the used resources of the physical server.
[0068] As the virtual instance in the physical server changes, the used resource amount will change accordingly. Considering that the main influencing factor of the used resource amount is the change of the virtual instance, the resource update component can trigger the operation of obtaining the used resource amount based on the change of the virtual instance. Considering that the change of the virtual instance that affects the used resource amount is mainly the deployment and deletion of the virtual instance, the resource update component can obtain the event of deploying the virtual instance and the event of deleting the virtual instance in the physical server, and obtain the used resource amount of the physical server when any of the event of deploying the virtual instance and the event of deleting the virtual instance occurs. Among them, when the event of deploying the virtual instance occurs, the used resource amount will decrease accordingly. When the event of deleting the virtual instance occurs, the used resource amount will increase accordingly. Since the management component of the virtual instance is used to manage the virtual instance, the management component of the virtual instance can obtain the event of deploying the virtual instance and the event of deleting the virtual instance, then the resource update component can obtain the event of deploying the virtual instance and the event of deleting the virtual instance from the management components of multiple virtual instances. In one implementation, the resource update component can call the interface of the management component to obtain the event of deploying the virtual instance and the event of deleting the virtual instance.
[0069] Step 2013: The resource update component obtains the available resource amount based on the total resource amount and the used resource amount.
[0070] After the resource update component obtains the total amount of resources and the amount of used resources, the available amount of resources can be obtained based on the total amount of resources and the amount of used resources. In one implementation, the available amount of resources can be the difference between the total amount of resources and the amount of used resources. For example, when the physical server is deployed with the virtual machine management component ecs client and the container management component kubelet, the total amount of resources res_kubelet used to deploy containers in the physical server, the total amount of resources res_ecs used to deploy virtual machines in the physical server, the total amount of resources res_all of the physical server, and the available amount of resources res_left of the physical server can satisfy: res_left = res_all-res_ecs-res_kubelet. Among them, when the total amount of resources is the total amount of resources in the resources of the physical server that can be used to deploy virtual instances, and the used amount of resources is the total amount of resources in the total amount of resources that have been used to deploy virtual instances, the available amount of resources is the total amount of resources that can be used to deploy virtual instances that have not been used in the total amount of resources.
[0071] Step 202: The resource update component provides the management component with the available resource amount.
[0072] After the resource update component obtains the available resources of the physical server, it can provide the available resources to the management component so that the management components of the multiple virtual instances are aware of the available resources. As the virtual instances in the physical server change, the used resources will change accordingly, and the available resources will also change accordingly. When any one of the multiple virtual instances causes the available resources of the physical server to change, the resource update component performs the operation of providing the available resources to the management component. Among them, for the management component of any virtual instance, it can be aware of the change in the amount of resources caused by the change of the virtual instance it manages. When the change of any virtual instance causes the change in the amount of available resources, after obtaining the available resources, the resource update component can provide the available resources to other management components without providing the available resources to the management component of any virtual instance. The other management components are management components of virtual instances other than any one of the multiple virtual instances. For example, Figure 4As shown, the resource update component can monitor whether the resources of the physical server have changed. When the physical server is deployed with the virtual machine management component ecs client and the container management component kubelet, when the amount of resources used by the container changes due to the deployment and deletion of the container, the resource update component can update the available resources of the physical server based on the change and provide the updated available resources to the ecs client. When the amount of resources used by the virtual machine changes due to the deployment and deletion of the virtual machine, the resource update component can update the available resources of the physical server based on the change and provide the updated available resources to the kubelet.
[0073] In one implementation, the resource update component can provide the management component with the available resource amount by modifying the resource startup parameter of the management component. The resource startup parameter indicates the amount of resources that the management component can use when running. At this time, if the management component does not support dynamic refresh of resource startup parameters, the management component needs to be modified before updating the available resource amount, so that the modified management component supports dynamic refresh of resource startup parameters.
[0074] Step 203: The management server receives the service instruction sent by the client, where the service instruction indicates the service that the user needs to implement.
[0075] When a user needs to implement a business through a virtual instance, the user can send a business instruction to the management server through the client to convey the demand to the management server. The business instruction may only indicate the business that the user needs to implement. Alternatively, the business instruction may also indicate the specifications of the virtual instance required to implement the business. In an implementation scenario, the function of the management server for the business through virtual implementation may be presented in the form of a service (such as a cloud service), and the process of the user purchasing the service on the client will trigger the business instruction. When the purchase of the service only requires the user to provide a description of the business, the business instruction is presented as only indicating the business that the user needs to implement. When the purchase of the service requires not only the user to provide a description of the business, but also the user to select the specifications of the virtual instance, the business instruction is presented as not only indicating the business that the user needs to implement, but also indicating the specifications of the virtual instance required to implement the business. The specification may indicate the type of virtual instances required to implement the business, the total number, and the resources such as processors and memory required for a single virtual instance.
[0076] Step 204: The management server determines the physical server for deploying the virtual instance and the specifications of the virtual instance to be deployed based on the business instruction, and sends a virtual instance deployment request to the management component of the physical server, where the virtual instance deployment request indicates the specifications of the virtual instance to be deployed.
[0077] After receiving the business instruction sent by the client, the management server can determine the specifications of the virtual instance that realizes the user's business needs based on the business instruction, and then perform resource scheduling based on the specifications of the virtual instance, determine the physical server used to deploy the virtual instance, and send a virtual instance deployment request to the management component in the physical server. Among them, when the business instruction only indicates the business that the user needs to implement, the management server can determine the specifications of the virtual instance that realizes the business needs according to the business volume of the business, and then perform resource scheduling according to the specifications. When the business instruction also indicates the specifications of the virtual instance required to realize the business, the management server can perform resource scheduling according to the specifications. The management server determines the specifications of the virtual instance, that is, determines the type of virtual instance, the total number and the processor and memory resources required for a single virtual instance, and then sends the virtual instance deployment request to the management component of the physical server, which actually sends the virtual instance deployment request to the management component that manages the virtual implementation of the type indicated by the specification.
[0078] Step 205: The management component deploys the virtual instance in the physical server based on the available resources and the virtual instance deployment request.
[0079] After the management component receives the virtual instance deployment request sent by the management server, it can deploy the virtual instance indicated by the virtual instance deployment request in the physical server according to the specifications of the virtual instance indicated by the virtual instance deployment request. Among them, after the management component receives the virtual instance deployment request sent by the management server, it will send a resource request to the resource management component of the physical server according to the specifications of the virtual instance to be deployed to apply for resources for deploying the virtual instance. After applying for resources from the resource management component, the virtual instance is deployed using the applied resources. It should be noted that since there are multiple management components of virtual instances deployed in the physical server, the management components of the multiple virtual instances may send resource requests to the physical server at the same time. When there are multiple concurrent resource requests, if the available resources of the physical server are insufficient, the management component can return indication information to the management server through the physical server, so that the management server re-schedules resources.
[0080] In summary, in the deployment method of the virtual instance provided in the embodiment of the present application, since the management components of multiple virtual instances are deployed on the physical server, multiple virtual instances can be deployed in the physical server through the management components of the multiple virtual instances. In addition, since the resource update component is deployed in the physical server, the resource update component can obtain the available resource amount of the physical server and provide the available resource amount to the management components of the multiple virtual instances. In this way, the management components of the multiple virtual instances can know the available resource amount, and deploy the corresponding virtual instances in the physical server based on the available resource amount, so that multiple virtual instances can be deployed in the physical server, and multiple virtual instances can be scheduled in the same physical server, and mixed scheduling of multiple virtual instances is realized, which effectively improves the scheduling efficiency of the virtual instances and improves the resource utilization of the physical server. In addition, the implementation logic of the resource update component is simple, which makes the deployment method of the virtual instance provided in the embodiment of the present application easier to implement, and ensures the versatility of the deployment method.
[0081] Furthermore, since a large number of applications are currently being transformed and migrated from virtual machines to containerization, the overall trend is that the number of virtual machines is gradually decreasing, and the number of containers is gradually increasing. From the perspective of the evolution trend of the application architecture, containers will eventually replace virtual machines. By using the virtual instance deployment method provided in the embodiment of the present application, multiple virtual instances are deployed in the same physical server, and containers can be deployed using the resource pool of the virtual machine, gradually converting the resource pool of the virtual machine into the resource pool of the container, providing a solution for transitioning applications from virtual machines to containerization. In addition, in this solution, by deploying a resource update component in the physical server and using the resource update component to update the available resources, on the one hand, there is no need to create a container resource pool separately, and on the other hand, the original virtual machine management component and the container management component do not need to be changed or only need to be changed slightly, and the workload of transforming the resource pool of the virtual machine is small, which reduces the cost of transitioning from virtual machines to containerization.
[0082] Figure 5 The following is a schematic diagram of the process of transitioning from a virtual machine resource pool to a container resource pool. Figure 5 From the content in the dashed box 1, we can see that for any physical server, the physical server can only be used as a resource pool for virtual machines or a resource pool for containers. Figure 5 From the content in the dashed box 2, it can be seen that after deploying the resource update component and multiple virtual instances in the physical server, a single physical server can be used as a resource pool for virtual machines and a resource pool for containers at the same time, and both virtual machines and containers can be deployed in the physical server. Figure 5From the content in the dotted box 3, it can be seen that: when the physical server can serve as a resource pool for virtual machines and a resource pool for containers at the same time, as the application is transformed and migrated from virtual machines to containerization, the virtual machines in the physical server can eventually be reduced to 0, and the resources of the physical server can all be used to deploy containers. That is, the physical server transitions from a mixed resource pool of virtual machines and containers to a resource pool of containers.
[0083] It should be noted that the sequence of steps of the deployment method of the virtual instance provided in the embodiment of the present application can be adjusted appropriately, and the steps can be increased or decreased accordingly according to the situation. Any technician familiar with the technical field can easily think of a change within the technical scope disclosed in this application, and all of them should be included in the protection scope of this application, so they will not be repeated here.
[0084] The above describes the deployment method of the virtual instance of the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a deployment device of the virtual instance. The device is applied to a physical server. Optionally, the device can be configured on a cloud platform. Figure 6 Schematic diagram of a virtual instance deployment device provided in an embodiment of the present application. Figure 6 As shown in the following multiple modules, the Figure 6 The deployment device of the virtual instance shown can perform the above Figure 2 The operations performed by the physical server in all or part of the operations shown. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown, and the embodiments of the present application are not limited to this. Figure 6 As shown, the virtual instance deployment device 60 may include: a resource update module 601 and a management module 602 for multiple virtual instances, and the management module 602 for multiple virtual instances corresponds to a management server for multiple virtual instances. Figure 6 The virtual instance deployment device 60 is a schematic diagram of a management module 602 including two virtual instances.
[0085] The resource update module 601 is used to obtain the available resource amount of the physical server and provide the available resource amount to the management module 602 .
[0086] The management module 602 is used to receive a virtual instance deployment request sent by a corresponding management server, and deploy a virtual instance in a physical server based on available resources and the virtual instance deployment request, wherein the virtual instance deployment request indicates the specifications of the virtual instance to be deployed.
[0087] Optionally, the resource update module 601 is specifically used to: obtain the total resource amount of the physical server; obtain the used resource amount of the physical server; and obtain the available resource amount based on the total resource amount and the used resource amount.
[0088] Optionally, the resource update module 601 is specifically used to: obtain events of deploying and deleting virtual instances in the physical server, and obtain the used resource amount of the physical server based on the events.
[0089] Optionally, the resource update module 601 is specifically configured to provide the management module 602 with the available resource amount when any one of the multiple virtual instances causes the available resource amount of the physical server to change.
[0090] Optionally, the resource update module 601 is specifically used to provide available resource amounts to other management modules 602, where the other management modules 602 are management modules 602 of virtual instances other than any one of the multiple virtual instances.
[0091] Optionally, the resource updating module 601 is specifically used to modify the resource startup parameters of the management module 602 , where the resource startup parameters indicate the amount of resources that can be used by the management module 602 .
[0092] Optionally, the multiple virtual instances include: virtual machines and containers.
[0093] In summary, in the deployment device of the virtual instance provided in the embodiment of the present application, since the management components of multiple virtual instances are deployed on the physical server, multiple virtual instances can be deployed in the physical server through the management components of the multiple virtual instances. In addition, since the resource update component is deployed in the physical server, the resource update component can obtain the available resource amount of the physical server and provide the available resource amount to the management components of the multiple virtual instances. In this way, the management components of the multiple virtual instances can know the available resource amount and deploy the corresponding virtual instances in the physical server based on the available resource amount, so that multiple virtual instances can be deployed in the physical server, and multiple virtual instances can be scheduled in the same physical server, and mixed scheduling of multiple virtual instances can be achieved, which effectively improves the scheduling efficiency of the virtual instances and improves the resource utilization of the physical server. In addition, the implementation logic of the resource update component is simple, which makes the deployment device of the virtual instance provided in the embodiment of the present application easier to implement, and ensures the versatility of the deployment device.
[0094] Furthermore, since a large number of applications are currently being transformed and migrated from virtual machines to containerization, the overall trend is that the number of virtual machines is gradually decreasing, and the number of containers is gradually increasing. From the perspective of the evolution trend of the application architecture, containers will eventually replace virtual machines. Using the virtual instance deployment device provided in the embodiment of the present application, multiple virtual instances are deployed in the same physical server, and the resource pool of the virtual machine can be used to deploy containers, and the resource pool of the virtual machine is gradually converted into the resource pool of the container, which provides a solution for the transition of applications from virtual machines to containerization. In addition, in this solution, by deploying a resource update component in the physical server and using the resource update component to update the available resources, on the one hand, there is no need to create a container resource pool separately, and on the other hand, the original virtual machine management component and the container management component do not need to be changed or only need a small change, the workload of transforming the resource pool of the virtual machine is small, and the cost of transitioning from virtual machines to containerization is reduced.
[0095] The resource update module 601 and the management module 602 can be implemented by software or hardware. For example, the resource update module 601 is taken as an example to introduce the implementation of the resource update module 601. Similarly, the implementation of the management module 602 can refer to the implementation of the resource update module 601.
[0096] As an example of a software functional unit, the resource update module 601 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the resource update module 601 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple data centers with similar geographical locations. Among them, usually a region may include multiple AZs.
[0097] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0098] As an example of a hardware functional unit, the resource update module 601 may include at least one computing device, such as a server, etc. Alternatively, the resource update module 601 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0099] The multiple computing devices included in the resource update module 601 can be distributed in the same region or in different regions. The multiple computing devices included in the resource update module 601 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the resource update module 601 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0100] It should be noted that, in other embodiments, any module in the resource update module 601 and the management module 602 can be used to execute any step in the deployment method of the virtual instance. The steps that the resource update module 601 and the management module 602 are responsible for implementing can be specified as needed, and the resource update module 601 and the management module 602 respectively implement different steps in the deployment method of the virtual instance to achieve all the functions of the deployment device of the virtual instance.
[0101] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding contents in the aforementioned method embodiments and will not be repeated here.
[0102] The embodiment of the present application provides a computing device, which is used to implement part or all of the functions of the virtual instance deployment method provided in the embodiment of the present application. Figure 7 Schematic diagram of a computing device provided in an embodiment of the present application. Figure 7As shown, the computing device 700 includes a processor 701, a memory 702, a communication interface 703 and a bus 704. The processor 701, the memory 702 and the communication interface 703 are connected to each other through the bus 704.
[0103] Processor 701 may include a general-purpose processor and / or a dedicated hardware chip. A general-purpose processor may include: a central processing unit (CPU), a microprocessor or a graphics processing unit (GPU). The CPU is, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU). A dedicated hardware chip is a hardware module for high-performance processing. A dedicated hardware chip includes at least one of a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or a network processor (NP). Processor 701 may also be an integrated circuit chip having signal processing capabilities. In the implementation process, some or all of the functions of the deployment method of the virtual instance of the present application may be completed by an integrated logic circuit of hardware in processor 701 or instructions in software form.
[0104] The memory 702 is used to store computer programs, and the computer programs include an operating system 702a and executable codes (i.e., program instructions) 702b. The memory 702 is, for example, a read-only memory or other types of static storage devices that can store static information and instructions, or a random access memory or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory, a read-only optical disc or other optical disc storage, an optical disc storage (including a compressed optical disc, a laser disc, an optical disc, a digital versatile disc, a blue-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired executable code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. For example, the memory 702 is used to store an outbound port queue, etc. The memory 702 is, for example, independent and connected to the processor 701 via a bus 704. Or the memory 702 and the processor 701 are integrated together. The memory 702 can store executable code. When the executable code stored in the memory 702 is executed by the processor 701, the processor 701 is used to execute part or all of the functions of the deployment method of the virtual instance provided in the embodiment of the present application. For the implementation of the processor 701 to execute the process, please refer to the relevant description in the aforementioned embodiment. The memory 702 may also include software modules and data required for other running processes such as the operating system.
[0105] The communication interface 703 uses a transceiver module such as, but not limited to, a transceiver to achieve communication with other devices or communication networks. For example, the communication interface 703 can be any one or any combination of the following devices: a network interface (such as an Ethernet interface), a wireless network card, and other devices with network access functions.
[0106] The bus 704 is any type of communication bus for interconnecting the internal devices of the computing device (e.g., the memory 702, the processor 701, and the communication interface 703). For example, a system bus. The embodiment of the present application takes the interconnection of the above-mentioned devices inside the computing device through the bus 704 as an example. Optionally, the above-mentioned devices inside the computing device 700 can also be connected to each other in communication with each other using other connection methods other than the bus 704. For example, the above-mentioned devices inside the computing device 700 are interconnected through an internal logical interface.
[0107] It should be noted that the above-mentioned multiple devices can be respectively arranged on independent chips, or at least partially or completely arranged on the same chip. Whether to independently arrange each device on different chips or to integrate and arrange it on one or more chips often depends on the needs of product design. The embodiments of the present application do not limit the specific implementation form of the above-mentioned devices. The descriptions of the processes corresponding to the above-mentioned figures have different focuses. For the parts not described in detail in a certain process, please refer to the relevant descriptions of other processes.
[0108] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product providing the program development platform includes one or more computer instructions, and when these computer program instructions are loaded and executed on a computing device, all or part of the functions of the method for deploying the virtual instance provided in the embodiments of the present application are implemented.
[0109] Furthermore, computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium stores computer program instructions that provide a program development platform.
[0110] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
[0111] Optionally, the structure of at least one computing device included in the computing device cluster can be found in Figure 7 The computing device 700 is shown. The memory 702 in one or more computing devices 700 in the computing device cluster may store the same instructions for executing the deployment method of the virtual instance.
[0112] In some possible implementations, the memory 702 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the method for deploying the virtual instance. In other words, the combination of one or more computing devices 700 may jointly execute the instructions for executing the method for deploying the virtual instance.
[0113] It should be noted that the memory 702 in different computing devices 700 in the computing device cluster may store different instructions, which are respectively used to execute part of the functions of the deployment device of the virtual instance. That is, the instructions stored in the memory 702 in different computing devices 700 may implement the functions of one or more of the first determination module, the second determination module and the third determination module.
[0114] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network, etc. Figure 8 A possible implementation is shown. Figure 8 As shown, two computing devices 800A and 800B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, computing devices 800A and 800B include a bus 802, a processor 804, a memory 806, and a communication interface 808. The memory 806 in the computing device 800A stores instructions for executing the functions of the first determination module. At the same time, the memory 806 in the computing device 800B stores instructions for executing the functions of the second determination module and the third determination module.
[0115] It should be understood that Figure 8 The functions of the computing device 800A shown in the figure can also be completed by multiple computing devices 800. Similarly, the functions of the computing device 800B can also be completed by multiple computing devices 800. And the deployment mode of the modules for implementing the deployment method of the virtual instance in the computing device can also be adjusted according to the application requirements.
[0116] An embodiment of the present application also provides a computer-readable storage medium, which is a non-volatile computer-readable storage medium. The computer-readable storage medium includes program instructions. When the program instructions are executed on a computing device, the computing device implements a method for deploying a virtual instance as provided in an embodiment of the present application.
[0117] The embodiment of the present application also provides a computer program product including instructions. When the computer program product is executed on a computer, the computer implements the method for deploying a virtual instance provided in the embodiment of the present application.
[0118] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0119] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the original data and executable code involved in this application are all obtained with full authorization.
[0120] In the embodiments of the present application, the terms "first", "second" and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. The term "at least one" means one or more, and the term "plurality" means two or more, unless otherwise expressly defined.
[0121] The term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0122] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the concepts and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for deploying a virtual instance, characterized in that: The method is applied to a physical server, on which a resource update component and management components of multiple virtual instances are deployed, and the management components of the multiple virtual instances correspond to management servers of the multiple virtual instances, and the method includes: The resource update component obtains the available resource amount of the physical server and provides the available resource amount to the management component; The management component receives a virtual instance deployment request sent by a corresponding management server, and deploys a virtual instance in the physical server based on the available resource amount and the virtual instance deployment request, wherein the virtual instance deployment request indicates the specification of the virtual instance to be deployed.
2. The method according to claim 1, characterized in that The resource update component obtains the available resource amount of the physical server, including: The resource update component obtains the total resource amount of the physical server; The resource update component obtains the used resource amount of the physical server; The resource update component obtains the available resource amount based on the total resource amount and the used resource amount.
3. The method according to claim 2, characterized in that The resource update component obtains the used resource amount of the physical server, including: The resource update component obtains events of deploying and deleting virtual instances in the physical server, and obtains the amount of used resources of the physical server based on the events.
4. The method according to any one of claims 1 to 3, characterized in that: The resource update component provides the available resource amount to the management component, including: When any one of the multiple virtual instances causes the amount of available resources of the physical server to change, the resource update component provides the amount of available resources to the management component.
5. The method according to claim 4, characterized in that The resource update component provides the available resource amount to the management component, including: The resource update component provides the available resource amount to other management components, and the other management components are management components of virtual instances among the multiple virtual instances except for the any one virtual instance.
6. The method according to any one of claims 1 to 5, characterized in that: The resource update component provides the available resource amount to the management component, including: The resource update component modifies a resource startup parameter of the management component, where the resource startup parameter indicates the amount of resources that can be used by the management component to run.
7. The method according to any one of claims 1 to 6, characterized in that: The multiple virtual instances include: virtual machines and containers.
8. A virtual instance deployment device, characterized in that: The device is applied to a physical server, and comprises: a resource update module and a management module for multiple virtual instances, wherein the management module for multiple virtual instances corresponds to a management server for multiple virtual instances; The resource update module is used to obtain the available resource amount of the physical server and provide the available resource amount to the management module; The management module is used to receive a virtual instance deployment request sent by a corresponding management server, and deploy a virtual instance in the physical server based on the available resource amount and the virtual instance deployment request, wherein the virtual instance deployment request indicates the specifications of the virtual instance to be deployed.
9. The device according to claim 8, characterized in that The resource update module is specifically used for: Obtaining the total resource amount of the physical server; Obtaining the amount of used resources of the physical server; The available resource amount is acquired based on the total resource amount and the used resource amount.
10. The device according to claim 9, characterized in that The resource update module is specifically used for: Events of deploying and deleting virtual instances in the physical server are obtained, and the amount of used resources of the physical server is obtained based on the events.
11. The device according to any one of claims 8 to 10, characterized in that: The resource update module is specifically used for: When any one of the multiple virtual instances causes the available resource amount of the physical server to change, the available resource amount is provided to the management module.
12. The device according to claim 11, characterized in that The resource update module is specifically used for: The available resource amount is provided to other management modules, where the other management modules are management modules of virtual instances among the multiple virtual instances except for the any one virtual instance.
13. The device according to any one of claims 8 to 12, characterized in that: The resource update module is specifically used for: The resource startup parameter of the management module is modified, wherein the resource startup parameter indicates the amount of resources that can be used by the management module to run.
14. The device according to any one of claims 8 to 13, characterized in that The multiple virtual instances include: virtual machines and containers.
15. A computing device, characterized in that: The method comprises a memory and a processor, wherein the memory stores program instructions, and the processor runs the program instructions to execute the method according to any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that: The method comprises program instructions, and when the program instructions are executed on a computing device, the computing device is caused to execute the method according to any one of claims 1 to 7.
17. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Cloud resource scheduling method and apparatus
WO2026066132A1
Method for creating virtual machine instance, system, electronic device, and storage medium
WO2026138513A1
