CN113687908A - PMEM virtual machine creation method, device, equipment and readable storage medium - Google Patents

PMEM virtual machine creation method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN113687908A
CN113687908A CN202110836590.1A CN202110836590A CN113687908A CN 113687908 A CN113687908 A CN 113687908A CN 202110836590 A CN202110836590 A CN 202110836590A CN 113687908 A CN113687908 A CN 113687908A
Authority
CN
China
Prior art keywords
pmem
virtual machine
vpmem
namespace
creating
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
Application number
CN202110836590.1A
Other languages
Chinese (zh)
Inventor
宋文平
亓开元
苏广峰
马豹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202110836590.1A priority Critical patent/CN113687908A/en
Publication of CN113687908A publication Critical patent/CN113687908A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming 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)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method for creating a PMEM virtual machine, which comprises the following steps: analyzing the received PMEM virtual machine creation request to obtain vPMEM namespace specification information; screening according to the vPMEM namespace specification information to obtain an available host; carrying out PMEM virtual machine creation operation by utilizing a vPMEM namespace in an available host; and generating an NVDIMM label according to the created occupation result of the PMEM virtual machine on the vPMEM namespace in the available host machine so as to bind the PMEM virtual machine and the occupied vPMEM namespace. By applying the method for creating the PMEM virtual machine, the vPMEM persistent memory device can be used in a finer-grained manner, and the PMEM persistent memory device can be conveniently used and managed. The invention also discloses a device, equipment and a storage medium for creating the PMEM virtual machine, and the device, the equipment and the storage medium have corresponding technical effects.

Description

PMEM virtual machine creation method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of virtualization technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for creating a PMEM virtual machine.
Background
With the development of virtualization technology, virtual machines are widely applied, and the creation of PMEM virtual machines is proposed in order to enable the created virtual machines to meet the requirement of large memory storage.
The existing PMEM virtual machine creation mode is based on an OpenStack cloud computing management platform, and PMEM virtual machine creation is carried out in a mode of randomly scheduling a vPMEM namespace in vPMEM equipment. This method cannot determine which namespaces are already used, and cannot determine which virtual machine corresponds to the used vPMEM namespaces, which is very unfavorable for management of PMEM devices.
In summary, how to effectively solve the problems that the existing PMEM virtual machine creation method cannot determine which namespaces are used, and cannot determine which virtual machine corresponds to the used vppm namespaces, which is very unfavorable for management of PMEM devices, and the like, is a problem that needs to be solved urgently by those skilled in the art at present.
Disclosure of Invention
The invention aims to provide a PMEM virtual machine creation method, which realizes finer-grained use of vPMEM persistent memory equipment and facilitates use and management of the PMEM persistent memory equipment; another object of the present invention is to provide a device, an apparatus and a computer readable storage medium for creating a PMEM virtual machine.
In order to solve the technical problems, the invention provides the following technical scheme:
a method for creating a PMEM virtual machine comprises the following steps:
analyzing the received PMEM virtual machine creation request to obtain vPMEM namespace specification information;
screening according to the vPMEM namespace specification information to obtain an available host;
performing PMEM virtual machine creation operation by utilizing a vPMEM namespace in the available host;
and generating an NVDIMM label according to the occupation result of the PMEM virtual machine on the vPMEM namespace in the available host, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.
In a specific embodiment of the present invention, parsing a received PMEM virtual machine creation request to obtain vPMEM namespace specification information includes:
analyzing the received PMEM virtual machine creation request to obtain a name of a vPMEM namespace;
screening and obtaining the available host according to the vPMEM namespace specification information, wherein the screening and obtaining of the available host comprises the following steps:
and screening to obtain the available host according to the name of the vPMEM namespace.
In a specific embodiment of the present invention, the screening to obtain an available host according to the vPMEM namespace specification information includes:
screening all candidate hosts according to the vPMEM namespace specification information;
and performing filtering operation on each candidate host to obtain the available host.
In an embodiment of the present invention, performing a filtering operation on each candidate host includes:
acquiring service state information corresponding to each candidate host respectively;
and filtering each candidate host according to each service state information.
In an embodiment of the present invention, performing a filtering operation on each candidate host includes:
acquiring resource clusters corresponding to the candidate hosts respectively;
and filtering each candidate host according to each resource cluster.
In a specific embodiment of the present invention, after the binding the PMEM virtual machine and the occupied vPMEM namespace, the method further includes:
starting the PMEM virtual machine;
judging whether the PMEM virtual machine is started successfully or not;
if yes, outputting a PMEM virtual machine starting success prompt message.
In a specific embodiment of the present invention, parsing a received PMEM virtual machine creation request to obtain vPMEM namespace specification information includes:
analyzing the received PMEM virtual machine creation request to obtain the vPMEM namespace specification information and system parameter information of the PMEM virtual machine to be created;
before the available host is obtained through screening according to the vPMEM namespace specification information, the method further comprises the following steps:
judging whether the system parameter information is legal or not;
and if so, executing the step of screening to obtain the available host according to the specification information of the vPMEM namespace.
A PMEM virtual machine creation apparatus, comprising:
the request analysis module is used for analyzing the received PMEM virtual machine creation request to obtain vPMEM namespace specification information;
the host screening module is used for screening the available host according to the vPMEM namespace specification information;
the virtual machine creating module is used for performing PMEM virtual machine creating operation by utilizing the vPMEM namespace in the available host;
and the label generation module is used for generating NVDIMM labels according to the occupation result of the PMEM virtual machine on the vPMEM namespace in the available host machine, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.
A PMEM virtual machine creation device includes:
a memory for storing a computer program;
and the processor is used for realizing the steps of the PMEM virtual machine creation method when the computer program is executed.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of creating a PMEM virtual machine as described above.
The PMEM virtual machine creation method provided by the invention is used for analyzing the received PMEM virtual machine creation request to obtain the specification information of the vPMEM naming space; screening according to the vPMEM namespace specification information to obtain an available host; carrying out PMEM virtual machine creation operation by utilizing a vPMEM namespace in an available host; and generating an NVDIMM label according to the created occupation result of the PMEM virtual machine on the vPMEM namespace in the available host machine so as to bind the PMEM virtual machine and the occupied vPMEM namespace.
According to the technical scheme, the rule information of the vPMEM namespace required by PMEM virtual machine creation is preset, after a PMEM virtual machine creation request is received, the available host is determined according to the vPMEM namespace specification information obtained through analysis, and after the PMEM virtual machine is created in the vPMEM namespace of the available host, an NVDIMM label is generated to bind the PMEM virtual machine and the occupied vPMEM namespace. The available host is selected according to the specification information of the vPMEM namespace, so that the PMEM persistent memory device can be used in a finer granularity mode, the PMEM virtual machine and the occupied vPMEM namespace are bound through the NVDIMM label, the binding relationship between the PMEM virtual machine and the vPMEM namespace can be conveniently checked, and the PMEM persistent memory device can be conveniently used and managed.
Correspondingly, the invention also provides a device, equipment and a computer readable storage medium for creating the PMEM virtual machine, which correspond to the method for creating the PMEM virtual machine, and the technical effects are achieved, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of an implementation of a method for creating a PMEM virtual machine according to an embodiment of the present invention;
FIG. 2 is a flowchart of another implementation of a method for creating a PMEM virtual machine according to an embodiment of the present invention;
FIG. 3 is a flowchart of another implementation of a method for creating a PMEM virtual machine according to an embodiment of the present invention;
fig. 4 is a block diagram of a device for creating a PMEM virtual machine according to an embodiment of the present invention;
fig. 5 is a block diagram of a device for creating a PMEM virtual machine according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a creating device of a PMEM virtual machine according to this embodiment.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of an implementation of a method for creating a PMEM virtual machine according to an embodiment of the present invention, where the method may include the following steps:
s101: and analyzing the received PMEM virtual machine creation request to obtain the specification information of the vPMEM namespace.
When a PMEM virtual machine needs to be created, a PMEM virtual machine creating request is generated, and the PMEM virtual machine creating request comprises vPMEM namespace specification information, such as vPMEM namespace name, vPMEM namespace memory size and other specification information. And the virtual machine center receives the PMEM virtual machine creation request, and analyzes the received PMEM virtual machine creation request to obtain the vPMEM namespace specification information.
S102: and screening to obtain the available host according to the vPMEM namespace specification information.
After the vPMEM namespace specification information is obtained through analysis, the vPMEM namespace specification information is used as a standard for screening physical hosts, and available hosts are screened according to the vPMEM namespace specification information. Available hosts are screened according to the specification information of the vPMEM namespace, so that vPMEM namespaces meeting requirements are screened, and PMEM persistent memory equipment is used in a finer-grained mode.
S103: PMEM virtual machine creation operations are performed using the vPMEM namespace in the available host.
After the available host is obtained through screening, the available host obtained through screening is shown to contain a vPMEM namespace meeting vPMEM namespace specification information, and PMEM virtual machine creation operation is carried out by utilizing the vPMEM namespace in the available host.
S104: and generating an NVDIMM label according to the created occupation result of the PMEM virtual machine on the vPMEM namespace in the available host machine so as to bind the PMEM virtual machine and the occupied vPMEM namespace.
After the PMEM virtual machine is created, an NVDIMM label is generated according to the occupation result of the created PMEM virtual machine on the vPMEM namespace in the available host, for example, the NVDIMM label can be added in the xml file of the created PMEM virtual machine, so that the PMEM virtual machine and the occupied vPMEM namespace are bound through the generated NVDIMM label. Therefore, a user can conveniently and quickly determine which namespaces are used by looking up the NVDIMM labels, and quickly determine which virtual machine corresponds to the used vPMEM namespaces, and the PMEM persistent memory device is convenient to use and manage.
According to the technical scheme, the rule information of the vPMEM namespace required by PMEM virtual machine creation is preset, after a PMEM virtual machine creation request is received, the available host is determined according to the vPMEM namespace specification information obtained through analysis, and after the PMEM virtual machine is created in the vPMEM namespace of the available host, an NVDIMM label is generated to bind the PMEM virtual machine and the occupied vPMEM namespace. The available host is selected according to the specification information of the vPMEM namespace, so that the PMEM persistent memory device can be used in a finer granularity mode, the PMEM virtual machine and the occupied vPMEM namespace are bound through the NVDIMM label, the binding relationship between the PMEM virtual machine and the vPMEM namespace can be conveniently checked, and the PMEM persistent memory device can be conveniently used and managed.
It should be noted that, based on the above embodiments, the embodiments of the present invention also provide corresponding improvements. In the following embodiments, steps that are the same as or correspond to those in the above embodiments may be referred to one another, and corresponding advantageous effects may also be referred to one another, which is not described in detail in the following modified embodiments.
Referring to fig. 2, fig. 2 is a flowchart of another implementation of a method for creating a PMEM virtual machine according to an embodiment of the present invention, where the method may include the following steps:
s201: and analyzing the received PMEM virtual machine creation request to obtain the name of the vPMEM namespace and system parameter information of the PMEM virtual machine to be created.
When a PMEM virtual machine needs to be created, the generated PMEM virtual machine creation request comprises a vPMEM namespace name and system parameter information of the PMEM virtual machine to be created. Analyzing the received PMEM virtual machine creation request to obtain the name of the vPMEM namespace and system parameter information of the PMEM virtual machine to be created.
S202: and judging whether the system parameter information is legal or not, if not, executing step S203, and if so, executing step S204.
The method comprises the steps of setting a system parameter validity check standard in advance according to real parameter information of system physical hardware, judging whether the system parameter information is legal after analyzing and obtaining the system parameter information of the PMEM virtual machine to be created, if not, indicating that the system parameter of the PMEM virtual machine to be created currently exceeds a bearing range of the system, executing step S203, if so, indicating that the system parameter of the PMEM virtual machine to be created is within the bearing range of the system, and executing step S204.
S203: and outputting illegal prompt information of the system parameter information.
When the system parameter information is determined to be illegal, the fact that the system parameters of the PMEM virtual machine which needs to be created currently exceed the bearing range of the system is shown, and illegal prompt information of the system parameter information is output. Therefore, the virtual machine creation requesting party is prompted that the virtual machine creation request is unreasonable, and system parameters need to be adjusted.
S204: and screening each candidate host according to the name of the vPMEM namespace.
When the system parameter information is determined to be legal, the system parameters of the PMEM virtual machine to be created are indicated to be within the bearing range of the system, all candidate hosts are screened according to the name of the vPMEM namespace, and the candidate hosts generally comprise a plurality of hosts.
S205: and filtering each candidate host to obtain an available host.
Because each candidate host can be in an unavailable state due to the current service state or available resources and other conditions, after each candidate host is obtained by screening, each candidate host is subjected to filtering operation to obtain an available host.
In an embodiment of the present invention, the filtering operation performed on each candidate host may include the following steps:
the method comprises the following steps: acquiring service state information corresponding to each candidate host respectively;
step two: and filtering each candidate host according to each service state information.
For convenience of description, the above two steps may be combined for illustration.
After the candidate hosts are obtained through screening, service state information corresponding to the candidate hosts is obtained, so that whether the candidate hosts can be normally used or not can be obtained according to the service state information, and filtering operation is performed on the candidate hosts according to the service state information. For example, after determining that there is a host in the downtime state in the candidate hosts, the candidate hosts in the downtime state may be filtered out to obtain available hosts.
In an embodiment of the present invention, the filtering operation performed on each candidate host may include the following steps:
the method comprises the following steps: acquiring resource clusters corresponding to the candidate hosts respectively;
step two: and filtering each candidate host according to each resource cluster.
After the candidate hosts are obtained through screening, the resource clusters corresponding to the candidate hosts are obtained, so that whether the candidate hosts can be normally used or not can be obtained according to the resource clusters corresponding to the candidate hosts, and the candidate hosts are filtered according to the resource clusters. If it is determined that there are hosts with fewer available resource clusters in the candidate hosts, the candidate hosts with fewer available resource clusters can be filtered out to obtain the available hosts.
S206: PMEM virtual machine creation operations are performed using the vPMEM namespace in the available host.
S207: and generating an NVDIMM label according to the created occupation result of the PMEM virtual machine on the vPMEM namespace in the available host machine so as to bind the PMEM virtual machine and the occupied vPMEM namespace.
S208: and carrying out starting operation on the PMEM virtual machine.
After the creation of the PMEM virtual machine is completed, a starting operation is performed on the PMEM virtual machine.
S209: and judging whether the PMEM virtual machine is successfully started, if so, executing the step S210, and if not, executing the step S211.
And judging whether the PMEM virtual machine is successfully started, if so, indicating that the PMEM virtual machine is successfully established, and executing step S210, otherwise, indicating that the PMEM virtual machine is unsuccessfully established, and executing step S211.
S210: and outputting a message of successfully starting the PMEM virtual machine.
When the PMEM virtual machine is successfully started, the PMEM virtual machine is successfully established, and PMEM virtual machine startup success prompt information is output, so that a virtual machine establishment requester is prompted that the virtual machine is successfully established.
S211: and outputting a PMEM virtual machine start failure prompt message.
When the PMEM virtual machine is determined to be failed to start, the PMEM virtual machine is indicated to be failed to build, and PMEM virtual machine start failure prompt information is output, so that a virtual machine building requester is prompted to fail in virtual machine building, and the virtual machine building requester can adopt a corresponding solution.
In a specific example application, a PMEM device is divided into namespaces in advance, the memory size of the namespaces can be the same, and a vPMEM namespace is created, wherein the creation process is as follows:
# Create 30G size name ns3 namespace
ndctl create-namespace-s 30G-m devdax-M mem-n ns3
# Exhibit all namespaces
ndctl list–X
Configuring a vPMEM namespace on the nova-computer computing service of a host where the PMEM device is located, wherein the namespace which is not configured cannot be reported to a resource management system and cannot be used by a cloud platform. The configuration items are as follows:
[libvirt]
pmem_namespaces=ns0,ns1,ns2,ns3
after the nova-computer service is restarted, the nova-computer automatically discovers the vPMEM namespace and reports the vPMEM namespace to the resource management system placement. The reported data are shown in table 1:
TABLE 1
Figure BDA0003177416380000091
And setting the attribute of the cloud host specification, and creating the virtual machine by using the cloud host specification.
openstack flavor set--property hw:pmem='NS0,NS1'my_flavor
Referring to fig. 3, fig. 3 is a flowchart of another implementation of the method for creating the PMEM virtual machine according to the embodiment of the present invention. Wherein:
nova-application programming interface (Nova-api): and a computing service interface is provided for a user on a control node in the OpenStack.
Nova-manager (Nova-conductor): and the control node in the OpenStack is responsible for operating the service of the database.
Nova-scheduler (Nova-scheduler): and finally scheduling available computing nodes for creating the virtual machine through a plurality of filtering algorithms on the control nodes in the OpenStack.
Configurator (placement): the resource management service is a service for using, maintaining and managing resources such as a CPU, a Memory, a Disk, a GPU, a vPMEM and the like in OpenStack.
Nova-calculator (Nova-scheduler): and starting the computing node service of the virtual machine in OpenStack.
Libvirt: open source APIs, daemons and management tools for managing the virtualization platform, for managing KVM, Xen, VMware ESX, QEMU and other virtualization technologies.
The flow is illustrated as follows:
(1) firstly, a user initiates a request for creating a vPMEM virtual machine, and whether the vPMEM-bound virtual machine is created or not is determined according to the selected cloud host specification.
(2) The Nova api receives the request, checks the validity of the parameters transmitted by the user, and then issues a creation request to the Nova-conductor service.
(3) Nova conductor calls Nova-scheduler to screen out the host that created the PMEM virtual machine.
(4) The Nova scheduler firstly queries resource management service according to specification information to obtain candidate hosts meeting the condition of the vPMEM, then filters the candidate hosts with the vPMEM through filtering algorithms such as service states, resource clustering and the like, and finally returns to a target host capable of creating the virtual machine.
(5) Nova conductor sends a create virtual machine request to the target host Nova-computer service.
(6) Nova computer acquires corresponding align, size and devpath attributes according to a vPMEM namespace, generates a LibvirtConfigGuest VPMEM object, adds the LibvirtConfigGuest VPMEM object to the equipment of the virtual machine, and finally adds an NVDIMM label to the xml of the virtual machine to bind a vPMEM memory.
(7) And after the virtual machine is successfully started, the nova-computer informs the nova-api of the successful start of the virtual machine, and the nova-api informs the user of the completion of the creation of the vPMEM virtual machine.
Corresponding to the above method embodiments, the present invention further provides a device for creating a PMEM virtual machine, and the device for creating a PMEM virtual machine described below and the method for creating a PMEM virtual machine described above may be referred to in correspondence with each other.
Referring to fig. 4, fig. 4 is a block diagram of a device for creating a PMEM virtual machine according to an embodiment of the present invention, where the device may include:
the request analysis module 41 is configured to analyze the received PMEM virtual machine creation request to obtain vmem namespace specification information;
the host screening module 42 is used for screening the available hosts according to the vPMEM namespace specification information;
a virtual machine creation module 43, configured to perform PMEM virtual machine creation operation using a vPMEM namespace in an available host;
and the tag generation module 44 is configured to generate an NVDIMM tag according to the created occupying result of the PMEM virtual machine to the vPMEM namespace in the available host, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.
According to the technical scheme, the rule information of the vPMEM namespace required by PMEM virtual machine creation is preset, after a PMEM virtual machine creation request is received, the available host is determined according to the vPMEM namespace specification information obtained through analysis, and after the PMEM virtual machine is created in the vPMEM namespace of the available host, an NVDIMM label is generated to bind the PMEM virtual machine and the occupied vPMEM namespace. The available host is selected according to the specification information of the vPMEM namespace, so that the PMEM persistent memory device can be used in a finer granularity mode, the PMEM virtual machine and the occupied vPMEM namespace are bound through the NVDIMM label, the binding relationship between the PMEM virtual machine and the vPMEM namespace can be conveniently checked, and the PMEM persistent memory device can be conveniently used and managed.
In a specific embodiment of the present invention, the request parsing module 41 is specifically a module that parses a received PMEM virtual machine creation request to obtain a name of a vplemm namespace;
the host screening module 42 is specifically a module for screening available hosts according to the name of the vPMEM namespace.
In one embodiment of the present invention, the host screening module 42 includes:
the candidate host screening submodule is used for screening each candidate host according to the vPMEM namespace specification information;
and the available host screening submodule is used for carrying out filtering operation on each candidate host to obtain an available host.
In one embodiment of the present invention, the available host screening submodule includes:
a service state obtaining unit, configured to obtain service state information corresponding to each candidate host;
and the first available host screening unit is used for carrying out filtering operation on each candidate host according to each service state information.
In one embodiment of the present invention, the available host screening submodule includes:
a resource cluster obtaining unit, configured to obtain resource clusters corresponding to the candidate hosts respectively;
and the second available host screening unit is used for filtering each candidate host according to each resource cluster.
In one embodiment of the present invention, the apparatus may further include:
the virtual machine starting module is used for carrying out starting operation on the PMEM virtual machine after the PMEM virtual machine and the occupied vPMEM namespace are bound;
the starting result judging module is used for judging whether the PMEM virtual machine is started successfully or not;
and the starting success prompt module is used for outputting PMEM virtual machine starting success prompt information when the PMEM virtual machine is successfully started.
In a specific embodiment of the present invention, the request parsing module 41 is specifically a module that parses a received PMEM virtual machine creation request to obtain vmem namespace specification information and system parameter information of a PMEM virtual machine to be created;
the apparatus may further include:
the parameter validity judging module is used for judging whether the system parameter information is legal or not;
the host screening module 42 is specifically a module that screens available hosts according to the vPMEM namespace specification information when it is determined that the system parameter information is legal.
Corresponding to the above method embodiment, referring to fig. 5, fig. 5 is a schematic diagram of a device for creating a PMEM virtual machine provided by the present invention, where the device may include:
a memory 332 for storing a computer program;
a processor 322, configured to implement the steps of the method for creating a PMEM virtual machine according to the above method embodiment when executing the computer program.
Specifically, referring to fig. 6, fig. 6 is a schematic diagram of a specific structure of a creating device of a PMEM virtual machine provided in this embodiment, the creating device of the PMEM virtual machine may generate a relatively large difference due to different configurations or performances, and may include a processor (CPU) 322 (for example, one or more processors) and a memory 332, where the memory 332 stores one or more computer applications 342 or data 344. Memory 332 may be, among other things, transient or persistent storage. The program stored in memory 332 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a data processing device. Still further, processor 322 may be configured to communicate with memory 332 to execute a series of instruction operations in memory 332 on PMEM virtual machine creation device 301.
The PMEM virtual machine creation device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341.
The steps in the above-described method for creating a PMEM virtual machine may be implemented by the structure of the apparatus for creating a PMEM virtual machine.
Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of:
analyzing the received PMEM virtual machine creation request to obtain vPMEM namespace specification information; screening according to the vPMEM namespace specification information to obtain an available host; carrying out PMEM virtual machine creation operation by utilizing a vPMEM namespace in an available host; and generating an NVDIMM label according to the created occupation result of the PMEM virtual machine on the vPMEM namespace in the available host machine so as to bind the PMEM virtual machine and the occupied vPMEM namespace.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided by the present invention, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device, the apparatus and the computer-readable storage medium disclosed in the embodiments correspond to the method disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
The principle and the implementation of the present invention are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A method for creating a PMEM virtual machine is characterized by comprising the following steps:
analyzing the received PMEM virtual machine creation request to obtain vPMEM namespace specification information;
screening according to the vPMEM namespace specification information to obtain an available host;
performing PMEM virtual machine creation operation by utilizing a vPMEM namespace in the available host;
and generating an NVDIMM label according to the occupation result of the PMEM virtual machine on the vPMEM namespace in the available host, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.
2. The method for creating the PMEM virtual machine according to claim 1, wherein analyzing the received PMEM virtual machine creation request to obtain the vPMEM namespace specification information comprises:
analyzing the received PMEM virtual machine creation request to obtain a name of a vPMEM namespace;
screening and obtaining the available host according to the vPMEM namespace specification information, wherein the screening and obtaining of the available host comprises the following steps:
and screening to obtain the available host according to the name of the vPMEM namespace.
3. A method for creating a PMEM virtual machine according to claim 1 or 2, wherein screening for available hosts according to the vPMEM namespace specification information comprises:
screening all candidate hosts according to the vPMEM namespace specification information;
and performing filtering operation on each candidate host to obtain the available host.
4. A method of creating a PMEM virtual machine according to claim 3, wherein performing a filtering operation on each of said candidate hosts comprises:
acquiring service state information corresponding to each candidate host respectively;
and filtering each candidate host according to each service state information.
5. A method of creating a PMEM virtual machine according to claim 3, wherein performing a filtering operation on each of said candidate hosts comprises:
acquiring resource clusters corresponding to the candidate hosts respectively;
and filtering each candidate host according to each resource cluster.
6. The method for creating the PMEM virtual machine according to claim 1, further comprising, after binding the PMEM virtual machine and the occupied vPMEM namespace:
starting the PMEM virtual machine;
judging whether the PMEM virtual machine is started successfully or not;
if yes, outputting a PMEM virtual machine starting success prompt message.
7. The method for creating the PMEM virtual machine according to claim 1, wherein analyzing the received PMEM virtual machine creation request to obtain the vPMEM namespace specification information comprises:
analyzing the received PMEM virtual machine creation request to obtain the vPMEM namespace specification information and system parameter information of the PMEM virtual machine to be created;
before the available host is obtained through screening according to the vPMEM namespace specification information, the method further comprises the following steps:
judging whether the system parameter information is legal or not;
and if so, executing the step of screening to obtain the available host according to the specification information of the vPMEM namespace.
8. An apparatus for creating a PMEM virtual machine, comprising:
the request analysis module is used for analyzing the received PMEM virtual machine creation request to obtain vPMEM namespace specification information;
the host screening module is used for screening the available host according to the vPMEM namespace specification information;
the virtual machine creating module is used for performing PMEM virtual machine creating operation by utilizing the vPMEM namespace in the available host;
and the label generation module is used for generating NVDIMM labels according to the occupation result of the PMEM virtual machine on the vPMEM namespace in the available host machine, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.
9. A PMEM virtual machine creation device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of creating a PMEM virtual machine according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, carries out the steps of the method of creating a PMEM virtual machine according to any one of claims 1 to 7.
CN202110836590.1A 2021-07-23 2021-07-23 PMEM virtual machine creation method, device, equipment and readable storage medium Pending CN113687908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110836590.1A CN113687908A (en) 2021-07-23 2021-07-23 PMEM virtual machine creation method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110836590.1A CN113687908A (en) 2021-07-23 2021-07-23 PMEM virtual machine creation method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113687908A true CN113687908A (en) 2021-11-23

Family

ID=78577945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110836590.1A Pending CN113687908A (en) 2021-07-23 2021-07-23 PMEM virtual machine creation method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113687908A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114356501A (en) * 2021-12-30 2022-04-15 苏州浪潮智能科技有限公司 Persistent memory access method and device for container in cloud platform virtual machine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114356501A (en) * 2021-12-30 2022-04-15 苏州浪潮智能科技有限公司 Persistent memory access method and device for container in cloud platform virtual machine

Similar Documents

Publication Publication Date Title
EP3761170B1 (en) Virtual machine creation method and apparatus
US11544100B2 (en) Hardware acceleration method and related device
CN111641515B (en) VNF life cycle management method and device
CN112181602A (en) Resource arranging method and device, electronic equipment and storage medium
EP3442201B1 (en) Cloud platform construction method and cloud platform
CN110633130B (en) Virtual memory management method and device based on memory hot plug technology
CN113495732A (en) Server deployment method, device, equipment and readable storage medium
EP3883183A1 (en) Virtualization management method and device
EP3879875A1 (en) Resource change method and device, apparatus, and storage medium
CN111061432A (en) Service migration method, device, equipment and readable storage medium
CN111190823A (en) UI automation test method, electronic device and computer readable storage medium
CN112363820A (en) Uniform resource pooling container scheduling engine based on heterogeneous hardware and scheduling method thereof
CN113687908A (en) PMEM virtual machine creation method, device, equipment and readable storage medium
CN116560803B (en) Resource management method and related device based on SR-IOV
CN111831393A (en) Method for managing virtual machine, server and storage medium
CN110599112B (en) Network page development and maintenance method and device
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN115277398A (en) Cluster network configuration method and device
CN114490189A (en) Cloud platform database backup method and device, electronic equipment and storage medium
CN116089020B (en) Virtual machine operation method, capacity expansion method and capacity expansion system
CN115202830B (en) Root file system preparation method, system, computing device and readable storage medium
CN116775171B (en) Architecture switching method and device, electronic equipment and storage medium
CN113162784B (en) Method and device for generating operation and maintenance template
CN115277838B (en) Cloud cache database service method, device, equipment and readable storage medium
CN109246167B (en) Container scheduling method and device

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