Configuration method and device, network equipment, storage medium and computer program product
By configuring virtual machines with specifications and images that are not associated with the CPU model, and combining them with specifications and images of specific CPU models, the problem of resource sharing and virtual machine migration between different types of servers is solved, and resource utilization and management efficiency are improved.
Patent Information
- Application Number
- CN202410167152.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-05
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing technology, resources cannot be shared due to different server types, and virtual machines cannot be flexibly migrated between different types of servers, affecting resource utilization and management efficiency.
Configure first parameters for the virtual machine, including the first specification and first image that are not associated with the CPU model, and configure one or more sets of second parameters for it. Each set of second parameters is associated with a specific CPU model, supporting the virtual machine in Run on different types of servers, and adapt specifications and images during migration.
It realizes resource sharing and flexible migration of virtual machines between different types of servers, improving resource utilization and management efficiency.
Smart Images

Figure CN118796343A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a configuration method, apparatus, network equipment, storage medium, and computer program product. Background Art
[0002] In the related art, servers are divided into different logical partitions in the same resource pool according to server types for unified management, which may result in the inability to share resources between servers of different types and the inability to flexibly migrate virtual machines between servers of different types, affecting resource utilization. Summary of the invention
[0003] To solve related technical problems, embodiments of the present application provide a configuration method, apparatus, network device, storage medium and computer program product.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application embodiment provides a configuration method, including:
[0006] Configuring first parameters for the virtual machine; the first parameters include a first specification and a first image of an unassociated central processing unit (CPU) model; and,
[0007] One or more sets of second parameters are configured for the virtual machine, or no second parameters are configured; each set of second parameters includes a second specification and a second image associated with a CPU model.
[0008] Wherein, in the above scheme, the method further comprises:
[0009] The virtual machine is deployed based on the first parameter of the virtual machine configuration, or based on the first parameter of the virtual machine configuration and the one or more sets of second parameters.
[0010] In the above solution, when there is a server matching the first parameter, the virtual machine is deployed using the server matching the first parameter; wherein the first parameter supports matching servers of all CPU models except the specified CPU model.
[0011] In the above solution, the virtual machine is configured with one or more sets of second parameters; the method further includes:
[0012] In the case that there is no server matching the first parameter, the virtual machine is deployed using a server matching a set of second parameters in the one or more sets of second parameters.
[0013] In the above scheme, the method further comprises:
[0014] Hot migration of the virtual machine from the first server to the second server; wherein,
[0015] The first server and the second server are of the same type.
[0016] In the above scheme, the method further comprises:
[0017] When migrating and / or rebuilding and / or evacuating the virtual machine, determining whether a first CPU model of a target server hosting the virtual machine is consistent with a second CPU model of a source server, and obtaining a determination result;
[0018] When the judgment result indicates that the first CPU model is inconsistent with the second CPU model, the specification of the virtual machine is changed based on the specification associated with the first CPU model, and the virtual machine is rebuilt based on the image associated with the first CPU model.
[0019] In the above scheme, the method further comprises:
[0020] When the specifications associated with the first CPU model and the second CPU model are inconsistent, resources are allocated to the virtual machine based on the first CPU model.
[0021] In the above scheme, the method further comprises:
[0022] Configuring one or more sets of second parameters in the virtual machine; and / or,
[0023] Deleting all or part of the second parameters in one or more groups of second parameters configured for the virtual machine; and / or,
[0024] Modifying the CPU model associated with all or part of the second parameters in one or more groups of second parameters configured for the virtual machine; and / or,
[0025] Find the CPU model associated with the second parameter of the virtual machine configuration.
[0026] The present application also provides a configuration device, including:
[0027] A configuration unit, configured to configure a first parameter for a virtual machine, and to configure one or more sets of second parameters or not configure the second parameter for the virtual machine; wherein,
[0028] The first parameters include a first specification and a first image that are not associated with a CPU model; each set of second parameters includes a second specification and a second image that are associated with a CPU model.
[0029] The embodiment of the present application further provides a network device, comprising: a first processor and a first communication interface; wherein,
[0030] The first processor is used to configure a first parameter for the virtual machine, and to configure one or more sets of second parameters or not configure the second parameter for the virtual machine; wherein,
[0031] The first parameters include a first specification and a first image that are not associated with a CPU model; each set of second parameters includes a second specification and a second image that are associated with a CPU model.
[0032] The embodiment of the present application further provides a network device, comprising: a first processor and a first memory for storing a computer program that can be run on the processor,
[0033] Wherein, the first processor is used to execute the steps of any of the above methods when running the computer program.
[0034] An embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0035] An embodiment of the present application further provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor.
[0036] In the configuration method, apparatus, network device, storage medium and computer program product provided in the embodiments of the present application, a first parameter is configured for a virtual machine, wherein the first parameter includes a first specification and a first image that are not associated with a CPU model. In addition, one or more groups of second parameters are configured for the virtual machine, or the second parameter is not configured for the virtual machine, wherein each group of second parameters includes a second specification and a second image associated with a CPU model. Based on the above scheme, when deploying a virtual machine instance, the same virtual machine instance can support running on servers with multiple different CPU models, thereby realizing resource sharing between different types of servers, and also realizing flexible migration of virtual machines between different types of servers, thereby improving resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of a configuration method implementation flow of an embodiment of the present application;
[0038] Figure 2 A schematic diagram of the configuration principle of a configuration method according to an embodiment of the present application;
[0039] Figure 3 This is a structural block diagram of a configuration device according to an embodiment of the present application;
[0040] Figure 4 This is a block diagram of a network device structure according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] At present, there are many server chip suppliers, resulting in many types of servers. Different types of servers need to be managed in a unified manner, including dividing servers into different resource pools for management based on server type, and dividing servers into different logical partitions within the same resource pool for management. Among them, dividing servers into different logical partitions within the same resource pool for management is currently mainly achieved by specifying the specification attributes of the virtual machine when creating the virtual machine. One way is to specify the HA tag, and the other way is to specify the server type.
[0042] Considering the inconsistency of processor single-core performance and processor instruction sets of different types of servers, the virtual machine specifications and software codes of upper-layer applications need to be designed differently. Therefore, the above-mentioned unified management of servers is essentially to manage different types of servers in isolation. However, this will result in different types of servers being unable to share resources, and virtual machines being unable to flexibly migrate between different types of servers, affecting resource utilization and management efficiency, as shown in the following:
[0043] 1. Resource pools need to be built and expanded separately. Different types of scattered resources cannot be integrated, resulting in a large number of resource fragments, which affects resource utilization;
[0044] 2. Processors are updated and replaced at a fast speed. It is often difficult for the resource pool to synchronize the latest types of servers when expanding capacity. In addition, the server type will lead to finer partition division and more partitions, which may also affect the specifications of virtual machines, thereby further affecting resource utilization and management efficiency.
[0045] Based on this, in an embodiment of the present application, a first parameter is configured for the virtual machine, wherein the first parameter includes a first flavor and a first image that are not associated with a CPU model. In addition, one or more sets of second parameters are configured for the virtual machine, or the second parameter is not configured for the virtual machine, wherein each set of second parameters includes a second flavor and a second image associated with a CPU model. Based on the above scheme, when deploying virtual machine instances, the same virtual machine instance can support running on different types of servers, thereby realizing resource sharing between different types of servers, and also realizing flexible migration of virtual machines between different types of servers, thereby improving resource utilization.
[0046] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0047] The present application embodiment provides a configuration method, referring to Figure 1 , the method comprising:
[0048] Step 101: configure a first parameter for a virtual machine, and configure one or more sets of second parameters or no second parameter for the virtual machine.
[0049] The first parameters include a first specification and a first image that are not associated with a CPU model, and each set of second parameters includes a second specification and a second image that are associated with a CPU model.
[0050] In the related art, the cloud platform, that is, the virtual layer, distinguishes the virtual machine specifications corresponding to different CPU models by specifications, and distinguishes the software codes corresponding to different CPU models by images. In the embodiment of the present application, it is possible to choose to retain the configuration of the above specifications and images, that is, it is possible to choose to configure one or more groups of second parameters for the virtual machine, each group of second parameters includes a second specification and a second image, wherein each group of second parameters is associated with a CPU model, that is, the virtual machine specifications matching the corresponding CPU model can be determined by the second specifications, and the virtual machine software code matching the corresponding CPU model can also be determined by the second image. Alternatively, it is also possible to choose not to retain the configuration of the above specifications and images, that is, not to configure the second parameters for the virtual machine.
[0051] In addition, in the embodiment of the present application, the first parameters are configured for the virtual machine, including the first specification and the first image, and the first specification and the first image are not associated with any CPU model.
[0052] Here, it can be understood that all other CPU models that do not match the specified CPU model can be associated with the first specification and the first image by default.
[0053] Based on the configuration of the first parameter, when the CPU is updated quickly or there are many server CPU models, all unspecified CPU models can be associated with the first specification and the first image by default. In this way, one virtual machine instance can support multiple servers of different types and realize resource sharing under different types of servers.
[0054] When scheduling a virtual machine, the priority of the first specification and the first image can be set higher than any second specification and second image. That is to say, when scheduling a virtual machine, the first specification and the first image are the preferred specifications and images, and the second specification and the second image are the secondary specifications and images.
[0055] In actual application, the relevant interface parameters originally used to configure specifications and images in the virtual machine deployment interface in the related technology can be retained, and the original interface parameters can be used to configure the first parameter, such as Figure 2 As shown, for example, the configuration "--flavor <id1>--image <id1>", and at the same time expand the virtual machine deployment interface, adding new interface parameters for configuring the second parameter, for example, configuring the specifications and images associated with a specific CPU model:
[0056] "--os:scheduler_hints.restype=[{cpu='hygon7285',flavor= <id2>,image= <id2>},…]”.
[0057] At the same time, in actual application, the cloud platform, that is, the virtual layer, also needs to transform the database used to deploy virtual machines. For each virtual machine, the original specification fields and image fields are used as the preferred specification fields and image fields in configuration for the configuration of the first parameter, and new specification fields and image fields are added as the second selected specification fields and image fields in configuration.
[0058] In the embodiment of the present application, when deploying a virtual machine, the first specification and the first image in the first parameter are used as the preferred specification and image, and the second specification and the second image in the second parameter are used as the secondary specification and image. That is, when deploying a virtual machine, the first parameter is used for deployment first, and the second parameter is considered for deployment secondly.
[0059] Based on the above parameter configuration of the virtual machine, when scheduling the virtual machine, it can support scheduling the virtual machine according to the first parameter or one or more sets of second parameters. Since the first parameter is not associated with any CPU model, when deploying the virtual machine instance, the virtual machine instance can support running on different types of servers, thereby realizing resource sharing between different types of servers and improving resource utilization. At the same time, the virtual machine instance can also support newly added server types, further improving resource utilization and management efficiency.
[0060] Based on this, for the deployment of the virtual machine, in one embodiment, the method further includes:
[0061] The virtual machine is deployed based on the first parameter of the virtual machine configuration, or based on the first parameter of the virtual machine configuration and the one or more sets of second parameters.
[0062] Here, since the first specification and the first image in the first parameter are not associated with any CPU model, for the server that meets the resource requirements selected in the filter, if the corresponding CPU model is inconsistent with the specified CPU model, then the server of this CPU model can be regarded as matching the first specification and the first image. For example, there are three CPU types of servers, CPU A, CPU B and CPU C, in the same pool. The virtual machine is configured with the first specification and the first image that are not associated with the CPU model, the second specification B and the second image Image B associated with CPU B, and the second specification C and the third image C associated with CPU C. The server using CPU A and CPU B selected by the filter meets the resource requirements. Since the first specification and the first image are the preferred specifications and images, and CPU A is not a specified CPU model and is not associated with any specifications and images, CPU A can be regarded as the CPU model associated with the first specification and the first image by default, so that the server of CPU A is finally selected to deploy the virtual machine.
[0063] Specifically, in one embodiment, when there is a server matching the first parameter, the virtual machine is deployed using the server matching the first parameter.
[0064] The first parameter supports matching servers of all CPU models except the specified CPU model.
[0065] In addition, when the virtual machine is configured with one or more sets of second parameters, the method further includes:
[0066] In the case that there is no server matching the first parameter, the virtual machine is deployed using a server matching a set of second parameters in the one or more sets of second parameters.
[0067] Here, the scheduling function of the cloud platform, that is, the virtual layer, is modified. First, the filter driver is modified so that when the filter determines whether the remaining CPU, memory and other hardware resources of the server meet the requirements of the virtual machine, it can support multiple types of servers, thereby screening out multiple types of servers that meet the hardware resource requirements. Secondly, the weighter driver that determines the final deployment location of the virtual machine is modified. In this way, when the filter screens out multiple types of servers that meet the requirements of the virtual machine, the weighter can give priority to the first specification and the first image, and according to the type of the server finally selected, the ID value of the first specification and the first image is updated to the preferred specification and image field in the database. Finally, the execution module on the finally selected server executes the deployment of the virtual machine according to the ID value of the first specification and the first image.
[0068] In the embodiment of the present application, the first specification and the first image of the virtual machine configuration can be scheduled to servers of all CPU models under the condition that they do not conflict with other scheduling policies. For other second specifications and second images, they can be scheduled to servers of associated CPU models under the condition that they do not conflict with other scheduling policies. In actual application, the first specification and the first image are preferentially used to deploy virtual machines on servers. When the first specification and the first image are not scheduled to a suitable server, other second specifications and the second image are used to deploy virtual machines on servers.
[0069] In addition, for the scenario of hot migration of virtual machines, in one embodiment, the method further includes:
[0070] The virtual machine is hot migrated from the first server to the second server.
[0071] The first server and the second server are of the same type.
[0072] In actual application, the weighter driver that determines the final deployment location of the virtual machine is modified, and a judgment operation is added to determine whether the currently executed virtual machine deployment operation is a virtual machine hot migration operation. If it involves virtual machine hot migration, the weighter needs to select a server of the same type as the source server as the target server for hot migration. In this way, the scheduling result of the hot migrated virtual machine will not change the CPU model of the server where the virtual machine is located.
[0073] For scenarios such as virtual machine migration, reconstruction, and evacuation, in an embodiment of the present application, it is possible to determine whether the CPU model of the new server hosting the virtual machine is consistent with that of the original server based on the scheduling result. If not, the specification associated with the CPU model of the new server is used to perform a specification change (resize) operation, and the image associated with the CPU model of the new server is used to perform a virtual machine reconstruction (rebuild) operation. Based on this, in one implementation, the method further includes:
[0074] When migrating and / or rebuilding and / or evacuating the virtual machine, determining whether a first CPU model of a target server hosting the virtual machine is consistent with a second CPU model of a source server, and obtaining a determination result;
[0075] When the judgment result indicates that the first CPU model is inconsistent with the second CPU model, the specification of the virtual machine is changed based on the specification associated with the first CPU model, and the virtual machine is rebuilt based on the image associated with the first CPU model.
[0076] Furthermore, in one embodiment, the method further includes:
[0077] When the specifications associated with the first CPU model and the second CPU model are inconsistent, resources are allocated to the virtual machine based on the first CPU model.
[0078] Here, when the specifications associated with the new CPU model are inconsistent with the specifications associated with the original CPU model, the resource allocation operation is performed using the specifications associated with the new CPU model.
[0079] In addition, the cloud platform, i.e., the virtual layer, also supports one or more operations of adding, deleting, modifying, and querying CPU models associated with various specifications and images. Based on this, in one embodiment, the method further includes:
[0080] Configuring one or more sets of second parameters in the virtual machine; and / or,
[0081] Deleting all or part of the second parameters in one or more groups of second parameters configured for the virtual machine; and / or,
[0082] Modifying the CPU model associated with all or part of the second parameters in one or more groups of second parameters configured for the virtual machine; and / or,
[0083] Find the CPU model associated with the second parameter of the virtual machine configuration.
[0084] Based on the solution of the embodiment of the present application, in addition to the relevant description of the virtual machine deployment scenario, in order to enable the virtual machine to share the diverse computing power services in the relevant operation scenarios such as migration, hot migration, reconstruction, and evacuation, the deployment method of the virtual machine in the relevant operation scenarios such as migration, hot migration, reconstruction, and evacuation is also described. In addition, it should be noted that in terms of the virtual machine deployment interface, since the secondary specifications and images are stored in the database for reading at any time when the virtual machine is deployed, there is no need to make additional enhancements to the virtual machine deployment loudspeaker in the relevant operation scenarios such as migration, hot migration, reconstruction, and evacuation.
[0085] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a configuration device, which is set on the cloud platform, that is, the virtual layer, such as Figure 3 As shown, the device comprises:
[0086] The configuration unit 301 is used to configure a first parameter for a virtual machine, and to configure one or more sets of second parameters or not configure the second parameter for the virtual machine; wherein,
[0087] The first parameters include a first specification and a first image that are not associated with a CPU model; each set of second parameters includes a second specification and a second image that are associated with a CPU model.
[0088] In one embodiment, the device further comprises:
[0089] A deployment unit is used to deploy the virtual machine based on the first parameter of the virtual machine configuration, or based on the first parameter of the virtual machine configuration and the one or more groups of second parameters.
[0090] In one embodiment, when there is a server matching the first parameter, the virtual machine is deployed using the server matching the first parameter; wherein the first parameter supports matching servers of all CPU models except a specified CPU model.
[0091] In one embodiment, the virtual machine is configured with one or more sets of second parameters; if there is no server matching the first parameters, the virtual machine is deployed using a server matching one of the one or more sets of second parameters.
[0092] In one embodiment, the device further comprises:
[0093] A hot migration unit, used to hot migrate the virtual machine from the first server to the second server; wherein,
[0094] The first server and the second server are of the same type.
[0095] In one embodiment, the device further comprises:
[0096] A judgment unit, used to judge whether a first CPU model of a target server hosting the virtual machine is consistent with a second CPU model of a source server when migrating and / or rebuilding and / or evacuating the virtual machine, and obtain a judgment result;
[0097] A processing unit is used to, when the judgment result indicates that the first CPU model is inconsistent with the second CPU model, perform a specification change on the virtual machine based on the specification associated with the first CPU model, and perform a reconstruction on the virtual machine based on the image associated with the first CPU model.
[0098] In one embodiment, the device further comprises:
[0099] A resource allocation unit is used to allocate resources to the virtual machine based on the first CPU model when the specifications associated with the first CPU model are inconsistent with those of the second CPU model.
[0100] In one embodiment, the device further comprises:
[0101] A processing unit for:
[0102] Configuring one or more sets of second parameters in the virtual machine; and / or,
[0103] Deleting all or part of the second parameters in one or more groups of second parameters configured for the virtual machine; and / or,
[0104] Modifying the CPU model associated with all or part of the second parameters in one or more groups of second parameters configured for the virtual machine; and / or,
[0105] Find the CPU model associated with the second parameter of the virtual machine configuration.
[0106] In actual application, the above-mentioned units can be implemented by a processor in the configuration device.
[0107] It should be noted that: when the configuration device provided in the above embodiment is configured, only the division of the above program modules is used as an example. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the above-described processing. In addition, the configuration device provided in the above embodiment and the configuration method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0108] Based on the hardware implementation of the above program modules, and in order to implement the method of the network device side of the embodiment of the present application, the embodiment of the present application also provides a network device, which is deployed in the cloud platform, that is, the virtual layer, such as Figure 4 As shown, the network device 400 includes:
[0109] The first communication interface 401 is capable of exchanging information with other network nodes;
[0110] The first processor 402 is connected to the first communication interface 401 to implement information exchange with other network nodes, and is used to execute the method provided by one or more technical solutions of the network device side when running a computer program. The computer program is stored in the first memory 403.
[0111] Specifically, the first processor 402 is used to configure a first parameter for the virtual machine, and to configure one or more sets of second parameters or not configure the second parameter for the virtual machine; wherein,
[0112] The first parameters include a first specification and a first image that are not associated with a CPU model; each set of second parameters includes a second specification and a second image that are associated with a CPU model.
[0113] In one embodiment, the first processor 402 is further configured to:
[0114] The virtual machine is deployed based on the first parameter of the virtual machine configuration, or based on the first parameter of the virtual machine configuration and the one or more sets of second parameters.
[0115] In one embodiment, when there is a server matching the first parameter, the virtual machine is deployed using the server matching the first parameter; wherein the first parameter supports matching servers of all CPU models except a specified CPU model.
[0116] In one embodiment, the virtual machine is configured with one or more sets of second parameters; if there is no server matching the first parameters, the virtual machine is deployed using a server matching one of the one or more sets of second parameters.
[0117] In one embodiment, the first processor 402 is further configured to:
[0118] Hot migration of the virtual machine from the first server to the second server; wherein,
[0119] The first server and the second server are of the same type.
[0120] In one embodiment, the first processor 402 is further configured to:
[0121] When migrating and / or rebuilding and / or evacuating the virtual machine, determining whether a first CPU model of a target server hosting the virtual machine is consistent with a second CPU model of a source server, and obtaining a determination result;
[0122] When the judgment result indicates that the first CPU model is inconsistent with the second CPU model, the specification of the virtual machine is changed based on the specification associated with the first CPU model, and the virtual machine is rebuilt based on the image associated with the first CPU model.
[0123] In one embodiment, the first processor 402 is further configured to:
[0124] When the specifications associated with the first CPU model and the second CPU model are inconsistent, resources are allocated to the virtual machine based on the first CPU model.
[0125] In one embodiment, the first processor 402 is further configured to:
[0126] Configuring one or more sets of second parameters in the virtual machine; and / or,
[0127] Deleting all or part of the second parameters in one or more groups of second parameters configured for the virtual machine; and / or,
[0128] Modifying the CPU model associated with all or part of the second parameters in one or more groups of second parameters configured for the virtual machine; and / or,
[0129] Find the CPU model associated with the second parameter of the virtual machine configuration.
[0130] It should be noted that the specific processing process of the first processor 402 and the first communication interface 401 can be understood by referring to the above method.
[0131] Of course, in actual application, the various components in the network device 400 are coupled together through the bus system 404. It can be understood that the bus system 404 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 4 Various buses are labeled as bus system 404 .
[0132] The first memory 403 in the embodiment of the present application is used to store various types of data to support the operation of the network device 400. Examples of such data include: any computer program used to operate on the network device 400.
[0133] The method disclosed in the above embodiment of the present application can be applied to the first processor 402, or implemented by the first processor 402. The first processor 402 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 402. The above-mentioned first processor 402 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The first processor 402 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the first memory 403, and the first processor 402 reads the information in the first memory 403, and completes the steps of the above method in combination with its hardware.
[0134] In an exemplary embodiment, the network device 400 may be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned method.
[0135] It can be understood that the memory (first memory 403, second memory 1303, third memory 1403) of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a ferromagnetic random access memory, a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.
[0136] In an exemplary embodiment, the embodiment of the present application further provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a first memory 403 storing a computer program, and the above-mentioned computer program can be executed by the first processor 402 of the network device 400 to complete the steps described in the aforementioned network device side method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.
[0137] Exemplarily, an embodiment of the present application further provides a computer program product, including a computer program, which can be executed by the first processor 402 of the network device 400 to complete the steps of the aforementioned network device side method.
[0138] It should be noted that "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. The term "and / or" herein is merely a description of an association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "one or more groups" herein represents any combination of at least two of any one or more of a plurality of groups. For example, including at least one of A, B, and C may represent any one or more elements selected from the set consisting of A, B, and C. In addition, the technical solutions described in the embodiments of the present application may be arbitrarily combined without conflict.
[0139] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A configuration method, It is characterized in that include: Configuring first parameters for the virtual machine; the first parameters include a first specification and a first image that are not associated with a central processing unit (CPU) model; as well as, One or more sets of second parameters are configured for the virtual machine, or no second parameters are configured; each set of second parameters includes a second specification and a second image associated with a CPU model.
2. The method according to claim 1, It is characterized in that The method further comprises: The virtual machine is deployed based on the first parameter of the virtual machine configuration, or based on the first parameter of the virtual machine configuration and the one or more sets of second parameters.
3. The method according to claim 2, It is characterized in that In the case that there is a server matching the first parameter, the virtual machine is deployed using the server matching the first parameter; wherein the first parameter supports matching servers of all CPU models except the specified CPU model.
4. The method according to claim 3, It is characterized in that The virtual machine is configured with one or more sets of second parameters; the method further comprises: In the case that there is no server matching the first parameter, the virtual machine is deployed using a server matching a set of second parameters in the one or more sets of second parameters.
5. The method according to claim 1, It is characterized in that The method further comprises: Hot migration of the virtual machine from the first server to the second server; wherein, The first server and the second server are of the same type.
6. The method according to claim 1, It is characterized in that The method further comprises: When migrating and / or rebuilding and / or evacuating the virtual machine, determining whether a first CPU model of a target server hosting the virtual machine is consistent with a second CPU model of a source server, and obtaining a determination result; When the judgment result indicates that the first CPU model is inconsistent with the second CPU model, the specification of the virtual machine is changed based on the specification associated with the first CPU model, and the virtual machine is rebuilt based on the image associated with the first CPU model.
7. The method according to claim 6, It is characterized in that The method further comprises: When the specifications associated with the first CPU model and the second CPU model are inconsistent, resources are allocated to the virtual machine based on the first CPU model.
8. The method according to claim 1, It is characterized in that The method further comprises: Configuring one or more sets of second parameters in the virtual machine; and / or, Deleting all or part of the second parameters in one or more groups of second parameters configured for the virtual machine; and / or, Modifying the CPU model associated with all or part of the second parameters in one or more groups of second parameters configured for the virtual machine; and / or, Find the CPU model associated with the second parameter of the virtual machine configuration.
9. A configuration device, It is characterized in that include: A configuration unit, configured to configure a first parameter for a virtual machine, and to configure one or more sets of second parameters or not configure the second parameter for the virtual machine; wherein, The first parameters include a first specification and a first image that are not associated with a CPU model; each set of second parameters includes a second specification and a second image that are associated with a CPU model.
10. A network device, It is characterized in that include: A first processor and a first communication interface; wherein, The first processor is used to configure a first parameter for the virtual machine, and to configure one or more sets of second parameters or not configure the second parameter for the virtual machine; wherein, The first parameters include a first specification and a first image that are not associated with a CPU model; each set of second parameters includes a second specification and a second image that are associated with a CPU model.
11. A network device, It is characterized in that include: a first processor and a first memory for storing a computer program executable on the processor, Wherein, when the first processor is used to run the computer program, the steps of the method described in any one of claims 1 to 8 are executed.
12. A storage medium having a computer program stored thereon, It is 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 8 are implemented.
13. A computer program product comprising a computer program, It is 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 8 are implemented.
