CN114816672A - Virtual machine creation method and device, electronic equipment and storage medium - Google Patents
Virtual machine creation method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114816672A CN114816672A CN202210487561.3A CN202210487561A CN114816672A CN 114816672 A CN114816672 A CN 114816672A CN 202210487561 A CN202210487561 A CN 202210487561A CN 114816672 A CN114816672 A CN 114816672A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- quasi
- cpu architecture
- simulator
- computing node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5044—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The disclosure provides a virtual machine creation method and device, electronic equipment and a storage medium, and relates to the technical field of cloud computing. The method comprises the following steps: receiving a mirror image virtual machine creation request initiated by a user through an application program interface; determining the type of a quasi CPU architecture according to the mirror image virtual machine establishing request through a dispatcher; scheduling, by the scheduler, the quasi-compute nodes supporting the quasi-CPU architecture type according to the CPU architecture capability information of each compute node reported by each compute node; determining virtual machine mirror image information according to the mirror image virtual machine creation request through the quasi-computing node; determining a simulator according to the virtual machine mirror image information through the quasi-computing node; and creating a virtual machine according to the simulator and the starting parameter list of the simulator through the quasi-computing node. The virtual machine with multiple types of CPU architectures supported by a single quasi-computing node can be flexibly adapted to the multiple types of CPU architectures, and cost pressure and resource waste are greatly reduced.
Description
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a method and an apparatus for creating a virtual machine, an electronic device, and a storage medium.
Background
In recent years, with the rapid development of cloud computing technology, more and more enterprises use the cloud computing technology, mainly by using a virtualization technology to develop and test applications.
In the current cloud computing operating system, only one kind of virtual machine with a Central Processing Unit (CPU) architecture can be created in one computing node. Typically, the CPU architecture of the virtual machine and the CPU architecture of the physical machine will remain consistent. The computing node agents of the cloud operating system and the virtual machine CPU architecture are in a binding relationship, and one computing node agent can only support one CPU virtual, so that the cloud operating system cannot be flexibly applied to different applications. In addition, the developed application needs to be adapted to various CPU architectures, and various CPU hardware resources need to be provided, which causes huge cost pressure and resource waste.
Therefore, the virtual machine of the current cloud operating system has the problems of high cost, resource waste and poor application flexibility.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a method and an apparatus for creating a virtual machine, an electronic device, and a storage medium, which overcome, at least to some extent, the problem of poor flexibility of virtual machine adaptation due to the related art.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, there is provided a method for creating a virtual machine, including:
receiving a mirror image virtual machine creation request initiated by a user through an application program interface;
determining the type of a quasi CPU architecture according to the mirror image virtual machine establishing request through a dispatcher;
scheduling, by the scheduler, the quasi-compute nodes supporting the quasi-CPU architecture type according to the CPU architecture capability information of each compute node reported by each compute node;
determining virtual machine mirror image information according to the mirror image virtual machine creation request through the quasi-computing node;
determining a simulator according to the virtual machine mirror image information through the quasi-computing node; and
and creating a virtual machine according to the simulator and the starting parameter list of the simulator through the quasi-computing node.
In an embodiment of the present disclosure, the determining, by the scheduler, a quasi-CPU architecture type according to the virtual machine creation request includes:
analyzing mirror image requirement information in the mirror image virtual machine establishing request through the dispatcher;
and determining the quasi-CPU architecture type through the scheduler according to the CPU architecture information supported by the virtual machine mirror image in the mirror image requirement information.
In an embodiment of the present disclosure, the scheduling, by the scheduler, the quasi-compute nodes supporting the quasi-CPU architecture type according to the CPU architecture capability information of each compute node reported by each compute node includes:
determining the CPU architecture type supported by each computing node through each computing node;
reporting the CPU architecture type supported by each computing node to a scheduler through each computing node;
and scheduling the quasi-computing nodes supporting the quasi-CPU architecture type according to the quasi-CPU architecture type through the scheduler.
In an embodiment of the present disclosure, the determining, by the quasi-compute node, a simulator according to the virtual machine image information includes:
analyzing the virtual machine mirror image information through the quasi-computing node to obtain CPU architecture information;
and determining the corresponding simulator according to the CPU architecture information.
In an embodiment of the present disclosure, the creating, by the quasi compute node, a virtual machine according to the simulator and the list of startup parameters of the simulator includes:
acquiring a starting parameter required by the simulator according to the parameter type and the parameter format corresponding to the simulator through the quasi-computing node;
generating a starting parameter list corresponding to the simulator at the quasi-computing node;
creating a virtual machine from the simulator and the list of startup parameters at the quasi-compute node.
In one embodiment of the present disclosure, the startup parameters include virtual machine creation specifications and CPU architecture information.
According to another aspect of the present disclosure, there is provided a virtual machine creation apparatus including:
the request receiving module is used for receiving a mirror image virtual machine establishing request initiated by a user through an application program interface;
the first type determining module is used for determining the quasi CPU architecture type according to the mirror image virtual machine establishing request through a dispatcher;
the node scheduling module is used for scheduling the quasi-computing nodes supporting the quasi-CPU architecture type according to the CPU architecture capability information of each computing node reported by each computing node through the scheduler;
the information determining module is used for determining virtual machine mirror image information according to the mirror image virtual machine establishing request through the quasi-computing node;
the simulator determining module is used for determining a simulator according to the virtual machine mirror image information through the quasi-computing node;
and the virtual machine generation module is used for creating a virtual machine according to the simulator and the starting parameter list of the simulator through the quasi-computing node.
In an embodiment of the present disclosure, the node scheduling module includes:
the second type determining module is used for determining the CPU architecture type supported by each computing node through each computing node;
a type reporting module, configured to report, to a scheduler, the CPU architecture type supported by each computing node through each computing node;
and the type scheduling module is used for scheduling the quasi-computing nodes supporting the quasi-CPU architecture type according to the quasi-CPU architecture type through the scheduler.
According to still another aspect of the present disclosure, there is provided an electronic device including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of creating a virtual machine of any one of the above via execution of the executable instructions.
According to yet another aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of creating a virtual machine of any one of the above.
The virtual machine creation method provided by the embodiment of the present disclosure includes: after receiving a mirror image virtual machine creation request initiated by a user through an application program interface, scheduling quasi-computing nodes supporting the quasi-CPU architecture type through a scheduler according to the quasi-CPU architecture type required by the mirror image virtual machine creation request and the CPU architecture capability information of each computing node reported by each computing node. The scheduled quasi-computing node receives a mirror image virtual machine creation request, the quasi-computing node determines the CPU mechanism type required by the mirror image of the virtual machine according to the virtual machine and the mirror image virtual machine creation request, the virtual machine mirror image information selects the corresponding simulator with the same type, the simulator with the required CPU structure type can be correspondingly selected according to the virtual machine mirror image of a user, and finally the quasi-computing node creates the virtual machine according to the simulator and the starting parameter list of the simulator. The CPU architecture type and the virtual machine are not bound any more, the problem that the quasi-computing node can only support the construction of one CPU architecture virtual machine is solved, the single quasi-computing node can support various types of CPU architecture virtual machines, and the problems of high cost, resource waste and poor application flexibility in virtual mechanism construction are solved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 is a flow diagram illustrating a method for creating a virtual machine in one embodiment of the present disclosure;
FIG. 2 is an interaction diagram illustrating a method for creating a virtual machine according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of a method for creating a virtual machine in another embodiment of the present disclosure;
FIG. 4 is a flow chart of a method for creating a virtual machine in yet another embodiment of the present disclosure;
FIG. 5 is a flow chart of a method for creating a virtual machine in yet another embodiment of the present disclosure;
FIG. 6 is an interaction diagram illustrating a method for creating a virtual machine according to another embodiment of the present disclosure;
FIG. 7 is a schematic diagram of an apparatus for creating a virtual machine according to an embodiment of the present disclosure; and
fig. 8 is a schematic diagram of a virtual machine creation apparatus in another embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The scheme provided by the application is a virtual machine creation method in a cloud computing operating system. For ease of understanding, the following first explains several terms referred to in this application.
The cloud computing center operating system is an operating system supported by cloud computing and cloud storage technologies, is an overall management operating system of a cloud computing background data center (some think that the cloud computing system comprises a cloud terminal operating system, such as various mobile phone operating systems which are popular at present, which is not much different from a prior stand-alone operating system and is not discussed here), and refers to a cloud platform integrated management system which is configured on basic hardware resources such as servers, storage and networks and basic software such as stand-alone operating systems, middleware and databases and manages massive basic hardware and software resources. It typically contains several modules: the system comprises a large-scale basic software and hardware management module, a virtual computing management module, a distributed file system module, a service/resource scheduling management module, a safety management control module and the like.
A Virtual Machine (VM) refers to a complete computer system with complete hardware system functions, which is simulated by software and runs in a completely isolated environment. The work that can be done in a physical computer can be implemented in a virtual machine. When creating a virtual machine in a computer, it is necessary to use a part of the hard disk and the memory capacity of the physical machine as the hard disk and the memory capacity of the virtual machine. Each virtual machine has an independent CMOS, hard disk and operating system, and can be operated like a physical machine.
A Central Processing Unit (CPU) is a final execution Unit for information Processing and program operation, and serves as an operation and control core of a computer system. Since the production of CPUs, great developments have been made in the extension of logic structures, operation efficiencies, and functions.
The vCPU, as the name implies, is a virtual CPU. When the virtual machine is created, the vCPU resource needs to be configured.
An embodiment of the present disclosure provides a method for creating a virtual machine, and as shown in fig. 1, a flow diagram of the method for creating a virtual machine is provided, where the method includes:
s101, receiving a mirror image virtual machine creation request initiated by a user through an application program interface;
specifically, the Application program Interface in this embodiment is an API (Application Programming Interface) Server (Server), and the API Server is used as an Interface to implement information interaction. Optionally, as shown in fig. 2, the application program interface in this embodiment may be an API Server210, and a virtual machine creation request initiated by a user is received through the API Server210, where the virtual machine creation request is initiated by selecting an image by the user, that is, a virtual machine creation request in this embodiment.
S102, determining a quasi-CPU architecture type according to the mirror image virtual machine establishing request through a dispatcher;
referring to FIG. 2, the scheduler 220 is used to select which compute node is scheduled to receive the mirror virtual machine creation request, so as to create a virtual machine at the compute node.
In step S102, a CPU architecture type pointed by the request of the user is first determined according to the mirror virtual machine creation request, and the CPU architecture type is determined, so that a computing node is subsequently selected according to the CPU architecture type to construct a virtual machine.
The CPU architecture refers to the manner in which the CPU accepts and processes signals, and the organization of its internal elements, and is largely divided into two types, CISC (Complex Instruction Set Computer) and RISC (Reduced Instruction Set Computer). The CISC comprises: the x86 architecture and the x86-64 architecture, RISC includes: POWER/PowerPC architecture, MIPS architecture, Alpha architecture, EPIC architecture, etc. The CPU architecture types that may be selected in this embodiment include: x86 architecture, ARM architecture, MIPS architecture, Alpha architecture, etc.
S103, scheduling quasi-computing nodes supporting the quasi-CPU architecture type according to the CPU architecture capacity information of each computing node reported by each computing node through the scheduler;
after the CPU architecture type, namely the quasi-CPU architecture type, which is desired to be created by the user is determined through the steps, the matched computing node is called according to the quasi-CPU architecture type, namely the quasi-computing node.
Specifically, referring to fig. 2, the scheduler 220 is configured to report, according to the CPU architecture capability information of each computing node reported by each computing node in the computing nodes 230, where the CPU architecture capability information mainly refers to a CPU architecture type supported by each computing node. According to the method, quasi-computing nodes supporting the quasi-CPU architecture type can be scheduled, and the number of the quasi-computing nodes can be one.
S104, determining virtual machine image information according to the image virtual machine creation request through the quasi-computing node;
with reference to fig. 2, after determining the quasi-compute node, the virtual machine is created on the quasi-compute node in the compute nodes 230. Step S104 is performed first, the called quasi-compute node receives a mirror image virtual machine creation request, and then obtains virtual machine mirror image information therein, where the virtual machine mirror image information includes a CPU architecture type required by a virtual machine mirror image. The simulator corresponding to the CPU architecture may then be selected accordingly.
S105, determining a simulator according to the virtual machine mirror image information through the quasi-computing node;
specifically, each CPU architecture simulator is software, and a corresponding software package needs to be installed to simulate a corresponding virtual machine CPU architecture. This step S105 requires selecting a simulator of the virtual machine CPU architecture as needed. The quasi-computing node analyzes the virtual machine mirror image information, the virtual machine CPU architecture type is selected based on the information, optionally, a simulator corresponding to the CPU architecture type is selected according to the adaptive CPU architecture type, and therefore the virtual machine is started through the simulator.
And S106, creating a virtual machine according to the simulator and the starting parameter list of the simulator through the quasi-computing node.
The virtual machine is started by adding a plurality of parameters to the simulator, and the types, formats and the like of the parameters corresponding to different simulators are different, so that a corresponding starting parameter list needs to be generated according to the selected simulator, and the virtual machine is created by the starting parameter lists of the simulator and the simulator. The starting parameter list comprises a virtual machine creating specification requirement, CPU framework information and the like.
According to the virtual machine creating method provided by the embodiment of the disclosure, after a mirror virtual machine creating request initiated by a user is received through an application program interface, a scheduler schedules quasi-computing nodes supporting quasi-CPU architecture types according to quasi-CPU architecture types required by the mirror virtual machine creating request and CPU architecture capability information of each computing node reported by each computing node. The scheduled quasi-computing node receives a mirror image virtual machine creation request, the quasi-computing node determines the CPU mechanism type required by the virtual machine mirror image according to the virtual machine and the mirror image virtual machine creation request, corresponding simulators of the same type are selected according to the virtual machine mirror image information, the simulators of the required CPU mechanism type can be correspondingly selected according to the virtual machine mirror image of a user, and finally the quasi-computing node creates the virtual machine according to the simulators and the starting parameter list of the simulators. The CPU architecture type and the virtual machine are not bound any more, the problem that the quasi-computing node can only support the construction of one CPU architecture virtual machine is solved, the single quasi-computing node can support various types of CPU architecture virtual machines, and the problems of high cost, resource waste and poor application flexibility in virtual mechanism construction are solved. The method can flexibly adapt to various CPU architectures, and greatly reduces cost pressure and resource waste.
In an embodiment of the present disclosure, as shown in fig. 3, the determining, by a scheduler, a quasi-CPU architecture type according to the mirror virtual machine creation request includes:
s301, analyzing mirror image requirement information in the mirror image virtual machine establishing request through the scheduler;
s302, determining the quasi-CPU architecture type through the scheduler according to the CPU architecture information supported by the virtual machine mirror image in the mirror image requirement information.
Specifically, a request for creating the mirror image virtual machine is usually analyzed in the scheduler, and the CPU architecture type in the mirror image request is analyzed, so that the computing node is matched according to the CPU architecture type, and the CPU architecture is constructed according to the requirements of the user.
In an embodiment of the present disclosure, as shown in a flowchart of a virtual machine creating method shown in fig. 4, the scheduling, by the scheduler, a quasi-compute node that supports the quasi-CPU architecture type according to the CPU architecture capability information of each compute node reported by each compute node includes:
s401, determining the CPU architecture type supported by each computing node through each computing node;
s402, reporting the CPU architecture type supported by each computing node to a scheduler through each computing node;
s403, scheduling, by the scheduler, the quasi-compute nodes supporting the quasi-CPU architecture type according to the quasi-CPU architecture type.
Specifically, with reference to the interaction diagram created by the virtual machine shown in fig. 6, step S401 is executed at the node CPU architecture capability information reporting unit 620 to determine the CPU architecture type supported by each computing node, then the node CPU architecture capability information reporting unit 620 executes step S402 to report the CPU architecture type supported by each computing node to the scheduler 220 through the communication unit 610, and the scheduler 220 may schedule the quasi-computing node supporting the quasi-CPU architecture type according to the reported information.
The computing node of the CPU architecture type which can meet the requirement of the user request is scheduled by the embodiment, so that the virtual machine can be created through the computing node in the following process. The embodiment changes the problem that each computing agent node can only support the creation of one CPU architecture in the existing cloud operating system, decouples the binding relationship between the two nodes, and supports that one computing node can correspond to various CPU architectures.
In an embodiment of the present disclosure, the determining, by the quasi-compute node, a simulator according to the virtual machine image information includes:
analyzing the virtual machine mirror image information through the quasi-computing node to obtain CPU architecture information;
and determining the corresponding simulator according to the CPU architecture information.
With reference to the content shown in fig. 6, the scheduled quasi-compute node analyzes the virtual machine image information through the image CPU architecture analyzing unit 630, obtains the CPU architecture information, and then determines the corresponding simulator of the CPU architecture according to the CPU architecture information.
Generally, the virtual machine image information selected by a user already determines the type of the required virtual machine CPU architecture, and the computing nodes of the original cloud computing platform do not need to analyze the information. The embodiment emphasizes that the virtual machine image information is analyzed in the quasi-computing node, and the simulator of the CPU architecture type of the virtual machine is selected based on the information.
In one embodiment of the present disclosure, creating, by the quasi compute node, a virtual machine according to the simulator and the list of startup parameters of the simulator as shown in fig. 5 includes:
s501, acquiring a starting parameter required by the simulator through the quasi-computing node according to the parameter type and the parameter format corresponding to the simulator;
s502, generating a starting parameter list corresponding to the simulator at the quasi-computing node;
s503, creating a virtual machine according to the simulator and the starting parameter list at the quasi-computing node.
The virtual machine is started by adding various parameters to the simulator, but the different simulators have different corresponding parameter types and formats, and with reference to the contents shown in fig. 6, the virtual machine start parameter list generating unit 640 executes step S501, obtains the start parameters required by the simulator according to the parameter types and parameter formats corresponding to the simulators, generates a start parameter list corresponding to the simulator, and executes step S502, generates a corresponding start parameter list according to the start requirements of the virtual machine and the selected simulator.
The virtual machine CPU architecture simulator calling unit 650 executes step S503 in the build virtual machine unit 660 using the called simulator and the start parameter list to finally create a virtual machine.
Optionally, in this embodiment, the QEMU is used to create a virtual machine, and is an open-source simulator, which is used as a user-mode simulator, and executes a code different from the host architecture by using a dynamic code translation mechanism. When the QEMU is used as a system simulator, a virtual machine capable of independently running an operating system is simulated. The QEMU simulates hardware equipment of a virtual machine at a host user, and the operation result of the vCPU on the hardware can be simulated in a user mode, if the virtual machine needs to write data into a hard disk, the actual result is that the data is written into a mirror image file in the host.
In one embodiment of the present disclosure, the startup parameters include virtual machine creation specifications and CPU architecture information.
Specifically, the boot parameters include, but are not limited to, simulator memory parameters, simulator kernel parameters, simulator version numbers, simulator image parameters, simulator network parameters, and the like. A list of startup parameters is generated to create a virtual machine with the simulator.
In an exemplary embodiment of the present disclosure, as shown in fig. 7, a schematic diagram of a virtual machine creation apparatus is provided, where a virtual machine creation apparatus 700 includes:
a request receiving module 701, configured to receive, through an application program interface, a mirror virtual machine creation request initiated by a user;
a first type determining module 702, configured to determine, by a scheduler, a quasi-CPU architecture type according to the mirror virtual machine creation request;
a node scheduling module 703, configured to schedule, by the scheduler, a quasi-compute node supporting the quasi-CPU architecture type according to the CPU architecture capability information of each compute node reported by each compute node;
an information determining module 704, configured to determine, by the quasi compute node, virtual machine image information according to the image virtual machine creation request;
a simulator determination module 705, configured to determine a simulator according to the virtual machine image information through the quasi-computing node;
and a virtual machine generation module 706, which creates a virtual machine according to the simulator and the start parameter list of the simulator through the quasi-computing node.
Specifically, the virtual machine creating apparatus 700 of the present embodiment includes: a request receiving module 701, a first type determining module 702, a node scheduling module 703, an information determining module 704, a simulator determining module 705, and a virtual machine generating module 706. The virtual machine creating apparatus 700 of this embodiment correspondingly selects a simulator of a required CPU architecture type according to a virtual machine image of a user, and finally creates a virtual machine by a quasi-compute node according to the simulator and a start parameter list of the simulator. The CPU architecture type and the virtual machine are not bound any more, the problem that the quasi-computing node can only support the construction of one CPU architecture virtual machine is solved, the single quasi-computing node can support various types of CPU architecture virtual machines, and the problems of high cost, resource waste and poor application flexibility in virtual mechanism construction are solved.
In an exemplary embodiment of the disclosure, the node scheduling module shown in fig. 8 is a schematic diagram of a creating apparatus of a further virtual machine, and includes:
a second type determining module 801, configured to determine, by the computing nodes, the CPU architecture types supported by the computing nodes;
a type reporting module 802, configured to report, by using each computing node, the CPU architecture type supported by each computing node to a scheduler;
a type scheduling module 803, configured to schedule, by the scheduler, a quasi-compute node supporting the quasi-CPU architecture type according to the quasi-CPU architecture type.
Specifically, as shown in fig. 8, through the second type determining module 801, the type reporting module 802, and the type scheduling module 803, a computing node of a CPU architecture type that can meet the requirement of a user request is scheduled, so that a virtual machine can be created through the computing node in the following. The problem that each computing agent node can only support the creation of one CPU architecture in the existing cloud operating system is solved, the binding relationship between the computing agent node and the CPU architecture is decoupled, and one computing node can be supported to correspond to various CPU architectures.
In one exemplary embodiment of the present disclosure, there is provided an electronic device including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of creating a virtual machine of any one of the above via execution of the executable instructions.
In the electronic device provided in this embodiment, the processor executes the method for creating the virtual machine, which is not described herein again.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the method of creating a virtual machine described in any one of the above.
In the computer-readable storage medium provided in this embodiment, the computer program is executed by the processor to perform the virtual machine creation method, which is not described herein again.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification is provided. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
A program product for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Claims (10)
1. A method for creating a virtual machine, comprising:
receiving a mirror image virtual machine creation request initiated by a user through an application program interface;
determining the type of a quasi CPU architecture according to the mirror image virtual machine establishing request through a dispatcher;
scheduling, by the scheduler, the quasi-compute nodes supporting the quasi-CPU architecture type according to the CPU architecture capability information of each compute node reported by each compute node;
determining virtual machine mirror image information according to the mirror image virtual machine creation request through the quasi-computing node;
determining a simulator according to the virtual machine mirror image information through the quasi-computing node; and
and creating a virtual machine according to the simulator and the starting parameter list of the simulator through the quasi-computing node.
2. The method for creating a virtual machine according to claim 1, wherein the determining, by a scheduler, a quasi-CPU architecture type according to the virtual machine creation request includes:
analyzing mirror image requirement information in the mirror image virtual machine establishing request through the dispatcher;
and determining the quasi-CPU architecture type through the scheduler according to the CPU architecture information supported by the virtual machine mirror image in the mirror image requirement information.
3. The method for creating a virtual machine according to claim 1, wherein the scheduling, by the scheduler, the quasi-compute nodes supporting the quasi-CPU architecture type according to the CPU architecture capability information of each compute node reported by each compute node comprises:
determining the CPU architecture type supported by each computing node through each computing node;
reporting the CPU architecture type supported by each computing node to a scheduler through each computing node;
and scheduling the quasi-computing nodes supporting the quasi-CPU architecture type according to the quasi-CPU architecture type through the scheduler.
4. The method for creating a virtual machine according to claim 1, wherein the determining, by the quasi-compute node, a simulator according to the virtual machine image information includes:
analyzing the virtual machine mirror image information through the quasi-computing node to obtain CPU architecture information;
and determining the corresponding simulator according to the CPU architecture information.
5. The method for creating a virtual machine according to claim 1, wherein the creating, by the quasi-compute node, a virtual machine from the simulator and the list of startup parameters of the simulator includes:
acquiring a starting parameter required by the simulator according to the parameter type and the parameter format corresponding to the simulator through the quasi-computing node;
generating a starting parameter list corresponding to the simulator at the quasi-computing node;
creating a virtual machine from the simulator and the list of startup parameters at the quasi-compute node.
6. The method according to claim 5, wherein the startup parameters include virtual machine creation specifications and CPU architecture information.
7. An apparatus for creating a virtual machine, comprising:
the request receiving module is used for receiving a mirror image virtual machine establishing request initiated by a user through an application program interface;
the first type determining module is used for determining the quasi CPU architecture type according to the mirror image virtual machine establishing request through a dispatcher;
the node scheduling module is used for scheduling the quasi-computing nodes supporting the quasi-CPU architecture type according to the CPU architecture capacity information of each computing node reported by each computing node through the scheduler;
the information determining module is used for determining virtual machine mirror image information according to the mirror image virtual machine creating request through the quasi-computing node;
the simulator determining module is used for determining a simulator according to the virtual machine mirror image information through the quasi-computing node;
and the virtual machine generation module is used for creating a virtual machine according to the simulator and the starting parameter list of the simulator through the quasi-computing node.
8. The apparatus for creating a virtual machine according to claim 7, wherein the node scheduling module includes:
the second type determining module is used for determining the CPU architecture type supported by each computing node through each computing node;
a type reporting module, configured to report, to a scheduler, the CPU architecture type supported by each computing node through each computing node;
and the type scheduling module is used for scheduling the quasi-computing nodes supporting the quasi-CPU architecture type according to the quasi-CPU architecture type through the scheduler.
9. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute the method for creating a virtual machine according to any one of claims 1 to 6 by executing the executable instructions.
10. A computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the method of creating a virtual machine according to any one of claims 1 to 6.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210487561.3A CN114816672A (en) | 2022-05-06 | 2022-05-06 | Virtual machine creation method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210487561.3A CN114816672A (en) | 2022-05-06 | 2022-05-06 | Virtual machine creation method and device, electronic equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN114816672A true CN114816672A (en) | 2022-07-29 |
Family
ID=82510606
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210487561.3A Pending CN114816672A (en) | 2022-05-06 | 2022-05-06 | Virtual machine creation method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114816672A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115145692A (en) * | 2022-07-13 | 2022-10-04 | 中国电信股份有限公司 | Container creation method and device, and computer-readable storage medium |
| CN117234662A (en) * | 2023-08-29 | 2023-12-15 | 中电云计算技术有限公司 | Virtual machine configuration method, device, equipment and storage medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109933405A (en) * | 2019-01-09 | 2019-06-25 | 平安科技(深圳)有限公司 | Virtual machine creation method and device, electronic equipment, storage medium |
| CN111459684A (en) * | 2020-04-24 | 2020-07-28 | 中国人民解放军国防科技大学 | Cloud computing resource fusion scheduling management method, system and medium for multiprocessor architecture |
| CN113010263A (en) * | 2021-02-26 | 2021-06-22 | 山东英信计算机技术有限公司 | Method, system, equipment and storage medium for creating virtual machine in cloud platform |
| CN113946415A (en) * | 2018-03-16 | 2022-01-18 | 华为技术有限公司 | Scheduling method and device and main node |
-
2022
- 2022-05-06 CN CN202210487561.3A patent/CN114816672A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113946415A (en) * | 2018-03-16 | 2022-01-18 | 华为技术有限公司 | Scheduling method and device and main node |
| CN109933405A (en) * | 2019-01-09 | 2019-06-25 | 平安科技(深圳)有限公司 | Virtual machine creation method and device, electronic equipment, storage medium |
| CN111459684A (en) * | 2020-04-24 | 2020-07-28 | 中国人民解放军国防科技大学 | Cloud computing resource fusion scheduling management method, system and medium for multiprocessor architecture |
| CN113010263A (en) * | 2021-02-26 | 2021-06-22 | 山东英信计算机技术有限公司 | Method, system, equipment and storage medium for creating virtual machine in cloud platform |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115145692A (en) * | 2022-07-13 | 2022-10-04 | 中国电信股份有限公司 | Container creation method and device, and computer-readable storage medium |
| CN117234662A (en) * | 2023-08-29 | 2023-12-15 | 中电云计算技术有限公司 | Virtual machine configuration method, device, equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108196915B (en) | Code processing method and device based on application container engine and storage medium | |
| US7437706B2 (en) | Automating the life cycle of a distributed computing application | |
| CN112685035B (en) | Project development method and device, computer readable storage medium and electronic equipment | |
| US12141559B2 (en) | Method for constructing, running and implementing cross-platform application, terminal, server and system | |
| CN111399897A (en) | Application issuing method and system based on kubernets | |
| CN107077379B (en) | A kind of virtual machine creation method and device | |
| CN112114789B (en) | Service development method and equipment | |
| CN113805882A (en) | Method and device for developing application program, electronic equipment and storage medium | |
| CN114816424B (en) | A container-based continuous integration method, device and electronic device | |
| US20120096527A1 (en) | Powershell cmdlets code generating tool for communicating to the web services | |
| CN114816672A (en) | Virtual machine creation method and device, electronic equipment and storage medium | |
| CN111625317A (en) | Container cloud construction method and related device of business system | |
| CN114721719A (en) | Method and system for containerized deployment of heterogeneous applications in cluster | |
| CN115291946A (en) | Hongmong system transplanting method, device, electronic equipment and readable medium | |
| CN111970349B (en) | Communication system, method, device, equipment and medium based on remote procedure call | |
| CN113626095A (en) | Switching method and switching system of configuration center, electronic equipment and storage medium | |
| US20060136880A1 (en) | System, apparatus and methods for automatic program translation | |
| CN109408057B (en) | Method, device, medium and computing equipment for automatically generating codes | |
| CN112035270A (en) | Interface adaptation method, system, device, computer readable medium and electronic equipment | |
| CN112162822A (en) | Mirror image construction method, device, equipment and readable storage medium | |
| CN118227180A (en) | Plug-in management method, medium, device and computing equipment of micro-service architecture gateway | |
| CN114696888B (en) | Port task processing method, device, equipment and medium of satellite measurement, operation and control system | |
| CN117707506A (en) | Front-end and rear-end combined cloud rendering containerized agile deployment system | |
| CN113220507B (en) | Version consistency checking method and device for double-master control system | |
| CN115422055A (en) | Method and device for testing SDK (software development kit) for developing application program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220729 |
|
| RJ01 | Rejection of invention patent application after publication |