PMEM virtual machine creation method, device, equipment and readable storage medium
By parsing the PMEM virtual machine creation request and generating an NVDIMM label to bind the PMEM virtual machine and the vPMEM namespace, the problem of being unable to determine the namespace usage in the existing technology is solved, and efficient management and use of PMEM equipment is achieved.
Patent Information
- Application Number
- CN202110836590.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-23
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-07-23
AI Technical Summary
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, resulting in inconvenient PMEM device management.
Obtain the vPMEM namespace specification information by parsing the PMEM virtual machine creation request, filter out the available hosts, use the vPMEM namespace in the available hosts to create the PMEM virtual machine, and generate an NVDIMM label to bind the PMEM virtual machine and the occupied vPMEM namespace to achieve alignment. Fine-grained usage and management of PMEM persistent memory devices.
It enables more fine-grained use and management of PMEM persistent memory devices, making it easy to view the usage and binding relationships of namespaces, and improving the efficiency of PMEM device usage and management.
Smart Images

Figure CN113687908B_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] 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.
[0003] 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.
[0004] 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
[0005] 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.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] A method for creating a PMEM virtual machine, comprising:
[0008] Parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information;
[0009] Filter and obtain available hosts according to the vPMEM namespace specification information;
[0010] Performing a PMEM virtual machine creation operation using the vPMEM namespace in the available host;
[0011] 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.
[0012] In a specific implementation of the present invention, the received PMEM virtual machine creation request is parsed to obtain vPMEM namespace specification information, including:
[0013] Parse the received PMEM virtual machine creation request to obtain the vPMEM namespace name;
[0014] Available hosts are obtained by filtering according to the vPMEM namespace specification information, including:
[0015] Available hosts are obtained by filtering according to the vPMEM namespace name.
[0016] In a specific implementation of the present invention, filtering and obtaining available hosts according to the vPMEM namespace specification information includes:
[0017] Filter each candidate host according to the vPMEM namespace specification information;
[0018] A filtering operation is performed on each of the candidate hosts to obtain the available hosts.
[0019] In a specific implementation of the present invention, filtering each candidate host includes:
[0020] Obtaining service status information corresponding to each of the candidate hosts;
[0021] A filtering operation is performed on each candidate host according to each service status information.
[0022] In a specific implementation of the present invention, filtering each candidate host includes:
[0023] Obtain resource clusters corresponding to each of the candidate hosts;
[0024] A filtering operation is performed on each of the candidate hosts according to each of the resource clusters.
[0025] In a specific implementation of the present invention, after binding the PMEM virtual machine and the occupied vPMEM namespace, the method further includes:
[0026] Starting the PMEM virtual machine;
[0027] Determine whether the PMEM virtual machine is started successfully;
[0028] If yes, the PMEM virtual machine startup success prompt message is output.
[0029] In a specific implementation of the present invention, the received PMEM virtual machine creation request is parsed to obtain vPMEM namespace specification information, including:
[0030] 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;
[0031] Before obtaining available hosts by screening according to the vPMEM namespace specification information, the method further includes:
[0032] Determining whether the system parameter information is legal;
[0033] If yes, the step of filtering and obtaining available hosts according to the vPMEM namespace specification information is performed.
[0034] A device for creating a PMEM virtual machine, comprising:
[0035] A request parsing module is used to parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information;
[0036] A host screening module, used for screening available hosts according to the vPMEM namespace specification information;
[0037] A virtual machine creation module, used to perform a PMEM virtual machine creation operation using the vPMEM namespace in the available host;
[0038] 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.
[0039] A device for creating a PMEM virtual machine, comprising:
[0040] Memory for storing computer programs;
[0041] 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.
[0042] 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.
[0043] 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.
[0044] 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.
[0045] 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
[0046] 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.
[0047] Figure 1 A flowchart of a method for creating a PMEM virtual machine in an embodiment of the present invention;
[0048] Figure 2 Another implementation flow chart of the method for creating a PMEM virtual machine in an embodiment of the present invention;
[0049] Figure 3 Another implementation flow chart of the method for creating a PMEM virtual machine in an embodiment of the present invention;
[0050] Figure 4 A structural block diagram of a device for creating a PMEM virtual machine in an embodiment of the present invention;
[0051] Figure 5 A structural block diagram of a device for creating a PMEM virtual machine in an embodiment of the present invention;
[0052] Figure 6 A schematic diagram of the specific structure of a device for creating a PMEM virtual machine provided in this embodiment. DETAILED DESCRIPTION
[0053] 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.
[0054] See also Figure 1 , Figure 1 This is a flow chart of an implementation of a method for creating a PMEM virtual machine in an embodiment of the present invention. The method may include the following steps:
[0055] S101: Parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information.
[0056] 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.
[0057] S102: Filter and obtain available hosts according to the vPMEM namespace specification information.
[0058] 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.
[0059] S103: Perform a PMEM virtual machine creation operation using the vPMEM namespace in the available host.
[0060] 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.
[0061] 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.
[0062] 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.
[0063] 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.
[0064] 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.
[0065] See also Figure 2 , Figure 2 Another implementation flow chart of the method for creating a PMEM virtual machine in an embodiment of the present invention, the method may include the following steps:
[0066] 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.
[0067] 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.
[0068] S202: Determine whether the system parameter information is legal, if not, execute step S203, if yes, execute step S204.
[0069] 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.
[0070] S203: Outputting a prompt message indicating that the system parameter information is illegal.
[0071] 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.
[0072] S204: Filter candidate hosts according to the vPMEM namespace name.
[0073] 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.
[0074] S205: Filter each candidate host to obtain available hosts.
[0075] 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.
[0076] In a specific implementation of the present invention, filtering each candidate host may include the following steps:
[0077] Step 1: Obtain service status information corresponding to each candidate host;
[0078] Step 2: Filter each candidate host according to each service status information.
[0079] For the convenience of description, the above two steps can be combined for explanation.
[0080] 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.
[0081] In a specific implementation of the present invention, filtering each candidate host may include the following steps:
[0082] Step 1: Obtain the resource cluster corresponding to each candidate host;
[0083] Step 2: Filter each candidate host according to each resource cluster.
[0084] 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.
[0085] S206: Perform a PMEM virtual machine creation operation using the vPMEM namespace in the available host.
[0086] 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.
[0087] S208: Start the PMEM virtual machine.
[0088] After the PMEM virtual machine is created, the PMEM virtual machine is started.
[0089] S209: Determine whether the PMEM virtual machine is started successfully, if so, execute step S210, if not, execute step S211.
[0090] 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.
[0091] S210: Outputting a prompt message indicating that the PMEM virtual machine is successfully started.
[0092] 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.
[0093] S211: Outputting a prompt message indicating that the PMEM virtual machine fails to start.
[0094] 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.
[0095] 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:
[0096] #Create a namespace of 30G named ns3
[0097] ndctl create-namespace-s 30G-m devdax-M mem-n ns3
[0098] #Show all namespaces
[0099] ndctl list –X
[0100] 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:
[0101] [libvirt]
[0102] pmem_namespaces=ns0, ns1, ns2, ns3
[0103] 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:
[0104] Table 1
[0105]
[0106] Set the properties of the cloud host specification and use the cloud host specification to create a virtual machine.
[0107] openstack flavor set--property hw:pmem='NS0,NS1'my_flavor
[0108] See also Figure 3 , Figure 3 FIG. 1 is another implementation flow chart of a method for creating a PMEM virtual machine in an embodiment of the present invention.
[0109] Nova-Application Programming Interface (Nova-api): Provides computing service interfaces for users on control nodes in OpenStack.
[0110] Nova-conductor: A service on the control node in OpenStack that is responsible for operating the database.
[0111] Nova-scheduler: In OpenStack, multiple filtering algorithms are used on the control node to finally schedule available computing nodes for creating virtual machines.
[0112] Placement: A resource management service that uses, maintains, and manages resources such as CPU, Memory, Disk, GPU, and vPMEM in OpenStack.
[0113] Nova-scheduler: A computing node service that starts virtual machines in OpenStack.
[0114] 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.
[0115] The process is described as follows:
[0116] (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.
[0117] (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.
[0118] (3) Nova conductor calls nova-scheduler to filter out the hosts that create PMEM virtual machines.
[0119] (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.
[0120] (5) Nova conductor sends a request to create a virtual machine to the nova-compute service on the target host.
[0121] (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.
[0122] (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.
[0123] 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.
[0124] See also Figure 4 , Figure 4 The structure block diagram of a device for creating a PMEM virtual machine in an embodiment of the present invention may include:
[0125] A request parsing module 41 is used to parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information;
[0126] A host screening module 42, configured to screen available hosts according to the vPMEM namespace specification information;
[0127] A virtual machine creation module 43, configured to perform a PMEM virtual machine creation operation using a vPMEM namespace in an available host;
[0128] 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.
[0129] 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.
[0130] 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;
[0131] The host screening module 42 is specifically a module for screening available hosts according to the vPMEM namespace name.
[0132] In a specific embodiment of the present invention, the host screening module 42 includes:
[0133] A candidate host screening submodule is used to screen candidate hosts according to vPMEM namespace specification information;
[0134] The available host screening submodule is used to filter each candidate host to obtain available hosts.
[0135] In a specific embodiment of the present invention, the available host screening submodule includes:
[0136] A service status acquisition unit, used to acquire service status information corresponding to each candidate host;
[0137] The first available host screening unit is used to perform a screening operation on each candidate host according to each service status information.
[0138] In a specific embodiment of the present invention, the available host screening submodule includes:
[0139] A resource cluster acquisition unit, used to acquire resource clusters corresponding to each candidate host;
[0140] The second available host screening unit is used to perform a screening operation on each candidate host according to each resource cluster.
[0141] In a specific embodiment of the present invention, the device may further include:
[0142] A virtual machine startup module is used to start the PMEM virtual machine after binding the PMEM virtual machine to the occupied vPMEM namespace;
[0143] The startup result judgment module is used to judge whether the PMEM virtual machine is successfully started;
[0144] 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.
[0145] 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;
[0146] The device may also include:
[0147] Parameter legality judgment module, used to judge whether the system parameter information is legal;
[0148] 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.
[0149] Corresponding to the above method embodiment, see Figure 5 , Figure 5 A schematic diagram of a device for creating a PMEM virtual machine provided by the present invention, the device may include:
[0150] A memory 332, for storing computer programs;
[0151] 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.
[0152] For details, please refer to Figure 6 , Figure 6A schematic diagram of the 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 can 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.
[0153] 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 .
[0154] 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.
[0155] 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:
[0156] 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.
[0157] 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.
[0158] 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.
[0159] 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.
[0160] 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
1. A method for creating a PMEM virtual machine, characterized in that: include: Parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information; 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; Performing a PMEM virtual machine creation operation using the vPMEM namespace in the available host; 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. The method for creating a PMEM virtual machine according to claim 1, characterized in that: Parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information, including: Parse the received PMEM virtual machine creation request to obtain the vPMEM namespace name; Available hosts are obtained by filtering according to the vPMEM namespace specification information, including: Available hosts are obtained by filtering according to the vPMEM namespace name.
3. The method for creating a PMEM virtual machine according to claim 1 or 2, characterized in that: Performing a filtering operation on 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.
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, the method further includes: Starting the PMEM virtual machine; Determine whether the PMEM virtual machine is started successfully; If yes, the PMEM virtual machine startup success prompt message is output.
5. The method for creating a PMEM virtual machine according to claim 1, characterized in that: Parse the received PMEM virtual machine creation request to obtain vPMEM namespace specification information, including: 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; 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; If yes, the step of filtering and obtaining available hosts according to the vPMEM namespace specification information is performed.
6. A device for creating a PMEM virtual machine, characterized in that: include: 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: 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; A virtual machine creation module, used to perform a PMEM virtual machine creation operation using the vPMEM namespace in the available host; 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. A device for creating a PMEM virtual machine, characterized in that: include: Memory for storing computer programs; 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. A computer-readable storage medium, characterized in that: The 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 according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
System for merging physical machine, virtual machine and container network settings and method
CN107592225A
Virtual machine security protection method and apparatus, readable medium, and storage controller
CN108200038A
