CN114780038A - Virtual machine storage allocation method and related components - Google Patents

Virtual machine storage allocation method and related components Download PDF

Info

Publication number
CN114780038A
CN114780038A CN202210469705.2A CN202210469705A CN114780038A CN 114780038 A CN114780038 A CN 114780038A CN 202210469705 A CN202210469705 A CN 202210469705A CN 114780038 A CN114780038 A CN 114780038A
Authority
CN
China
Prior art keywords
virtual machine
physical host
computer
nova
logical volume
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210469705.2A
Other languages
Chinese (zh)
Inventor
焦浩霖
马豹
亓开元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202210469705.2A priority Critical patent/CN114780038A/en
Publication of CN114780038A publication Critical patent/CN114780038A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0626Reducing size or complexity of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0664Virtualisation aspects at device level, e.g. emulation of a storage device or system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a virtual machine storage allocation method and related components, and relates to the technical field of cloud computing. It can be seen that aiming at that the sender-Volume and the Nova computer are on the same physical host, the cost is lower without using a third-party storage device, the virtual machine can directly use the first logic Volume without maintaining an additional communication network, and the storage resources of the physical host where the Nova computer is located are fully utilized; and the first logical volume is used without depending on iSCSI technology, so that an OpenStack architecture is simplified, the communication time between the virtual machine and the first logical volume is reduced, and the data transmission performance is ensured.

Description

Virtual machine storage allocation method and related components
Technical Field
The invention relates to the technical field of cloud computing, in particular to a virtual machine storage allocation method and related components.
Background
The OpenStack open source project comprises a computing node Nova computer and a storage node circular-Volume, and the Nova computer is in communication connection with the circular-Volume. Nova computer can establish a virtual machine on a physical host where Nova computer is located, and when a newly created virtual machine is allocated with storage resources needed by the newly created virtual machine, two ways are generally adopted in the prior art:
the first mode is that the third-party storage device is independent except the physical machine where the two nodes are located, and the third-party storage device is in communication connection with the circle-Volume, so that the Nova computer sends the requirement for obtaining the storage resource to the circle-Volume, the circle-Volume replies the Nova computer after processing, and the Nova computer realizes the purpose of mounting the third-party storage device to the newly created virtual machine, and then the virtual machine can use the third-party storage device for data storage only by depending on an independent communication network such as an FC network or an iSCSI network because the storage resource is the third-party storage device.
However, the above method has the following problems: firstly, after the third-party storage device is mounted to the Nova computer, the reliable connection of an independent communication network between the third-party storage device and the Nova computer is required to be maintained all the time; and the communication connection between the third-party storage equipment and the folder-Volume is always ensured so as to be used for the functions of creating, backing up, migrating and the like of the mirror image Volume; secondly, the purchase of a third-party storage device requires the payment of expensive fees and the separate maintenance of the storage device; finally, the storage resources included in the physical host where Nova computer is located are probably not fully applied, which causes resource waste;
the second mode is that an iSCSI-target is established on a renderer-Volume by depending on an iSCSI technology, an iSCSI-initiator is established on a Nova computer, and after the iSCSI-target and the iSCSI-initiator are in communication connection, the fact that the renderer-Volume is allocated to storage resources of a virtual machine can be mounted to the virtual machine. However, the above-mentioned method has problems that even if the sender-Volume and Nova computer are on one physical host, the virtual machine must perform the transmission process such as encapsulation and unpacking through the iSCSI-target and iSCSI-initiator every time the mounted storage resource is used, and the network transmission and the operations such as encapsulation and unpacking require much time, which results in long communication time and poor transmission performance.
Therefore, how to find an effective virtual machine storage allocation method is a problem to be solved urgently at present.
Disclosure of Invention
The invention aims to provide a virtual machine storage allocation method and related components, on one hand, third-party storage equipment is not needed, the cost is lower, an additional independent communication network is not needed to be maintained, and the storage resources of a physical host where a Nova computer is located are fully utilized; on the other hand, the virtual machine can directly use the first logic volume without depending on the iSCSI technology, so that the OpenStack architecture is simplified, and the data transmission performance is ensured.
In order to solve the above technical problem, the present invention provides a virtual machine storage allocation method, which is applied to a processor in a physical host, and the virtual machine storage allocation method includes:
calling circle-Volume to execute the following steps:
when request information which is sent by Nova computer and used for requesting storage resources for a newly created virtual machine is received, judging whether a physical host where the Nova computer is located and a physical host where the Nova computer is located are the same physical host according to the request information;
if yes, determining first response information related to a first logic volume distributed for the virtual machine according to local volume group information to be distributed, which is pre-established by the virtual machine;
and sending the first response information to the Nova computer, so that the Nova computer mounts the first logical volume to the virtual machine according to the first response information.
Preferably, the request information includes an IP of a physical host where the Nova computer is located and authentication information for authenticating with the sender-Volume;
determining that the physical host where the Nova computer is located and the physical host where the Nova computer is located are the same physical host according to the request information, including:
judging whether the physical host where the Nova computer is located has the authority of establishing communication with the physical host according to the authentication information;
if yes, acquiring the IP of the physical host where the host is located;
and when the IP of the physical host where the Nova computer is located is determined to be the same as the IP of the physical host where the Nova computer is located, determining that the IP of the physical host where the Nova computer is located and the physical host where the Nova computer is located are the same physical host.
Preferably, the request information is obtained by calling an OS-quick function to the Nova computer.
Preferably, the first reply information includes an access path allocated to a first logical volume of the virtual machine and a local identifier for characterizing a storage resource type to which the first logical volume belongs;
the mounting, by the Nova computer, the first logical volume to the virtual machine according to the first response information includes:
and when the Nova computer determines that a first logical volume allocated to the virtual machine is a local logical volume according to the local identification, mapping an access path of the local logical volume to the virtual machine so as to mount the local logical volume to the virtual machine.
Preferably, the request information includes first identification information of an iSCSI-initiator in the Nova computer;
after determining, according to the request information, that the physical host where the Nova computer is located is not the same physical host as the physical host where the Nova computer is located, the method further includes:
determining a second logical volume allocated to the virtual machine according to the local volume group information to be allocated, which is pre-established by the virtual machine;
establishing an iSCSI-target according to the request information, the volume name of the second logical volume and the first identification information;
and sending second response information related to the second logical volume to the Nova computer through the iSCSI-target, so that the Nova computer mounts the second logical volume to the virtual machine through the iSCSI-initiator of the Nova computer according to the second response information.
Preferably, the second response information includes second identification information of the iSCSI-target, an access path allocated to a second logical volume of the virtual machine, and a corresponding iSCSI identification used for characterizing a storage resource type to which the second logical volume belongs;
the Nova computer mounts the second logical volume to the virtual machine through the iSCSI-initiator thereof according to the second response information, and includes:
when the Nova computer determines that a second logical volume allocated to the virtual machine is a remote logical volume according to the iSCSI identification, the Nova computer performs iSCSI login through the iSCSI-initiator and the second identification information of the Nova computer to establish communication connection between the iSCSI-initiator and the iSCSI-target so as to map an access path of the remote logical volume into the virtual machine, and mount the remote logical volume to the virtual machine.
In order to solve the above technical problem, the present invention further provides a virtual machine storage allocation system, which is applied to a processor in a physical host, and the virtual machine storage allocation system includes:
the calling unit is used for calling the sender-Volume execution judging unit, the response unit and the first sending unit;
the judging unit is used for judging whether a physical host where the Nova computer is located and a physical host where the Nova computer is located are the same physical host or not according to request information when the request information which is sent by the Nova computer and used for requesting storage resources for a newly-created virtual machine is received; if yes, triggering the response unit;
the response unit is used for determining first response information related to a first logical volume allocated to the virtual machine according to local volume group information to be allocated, which is pre-established by the response unit;
the first sending unit is configured to send the response information to the Nova computer, so that the Nova computer mounts the first logical volume to the virtual machine according to the first response information.
Preferably, the request information includes first identification information of an iSCSI-initiator in the Nova computer;
the judging unit is further configured to trigger the determining unit when it is judged, according to the request information, that the physical host where the Nova computer is located and the physical host where the Nova computer is located are not the same physical host;
the determining unit is configured to determine, according to the local volume group information to be allocated, a second logical volume allocated to the virtual machine;
the creating unit is used for creating an iSCSI-target according to the request information, the volume name of the second logical volume and the first identification information;
a second sending unit, configured to send second response information related to the second logical volume to the Nova computer through the iSCSI-target, so that the Nova computer mounts the second logical volume to the virtual machine through its own iSCSI-initiator according to the second response information.
In order to solve the above technical problem, the present invention further provides a physical host, including a memory and a processor;
the memory is used for storing a computer program;
the processor is used for calling a render-Volume to execute the steps of the virtual machine storage allocation method.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, comprising:
the computer readable medium has stored thereon a computer program which, when executed by a processor, implements the steps of the virtual machine storage allocation method as described above.
The method comprises the steps that a called sender-Volume judges whether a physical host where the Nova computer is located and a physical host where the software is located are the same as each other according to request information, if yes, first response information related to a first logic Volume distributed for the virtual machine is determined according to local Volume group information to be distributed, which is created in advance, and the first response information is sent to the Nova computer, so that the Nova computer mounts the first logic Volume to the virtual machine according to the first response information. Compared with the prior art, aiming at the condition that the circular-Volume and the Nova computer are on the same physical host, on one hand, a third-party storage device is not needed to be used, the cost is lower, the virtual machine can directly use the first logic Volume without maintaining an additional independent communication network, and the storage resource of the physical host where the Nova computer is located is fully utilized; on the other hand, the virtual machine can directly use the first logical volume without establishing a communication connection link between an iSCSI-initiator and an iSCSI-target by relying on an iSCSI technology, so that an OpenStack architecture is simplified, the communication time between the virtual machine and the first logical volume is reduced, and the data transmission performance is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic structural diagram of components of a virtual machine storage allocation method in the prior art;
FIG. 2 is a flowchart of a method for allocating storage of a virtual machine according to the present invention;
FIG. 3 is a schematic structural diagram of components of a virtual machine storage allocation method according to the present invention;
FIG. 4 is a schematic structural diagram of components of another virtual machine storage allocation method provided in the present invention;
FIG. 5 is a schematic structural diagram of a virtual machine storage allocation system according to the present invention;
FIG. 6 is a schematic structural diagram of another virtual machine storage allocation system provided in the present invention;
fig. 7 is a schematic structural diagram of a physical host according to the present invention.
Detailed Description
The core of the invention is to provide a virtual machine storage allocation method and related components, on one hand, a third-party storage device is not needed, the cost is lower, an additional independent communication network is not needed to be maintained, and the storage resources of a physical host where the Nova computer is located are fully utilized; on the other hand, the virtual machine can directly use the first logical volume without depending on iSCSI technology, thereby simplifying OpenStack architecture and ensuring data transmission performance.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 2, and fig. 3, fig. 1 is a schematic structural diagram of each component of a virtual machine storage allocation method in the prior art, fig. 2 is a flowchart of a virtual machine storage allocation method provided by the present invention, and fig. 3 is a schematic structural diagram of each component of a virtual machine storage allocation method provided by the present invention.
The virtual machine storage allocation method is applied to a processor in a physical host, and comprises the following steps:
s11: calling circle-Volume to execute the following steps:
when request information which is sent by Nova computer and used for requesting storage resources for a newly created virtual machine is received, judging whether a physical host where the Nova computer is located and a physical host where the Nova computer is located are the same physical host according to the request information; if yes, go to S12;
s12: determining first response information related to a first logic volume distributed for the virtual machine according to local volume group information to be distributed, which is pre-established by the virtual machine;
s13: and sending the first response information to the Nova computer so that the Nova computer mounts the first logical volume to the virtual machine according to the first response information.
In this embodiment, in view of the problem of storage allocation for a virtual machine, the first manner described in the background art, that is, the manner of additionally providing an independent third-party storage device, is easy to cause problems of cost increase, additional maintenance of a communication network, and resource waste, and specifically, a schematic structural diagram in this manner is shown in fig. 1; the second method as described in the background art, that is, the method of implementing the mount of the storage resource on the sender-Volume to the virtual machine by using the iSCSI technology, cannot ensure the transmission performance. In order to solve the technical problem, the application provides a virtual machine storage allocation method, a circular-Volume and Nova computer are deployed in a fusion manner, a mounting mode of a local logical Volume is modified, and the problem can be effectively solved.
The shader is an OpenStack block storage service, persistent storage can be added to the virtual machine, the block storage provides an infrastructure for managing volumes and interaction with the computing service of OpenStack, and provides volumes for instances, and the service also activates functions for managing snapshots and Volume types of the volumes, and the shader comprises a shader-Volume service, so that information interaction with the Nova computer service, namely Nova computer service, can be realized by calling the shader-Volume. It should be noted that Nova computer here belongs to Nova, which is the most core service of OpenStack and is responsible for maintaining and managing computing resources of a cloud environment and managing the life cycle of a virtual machine.
Therefore, when request information sent by Nova computer for requesting storage resources for a newly created virtual machine is received, whether a physical host where the Nova computer is located and a physical host where the finder-Volume itself is located are the same physical host can be judged according to the request information; if so, it is determined that the Nova computer and the folder-Volume are fused and deployed on one physical host, and the first response information related to the first Logical Volume allocated to the virtual machine is determined according to the local Volume group information to be allocated, which is pre-created by the folder-Volume Manager, where the pre-created local Volume group information to be allocated may be obtained by virtualizing the physical host where the folder-Volume is located in advance through a Logical Volume Manager (LVM) and is used for allocating storage resources to the virtual machine that has a storage resource allocation demand.
The first reply information is transmitted to Nova computer, and thus, for Nova computer, the first logical volume may be mounted to the virtual machine according to the first reply information.
To illustrate more intuitively, please refer to fig. 3, circle-Volume is on the same physical host as Nova computer, and then, as Nova computer & & circle-Volume, it is assumed that two VMs (Virtual machines), VM1 and VM2, are newly created by Nova computer, and local Volume group information to be allocated can be created in advance through LVMs, so that Disk1 is the first logical Volume allocated to VM1, and similarly, Disk2 is the first logical Volume allocated to VM2, and this allocation can be regarded as local mapping, and finally, the effect of mounting Disk1 to VM1 and Disk2 to VM2 is achieved.
In summary, compared with the prior art, for the case that the sender-Volume and the Nova computer are on the same physical host, on one hand, a third-party storage device is not needed, the cost is lower, the virtual machine can directly use the first logical Volume without maintaining an additional independent communication network, and the storage resource of the physical host where the Nova computer is located is fully utilized; on the other hand, the virtual machine can directly use the first logical volume without establishing a communication connection link between an iSCSI-initiator and an iSCSI-target by relying on an iSCSI technology, so that an OpenStack framework is simplified, the communication time between the virtual machine and the first logical volume is reduced, and the data transmission performance is ensured.
On the basis of the above-described embodiment:
as a preferred embodiment, the request message includes the IP of the physical host where the Nova computer is located and authentication information for authentication with the sender-Volume;
determining that the physical host where the Nova computer is located and the physical host where the Nova computer is located are the same physical host according to the request information, wherein the determining comprises the following steps:
judging whether the physical host where the Nova computer is located has the authority of establishing communication with the host according to the authentication information;
if yes, acquiring the IP of the physical host where the mobile terminal is located;
when the IP of the physical host where the host is located is determined to be the same as the IP of the physical host where the Nova computer is located, the IP of the physical host where the host is located and the physical host where the Nova computer is located are determined to be the same physical host.
In this embodiment, the request message may include an IP of the physical host where the Nova computer is located and authentication information for authenticating with the sender-Volume, and specifically, the authentication information includes, but is not limited to, a host name of the physical host where the Nova computer is located, whether multipath is used, wwpn, and other various information, and is not limited herein.
Then, whether a physical host where the Nova computer is located has the authority of establishing communication with the sender-Volume is judged according to the authentication information; if so, acquiring the IP of the physical host where the host is located, and determining that the IP of the physical host where the host is located and the IP of the physical host where the Nova computer is located are the same when determining that the IP of the physical host where the host is located and the IP of the physical host where the Nova computer is located are the same.
Therefore, the judgment logic that the physical host where the Nova computer is located and the physical host where the circle-Volume is located are the same physical host can be simply and reliably realized through the method.
In a preferred embodiment, the request message is Nova computer, which is obtained by calling an OS-quick function.
In this embodiment, the OS-brick function is a dependent library for mounting the OpenStack cloud hard disk to the virtual machine, the mounting and unloading functions of the cloud hard disk in the OpenStack are copied, multiple protocols such as iSCSI, FC, RBD and the like are supported, multiple types of storage such as centralized storage or distributed storage are supported, and the functions are strong, so that the Nova computer can obtain the request information, that is, the IP of the physical host where the Nova computer is located and the authentication information for performing authentication with the circular-Volume by calling the OS-brick function, and the implementation method is simple, reliable and easy to operate.
As a preferred embodiment, the first response information includes an access path allocated to a first logical volume of the virtual machine and a local identifier for characterizing a storage resource type to which the first logical volume belongs;
the method for mounting the first logical volume to the virtual machine by the Nova computer according to the first response information includes:
when the Nova computer determines that the first logical volume allocated to the virtual machine is the local logical volume according to the local identifier, the Nova computer maps the access path of the local logical volume to the virtual machine so as to mount the local logical volume to the virtual machine.
In this embodiment, a process of how Nova computer mounts the first logical Volume to the virtual machine according to the first response information is given, when Nova computer and sender-Volume are on the same host, without using iSCSI technology, the access path and local identifier of the first logical Volume may be directly included in the first response information, and when Nova computer determines that the first logical Volume allocated this time is the local logical Volume according to the local identifier (specifically, Nova computer may call the local identifier identified by the OS-quick function to determine that the first logical Volume allocated this time is the local logical Volume), the access path may be directly mapped to the virtual machine to mount the local logical Volume to the virtual machine, and through the mounting method provided in this application, when the virtual machine wants to use the first logical Volume later, the access may be directly performed according to the access path without using iSCSI technology, performance loss is reduced, the OpenStack deployment architecture is simplified, and an OpenStack hyper-fusion product is formed.
In a preferred embodiment, the request information includes first identification information of an iSCSI-initiator in Nova computer;
after determining, according to the request information, that the physical host where the Nova computer is located is not the same physical host as the physical host where the Nova computer is located, the method further includes:
determining a second logical volume allocated to the virtual machine according to the self-pre-established local volume group information to be allocated;
establishing an iSCSI-target according to the request information, the volume name of the second logical volume and the first identification information;
and sending second response information related to the second logical volume to the Nova computer through the iSCSI-target so that the Nova computer mounts the second logical volume to the virtual machine through the own iSCSI-initiator according to the second response information.
In this embodiment, the inventor further considers that for the case that the circle-Volume and Nova computer are not on the same physical host, there are some cases where migration of virtual machines and cloud hard disks requires to preserve iSCSI mount of Nova computer for virtual machines, and thus, after determining that the physical host where Nova computer is located is not the same physical host as the physical host where Nova computer is located according to the request information, determining a second logic volume allocated for the virtual machine according to the local volume group information to be allocated which is pre-established by the virtual machine, the local Volume group information to be allocated is a storage resource on a physical host where the circle-Volume is located, and specifically can be obtained by virtualizing the physical host where the circle-Volume is located in advance through the LVM, and the local volume group information to be allocated is used for allocating the storage resources for the virtual machine with the storage resource allocation requirement.
And creating an iSCSI-target according to the request information, the Volume name of the second logical Volume and the first identification information, that is, mapping the above content to the iSCSI-target, and then configuring access rights, which is not limited herein, so that the circle-Volume can send second response information related to the second logical Volume to the Nova computer through the iSCSI-target, so that the Nova computer can mount the second logical Volume to the virtual machine according to the second response information and through its own iSCSI-initiator.
To illustrate more intuitively, please refer to fig. 4, circle-Volume and Nova computer are respectively on two physical hosts, assuming that two VMs (Virtual machines) are newly created by Nova computer currently, that is, VM1 and VM2, both need to allocate storage resources, so that request information can be sent to circle-Volume, for circle-Volume, it is specifically possible to create local Volume group information to be allocated in advance by its own LVM, so that, according to the request information, distk 1 is the second logical Volume allocated to VM1, distk 2 is the second logical Volume allocated to VM2, this allocation is through iSCSI connection, iSCSI-target in circle-Volume, that is, iSCSI-target1 is connected to iSCSI-initiator and specifically to session1, iSCSI-target2 is connected to iSCSI-target and specifically to session2, and this iSCSI-target2 is connected to session-target 2, this is finally connected to VM 63685 3, this is expressed in order to mount VM 6853, this is directly to mount VM 7372, here, a Disk1 block diagram is added between the iSCSI initiator and the VM1, and a Disk2 block diagram is added between the iSCSI initiator and the VM2, but the above is still a remote mount method in nature.
Therefore, through the arrangement of the mode, the capacity that the virtual machine newly created by Nova computer is a remote storage resource is reserved, and the practicability is higher.
As a preferred embodiment, the second response information includes second identification information of the iSCSI-target, an access path allocated to the second logical volume of the virtual machine, and a corresponding iSCSI identification used for characterizing a storage resource type to which the second logical volume belongs;
the Nova computer mounts the second logical volume to the virtual machine through its iSCSI-initiator according to the second response information, and includes:
when the Nova computer determines that the second logical volume allocated to the virtual machine is the remote logical volume according to the iSCSI identification, the Nova computer performs iSCSI login through the iSCSI-initiator and the second identification information of the Nova computer to establish communication connection between the iSCSI-initiator and the iSCSI-target so as to map the access path of the remote logical volume into the virtual machine, and thus the remote logical volume is mounted to the virtual machine.
In this embodiment, the second response message may include second identifier information of the iSCSI-target, an access path allocated to the second logical volume of the virtual machine, and a corresponding iSCSI identifier for characterizing a storage resource type to which the second logical volume belongs, and then, for Nova computer, upon determining from the iSCSI identification that the second logical volume allocated to the virtual machine is a remote logical volume, it is stated that, in order to implement the remote storage resource mount and the sender-Volume has already allocated the second logical Volume, then the iSCSI login is performed through the iSCSI-initiator and the second identification information of itself to establish the communication connection between the iSCSI-initiator and the iSCSI-target, specifically, the iSCSI login is performed and the session is established to establish the communication connection between the iSCSI-initiator and the iSCSI-target, to map the access path of the remote logical volume into the virtual machine, so that the remote logical volume is mounted to the virtual machine. After the mount is successful, when the virtual machine wants to use the second logical volume, it needs to communicate with the iSCSI-target through the iSCSI-initiator and access the second logical volume. Therefore, the capacity of realizing remote mounting of the virtual machine is reliably ensured by the mode.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a virtual machine storage allocation system according to the present invention.
The virtual machine storage allocation system is applied to a processor in a physical host, and comprises:
a calling unit 21, configured to call a sender-Volume execution judging unit 22, a response unit 23, and a first sending unit 24;
a determining unit 22, configured to, when receiving request information sent by Nova computer and used to request a storage resource for a newly created virtual machine, determine, according to the request information, whether a physical host where the Nova computer is located and a physical host where the Nova computer is located are the same physical host; if yes, triggering a response unit 23;
the response unit 23 is configured to determine, according to local volume group information to be allocated that is pre-created by itself, first response information related to a first logical volume allocated to the virtual machine;
a first sending unit 24, configured to send the response information to Nova computer, so that Nova computer mounts the first logical volume to the virtual machine according to the first response information.
For introduction of the virtual machine storage allocation system provided in the present invention, please refer to the embodiment of the virtual machine storage allocation method, which is not described herein again.
Referring to fig. 6, fig. 6 is a schematic structural diagram of another virtual machine storage allocation system provided in the present invention.
In a preferred embodiment, the request information includes first identification information of an iSCSI-initiator in Nova computer;
the judging unit 22 is further configured to trigger the determining unit 25 when it is judged that the physical host where the Nova computer is located and the physical host where the Nova computer is located are not the same physical host according to the request information;
the determining unit 25 is configured to determine, according to local volume group information to be allocated that is created in advance by the determining unit, a second logical volume allocated to the virtual machine;
a creating unit 26, configured to create an iSCSI-target according to the request information, the volume name of the second logical volume, and the first identification information;
a second sending unit 27, configured to send second response information related to the second logical volume to the Nova computer through the iSCSI-target, so that the Nova computer mounts the second logical volume to the virtual machine through its own iSCSI-initiator according to the second response information.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a physical host according to the present invention.
The physical host comprises a memory 31 and a processor 32;
the memory 31 is used for storing computer programs;
the processor 32 is configured to call circle-Volume to perform the steps of the virtual machine storage allocation method as described above.
For the introduction of the physical host provided in the present invention, please refer to the above-mentioned embodiment of the virtual machine storage allocation method, which is not described herein again.
The present invention also provides a computer-readable storage medium comprising:
the computer readable medium has stored thereon a computer program which, when executed by a processor, implements the steps of the virtual machine storage allocation method as described above.
For the introduction of the computer-readable medium provided in the present invention, please refer to the above-mentioned embodiment of the virtual machine storage allocation method, which is not described herein again.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A virtual machine storage allocation method is applied to a processor in a physical host, and comprises the following steps:
calling circle-Volume to execute the following steps:
when request information which is sent by Nova computer and used for requesting storage resources for a newly created virtual machine is received, judging whether a physical host where the Nova computer is located and a physical host where the Nova computer is located are the same physical host according to the request information;
if yes, determining first response information related to a first logic volume allocated to the virtual machine according to local volume group information to be allocated which is pre-established by the virtual machine;
and sending the first response information to the Nova computer, so that the Nova computer mounts the first logical volume to the virtual machine according to the first response information.
2. The virtual machine storage allocation method according to claim 1, wherein the request information includes an IP of a physical host where the Nova computer is located and authentication information for authenticating with the sender-Volume;
determining that the physical host where the Nova computer is located and the physical host where the Nova computer is located are the same physical host according to the request information, including:
judging whether the physical host where the Nova computer is located has the authority of establishing communication with the physical host according to the authentication information;
if yes, acquiring the IP of the physical host where the mobile terminal is located;
and when the IP of the physical host where the Nova computer is located is determined to be the same as the IP of the physical host where the Nova computer is located, determining that the IP of the physical host where the Nova computer is located and the physical host where the Nova computer is located are the same physical host.
3. The method of claim 2, wherein the request message is obtained by calling an OS-brick function for the Nova computer.
4. The virtual machine storage allocation method according to claim 1, wherein the first response information includes an access path allocated to a first logical volume of the virtual machine and a local identification for characterizing a storage resource type to which the first logical volume belongs;
the mounting, by the Nova computer, the first logical volume to the virtual machine according to the first response information includes:
and when the Nova computer determines that the first logical volume allocated to the virtual machine is a local logical volume according to the local identification, mapping an access path of the local logical volume to the virtual machine so as to mount the local logical volume to the virtual machine.
5. The virtual machine storage allocation method according to any one of claims 1 to 4, wherein the request information includes first identification information of an iSCSI-initiator in the Nova computer;
after determining, according to the request information, that the physical host where the Nova computer is located is not the same physical host as the physical host where the Nova computer is located, the method further includes:
determining a second logical volume allocated to the virtual machine according to the local volume group information to be allocated, which is pre-established by the virtual machine;
establishing an iSCSI-target according to the request information, the volume name of the second logical volume and the first identification information;
and sending second response information related to the second logical volume to the Nova computer through the iSCSI-target, so that the Nova computer mounts the second logical volume to the virtual machine through the iSCSI-initiator of the Nova computer according to the second response information.
6. The method according to claim 5, wherein the second response message includes second identifier information of the iSCSI-target, an access path allocated to a second logical volume of the virtual machine, and a corresponding iSCSI identifier for characterizing a storage resource type to which the second logical volume belongs;
the mounting, by the Nova computer according to the second response information and through the iSCSI-initiator of the Nova computer, the second logical volume to the virtual machine includes:
when the Nova computer determines that a second logical volume allocated to the virtual machine is a remote logical volume according to the iSCSI identification, the Nova computer performs iSCSI login through the iSCSI-initiator and the second identification information of the Nova computer to establish communication connection between the iSCSI-initiator and the iSCSI-target so as to map an access path of the remote logical volume into the virtual machine, and mount the remote logical volume to the virtual machine.
7. A virtual machine storage allocation system for use with a processor in a physical host, the virtual machine storage allocation system comprising:
the calling unit is used for calling the sender-Volume execution judging unit, the response unit and the first sending unit;
the judging unit is used for judging whether a physical host where the Nova computer is located and a physical host where the Nova computer is located are the same physical host according to request information when the request information which is sent by the Nova computer and used for requesting storage resources for a newly-created virtual machine is received; if yes, triggering the response unit;
the response unit is used for determining first response information related to a first logical volume allocated to the virtual machine according to local volume group information to be allocated, which is pre-established by the response unit;
the first sending unit is configured to send the response information to the Nova computer, so that the Nova computer mounts the first logical volume to the virtual machine according to the first response information.
8. The virtual machine storage allocation system of claim 7 wherein said request information comprises first identification information of an iSCSI-initiator in said Nova computer;
the judging unit is further configured to trigger the determining unit when it is judged, according to the request information, that the physical host where the Nova computer is located and the physical host where the Nova computer is located are not the same physical host;
the determining unit is configured to determine, according to the local volume group information to be allocated, a second logical volume allocated to the virtual machine;
the creating unit is used for creating an iSCSI-target according to the request information, the volume name of the second logical volume and the first identification information;
a second sending unit, configured to send second response information related to the second logical volume to the Nova computer through the iSCSI-target, so that the Nova computer mounts the second logical volume to the virtual machine through its own iSCSI-initiator according to the second response information.
9. A physical host comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to call a render-Volume to perform the steps of the virtual machine storage allocation method of any of claims 1 to 6.
10. A computer-readable storage medium, comprising:
the computer readable medium has stored thereon a computer program which, when executed by a processor, carries out the steps of the virtual machine storage allocation method of any of claims 1 to 6.
CN202210469705.2A 2022-04-30 2022-04-30 Virtual machine storage allocation method and related components Pending CN114780038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210469705.2A CN114780038A (en) 2022-04-30 2022-04-30 Virtual machine storage allocation method and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210469705.2A CN114780038A (en) 2022-04-30 2022-04-30 Virtual machine storage allocation method and related components

Publications (1)

Publication Number Publication Date
CN114780038A true CN114780038A (en) 2022-07-22

Family

ID=82435957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210469705.2A Pending CN114780038A (en) 2022-04-30 2022-04-30 Virtual machine storage allocation method and related components

Country Status (1)

Country Link
CN (1) CN114780038A (en)

Similar Documents

Publication Publication Date Title
US10701139B2 (en) Life cycle management method and apparatus
US11190375B2 (en) Data packet processing method, host, and system
US11252228B2 (en) Multi-tenant multi-session catalogs with machine-level isolation
US10320674B2 (en) Independent network interfaces for virtual network environments
CN107534579B (en) System and method for resource management
US9244817B2 (en) Remote debugging in a cloud computing environment
JP6771650B2 (en) Methods, devices, and systems for virtual machines to access physical servers in cloud computing systems
US10044622B2 (en) Load balancing for a virtual networking system
US9628290B2 (en) Traffic migration acceleration for overlay virtual environments
US20220004410A1 (en) Method For Deploying Virtual Machine And Container, And Related Apparatus
US9225596B2 (en) Undifferentiated service domains
US20140254603A1 (en) Interoperability for distributed overlay virtual environments
US9753786B2 (en) Client server communication system
WO2016028927A1 (en) Methods and system for allocating an ip address for an instance in a network function virtualization (nfv) system
WO2017161562A1 (en) Management method and device for application in network function virtualization environment
CN107209642B (en) Method and entity for controlling resources in a cloud environment
JP6511585B2 (en) Network function virtualization resource processing method and virtualized network function manager
US10705740B2 (en) Managing of storage resources
CN115086166B (en) Computing system, container network configuration method, and storage medium
CN109857464B (en) System and method for platform deployment and operation of mobile operating system
CN113424149A (en) Low latency events across virtual machine boundaries
US20130007841A1 (en) Client server communication system
CN114780038A (en) Virtual machine storage allocation method and related components
CN112889247B (en) VNF service instantiation method and device
US10868758B1 (en) Enabling bypass flows for network traffic between devices

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