[go: up one dir, main page]

CN113687908B - Method, device and equipment for creating PMEM virtual machine and readable storage medium - Google Patents

Method, device and equipment for creating PMEM virtual machine and readable storage medium Download PDF

Info

Publication number
CN113687908B
CN113687908B CN202110836590.1A CN202110836590A CN113687908B CN 113687908 B CN113687908 B CN 113687908B CN 202110836590 A CN202110836590 A CN 202110836590A CN 113687908 B CN113687908 B CN 113687908B
Authority
CN
China
Prior art keywords
pmem
virtual machine
vpmem
namespace
host
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.)
Active
Application number
CN202110836590.1A
Other languages
Chinese (zh)
Other versions
CN113687908A (en
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.)
Inspur Jinan data Technology Co ltd
Original Assignee
Inspur Jinan 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 Inspur Jinan data Technology Co ltd filed Critical Inspur Jinan data Technology Co ltd
Priority to CN202110836590.1A priority Critical patent/CN113687908B/en
Publication of CN113687908A publication Critical patent/CN113687908A/en
Application granted granted Critical
Publication of CN113687908B publication Critical patent/CN113687908B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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

本发明公开了一种PMEM虚拟机的创建方法,包括:对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息;根据vPMEM命名空间规格信息筛选得到可用主机;利用可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作;根据创建得到的PMEM虚拟机对可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,以对PMEM虚拟机和被占用vPMEM命名空间进行绑定。应用本发明所提供的PMEM虚拟机的创建方法,实现了对vPMEM持久化内存设备更细粒度地使用,方便了PMEM持久化内存设备的使用和管理。本发明还公开了一种PMEM虚拟机的创建装置、设备及存储介质,具有相应技术效果。

The present invention discloses a method for creating a PMEM virtual machine, including: parsing a received PMEM virtual machine creation request to obtain vPMEM namespace specification information; filtering available hosts according to the vPMEM namespace specification information; performing a PMEM virtual machine creation operation using the vPMEM namespace in the available hosts; generating an NVDIMM label according to the occupation result of the created PMEM virtual machine on the vPMEM namespace in the available hosts, so as to bind the PMEM virtual machine and the occupied vPMEM namespace. The method for creating a PMEM virtual machine provided by the present invention realizes a more fine-grained use of vPMEM persistent memory devices, and facilitates the use and management of PMEM persistent memory devices. The present invention also discloses a device, equipment and storage medium for creating a PMEM virtual machine, which have corresponding technical effects.

Description

PMEM虚拟机的创建方法、装置、设备及可读存储介质PMEM virtual machine creation method, device, equipment and readable storage medium

技术领域Technical Field

本发明涉及虚拟化技术领域,特别是涉及一种PMEM虚拟机的创建方法、装置、设备及计算机可读存储介质。The present invention relates to the field of virtualization technology, and in particular to a method, device, equipment and computer-readable storage medium for creating a PMEM virtual machine.

背景技术Background Art

随着虚拟化技术的发展,虚拟机得到了广泛的应用,为了使得创建得到的虚拟机满足大内存存储,推出了对PMEM虚拟机的创建。With the development of virtualization technology, virtual machines have been widely used. In order to make the created virtual machines meet the needs of large memory storage, the creation of PMEM virtual machines has been introduced.

现有的PMEM虚拟机创建方式为基于OpenStack云计算管理平台,通过对vPMEM设备中的vPMEM命名空间进行随机调度的方式进行PMEM虚拟机创建。这种方式无法确定哪些命名空间已经被使用,也无法确定已使用的vPMEM命名空间对应的是哪个虚拟机,非常不利于PMEM设备的管理。The existing PMEM virtual machine creation method is based on the OpenStack cloud computing management platform, which creates PMEM virtual machines by randomly scheduling vPMEM namespaces in vPMEM devices. This method cannot determine which namespaces have been used, nor can it determine which virtual machine the used vPMEM namespace corresponds to, which is very unfavorable for the management of PMEM devices.

综上所述,如何有效地解决现有的PMEM虚拟机创建方式无法确定哪些命名空间已经被使用,也无法确定已使用的vPMEM命名空间对应的是哪个虚拟机,非常不利于PMEM设备的管理等问题,是目前本领域技术人员急需解决的问题。In summary, how to effectively solve the problem that the existing PMEM virtual machine creation method cannot determine which namespaces have been used, nor can it determine which virtual machine the used vPMEM namespace corresponds to, which is very unfavorable for the management of PMEM devices, is a problem that technicians in this field urgently need to solve.

发明内容Summary of the invention

本发明的目的是提供一种PMEM虚拟机的创建方法,该方法实现了对vPMEM持久化内存设备更细粒度地使用,方便了PMEM持久化内存设备的使用和管理;本发明的另一目的是提供一种PMEM虚拟机的创建装置、设备及计算机可读存储介质。An object of the present invention is to provide a method for creating a PMEM virtual machine, which realizes a more fine-grained use of vPMEM persistent memory devices and facilitates the use and management of PMEM persistent memory devices; another object of the present invention is to provide a device, equipment and computer-readable storage medium for creating a PMEM virtual machine.

为解决上述技术问题,本发明提供如下技术方案:In order to solve the above technical problems, the present invention provides the following technical solutions:

一种PMEM虚拟机的创建方法,包括:A method for creating a PMEM virtual machine, comprising:

对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息;Parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information;

根据所述vPMEM命名空间规格信息筛选得到可用主机;Filter and obtain available hosts according to the vPMEM namespace specification information;

利用所述可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作;Performing a PMEM virtual machine creation operation using the vPMEM namespace in the available host;

根据创建得到的PMEM虚拟机对所述可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,以对所述PMEM虚拟机和被占用vPMEM命名空间进行绑定。An NVDIMM tag is generated according to the occupation result of the created PMEM virtual machine on the vPMEM namespace in the available host, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.

在本发明的一种具体实施方式中,对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息,包括:In a specific implementation of the present invention, the received PMEM virtual machine creation request is parsed to obtain vPMEM namespace specification information, including:

对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间名称;Parse the received PMEM virtual machine creation request to obtain the vPMEM namespace name;

根据所述vPMEM命名空间规格信息筛选得到可用主机,包括:Available hosts are obtained by filtering according to the vPMEM namespace specification information, including:

根据所述vPMEM命名空间名称筛选得到可用主机。Available hosts are obtained by filtering according to the vPMEM namespace name.

在本发明的一种具体实施方式中,根据所述vPMEM命名空间规格信息筛选得到可用主机,包括:In a specific implementation of the present invention, filtering and obtaining available hosts according to the vPMEM namespace specification information includes:

根据所述vPMEM命名空间规格信息筛选各候选主机;Filter each candidate host according to the vPMEM namespace specification information;

对各所述候选主机进行过滤操作,得到所述可用主机。A filtering operation is performed on each of the candidate hosts to obtain the available hosts.

在本发明的一种具体实施方式中,对各所述候选主机进行过滤操作,包括:In a specific implementation of the present invention, filtering each candidate host includes:

获取各所述候选主机分别对应的服务状态信息;Obtaining service status information corresponding to each of the candidate hosts;

根据各所述服务状态信息对各所述候选主机进行过滤操作。A filtering operation is performed on each candidate host according to each service status information.

在本发明的一种具体实施方式中,对各所述候选主机进行过滤操作,包括:In a specific implementation of the present invention, filtering each candidate host includes:

获取各所述候选主机分别对应的资源群集;Obtain resource clusters corresponding to each of the candidate hosts;

根据各所述资源群集对各所述候选主机进行过滤操作。A filtering operation is performed on each of the candidate hosts according to each of the resource clusters.

在本发明的一种具体实施方式中,在对所述PMEM虚拟机和被占用vPMEM命名空间进行绑定之后,还包括:In a specific implementation of the present invention, after binding the PMEM virtual machine and the occupied vPMEM namespace, the method further includes:

对所述PMEM虚拟机进行启动操作;Starting the PMEM virtual machine;

判断所述PMEM虚拟机是否启动成功;Determine whether the PMEM virtual machine is started successfully;

若是,则输出PMEM虚拟机启动成功提示信息。If yes, the PMEM virtual machine startup success prompt message is output.

在本发明的一种具体实施方式中,对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息,包括:In a specific implementation of the present invention, the received PMEM virtual machine creation request is parsed to obtain vPMEM namespace specification information, including:

对接收到的PMEM虚拟机创建请求进行解析,得到所述vPMEM命名空间规格信息和待创建的PMEM虚拟机的系统参数信息;Parsing 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;

在根据所述vPMEM命名空间规格信息筛选得到可用主机之前,还包括:Before obtaining available hosts by screening according to the vPMEM namespace specification information, the method further includes:

判断所述系统参数信息是否合法;Determining whether the system parameter information is legal;

若是,则执行所述根据所述vPMEM命名空间规格信息筛选得到可用主机的步骤。If yes, the step of filtering and obtaining available hosts according to the vPMEM namespace specification information is performed.

一种PMEM虚拟机的创建装置,包括:A device for creating a PMEM virtual machine, comprising:

请求解析模块,用于对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息;A request parsing module is used to parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information;

主机筛选模块,用于根据所述vPMEM命名空间规格信息筛选得到可用主机;A host screening module, used for screening available hosts according to the vPMEM namespace specification information;

虚拟机创建模块,用于利用所述可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作;A virtual machine creation module, used to perform a PMEM virtual machine creation operation using the vPMEM namespace in the available host;

标签生成模块,用于根据创建得到的PMEM虚拟机对所述可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,以对所述PMEM虚拟机和被占用vPMEM命名空间进行绑定。The label generation module is used to generate an NVDIMM label according to the occupation result of the created PMEM virtual machine on the vPMEM namespace in the available host, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.

一种PMEM虚拟机的创建设备,包括:A device for creating a PMEM virtual machine, comprising:

存储器,用于存储计算机程序;Memory for storing computer programs;

处理器,用于执行所述计算机程序时实现如前所述PMEM虚拟机的创建方法的步骤。The processor is used to implement the steps of the method for creating a PMEM virtual machine as described above when executing the computer program.

一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如前所述PMEM虚拟机的创建方法的步骤。A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for creating a PMEM virtual machine as described above are implemented.

本发明所提供的PMEM虚拟机的创建方法,对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息;根据vPMEM命名空间规格信息筛选得到可用主机;利用可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作;根据创建得到的PMEM虚拟机对可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,以对PMEM虚拟机和被占用vPMEM命名空间进行绑定。The method for creating a PMEM virtual machine provided by the present invention parses a received PMEM virtual machine creation request to obtain vPMEM namespace specification information; obtains available hosts based on the vPMEM namespace specification information; performs a PMEM virtual machine creation operation using the vPMEM namespace in the available hosts; generates an NVDIMM label based on the occupation result of the created PMEM virtual machine on the vPMEM namespace in the available hosts, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.

由上述技术方案可知,通过预先设置进行PMEM虚拟机创建所需的vPMEM命名空间的规则信息,当接收到PMEM虚拟机创建请求之后,根据解析得到的vPMEM命名空间规格信息进行可用主机的确定,当在可用主机的vPMEM命名空间中创建完成PMEM虚拟机之后,生成NVDIMM标签对PMEM虚拟机和被占用vPMEM命名空间进行绑定。通过根据vPMEM命名空间规格信息进行可用主机的选取,实现了对PMEM持久化内存设备更细粒度地使用,通过NVDIMM标签对PMEM虚拟机和被占用vPMEM命名空间进行绑定,便于查看PMEM虚拟机和vPMEM命名空间的绑定关系,方便了PMEM持久化内存设备的使用和管理。It can be seen from the above technical solution that by presetting the rule information of the vPMEM namespace required for creating a PMEM virtual machine, after receiving a PMEM virtual machine creation request, the available host is determined according to the vPMEM namespace specification information obtained by parsing, and after the PMEM virtual machine is created in the vPMEM namespace of the available host, an NVDIMM tag is generated to bind the PMEM virtual machine and the occupied vPMEM namespace. By selecting the available host according to the vPMEM namespace specification information, a more fine-grained use of the PMEM persistent memory device is achieved, and the PMEM virtual machine and the occupied vPMEM namespace are bound by the NVDIMM tag, which makes it easy to view the binding relationship between the PMEM virtual machine and the vPMEM namespace, and facilitates the use and management of the PMEM persistent memory device.

相应的,本发明还提供了与上述PMEM虚拟机的创建方法相对应的PMEM虚拟机的创建装置、设备和计算机可读存储介质,具有上述技术效果,在此不再赘述。Correspondingly, the present invention also provides a PMEM virtual machine creation device, equipment and computer-readable storage medium corresponding to the above-mentioned PMEM virtual machine creation method, which have the above-mentioned technical effects and are not repeated here.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

图1为本发明实施例中PMEM虚拟机的创建方法的一种实施流程图;FIG1 is a flowchart of a method for creating a PMEM virtual machine according to an embodiment of the present invention;

图2为本发明实施例中PMEM虚拟机的创建方法的另一种实施流程图;FIG2 is another implementation flow chart of a method for creating a PMEM virtual machine in an embodiment of the present invention;

图3为本发明实施例中PMEM虚拟机的创建方法的另一种实施流程图;FIG3 is another implementation flow chart of the method for creating a PMEM virtual machine in an embodiment of the present invention;

图4为本发明实施例中一种PMEM虚拟机的创建装置的结构框图;FIG4 is a structural block diagram of a device for creating a PMEM virtual machine according to an embodiment of the present invention;

图5为本发明实施例中一种PMEM虚拟机的创建设备的结构框图;FIG5 is a structural block diagram of a device for creating a PMEM virtual machine according to an embodiment of the present invention;

图6为本实施例提供的一种PMEM虚拟机的创建设备的具体结构示意图。FIG. 6 is a schematic diagram of a specific structure of a device for creating a PMEM virtual machine provided in this embodiment.

具体实施方式DETAILED DESCRIPTION

为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

参见图1,图1为本发明实施例中PMEM虚拟机的创建方法的一种实施流程图,该方法可以包括以下步骤:Referring to FIG. 1 , FIG. 1 is a flowchart of a method for creating a PMEM virtual machine in an embodiment of the present invention. The method may include the following steps:

S101:对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息。S101: Parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information.

当需要进行PMEM虚拟机创建时,生成PMEM虚拟机创建请求,PMEM虚拟机创建请求中包含vPMEM命名空间规格信息,如vPMEM命名空间名称、vPMEM命名空间内存大小等规格信息。虚拟机中心接收PMEM虚拟机创建请求,并对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息。When a PMEM virtual machine needs to be created, a PMEM virtual machine creation request is generated, which includes vPMEM namespace specification information, such as vPMEM namespace name, vPMEM namespace memory size, etc. The virtual machine center receives the PMEM virtual machine creation request and parses the received PMEM virtual machine creation request to obtain the vPMEM namespace specification information.

S102:根据vPMEM命名空间规格信息筛选得到可用主机。S102: Filter and obtain available hosts according to the vPMEM namespace specification information.

在解析得到vPMEM命名空间规格信息之后,将vPMEM命名空间规格信息作为进行物理主机筛选的标准,根据vPMEM命名空间规格信息筛选得到可用主机。通过根据vPMEM命名空间规格信息筛选可用主机,从而筛选出符合要求的vPMEM命名空间,实现对PMEM持久化内存设备更细粒度地使用。After parsing the vPMEM namespace specification information, the vPMEM namespace specification information is used as the standard for physical host screening, and available hosts are screened according to the vPMEM namespace specification information. By screening available hosts according to the vPMEM namespace specification information, vPMEM namespaces that meet the requirements are screened, and more fine-grained use of PMEM persistent memory devices is achieved.

S103:利用可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作。S103: Perform a PMEM virtual machine creation operation using the vPMEM namespace in the available host.

在筛选得到可用主机之后,说明筛选得到的可用主机包含满足vPMEM命名空间规格信息的vPMEM命名空间,利用可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作。After the available hosts are obtained through screening, it indicates that the available hosts obtained through screening contain vPMEM namespaces that meet the vPMEM namespace specification information, and the vPMEM namespaces in the available hosts are used to perform a PMEM virtual machine creation operation.

S104:根据创建得到的PMEM虚拟机对可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,以对PMEM虚拟机和被占用vPMEM命名空间进行绑定。S104: Generate an NVDIMM tag according to the occupation result of the created PMEM virtual machine on the vPMEM namespace in the available host, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.

在创建得到PMEM虚拟机之后,根据创建得到的PMEM虚拟机对可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,如可以在创建得到的PMEM虚拟机的虚拟机xml文件中增加NVDIMM标签,从而通过生成的NVDIMM标签对PMEM虚拟机和被占用vPMEM命名空间进行绑定。从而方便用户通过查看NVDIMM标签,快速确定出哪些命名空间已经被使用,并快速确定出已使用的vPMEM命名空间对应的是哪个虚拟机,方便了PMEM持久化内存设备的使用和管理。After the PMEM virtual machine is created, an NVDIMM tag 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 tag can be added to the virtual machine 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 tag. This makes it convenient for users to quickly determine which namespaces have been used by checking the NVDIMM tag, and quickly determine which virtual machine the used vPMEM namespace corresponds to, which facilitates the use and management of PMEM persistent memory devices.

由上述技术方案可知,通过预先设置进行PMEM虚拟机创建所需的vPMEM命名空间的规则信息,当接收到PMEM虚拟机创建请求之后,根据解析得到的vPMEM命名空间规格信息进行可用主机的确定,当在可用主机的vPMEM命名空间中创建完成PMEM虚拟机之后,生成NVDIMM标签对PMEM虚拟机和被占用vPMEM命名空间进行绑定。通过根据vPMEM命名空间规格信息进行可用主机的选取,实现了对PMEM持久化内存设备更细粒度地使用,通过NVDIMM标签对PMEM虚拟机和被占用vPMEM命名空间进行绑定,便于查看PMEM虚拟机和vPMEM命名空间的绑定关系,方便了PMEM持久化内存设备的使用和管理。It can be seen from the above technical solution that by presetting the rule information of the vPMEM namespace required for creating a PMEM virtual machine, after receiving a PMEM virtual machine creation request, the available host is determined according to the vPMEM namespace specification information obtained by parsing, and after the PMEM virtual machine is created in the vPMEM namespace of the available host, an NVDIMM tag is generated to bind the PMEM virtual machine and the occupied vPMEM namespace. By selecting the available host according to the vPMEM namespace specification information, a more fine-grained use of the PMEM persistent memory device is achieved, and the PMEM virtual machine and the occupied vPMEM namespace are bound by the NVDIMM tag, which makes it easy to view the binding relationship between the PMEM virtual machine and the vPMEM namespace, and facilitates the use and management of the PMEM persistent memory device.

需要说明的是,基于上述实施例,本发明实施例还提供了相应的改进方案。在后续实施例中涉及与上述实施例中相同步骤或相应步骤之间可相互参考,相应的有益效果也可相互参照,在下文的改进实施例中不再一一赘述。It should be noted that, based on the above embodiment, the embodiment of the present invention also provides corresponding improved solutions. In the subsequent embodiments, the same steps or corresponding steps as those in the above embodiment can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be repeated one by one in the following improved embodiments.

参见图2,图2为本发明实施例中PMEM虚拟机的创建方法的另一种实施流程图,该方法可以包括以下步骤:Referring to FIG. 2 , FIG. 2 is another implementation flow chart of a method for creating a PMEM virtual machine in an embodiment of the present invention. The method may include the following steps:

S201:对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间名称和待创建的PMEM虚拟机的系统参数信息。S201: Parse the received PMEM virtual machine creation request to obtain the vPMEM namespace name and system parameter information of the PMEM virtual machine to be created.

当需要创建PMEM虚拟机,生成的PMEM虚拟机创建请求包含vPMEM命名空间名称和待创建的PMEM虚拟机的系统参数信息。通过对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间名称和待创建的PMEM虚拟机的系统参数信息。When a PMEM virtual machine needs to be created, the generated PMEM virtual machine creation request includes the vPMEM namespace name and the system parameter information of the PMEM virtual machine to be created. The vPMEM namespace name and the system parameter information of the PMEM virtual machine to be created are obtained by parsing the received PMEM virtual machine creation request.

S202:判断系统参数信息是否合法,若否,则执行步骤S203,若是,则执行步骤S204。S202: Determine whether the system parameter information is legal, if not, execute step S203, if yes, execute step S204.

预先根据系统物理硬件的真实参数信息,设置系统参数合法性校验标准,在解析得到待创建的PMEM虚拟机的系统参数信息之后,判断系统参数信息是否合法,若否,则说明当前需要创建的PMEM虚拟机的系统参数超出了系统的承受范围,执行步骤S203,若是,则说明要创建的PMEM虚拟机的系统参数在系统的承受范围之内,执行步骤S204。A system parameter validity check standard is set in advance according to the actual parameter information of the system physical hardware. After parsing the system parameter information of the PMEM virtual machine to be created, it is determined whether the system parameter information is legal. If not, it means that the system parameters of the PMEM virtual machine to be created currently exceed the tolerance range of the system, and step S203 is executed. If so, it means that the system parameters of the PMEM virtual machine to be created are within the tolerance range of the system, and step S204 is executed.

S203:输出系统参数信息不合法提示信息。S203: Outputting a prompt message indicating that the system parameter information is illegal.

当确定系统参数信息不合法时,说明当前需要创建的PMEM虚拟机的系统参数超出了系统的承受范围,输出系统参数信息不合法提示信息。从而提示虚拟机创建请求方本次虚拟机创建请求不合理,需要进行系统参数的调整。When it is determined that the system parameter information is illegal, it means that the system parameters of the PMEM virtual machine to be created currently exceed the tolerance of the system, and the system parameter information is illegal prompt information is output, thereby prompting the virtual machine creation requester that the virtual machine creation request is unreasonable and the system parameters need to be adjusted.

S204:根据vPMEM命名空间名称筛选各候选主机。S204: Filter candidate hosts according to the vPMEM namespace name.

当确定系统参数信息合法时,说明要创建的PMEM虚拟机的系统参数在系统的承受范围之内,根据vPMEM命名空间名称筛选各候选主机,候选主机一般包含多个。When it is determined that the system parameter information is legal, it means that the system parameters of the PMEM virtual machine to be created are within the tolerance range of the system. The candidate hosts are screened according to the vPMEM namespace name, and the candidate hosts generally include multiple ones.

S205:对各候选主机进行过滤操作,得到可用主机。S205: Filter each candidate host to obtain available hosts.

由于各候选主机可以由于当前服务状态或可用资源等情况处于不可用状态,因此在筛选得到各候选主机之后,对各候选主机进行过滤操作,得到可用主机。Since each candidate host may be in an unavailable state due to the current service state or available resources, after each candidate host is obtained through screening, a filtering operation is performed on each candidate host to obtain an available host.

在本发明的一种具体实施方式中,对各候选主机进行过滤操作,可以包括以下步骤:In a specific implementation of the present invention, filtering each candidate host may include the following steps:

步骤一:获取各候选主机分别对应的服务状态信息;Step 1: Obtain service status information corresponding to each candidate host;

步骤二:根据各服务状态信息对各候选主机进行过滤操作。Step 2: Filter each candidate host according to each service status information.

为方便描述,可以将上述两个步骤结合起来进行说明。For the convenience of description, the above two steps can be combined for explanation.

在筛选得到各候选主机之后,获取各候选主机分别对应的服务状态信息,从而根据服务状态信息可以获知各候选主机是否能够正常使用,根据各服务状态信息对各候选主机进行过滤操作。如当确定候选主机中存在处于宕机状态的主机之后,可以过滤掉处于宕机状态的候选主机,得到可用主机。After screening and obtaining each candidate host, the service status information corresponding to each candidate host is obtained, so that it can be known whether each candidate host can be used normally according to the service status information, and each candidate host is filtered according to the service status information. For example, after determining that there is a host in a downtime state among the candidate hosts, the candidate hosts in the downtime state can be filtered out to obtain available hosts.

在本发明的一种具体实施方式中,对各候选主机进行过滤操作,可以包括以下步骤:In a specific implementation of the present invention, filtering each candidate host may include the following steps:

步骤一:获取各候选主机分别对应的资源群集;Step 1: Obtain the resource cluster corresponding to each candidate host;

步骤二:根据各资源群集对各候选主机进行过滤操作。Step 2: Filter each candidate host according to each resource cluster.

在筛选得到各候选主机之后,获取各候选主机分别对应的资源群集,从而根据各候选主机分别对应的资源群集可以获知各候选主机是否能够正常使用,根据各资源群集对各候选主机进行过滤操作。如确定候选主机中存在处于可用资源集群较少的主机之后,可以过滤掉可用资源集群较少的候选主机,得到可用主机。After screening and obtaining each candidate host, the resource clusters corresponding to each candidate host are obtained, so that it can be known whether each candidate host can be used normally according to the resource clusters corresponding to each candidate host, and each candidate host is filtered according to each resource cluster. If it is determined that there are hosts with fewer available resource clusters among the candidate hosts, the candidate hosts with fewer available resource clusters can be filtered out to obtain available hosts.

S206:利用可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作。S206: Perform a PMEM virtual machine creation operation using the vPMEM namespace in the available host.

S207:根据创建得到的PMEM虚拟机对可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,以对PMEM虚拟机和被占用vPMEM命名空间进行绑定。S207: Generate an NVDIMM tag according to the occupation result of the created PMEM virtual machine on the vPMEM namespace in the available host, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.

S208:对PMEM虚拟机进行启动操作。S208: Start the PMEM virtual machine.

在对PMEM虚拟机创建完成之后,对PMEM虚拟机进行启动操作。After the PMEM virtual machine is created, the PMEM virtual machine is started.

S209:判断PMEM虚拟机是否启动成功,若是,则执行步骤S210,若否,则执行步骤S211。S209: Determine whether the PMEM virtual machine is started successfully, if so, execute step S210, if not, execute step S211.

判断PMEM虚拟机是否启动成功,若是,则说明PMEM虚拟机创建成功,执行步骤S210,若否,则说明PMEM虚拟机创建失败,执行步骤S211。Determine whether the PMEM virtual machine is started successfully. If so, it means that the PMEM virtual machine is created successfully, and step S210 is executed. If not, it means that the PMEM virtual machine is created unsuccessfully, and step S211 is executed.

S210:输出PMEM虚拟机启动成功提示信息。S210: Outputting a prompt message indicating that the PMEM virtual machine is successfully started.

当确定PMEM虚拟机启动成功时,说明PMEM虚拟机创建成功,输出PMEM虚拟机启动成功提示信息,从而提示虚拟机创建请求方本次虚拟机创建成功。When it is determined that the PMEM virtual machine is successfully started, it means that the PMEM virtual machine is successfully created, and a prompt message indicating that the PMEM virtual machine is successfully started is output, thereby prompting the virtual machine creation requester that the virtual machine is successfully created.

S211:输出PMEM虚拟机启动失败提示信息。S211: Outputting a prompt message indicating that the PMEM virtual machine fails to start.

当确定PMEM虚拟机启动失败时,说明PMEM虚拟机创建失败,输出PMEM虚拟机启动失败提示信息,从而提示虚拟机创建请求方本次虚拟机创建失败,以便虚拟机创建请求方采取相应的解决方案。When it is determined that the PMEM virtual machine startup fails, it indicates that the PMEM virtual machine creation fails, and a prompt message indicating that the PMEM virtual machine startup fails is output, thereby prompting the virtual machine creation requester that the virtual machine creation fails this time, so that the virtual machine creation requester can take corresponding solutions.

在一种具体实例应用中,预先将PMEM设备划分成一个个命名空间,命名空间内存大小可以相同,创建vPMEM命名空间,其创建过程如下:In a specific example application, the PMEM device is pre-divided into namespaces. The namespace memory sizes can be the same. The vPMEM namespace is created. The creation process is as follows:

#创建30G大小名字为ns3的命名空间#Create a namespace of 30G named ns3

ndctl create-namespace-s 30G-m devdax-M mem-n ns3ndctl create-namespace-s 30G-m devdax-M mem-n ns3

#展示所有命名空间#Show all namespaces

ndctl list–Xndctl list –X

在PMEM设备所在主机的nova-compute计算服务上配置vPMEM命名空间,没有配置的命名空间不会上报到资源管理系统中,不会被云平台使用。配置项如下:Configure the vPMEM namespace on the nova-compute computing service of the host where the PMEM device is located. Unconfigured namespaces will not be reported to the resource management system and will not be used by the cloud platform. The configuration items are as follows:

[libvirt][libvirt]

pmem_namespaces=ns0,ns1,ns2,ns3pmem_namespaces=ns0, ns1, ns2, ns3

重启nova-compute服务后,nova-compute自动发现vPMEM命名空间并上报到资源管理系统placement中。上报的数据如表1所示:After restarting the nova-compute service, nova-compute automatically discovers the vPMEM namespace and reports it to the resource management system placement. The reported data is shown in Table 1:

表1Table 1

设置云主机规格的属性,使用该云主机规格创建虚拟机。Set the properties of the cloud host specification and use the cloud host specification to create a virtual machine.

openstack flavor set--property hw:pmem='NS0,NS1'my_flavoropenstack flavor set--property hw:pmem='NS0,NS1'my_flavor

参见图3,图3为本发明实施例中PMEM虚拟机的创建方法的另一种实施流程图。其中:Referring to FIG. 3 , FIG. 3 is another implementation flow chart of the method for creating a PMEM virtual machine in an embodiment of the present invention.

Nova-应用程序编程接口(Nova-api):OpenStack中控制节点上为用户提供计算服务接口。Nova-Application Programming Interface (Nova-api): Provides computing service interfaces for users on control nodes in OpenStack.

Nova-管理器(Nova-conductor):OpenStack中控制节点上负责操作数据库的服务。Nova-conductor: A service on the control node in OpenStack that is responsible for operating the database.

Nova-调度器(Nova-scheduler):OpenStack中控制节点上通过多个过滤算法,最终调度出可用的计算节点供创建虚拟机使用。Nova-scheduler: In OpenStack, multiple filtering algorithms are used on the control node to finally schedule available computing nodes for creating virtual machines.

配置器(placement):资源管理服务,OpenStack中对CPU、Memory、Disk、GPU、vPMEM等资源的使用、维护、管理的服务。Placement: A resource management service that uses, maintains, and manages resources such as CPU, Memory, Disk, GPU, and vPMEM in OpenStack.

Nova-计算器(Nova-scheduler):OpenStack中启动虚拟机的计算节点服务。Nova-scheduler: A computing node service that starts virtual machines in OpenStack.

Libvirt:用于管理虚拟化平台的开源的API,后台程序和管理工具,用于管理KVM、Xen、VMware ESX,QEMU和其他虚拟化技术。Libvirt: An open source API, daemon, and management tool for managing virtualization platforms, used to manage KVM, Xen, VMware ESX, QEMU, and other virtualization technologies.

流程说明如下:The process is described as follows:

(1)首先用户发起创建vPMEM虚拟机请求,根据选择的云主机规格决定是否创建绑定vPMEM的虚拟机。(1) First, the user initiates a request to create a vPMEM virtual machine and decides whether to create a virtual machine bound to vPMEM based on the selected cloud host specifications.

(2)Nova api接收到请求,校验用户传递的参数合法性,然后下发创建请求到nova-conductor服务。(2) Nova API receives the request, verifies the validity of the parameters passed by the user, and then sends a creation request to the nova-conductor service.

(3)Nova conductor调用nova-scheduler筛选出创建PMEM虚拟机的主机。(3) Nova conductor calls nova-scheduler to filter out the hosts that create PMEM virtual machines.

(4)Nova scheduler首先根据规格信息查询资源管理服务获取满足vPMEM条件的候选主机,然后把带有vPMEM的候选主机经过服务状态、资源群集等过滤算法过滤后,最终返回可以创建虚拟机的目标主机。(4) Nova scheduler first queries the resource management service to obtain candidate hosts that meet the vPMEM conditions based on the specification information. It then filters the candidate hosts with vPMEM through filtering algorithms such as service status and resource clusters, and finally returns the target host where the virtual machine can be created.

(5)Nova conductor向目标主机nova-compute服务发送创建虚拟机请求。(5) Nova conductor sends a request to create a virtual machine to the nova-compute service on the target host.

(6)Nova compute从根据vPMEM命名空间,获取对应的align、size和devpath属性,生成LibvirtConfigGuestVPMEM对象,添加到虚拟机的设备中,最终在虚拟机xml增加NVDIMM标签,绑定vPMEM内存。(6) Nova compute obtains the corresponding align, size, and devpath attributes from the vPMEM namespace, generates a LibvirtConfigGuestVPMEM object, adds it to the virtual machine's device, and finally adds the NVDIMM tag to the virtual machine xml to bind the vPMEM memory.

(7)待虚拟机启动成功,nova-compute通知nova-api虚拟机成功启动,nova-api通知用户创建vPMEM虚拟机完成。(7) After the virtual machine is successfully started, nova-compute notifies nova-api that the virtual machine is successfully started, and nova-api notifies the user that the creation of the vPMEM virtual machine is complete.

相应于上面的方法实施例,本发明还提供了一种PMEM虚拟机的创建装置,下文描述的PMEM虚拟机的创建装置与上文描述的PMEM虚拟机的创建方法可相互对应参照。Corresponding to the above method embodiment, the present invention further provides a device for creating a PMEM virtual machine. The device for creating a PMEM virtual machine described below and the method for creating a PMEM virtual machine described above can refer to each other.

参见图4,图4为本发明实施例中一种PMEM虚拟机的创建装置的结构框图,该装置可以包括:Referring to FIG. 4 , FIG. 4 is a structural block diagram of a device for creating a PMEM virtual machine according to an embodiment of the present invention. The device may include:

请求解析模块41,用于对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息;A request parsing module 41 is used to parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information;

主机筛选模块42,用于根据vPMEM命名空间规格信息筛选得到可用主机;A host screening module 42, configured to screen available hosts according to the vPMEM namespace specification information;

虚拟机创建模块43,用于利用可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作;A virtual machine creation module 43, configured to perform a PMEM virtual machine creation operation using a vPMEM namespace in an available host;

标签生成模块44,用于根据创建得到的PMEM虚拟机对可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,以对PMEM虚拟机和被占用vPMEM命名空间进行绑定。The label generation module 44 is used to generate an NVDIMM label according to the occupation result of the created PMEM virtual machine on the vPMEM namespace in the available host, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.

由上述技术方案可知,通过预先设置进行PMEM虚拟机创建所需的vPMEM命名空间的规则信息,当接收到PMEM虚拟机创建请求之后,根据解析得到的vPMEM命名空间规格信息进行可用主机的确定,当在可用主机的vPMEM命名空间中创建完成PMEM虚拟机之后,生成NVDIMM标签对PMEM虚拟机和被占用vPMEM命名空间进行绑定。通过根据vPMEM命名空间规格信息进行可用主机的选取,实现了对PMEM持久化内存设备更细粒度地使用,通过NVDIMM标签对PMEM虚拟机和被占用vPMEM命名空间进行绑定,便于查看PMEM虚拟机和vPMEM命名空间的绑定关系,方便了PMEM持久化内存设备的使用和管理。It can be seen from the above technical solution that by presetting the rule information of the vPMEM namespace required for creating a PMEM virtual machine, after receiving a PMEM virtual machine creation request, the available host is determined according to the vPMEM namespace specification information obtained by parsing, and after the PMEM virtual machine is created in the vPMEM namespace of the available host, an NVDIMM tag is generated to bind the PMEM virtual machine and the occupied vPMEM namespace. By selecting the available host according to the vPMEM namespace specification information, a more fine-grained use of the PMEM persistent memory device is achieved, and the PMEM virtual machine and the occupied vPMEM namespace are bound by the NVDIMM tag, which makes it easy to view the binding relationship between the PMEM virtual machine and the vPMEM namespace, and facilitates the use and management of the PMEM persistent memory device.

在本发明的一种具体实施方式中,请求解析模块41具体为对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间名称的模块;In a specific implementation of the present invention, the request parsing module 41 is specifically a module that parses the received PMEM virtual machine creation request to obtain the vPMEM namespace name;

主机筛选模块42具体为根据vPMEM命名空间名称筛选得到可用主机的模块。The host screening module 42 is specifically a module for screening available hosts according to the vPMEM namespace name.

在本发明的一种具体实施方式中,主机筛选模块42包括:In a specific embodiment of the present invention, the host screening module 42 includes:

候选主机筛选子模块,用于根据vPMEM命名空间规格信息筛选各候选主机;A candidate host screening submodule is used to screen candidate hosts according to vPMEM namespace specification information;

可用主机筛选子模块,用于对各候选主机进行过滤操作,得到可用主机。The available host screening submodule is used to filter each candidate host to obtain available hosts.

在本发明的一种具体实施方式中,可用主机筛选子模块包括:In a specific embodiment of the present invention, the available host screening submodule includes:

服务状态获取单元,用于获取各候选主机分别对应的服务状态信息;A service status acquisition unit, used to acquire service status information corresponding to each candidate host;

第一可用主机筛选单元,用于根据各服务状态信息对各候选主机进行过滤操作。The first available host screening unit is used to perform a screening operation on each candidate host according to each service status information.

在本发明的一种具体实施方式中,可用主机筛选子模块包括:In a specific embodiment of the present invention, the available host screening submodule includes:

资源集群获取单元,用于获取各候选主机分别对应的资源群集;A resource cluster acquisition unit, used to acquire resource clusters corresponding to each candidate host;

第二可用主机筛选单元,用于根据各资源群集对各候选主机进行过滤操作。The second available host screening unit is used to perform a screening operation on each candidate host according to each resource cluster.

在本发明的一种具体实施方式中,该装置还可以包括:In a specific embodiment of the present invention, the device may further include:

虚拟机启动模块,用于在对PMEM虚拟机和被占用vPMEM命名空间进行绑定之后,对PMEM虚拟机进行启动操作;A virtual machine startup module is used to start the PMEM virtual machine after binding the PMEM virtual machine to the occupied vPMEM namespace;

启动结果判断模块,用于判断PMEM虚拟机是否启动成功;The startup result judgment module is used to judge whether the PMEM virtual machine is successfully started;

启动成功提示模块,用于当PMEM虚拟机启动成功时,输出PMEM虚拟机启动成功提示信息。The startup success prompt module is used to output a PMEM virtual machine startup success prompt message when the PMEM virtual machine is successfully started.

在本发明的一种具体实施方式中,请求解析模块41具体为对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息和待创建的PMEM虚拟机的系统参数信息的模块;In a specific embodiment of the present invention, the request parsing module 41 is specifically a module that parses the received PMEM virtual machine creation request to obtain vPMEM namespace specification information and system parameter information of the PMEM virtual machine to be created;

该装置还可以包括:The device may also include:

参数合法性判断模块,用于判断系统参数信息是否合法;Parameter legality judgment module, used to judge whether the system parameter information is legal;

主机筛选模块42具体为当确定系统参数信息合法时,根据vPMEM命名空间规格信息筛选得到可用主机的模块。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.

相应于上面的方法实施例,参见图5,图5为本发明所提供的PMEM虚拟机的创建设备的示意图,该设备可以包括: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, and the device may include:

存储器332,用于存储计算机程序;A memory 332, for storing computer programs;

处理器322,用于执行计算机程序时实现上述方法实施例的PMEM虚拟机的创建方法的步骤。The processor 322 is configured to implement the steps of the method for creating a PMEM virtual machine in the above method embodiment when executing a computer program.

具体的,请参考图6,图6为本实施例提供的一种PMEM虚拟机的创建设备的具体结构示意图,该PMEM虚拟机的创建设备可因配置或性能不同而产生比较大的差异,可以包括处理器(central processing units,CPU)322(例如,一个或一个以上处理器)和存储器332,存储器332存储有一个或一个以上的计算机应用程序342或数据344。其中,存储器332可以是短暂存储或持久存储。存储在存储器332的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对数据处理设备中的一系列指令操作。更进一步地,处理器322可以设置为与存储器332通信,在PMEM虚拟机的创建设备301上执行存储器332中的一系列指令操作。Specifically, please refer to FIG. 6 , which is a schematic diagram of a specific structure of a device for creating a PMEM virtual machine provided in this embodiment. The device for creating the PMEM virtual machine may have relatively large differences due to different configurations or performances, and may include a processor (central processing units, CPU) 322 (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer applications 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 may be configured to communicate with the memory 332, and execute a series of instruction operations in the memory 332 on the device 301 for creating the PMEM virtual machine.

PMEM虚拟机的创建设备301还可以包括一个或一个以上电源326,一个或一个以上有线或无线网络接口350,一个或一个以上输入输出接口358,和/或,一个或一个以上操作系统341。The PMEM virtual machine creation device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and/or one or more operating systems 341 .

上文所描述的PMEM虚拟机的创建方法中的步骤可以由PMEM虚拟机的创建设备的结构实现。The steps in the method for creating a PMEM virtual machine described above may be implemented by the structure of a device for creating a PMEM virtual machine.

相应于上面的方法实施例,本发明还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时可实现如下步骤:Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:

对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息;根据vPMEM命名空间规格信息筛选得到可用主机;利用可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作;根据创建得到的PMEM虚拟机对可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,以对PMEM虚拟机和被占用vPMEM命名空间进行绑定。The received PMEM virtual machine creation request is parsed to obtain vPMEM namespace specification information; available hosts are screened according to the vPMEM namespace specification information; the vPMEM namespace in the available hosts is used to perform the PMEM virtual machine creation operation; and an NVDIMM tag is generated according to the occupation result of the created PMEM virtual machine on the vPMEM namespace in the available hosts, so as to bind the PMEM virtual machine and the occupied vPMEM namespace.

该计算机可读存储介质可以包括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

对于本发明提供的计算机可读存储介质的介绍请参照上述方法实施例,本发明在此不做赘述。For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not be elaborated here.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置、设备及计算机可读存储介质而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the devices, equipment and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.

本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的技术方案及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the technical solution and core ideas of the present invention. It should be pointed out that for ordinary technicians in this technical field, the present invention can also be improved and modified without departing from the principles of the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims (8)

1.一种PMEM虚拟机的创建方法,其特征在于,包括:1. A method for creating a PMEM virtual machine, comprising: 对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息;Parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information; 根据所述vPMEM命名空间规格信息筛选各候选主机;Filter each candidate host according to the vPMEM namespace specification information; 获取各所述候选主机分别对应的服务状态信息;Obtaining service status information corresponding to each of the candidate hosts; 根据各所述服务状态信息对各所述候选主机进行过滤操作,得到可用主机;Filtering each candidate host according to each service status information to obtain an available host; 利用所述可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作;Performing a PMEM virtual machine creation operation using the vPMEM namespace in the available host; 根据创建得到的PMEM虚拟机对所述可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,以对所述PMEM虚拟机和被占用vPMEM命名空间进行绑定。An NVDIMM tag is generated according to the occupation result of the created 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.根据权利要求1所述的PMEM虚拟机的创建方法,其特征在于,对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息,包括:2. The method for creating a PMEM virtual machine according to claim 1, wherein the received PMEM virtual machine creation request is parsed to obtain vPMEM namespace specification information, including: 对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间名称;Parse the received PMEM virtual machine creation request to obtain the vPMEM namespace name; 根据所述vPMEM命名空间规格信息筛选得到可用主机,包括:Available hosts are obtained by filtering according to the vPMEM namespace specification information, including: 根据所述vPMEM命名空间名称筛选得到可用主机。Available hosts are obtained by filtering according to the vPMEM namespace name. 3.根据权利要求1或2所述的PMEM虚拟机的创建方法,其特征在于,对各所述候选主机进行过滤操作,包括:3. The method for creating a PMEM virtual machine according to claim 1 or 2, characterized in that filtering each of the candidate hosts comprises: 获取各所述候选主机分别对应的资源群集;Obtain resource clusters corresponding to each of the candidate hosts; 根据各所述资源群集对各所述候选主机进行过滤操作。A filtering operation is performed on each of the candidate hosts according to each of the resource clusters. 4.根据权利要求1所述的PMEM虚拟机的创建方法,其特征在于,在对所述PMEM虚拟机和被占用vPMEM命名空间进行绑定之后,还包括:4. The method for creating a PMEM virtual machine according to claim 1, characterized in that after binding the PMEM virtual machine and the occupied vPMEM namespace, it also includes: 对所述PMEM虚拟机进行启动操作;Starting the PMEM virtual machine; 判断所述PMEM虚拟机是否启动成功;Determine whether the PMEM virtual machine is started successfully; 若是,则输出PMEM虚拟机启动成功提示信息。If yes, the PMEM virtual machine startup success prompt message is output. 5.根据权利要求1所述的PMEM虚拟机的创建方法,其特征在于,对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息,包括:5. The method for creating a PMEM virtual machine according to claim 1, wherein the received PMEM virtual machine creation request is parsed to obtain vPMEM namespace specification information, including: 对接收到的PMEM虚拟机创建请求进行解析,得到所述vPMEM命名空间规格信息和待创建的PMEM虚拟机的系统参数信息;Parsing 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; 在根据所述vPMEM命名空间规格信息筛选得到可用主机之前,还包括:Before obtaining available hosts by screening according to the vPMEM namespace specification information, the method further includes: 判断所述系统参数信息是否合法;Determining whether the system parameter information is legal; 若是,则执行所述根据所述vPMEM命名空间规格信息筛选得到可用主机的步骤。If yes, the step of filtering and obtaining available hosts according to the vPMEM namespace specification information is performed. 6.一种PMEM虚拟机的创建装置,其特征在于,包括:6. A device for creating a PMEM virtual machine, comprising: 请求解析模块,用于对接收到的PMEM虚拟机创建请求进行解析,得到vPMEM命名空间规格信息;A request parsing module is used to parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information; 主机筛选模块,主机筛选模块包括:Host screening module, the host screening module includes: 候选主机筛选子模块,用于根据vPMEM命名空间规格信息筛选各候选主机;A candidate host screening submodule is used to screen candidate hosts according to vPMEM namespace specification information; 可用主机筛选子模块,可用主机筛选子模块包括:Available host filtering submodule, available host filtering submodule includes: 服务状态获取单元,用于获取各候选主机分别对应的服务状态信息;A service status acquisition unit, used to acquire service status information corresponding to each candidate host; 第一可用主机筛选单元,用于根据各服务状态信息对各候选主机进行过滤操作,得到可用主机;A first available host screening unit is used to filter each candidate host according to each service status information to obtain an available host; 虚拟机创建模块,用于利用所述可用主机中的vPMEM命名空间进行PMEM虚拟机创建操作;A virtual machine creation module, used to perform a PMEM virtual machine creation operation using the vPMEM namespace in the available host; 标签生成模块,用于根据创建得到的PMEM虚拟机对所述可用主机中vPMEM命名空间的占用结果生成NVDIMM标签,以对所述PMEM虚拟机和被占用vPMEM命名空间进行绑定。The label generation module is used to generate an NVDIMM label according to the occupation result of the created PMEM virtual machine on the vPMEM namespace in the available host, so as to bind the PMEM virtual machine and the occupied vPMEM namespace. 7.一种PMEM虚拟机的创建设备,其特征在于,包括:7. A device for creating a PMEM virtual machine, comprising: 存储器,用于存储计算机程序;Memory for storing computer programs; 处理器,用于执行所述计算机程序时实现如权利要求1至5任一项所述PMEM虚拟机的创建方法的步骤。A processor, configured to implement the steps of the method for creating a PMEM virtual machine according to any one of claims 1 to 5 when executing the computer program. 8.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述PMEM虚拟机的创建方法的步骤。8. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for creating a PMEM virtual machine according to any one of claims 1 to 5 are implemented.
CN202110836590.1A 2021-07-23 2021-07-23 Method, device and equipment for creating PMEM virtual machine and readable storage medium Active CN113687908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110836590.1A CN113687908B (en) 2021-07-23 2021-07-23 Method, device and equipment for creating PMEM virtual machine and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110836590.1A CN113687908B (en) 2021-07-23 2021-07-23 Method, device and equipment for creating PMEM virtual machine and readable storage medium

Publications (2)

Publication Number Publication Date
CN113687908A CN113687908A (en) 2021-11-23
CN113687908B true CN113687908B (en) 2024-10-29

Family

ID=78577945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110836590.1A Active CN113687908B (en) 2021-07-23 2021-07-23 Method, device and equipment for creating PMEM virtual machine and readable storage medium

Country Status (1)

Country Link
CN (1) CN113687908B (en)

Families Citing this family (1)

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

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107592225A (en) * 2017-09-13 2018-01-16 国云科技股份有限公司 A system and method for integrating physical machines, virtual machines, and container network settings
CN108200038A (en) * 2017-12-28 2018-06-22 山东浪潮云服务信息科技有限公司 A kind of secure virtual machine means of defence, device, readable medium and storage control

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8392361B2 (en) * 2008-08-11 2013-03-05 Vmware, Inc. Centralized management of virtual machines
US10782993B2 (en) * 2017-10-13 2020-09-22 Dell Products L.P. Systems and methods for secure runtime dynamic resizing of memory namespaces
CN111858509B (en) * 2020-07-06 2022-11-25 苏州浪潮智能科技有限公司 Distributed computing method and device based on container

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107592225A (en) * 2017-09-13 2018-01-16 国云科技股份有限公司 A system and method for integrating physical machines, virtual machines, and container network settings
CN108200038A (en) * 2017-12-28 2018-06-22 山东浪潮云服务信息科技有限公司 A kind of secure virtual machine means of defence, device, readable medium and storage control

Also Published As

Publication number Publication date
CN113687908A (en) 2021-11-23

Similar Documents

Publication Publication Date Title
CN102222042B (en) Automatic software testing method based on cloud computing
WO2019184164A1 (en) Method for automatically deploying kubernetes worker node, device, terminal apparatus, and readable storage medium
CN105468362A (en) Application deployment method and cloud computing system
EP3287897B1 (en) Hardware acceleration method and relevant device
CN108809683B (en) Method and device for deploying cloud application system
CN111143023B (en) Resource changing method and device, equipment and storage medium
CN113886012B (en) Method, device and equipment for automatically selecting virtual machine thermomigration acceleration scheme
CN112306719A (en) Task scheduling method and device
CN108234551B (en) Data processing method and device
CN115658185B (en) Method, device, storage medium and electronic device for quick start of cloud application
CN113687908B (en) Method, device and equipment for creating PMEM virtual machine and readable storage medium
EP3358795B1 (en) Method and apparatus for allocating a virtual resource in network functions virtualization (nfv) network
CN104702534A (en) Method and device for processing data of multi-process sharing port
CN105933136B (en) A kind of resource regulating method and system
CN116048825A (en) Container cluster construction method and system
CN111131440B (en) Resource scheduling method and device and server
CN115658184B (en) Method and device for quickly starting cloud application, storage medium and electronic equipment
CN116112497B (en) Node scheduling method, device, equipment and medium of cloud host cluster
CN107479837A (en) The method and apparatus of virtual machine dilatation in cloud data system
WO2021120841A1 (en) Method, apparatus, and device for creating virtual machine and allocating cpu resources
CN110321132B (en) Code release method and device
CN113094167A (en) Cloud computing resource processing method, device, equipment and storage medium
CN116089020B (en) Virtual machine operation method, capacity expansion method and capacity expansion system
CN117492958B (en) Thread information adjustment method and device and electronic equipment
CN111399969B (en) Virtual resource arranging system, method, device, medium and equipment

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
GR01 Patent grant
GR01 Patent grant