WO2017008584A1 - 一种虚拟机启动方法、装置及管理节点 - Google Patents

一种虚拟机启动方法、装置及管理节点 Download PDF

Info

Publication number
WO2017008584A1
WO2017008584A1 PCT/CN2016/083688 CN2016083688W WO2017008584A1 WO 2017008584 A1 WO2017008584 A1 WO 2017008584A1 CN 2016083688 W CN2016083688 W CN 2016083688W WO 2017008584 A1 WO2017008584 A1 WO 2017008584A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
affinity
mirror
image
data
Prior art date
Application number
PCT/CN2016/083688
Other languages
English (en)
French (fr)
Inventor
江滢
王志坤
张恒生
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017008584A1 publication Critical patent/WO2017008584A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • This document relates to but not limited to the field of communication, and in particular to a virtual machine startup method, device and management node.
  • Cloud computing is a computing model that uses the Internet to access shared resource pools anytime, anywhere, on demand, and conveniently. Key features of cloud computing include multi-tenancy, resource pooling, on-demand self-service, rapid resiliency and scalability, measurable services, and extensive network access.
  • Virtualization and related technologies are one of the main technologies for implementing these features. Cloud computing platforms need to flexibly deploy and build virtualized clusters of different sizes and types to meet different user needs and achieve flexible services.
  • a typical virtual machine deployment method is: the management node selects a host that meets the requirements in the cluster as a target host according to the deployment request and the constraint condition, and the target host copies the virtual machine image file from the virtual machine image template library to the local, and Start the virtual machine after the copy is complete.
  • the application is deployed in a local private cloud in a normal state.
  • the acquisition resource is greatly expanded by extending the application to the public cloud.
  • a large amount of virtual machine data needs to be transmitted through a network between relatively low-speed public and private clouds, which often takes hours or even days, which seriously affects the flexibility and agility of cloud computing.
  • the embodiment of the invention provides a virtual machine startup method, device and management node, which can be used to solve the related art, and the cloud computing puts forward higher requirements for the rapid deployment of large-scale and large-capacity virtual machines, and the virtual machine is deployed. The way is no longer enough to meet the demand.
  • a virtual machine startup method includes:
  • the management node sends a mirror analysis request to the mirror server, so that the mirror server analyzes the virtual machine image affinity feature value to be created;
  • the management node determines, according to the virtual machine resource requirement and the virtual machine image affinity feature value, the host where the mirror affinity virtual machine of the source virtual machine is located, so that the host machine is the target host;
  • the management node copies the data of the source virtual machine image to the target host in combination with the existing data on the target host to restore the complete source virtual machine image data.
  • the management node sends a mirror analysis request to the mirror server, so that the mirror server analyzes the virtual machine image affinity feature value to be created, including:
  • the management node receives a create virtual machine request from a client, and registers an image with the mirror server;
  • the management node sends a mirror analysis request to the mirror server, so that the mirror server performs mirror image affinity feature value analysis on the virtual machine image, and saves the analysis result in the mirror feature value database.
  • the management node determines, according to the virtual machine resource requirement and the virtual machine image affinity feature value, a host where the mirror affinity virtual machine of the source virtual machine is located, to use the host machine as a target sink.
  • the host includes:
  • the management node acquires real-time resource usage information of each computing node, and filters out nodes with sufficient resources according to resource requirement information of the virtual machine;
  • the management node sends, to the mirror server, a virtual machine image affinity analysis instruction on the virtual machine to be deployed and the candidate node, so that the mirror server determines the mirror similarity according to the image affinity feature value analysis;
  • the management node determines the adjacency virtual machine on the node to be deployed and the node to be deployed according to the node resource adequacy ratio and the mirror similarity.
  • the management node in combination with the existing data on the target host, copies the source virtual machine image data portion to the target host to restore the complete source virtual machine image data, including:
  • the management node sends a preparation virtual machine image request to the target host
  • the management node copies the source virtual machine image data portion to the target host in combination with the existing data on the target host, so that the target host combines the virtual machine image incremental data to be deployed to implement the virtual machine image. Local refactoring.
  • the mirroring server performs image affinity eigenvalue analysis on the virtual machine image, and saves the analysis result in the mirrored feature value database, including:
  • I is set to i+1, and the n hash functions are repeated until all the data blocks are mapped to generate an image array of the image affinity value of the current virtual machine as the analysis result of the image affinity feature value, and Saving the analysis result in a mirrored feature value database;
  • i is initially 1, and m and n are positive integers greater than or equal to 1.
  • the management node sends, to the mirror server, a virtual machine image affinity analysis instruction on the virtual machine to be deployed and the candidate node, so that the mirror server determines the mirror similarity according to the image affinity feature value analysis. , including:
  • the virtual machine on the node v is sequentially selected, and the virtual machine image uuid corresponding to the virtual machine v is obtained from the pre-stored virtual machine information table;
  • the management node retrieves the source virtual machine image uuid from the virtual machine information table according to the uuid of the source virtual machine;
  • the management node sends the source virtual machine and the virtual machine v image affinity analysis request to the mirror server to determine the affinity of the affinity source virtual machine and the virtual machine v by default, and the request parameter is the source virtual machine image uuid and The mirror uuid of the virtual machine v.
  • the determining, by the preset manner, the affinity of the affinity source virtual machine and the virtual machine v including:
  • the mirroring server extracts a mirrored OS attribute according to the stored virtual machine image description information to determine an affinity by using the mirrored OS attribute;
  • the source virtual machine image and the virtual machine v mirror affinity relationship value are searched from the mirrored feature value database, and directly in the case of the query. Read the value, and if not queried, read the mirror affinity bit array of the source virtual machine and the virtual machine v from the mirrored feature value database according to the mirror uuid to calculate the source virtual machine and the virtual machine.
  • Mirror affinity of v
  • the maximum mirror affinity value is updated, and the uuid of the virtual machine v corresponding to the maximum mirror affinity value and the host address of the node where it is located are recorded.
  • the management node in combination with the existing data on the target host, copying the source virtual machine image data portion to the target host, and copying the source virtual machine image data portion to the target host device includes:
  • the verification code information array of the affinity virtual machine image is transmitted to the mirror server, so that the source virtual machine image and the affinity virtual machine image are compared one by one according to the data block granularity;
  • the source virtual machine image is constructed with an array of meta information to transfer the affinity virtual machine block number and the source virtual machine image difference data set to the target host.
  • a virtual machine quick start device includes:
  • a sending module configured to send a mirror analysis request to the mirror server, so that the mirror server analyzes the virtual machine image affinity feature value to be created
  • a determining module configured to determine, according to the virtual machine resource requirement and the virtual machine image affinity feature value, a host of the mirror affinity virtual machine of the source virtual machine, to use the host machine as the target host;
  • the backup module is configured to combine the data of the source virtual machine image with the existing data on the target host to copy the data of the source virtual machine to the target host to restore the complete source virtual machine image data.
  • the sending module includes:
  • a receiving unit configured to receive a create virtual machine request from a client, and register an image with the mirror server
  • the first sending unit is configured to send a mirror analysis request to the mirror server, so that the mirror server performs mirror image affinity feature value analysis on the virtual machine image, and saves the analysis result in the mirrored feature value database.
  • the determining module includes:
  • the acquiring unit is configured to obtain real-time resource usage information of each computing node, and filter out nodes with sufficient resources according to resource requirement information of the virtual machine;
  • a second sending unit configured to send, to the mirror server, a virtual machine image affinity analysis instruction on the virtual machine to be deployed and the candidate node, so that the mirror server determines the mirror similarity according to the image affinity feature value analysis
  • Determining a unit configured to determine to be deployed according to a node resource adequacy ratio and the mirror similarity Affinity virtual machines on nodes and nodes to be deployed.
  • the backup module includes:
  • a third sending unit configured to send a preparation virtual machine image request to the target host
  • a backup unit configured to combine the data of the source virtual machine image with the existing data on the target host, and copy the source virtual machine image data portion to the target host, so that the target host machine implements the virtual machine in combination with the virtual machine image incremental data to be deployed.
  • Mirror local refactoring configured to combine the data of the source virtual machine image with the existing data on the target host, and copy the source virtual machine image data portion to the target host, so that the target host machine implements the virtual machine in combination with the virtual machine image incremental data to be deployed.
  • the first sending unit sends a mirroring analysis request to the mirroring server, so that the mirroring server performs mirroring affinity feature value analysis on the virtual machine image, and saves the analysis result in the mirrored feature value database, including:
  • the first sending unit sends a mirror analysis request to the mirror server, so that the mirror server constructs an m-bit image affinity feature value bit array, and sets all positions to 0; defines a set of hashes from 1 to n Function; decompose the virtual machine image data into a plurality of fixed length data blocks of length L; pass the i th data block successively through n hash functions to map into the image affinity feature value bit array; set i to i+1, repeating through n hash functions until all data blocks are mapped, to generate an array of mirror affinity eigenvalue bits of the current virtual machine, realizing the mirror affinity eigenvalue analysis process, and saving the analysis result in Mirroring the feature value database; where i is initially 1, and m and n are positive integers greater than or equal to 1.
  • the second sending unit sends, to the mirror server, a virtual machine image affinity analysis instruction on the virtual machine to be deployed and the candidate node, so that the mirror server determines the image according to the image affinity feature value analysis. Similarity, including:
  • the second sending unit sets a maximum mirror affinity value to a first preset value, where the first preset value is an affinity value that is impossible to exist; and sequentially selects a node from a resource-rich candidate node.
  • the virtual machine on the node v is sequentially selected, and the virtual machine image uuid corresponding to the virtual machine v is obtained from the pre-stored virtual machine information table; according to the uuid of the source virtual machine, Obtaining the source virtual machine image uuid from the virtual machine information table;
  • the source virtual machine and the virtual machine v image affinity analysis request are sent to the mirror server to determine the affinity of the affinity source virtual machine and the virtual machine v by default, and the request parameters are the source virtual machine image uuid and the virtual machine.
  • the mirror uuid of v is the mirror uuid of v.
  • the determining, by the second sending unit, the affinity of the affinity source virtual machine and the virtual machine v by a preset manner includes:
  • the second sending unit extracts, by using the mirror server, the mirroring OS attribute according to the stored virtual machine image description information, to determine the affinity by using the mirroring OS attribute;
  • the source virtual machine image and the virtual machine v mirror affinity relationship value are searched from the mirrored feature value database, and directly in the case of the query. Read the value, and if not queried, read the mirror affinity bit array of the source virtual machine and the virtual machine v from the mirrored feature value database according to the mirror uuid to calculate the source virtual machine and the virtual machine.
  • Mirror affinity of v
  • the maximum mirror affinity value is updated, and the uuid of the virtual machine v corresponding to the maximum mirror affinity value and the host address of the node where it is located are recorded.
  • the backup module combines the existing data on the target host to copy the source virtual machine image data portion to the target host to restore the complete source virtual machine image data, including:
  • the backup module sequentially decomposes the affinity virtual machine mirror data into a plurality of fixed length data blocks of length L, and generates two check codes for each block by using two check code algorithms;
  • the mirrored checksum information array is transmitted to the mirror server to compare the source virtual machine image with the affinity virtual machine image by the data block granularity; the source virtual machine image is constructed with the meta information array to be the affinity virtual machine data block.
  • the number and source virtual machine image difference data set is transferred to the target host.
  • a management node includes: the above virtual machine boot device.
  • a computer readable storage medium storing computer executable instructions for performing the above method.
  • the solution provided by the embodiment of the present invention performs image affinity analysis on the virtual machine to be created, and obtains the target host of the mirror affinity virtual machine of the source virtual machine, according to the existing data on the target host. Copy the source virtual machine image data to the target host, reduce the number of remote data copies, quickly deploy and start the virtual machine, improve the deployment efficiency, and solve the related technology, the cloud computing for large-scale, large-capacity virtual machines Rapid deployment puts forward higher requirements, and the virtual machine deployment method can no longer meet the demand problem.
  • FIG. 1 is a flowchart of a method for starting a virtual machine in an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a virtual machine starting device according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a sending module in a virtual machine starting device according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a determining module in a virtual machine starting device according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a backup module in a virtual machine starting device according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a topology of a virtualized cluster in an alternative embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of implementing a virtual machine startup method in an optional embodiment of the present invention.
  • the embodiment of the invention provides a virtual machine startup method, device and management node. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
  • the embodiment of the invention provides a virtual machine startup method.
  • the process of the method is as shown in FIG. 1 and includes steps S102 to S106:
  • the management node sends a mirror analysis request to the mirror server, so that the mirror server analyzes the virtual machine image affinity feature value to be created.
  • the management node determines, according to the virtual machine resource requirement and the virtual machine image affinity feature value, the host where the mirror affinity virtual machine of the source virtual machine is located, so that the host machine is the target host;
  • the management node combines the existing data on the target host to mirror the data part of the source virtual machine. Copy to the target host to restore the full source virtual machine image data, thus enabling a quick start of the virtual machine.
  • the method provided by the embodiment of the present invention performs image affinity analysis on the virtual machine to be created, obtains the target host of the mirror affinity virtual machine of the source virtual machine, and mirrors the source virtual machine according to the existing data on the target host.
  • the data is partially copied to the target host, which reduces the number of remote data copies, can quickly deploy and start the virtual machine, improves the deployment efficiency, and solves the related technology, the cloud computing provides a rapid deployment of large-scale, large-capacity virtual machines. With higher requirements, the existing virtual machine deployment method can no longer meet the demand problem.
  • the management node sends a mirror analysis request to the mirror server, so that the mirror server analyzes the virtual machine image affinity feature value to be created, including: the management node receives the create virtual machine request from the client, and registers the image with the mirror server.
  • the management node sends a mirror analysis request to the mirror server, so that the mirror server performs mirror image affinity feature analysis on the virtual machine image, and saves the analysis result in the mirrored feature value database.
  • the mirroring server performs image affinity eigenvalue analysis on the virtual machine image, and saves the analysis result in the mirrored feature value database, including: constructing an m-bit image affinity feature value bit array, and All positions are 0; define a set of hash functions from 1 to n; decompose the virtual machine image data into multiple fixed length data blocks of length L; pass the i th data block successively through n hash functions to map to Mirror affinity feature value bit array; set i to i+1, repeat n hash functions until all data blocks are mapped, to generate an array of mirror affinity eigenvalue bits of the current virtual machine, as a mirror
  • the analysis result of the affinity feature value is saved in the mirrored feature value database; wherein i is initially 1, and m and n are positive integers greater than or equal to 1.
  • the management node determines, according to the virtual machine resource requirement and the virtual machine image affinity feature value, the host where the virtual machine of the source virtual machine is located, and the host machine as the target host includes: The management node obtains the real-time resource usage information of each computing node, and filters out the nodes with sufficient resources according to the resource requirement information of the virtual machine; the management node sends the virtual machine mirroring affinity analysis of the virtual machine to be deployed and the candidate node to the mirror server.
  • the instructions are such that the mirror server determines the mirror similarity according to the image affinity feature value analysis; the management node determines the affinity virtual machine on the node to be deployed and the node to be deployed according to the node resource adequacy ratio and the mirror similarity.
  • the management node sends, to the mirror server, a virtual machine image affinity analysis instruction on the virtual machine to be deployed and the candidate node, so that the mirror server determines the mirror similarity according to the image affinity feature value analysis.
  • the node v is selected from the resource-rich candidate nodes in sequence; the virtual machine on the node v is sequentially selected according to the pre-stored virtualized cluster node information table, and the virtual machine corresponding to the virtual machine v is obtained from the pre-stored virtual machine information table.
  • the machine mirrors the uuid; the management node retrieves the source virtual machine image uuid from the virtual machine information table according to the uuid of the source virtual machine; the management node sends the source virtual machine and the virtual machine v image affinity analysis request to the mirror server to pass the
  • the preset mode determines the affinity of the affinity source virtual machine and the virtual machine v.
  • the request parameters are the source virtual machine image uuid and the mirror uuid of the virtual machine v.
  • determining, by using a preset manner, the affinity source virtual machine and the virtual machine v image affinity including: the mirror server extracting the mirrored OS attribute according to the stored virtual machine image description information, to mirror the OS attribute.
  • the mirrored feature value database The image affinity bit arrays of the source virtual machine and the virtual machine v are respectively read to calculate the mirror affinity of the source virtual machine and the virtual machine v; whether the value of the mirror affinity relationship is greater than the current maximum value; In the case of a value, the maximum mirror affinity value is updated, and the uuid of the virtual machine v corresponding to the maximum mirror affinity value and the host address of the node where it is located are recorded.
  • the management node combines the data of the source virtual machine image with the data of the target host to copy the data of the source virtual machine to the target host to restore the complete source virtual machine image data, so as to implement the fast startup virtual machine, including:
  • the management node sends a request for preparing a virtual machine image to the target host; the management node copies the data of the source virtual machine image to the target host in combination with the existing data on the target host, so that the target host combines the virtual machine image to be deployed.
  • Incremental data enables local reconstruction of virtual machine images.
  • the management node combines the data of the source virtual machine with the existing data on the target host.
  • the partial copy to the target host to restore the complete source virtual machine image data, to achieve a quick start virtual machine includes:
  • the affinity virtual machine mirror data into a plurality of fixed length data blocks of length L, respectively generating two check codes by using two check code algorithms for each block of data; verifying the mirror of the affinity virtual machine
  • the code information array is transmitted to the mirror server to compare the source virtual machine image with the affinity virtual machine image by data block granularity; the source virtual machine image is constructed to construct a meta information array to associate the affinity virtual machine data block number with the source virtual
  • the machine mirror differential data set is transferred to the target host.
  • the embodiment of the present invention further provides a virtual machine starting device.
  • the structure of the device is as shown in FIG. 2, and includes: a sending module 10, configured to send a mirroring analysis request to the mirror server, so that the mirror server analyzes the virtual machine to be created. a mirroring affinity feature value; the determining module 20 is coupled to the sending module 10, and configured to determine, according to the virtual machine resource requirement and the virtual machine image affinity feature value, the host machine of the mirror virtual affinity virtual machine of the source virtual machine, The host computer is used as the target host; the backup module 30 is coupled with the determining module 20, and is configured to combine the existing data on the target host to copy the source virtual machine image data portion to the target host to restore the complete source virtual machine image. Data to enable a quick start of the virtual machine.
  • the structure of the sending module 10 is as shown in FIG. 3, which may include: a receiving unit 101 configured to receive a request for creating a virtual machine from a client, and register an image with the mirror server; the first sending unit 102, and the receiving unit The 101 is coupled to send a mirror analysis request to the mirror server, so that the mirror server performs mirror image affinity feature value analysis on the virtual machine image, and saves the analysis result in the mirrored feature value database.
  • the first sending unit 102 sends a mirror analysis request to the mirror server, so that the mirror server performs mirror image affinity feature value analysis on the virtual machine image, and saves the analysis result in the mirrored feature value database.
  • the first sending unit sends a mirror analysis request to the mirror server, so that the mirror server constructs an m-bit image affinity feature value bit array, and sets all positions to 0; defines a set of hashes from 1 to n Function; decompose the virtual machine image data into a plurality of fixed length data blocks of length L; pass the i th data block successively through n hash functions to map into the image affinity feature value bit array; set i to i+1, repeating through n hash functions until all data blocks are mapped, to generate an array of mirror affinity eigenvalue bits of the current virtual machine, to achieve mirror affinity characteristics
  • the value analysis process saves the analysis result in the mirrored feature value database; where i is initially 1, and m and n are positive integers greater than or equal to 1.
  • the determining module 20 may include: an obtaining unit 201, configured to acquire real-time resource usage information of each computing node, and filter out a node with sufficient resources according to resource requirement information of the virtual machine;
  • the unit 202 is coupled to the obtaining unit 201, and configured to send, to the mirror server, a virtual machine image affinity analysis instruction on the virtual machine to be deployed and the candidate node, so that the mirror server determines the mirror similarity according to the image affinity feature value analysis;
  • the determining unit 203 is coupled to the second sending unit 202 and configured to determine the affinity virtual machine on the node to be deployed and the node to be deployed according to the node resource adequacy ratio and the mirror similarity.
  • the foregoing second sending unit 202 sends, to the mirror server, a virtual machine image affinity analysis instruction on the virtual machine to be deployed and the candidate node, so that the mirror server determines according to the image affinity feature value analysis.
  • Mirror similarity including:
  • the second sending unit 202 sets a maximum mirror affinity value to a first preset value, where the first preset value is an affinity value that cannot exist; and sequentially selects a node v from the resource-qualified candidate nodes.
  • the virtual machine on the node v is sequentially selected, and the virtual machine image uuid corresponding to the virtual machine v is obtained from the pre-stored virtual machine information table; according to the uuid of the source virtual machine, The source virtual machine image uuid is obtained in the virtual machine information table; the source virtual machine and the virtual machine v image affinity analysis request are sent to the mirror server to determine the affinity source virtual machine and the virtual machine v mirror pro by a preset manner.
  • sexuality where the request parameter is the source virtual machine image uuid and the mirror uuid of the virtual machine v.
  • the determining, by the second sending unit, the affinity of the affinity source virtual machine and the virtual machine v by using a preset manner includes:
  • the second sending unit extracts the mirroring OS attribute according to the stored virtual machine image description information by the mirroring server to determine the affinity by mirroring the OS attribute; and the source virtual machine and the virtual machine v mirroring the OS anti-affinity In this case, directly returning to the first preset value; if the source virtual machine and the virtual machine v mirroring OS are not anti-affinity, the value of the affinity relationship between the source virtual machine image and the virtual machine v is obtained from the mirrored feature value database.
  • the backup module 30 may include: a third sending unit 301, configured to send a preparation virtual machine image request to the target host; and a backup unit 302 coupled with the third sending unit 301, and configured The data of the source virtual machine is copied to the target host, so that the target host combines the incremental data of the virtual machine image to be deployed to implement local reconstruction of the virtual machine image.
  • the backup module 30 combines the data of the source virtual machine image with the data on the target host to copy the source virtual machine image data to the target host to restore the complete source virtual machine image data, including:
  • the backup module sequentially decomposes the affinity virtual machine mirror data into a plurality of fixed length data blocks of length L, and generates two check codes for each block by using two check code algorithms;
  • the mirrored checksum information array is transmitted to the mirror server to compare the source virtual machine image with the affinity virtual machine image by the data block granularity; the source virtual machine image is constructed with the meta information array to be the affinity virtual machine data block.
  • the number and source virtual machine image difference data set is transferred to the target host.
  • the embodiment of the invention further provides a management node, which comprises the above-mentioned virtual machine starting device.
  • a management node which comprises the above-mentioned virtual machine starting device.
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions for performing the above method.
  • the embodiment provides a method for starting a virtual machine.
  • the method determines the virtual machine image affinity feature value, and integrates the virtual machine resource requirements and constraints to determine the host of the mirror virtual affinity virtual machine of the source virtual machine.
  • the target host and then copy the source virtual machine image data part to the target host, and combine the existing data on the target host to locally restore the complete source virtual machine image data.
  • This embodiment speeds up virtual machine deployment and startup time, reduces bandwidth consumption during virtual machine deployment, and enhances the flexible expansion capability of the virtualized cluster.
  • FIG. 6 is a schematic diagram of a virtualized cluster topology.
  • the architecture of the virtualized cluster can be seen from the figure.
  • 7 is a schematic diagram of the architecture of the virtual machine startup method implementation.
  • the virtualization cluster of the embodiment includes a management server (management node), and the mirror server and at least one compute node (physical host) are connected through a network.
  • the computing node includes a hardware layer, a VMM (Virtual Machine Supervisory System) running on the hardware layer, and at least one VM (virtual machine) running on the host, such as VM1 and VM2 in FIG. 6;
  • the mirror server contains one or more mirrors, such as mirror 1 to mirror 4 in Figure 6.
  • the client, the host, and the mirror server are respectively connected to the management center (management node).
  • the user initiates a virtual machine request from the client of the management node.
  • the management node receives the instruction and sets the virtual machine state to pending.
  • the management node registers the image with the mirror server, and the mirror server performs image affinity eigenvalue analysis on the virtual machine image, and records the analysis result in the mirrored feature value database.
  • the management node obtains real-time resource usage information through each computing node, and filters out nodes with sufficient resources according to resource demand information such as CPU (central processing unit), MEM (memory), and disk space of the virtual machine.
  • resource demand information such as CPU (central processing unit), MEM (memory), and disk space of the virtual machine.
  • the management node sends a virtual machine image affinity analysis instruction to the virtual machine to be deployed to the mirror server one by one, and the mirror server calculates the mirror similarity according to the image affinity feature value analysis.
  • the management node issues a preparation virtual machine image request to the target host, and sets the virtual machine state to prolog.
  • the target host combines the virtual machine image incremental data to be deployed, and the virtual machine image is locally reconstructed to complete the virtual machine deployment; if there is no affinity virtual machine, the virtual machine image is completely transmitted to the target node.
  • the target host returns the virtual machine image preparation completion information to the management node.
  • the management node issues a virtual machine command to the target host, and the target host starts the virtual machine locally, and the virtual machine enters the booting state.
  • the virtual machine enters the running state, and the virtual machine completes the deployment and starts, and starts executing.
  • Business processing
  • the mirror server analyzes the affinity feature value based on the feature reduction of the mirror data, including the following process:
  • step (3) For the i-th data block (i is initially 1), the n hash functions defined by step (3) are successively mapped to the image affinity feature value bit array;
  • the image dimensionality reduction is completed, and the image is represented by an array of m-bit affinity feature value bits.
  • the more similar images have more common ones in their affinity feature value bit arrays. Since the hash function will collide, the similarity judgment will have a certain probability of error, and the larger the number m of the feature value bit array, the higher the accuracy of the similarity judgment, and of course the storage space consumption is larger.
  • the management node Before starting the virtual machine, the management node first obtains the real-time resource usage information from each computing node, and filters out the preliminary feasibility node according to the virtual machine's CPU, MEM, network bandwidth, and disk space resource requirement information. The management node sorts the preliminary feasibility nodes in descending order according to resource adequacy. For virtual machine j, the resource adequacy ratio of node i is defined as:
  • W cpu, j is the CPU weight of the virtual machine j
  • W mem, j is the weight of the MEM of the virtual machine j
  • W storage, j is the storage weight of the virtual machine j
  • the weight value can be based on the service type and resources of the virtual machine Demand adjustment, default is 1:1:1.
  • CPU i , MEM i , and Storage i are the CPU, MEM, and storage capacity remaining resource ratio of node i.
  • the management node finds the affinity virtual machine of the source virtual machine from the preliminary feasibility queue, as follows:
  • the management node retrieves the source virtual machine image uuid from the virtual machine information table according to the uuid of the source virtual machine;
  • the management node sends a source virtual machine and virtual machine v image affinity analysis request to the mirror server, and the request parameters are the source virtual machine image uuid and the mirror uuid of the virtual machine v;
  • the mirror server extracts the mirror OS attribute according to the virtual machine image description information
  • Affinity can be defined in a variety of ways, and is illustrated here by way of example only.
  • )), dot(x,y) ⁇ x[i].y[i], Where dot(x, y) is equivalent to the number of bits in the array of two affinity feature bits at the same time;
  • the management node updates the maximum mirror affinity value, and records the uuid of the virtual machine v corresponding to the maximum mirror affinity value and the hostid of the node n where it is located;
  • the mirror server returns ⁇ the maximum mirror affinity value to the management node, the corresponding virtual machine v, and the node where the virtual machine is located n>;
  • the maximum mirror affinity value obtained by the management node is not -1, that is, through the affinity relationship analysis, the mirror affinity virtual machine is found, and then the node in the request return value is determined as the target placement node, and the request return value is obtained.
  • the virtual machine in is the mirror affinity virtual machine of the source virtual machine on the target node. Otherwise, the source virtual machine and the virtual machines on all the candidate nodes are opposite each other, and the node with the highest resource adequacy is selected as the target placement node.
  • the affinity virtual machine mirror data is successively decomposed into a plurality of fixed length data blocks of length L.
  • Two checksum algorithms are generated for each block of data to generate two check codes (weak checksum, strong checksum);
  • Block_id Long Block number Weak_checksum String Weak checksum Strong_checksum String Strong checksum
  • step d) The source virtual machine image moves L bytes (i is updated to i+L), and step a) is repeated until the source virtual machine mirrors all the data blocks to complete the comparison;
  • step f) The source virtual machine image moves 1 byte (i is updated to i+1), and step a) is repeated until the source virtual machine mirrors all data blocks to complete the comparison.
  • the source virtual machine image is constructed to construct a meta information array, that is, the affinity virtual machine data block number and the source virtual machine image difference data set are transmitted to the target placement node; wherein the meta information data structure is as shown in Table 6.
  • the source virtual machine is built on the target placement node by:
  • the corresponding L-byte data block of the mirror affinity virtual machine is found according to the block id, and is added to the image in the local directory of the source virtual machine;
  • the source virtual machine full mirror is generated in the local directory of the source virtual machine.
  • the virtual machine image is completely transferred to the target placement node through the network.
  • the embodiments of the present invention have the following advantages: strong applicability, no need to modify the underlying kernel, and are applicable to virtualization technologies such as VMware ESX, KVM, and XEN; platform independence, applicable to operating systems such as windows and Linux, and completely the Guest OS As a black box, you do not need to modify the Guest OS.
  • virtualization technologies such as VMware ESX, KVM, and XEN
  • platform independence applicable to operating systems such as windows and Linux, and completely the Guest OS
  • you do not need to modify the Guest OS By analyzing the virtual machine image dimensionality reduction, you can accurately determine the mirror affinity virtual machine and select the corresponding node for deployment, avoiding redundant presets on multiple nodes, effectively improving storage. Space utilization rate.
  • the embodiment of the present invention has the following positive effects on the large-scale deployment of the cloud computing: by selecting the node where the virtual machine with the highest mirror affinity is deployed, reducing the number of remote data copies, rapidly deploying and starting the virtual machine, improving the deployment efficiency, and enhancing the cloud. Calculate the elastic expansion capability when the load changes dynamically; reduce the bandwidth consumption caused by data copy, and effectively reduce the communication cost of the hybrid cloud network.
  • the solution provided by the embodiment of the present invention performs image affinity analysis on the virtual machine to be created, obtains the target host of the mirror affinity virtual machine of the source virtual machine, and mirrors the source virtual machine according to the existing data on the target host.
  • the data is partially copied to the target host, which reduces the number of remote data copies, rapidly deploys and starts the virtual machine, improves the deployment efficiency, and solves the related technology.
  • the cloud computing proposes a rapid deployment of large-scale and large-capacity virtual machines. High requirements, virtual machine deployment methods can not meet the demand.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

一种虚拟机启动方法、装置及管理节点,其中,该方法包括:管理节点向镜像服务器发送镜像分析请求,以使得镜像服务器分析待创建虚拟机镜像亲和性特征值;管理节点根据虚拟机资源需求及虚拟机镜像亲和性特征值,确定源虚拟机的镜像亲和性虚拟机所在宿主机,以将所在宿主机作为目标宿主机;管理节点结合目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据。

Description

一种虚拟机启动方法、装置及管理节点 技术领域
本文涉及但不限于通讯领域,特别是涉及一种虚拟机启动方法、装置及管理节点。
背景技术
云计算是一种利用互联网实现随时随地、按需、便捷地访问共享资源池的计算模式。云计算的关键特性包括多租用、资源池化、按需自助、快速弹性和可扩展、可测量服务、广泛的网络接入。
虚拟化及其相关技术是目前实现这些特征的主要技术之一。云计算平台需要通过灵活的部署和搭建不同规模与类型的虚拟化集群来应对各异的用户需求,从而实现其弹***。
典型的虚拟机部署方法为,管理节点根据部署请求及约束条件在集群中选择一台满足需求的宿主机作为目标主机,目标主机将虚拟机镜像文件从虚拟机镜像模板库全量拷贝到本地,并在拷贝完成后启动虚拟机。
上述虚拟机部署方法存在如下三个方面的局限性:
a)通常一个安装有操作***和多种应用业务软件的虚拟机模板映像的容量在几个甚至几十个GB以上,传输这种大尺寸的镜像文件往往需要很长的时间,降低了整体的部署效率;
b)大尺寸镜像的传输,会导致较高的网络传输开销;
c)大多数虚拟机模板库依赖于集中式存储,其往往成为数据吞吐的瓶颈,而且其单点故障也会对平台的整体运行带来关键影响。
尤其在混合云模式中,在常规状态下应用部署在本地私有云,当周期性负载或突发负载来临时,通过将应用扩展到公有云,获取资源极大扩展。但是大量虚拟机数据需要通过相对低速的公私有云之间的网络进行传输,往往需要数小时甚至数天,严重影响了云计算的弹性与敏捷性。
综上,随着用户数量及业务增长的迅速增长,云计算对大规模、大容量 的虚拟机的快速部署提出了更高的要求,相关技术中的虚拟机部署方式已无法满足需求。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供了一种虚拟机启动方法、装置及管理节点,可以用以解决相关技术中,云计算对大规模、大容量的虚拟机的快速部署提出了更高的要求,虚拟机部署方式已无法满足需求的问题。
本发明实施例采用如下技术方案。
一种虚拟机启动方法,包括:
管理节点向镜像服务器发送镜像分析请求,以使得所述镜像服务器分析待创建虚拟机镜像亲和性特征值;
所述管理节点根据虚拟机资源需求及所述虚拟机镜像亲和性特征值,确定源虚拟机的镜像亲和性虚拟机所在宿主机,以将所述所在宿主机作为目标宿主机;
所述管理节点结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据。
可选地,所述管理节点向镜像服务器发送镜像分析请求,以使得所述镜像服务器分析待创建虚拟机镜像亲和性特征值包括:
所述管理节点接收来自客户端的创建虚拟机请求,并向所述镜像服务器注册镜像;
所述管理节点向镜像服务器发送镜像分析请求,以使得所述镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中。
可选地,所述管理节点根据虚拟机资源需求及所述虚拟机镜像亲和性特征值,确定源虚拟机的镜像亲和性虚拟机所在宿主机,以将所述所在宿主机作为目标宿主机包括:
所述管理节点获取每个计算节点的实时资源使用信息,根据虚拟机的资源需求信息过滤出资源充足的节点;
所述管理节点向所述镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得所述镜像服务器根据镜像亲和性特征值分析确定镜像相似度;
所述管理节点根据节点资源充足率及所述镜像相似度,确定待部署节点及待部署节点上的亲和性虚拟机。
可选地,所述管理节点结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据包括:
所述管理节点向目标宿主机发出准备虚拟机镜像请求;
所述管理节点结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到所述目标宿主机,以使所述目标宿主机结合待部署虚拟机镜像增量数据实现虚拟机镜像本地重构。
可选地,所述镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中,包括:
构造一个m位的镜像亲和性特征值位数组,并将所有位置为0;
定义一组从1至n的hash函数;
将虚拟机镜像数据分解为长度为L的多个定长数据块;
将第i个数据块逐次通过n个hash函数,以映射到镜像亲和性特征值位数组中;
将i设为i+1,重复通过n个hash函数,直到所有数据块都完成映射,以生成当前虚拟机的镜像亲和性特征值位数组,作为镜像亲和性特征值的分析结果,并将所述分析结果保存在镜像特征值数据库中;
其中,i初始为1,m和n均为大于或等于1的正整数。
可选地,所述管理节点向所述镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得所述镜像服务器根据镜像亲和性特征值分析确定镜像相似度,包括:
设置最大镜像亲和性数值为第一预设值,所述第一预设值为不可能存在的亲和性数值;
依次从资源充足的备选节点中选取节点v;
根据预存储的虚拟化集群节点信息表,依次选取节点v上的虚拟机,并从预存储的虚拟机信息表中获取虚拟机v对应的虚拟机镜像uuid;
管理节点根据源虚拟机的uuid,从所述虚拟机信息表中查取到源虚拟机镜像uuid;
管理节点向镜像服务器发出源虚拟机及虚拟机v镜像亲和性分析请求,以通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性,请求参数为源虚拟机镜像uuid及虚拟机v的镜像uuid。
可选地,所述通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性,包括:
所述镜像服务器根据与存储的虚拟机镜像描述信息提取镜像OS属性,以通过所述镜像OS属性确定亲和性;
在源虚拟机与虚拟机v镜像OS反亲和的情况下,直接返回所述第一预设值;
在源虚拟机与虚拟机v镜像OS不反亲和的情况下,从所述镜像特征值数据库中查找源虚拟机镜像与虚拟机v镜像亲和性关系数值,并在查询到的情况下直接读取该数值,在没有查询到的情况下,根据镜像uuid,从所述镜像特征值数据库分别读取源虚拟机和虚拟机v的镜像亲和性位数组,以计算源虚拟机与虚拟机v的镜像亲和性;
判断镜像亲和性关系数值是否大于当前最大值;
在大于当前最大值的情况下,更新最大镜像亲和性数值,并记录最大镜像亲和性数值所对应的虚拟机v的uuid及其所在节点的宿主机地址。
可选地,所述管理节点结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机确将源虚拟机镜像数据部分拷贝到目标宿主机包括:
将亲和虚拟机镜像数据逐次分解为长度为L的多个定长数据块,对每块 数据块用两种校验码算法分别生成两个校验码;
将亲和虚拟机镜像的校验码信息数组传给镜像服务器,以将源虚拟机镜像与亲和虚拟机镜像按数据块粒度逐一比对;
将源虚拟机镜像构建元信息数组,以将亲和虚拟机数据块编号与源虚拟机镜像差异数据集传输至目标宿主机。
一种虚拟机快速启动装置,包括:
发送模块,设置成向镜像服务器发送镜像分析请求,以使得所述镜像服务器分析待创建虚拟机镜像亲和性特征值;
确定模块,设置成根据虚拟机资源需求及所述虚拟机镜像亲和性特征值,确定源虚拟机的镜像亲和性虚拟机所在宿主机,以将所述所在宿主机作为目标宿主机;
备份模块,设置成结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据。
可选地,所述发送模块包括:
接收单元,设置成接收来自客户端的创建虚拟机请求,并向所述镜像服务器注册镜像;
第一发送单元,设置成向所述镜像服务器发送镜像分析请求,以使得所述镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中。
可选地,所述确定模块包括:
获取单元,设置成获取每个计算节点的实时资源使用信息,根据虚拟机的资源需求信息过滤出资源充足的节点;
第二发送单元,设置成向所述镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得所述镜像服务器根据镜像亲和性特征值分析确定镜像相似度;
确定单元,设置成根据节点资源充足率及所述镜像相似度,确定待部署 节点及待部署节点上的亲和性虚拟机。
可选地,所述备份模块包括:
第三发送单元,设置成向目标宿主机发出准备虚拟机镜像请求;
备份单元,设置成结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到所述目标宿主机,以使所述目标宿主机结合待部署虚拟机镜像增量数据实现虚拟机镜像本地重构。
可选地,所述第一发送单元向镜像服务器发送镜像分析请求,以使得所述镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中包括:
所述第一发送单元向镜像服务器发送镜像分析请求,以使得所述镜像服务器构造一个m位的镜像亲和性特征值位数组,并将所有位置为0;定义一组从1至n的hash函数;将虚拟机镜像数据分解为长度为L的多个定长数据块;将第i个数据块逐次通过n个hash函数,以映射到镜像亲和性特征值位数组中;将i设为i+1,重复通过n个hash函数,直到所有数据块都完成映射,以生成当前虚拟机的镜像亲和性特征值位数组,实现镜像亲和性特征值分析过程,并将分析结果保存在镜像特征值数据库中;其中,i初始为1,m和n均为大于或等于1的正整数。
可选地,所述第二发送单元向所述镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得所述镜像服务器根据镜像亲和性特征值分析确定镜像相似度,包括:
所述第二发送单元设置最大镜像亲和性数值为第一预设值,其中,所述第一预设值为不可能存在的亲和性数值;依次从资源充足的备选节点中选取节点v;根据预存储的虚拟化集群节点信息表,依次选取节点v上的虚拟机,并从预存储的虚拟机信息表中获取虚拟机v对应的虚拟机镜像uuid;根据源虚拟机的uuid,从所述虚拟机信息表中查取到源虚拟机镜像uuid;
向镜像服务器发出源虚拟机及虚拟机v镜像亲和性分析请求,以通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性,请求参数为源虚拟机镜像uuid及虚拟机v的镜像uuid。
可选地,所述第二发送单元通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性包括:
所述第二发送单元通过所述镜像服务器,根据与存储的虚拟机镜像描述信息提取镜像OS属性,以通过所述镜像OS属性确定亲和性;
在源虚拟机与虚拟机v镜像OS反亲和的情况下,直接返回所述第一预设值;
在源虚拟机与虚拟机v镜像OS不反亲和的情况下,从所述镜像特征值数据库中查找源虚拟机镜像与虚拟机v镜像亲和性关系数值,并在查询到的情况下直接读取该数值,在没有查询到的情况下,根据镜像uuid,从所述镜像特征值数据库分别读取源虚拟机和虚拟机v的镜像亲和性位数组,以计算源虚拟机与虚拟机v的镜像亲和性;
判断镜像亲和性关系数值是否大于当前最大值;
在大于当前最大值的情况下,更新最大镜像亲和性数值,并记录最大镜像亲和性数值所对应的虚拟机v的uuid及其所在节点的宿主机地址。
可选地,所述备份模块结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据包括:
所述备份模块将亲和虚拟机镜像数据逐次分解为长度为L的多个定长数据块,对每块数据块用两种校验码算法分别生成两个校验码;将亲和虚拟机镜像的校验码信息数组传给镜像服务器,以将源虚拟机镜像与亲和虚拟机镜像按数据块粒度逐一比对;将源虚拟机镜像构建元信息数组,以将亲和虚拟机数据块编号与源虚拟机镜像差异数据集传输至目标宿主机。
一种管理节点,包括:上述的虚拟机启动装置。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述方法。
本发明实施例提供的方案在待创建虚拟机上进行镜像亲和性分析,得到源虚拟机的镜像亲和性虚拟机的目标宿主机,根据目标宿主机上已有数据, 将源虚拟机镜像数据部分拷贝到目标宿主机,减少了远程数据拷贝数量,快速部署并启动虚拟机,提高了部署效率,解决了相关技术中,云计算对大规模、大容量的虚拟机的快速部署提出了更高的要求,虚拟机部署方式已无法满足需求的问题。
在阅读并理解了附图和详细描述后,可以明白其它方面。
附图概述
图1是本发明实施例中虚拟机启动方法的流程图;
图2是本发明实施例中虚拟机启动装置的结构示意图;
图3是本发明实施例中虚拟机启动装置中发送模块的结构示意图;
图4是本发明实施例中虚拟机启动装置中确定模块的结构示意图;
图5是本发明实施例中虚拟机启动装置中备份模块的结构示意图;
图6是本发明可选实施例中虚拟化集群拓扑示意图;
图7是本发明可选实施例中虚拟机启动方法实现的架构示意图。
本发明的实施方式
本发明实施例提供了一种虚拟机启动方法、装置及管理节点。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
本发明实施例提供了一种虚拟机启动方法,该方法的流程如图1所示,包括步骤S102至S106:
S102,管理节点向镜像服务器发送镜像分析请求,以使得镜像服务器分析待创建虚拟机镜像亲和性特征值;
S104,管理节点根据虚拟机资源需求及虚拟机镜像亲和性特征值,确定源虚拟机的镜像亲和性虚拟机所在宿主机,以将所在宿主机作为目标宿主机;
S106,管理节点结合目标宿主机上已有数据,将源虚拟机镜像数据部分 拷贝到目标宿主机,以复原完整源虚拟机镜像数据,从而实现快速启动虚拟机。
本发明实施例提供的方法在待创建虚拟机上进行镜像亲和性分析,得到源虚拟机的镜像亲和性虚拟机的目标宿主机,根据目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,减少了远程数据拷贝数量,可以快速部署并启动虚拟机,提高了部署效率,解决了相关技术中,云计算对大规模、大容量的虚拟机的快速部署提出了更高的要求,现有的虚拟机部署方式已无法满足需求的问题。
可选地,所述管理节点向镜像服务器发送镜像分析请求,以使得镜像服务器分析待创建虚拟机镜像亲和性特征值包括:管理节点接收来自客户端的创建虚拟机请求,并向镜像服务器注册镜像;管理节点向镜像服务器发送镜像分析请求,以使得镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中。
可选地,所述镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中包括:构造一个m位的镜像亲和性特征值位数组,并将所有位置为0;定义一组从1至n的hash函数;将虚拟机镜像数据分解为长度为L的多个定长数据块;将第i个数据块逐次通过n个hash函数,以映射到镜像亲和性特征值位数组中;将i设为i+1,重复通过n个hash函数,直到所有数据块都完成映射,以生成当前虚拟机的镜像亲和性特征值位数组,作为镜像亲和性特征值的分析结果,并将所述分析结果保存在镜像特征值数据库中;其中,i初始为1,m和n均为大于或等于1的正整数。
可选地,所述管理节点根据虚拟机资源需求及虚拟机镜像亲和性特征值,确定源虚拟机的镜像亲和性虚拟机所在宿主机,以将所在宿主机作为目标宿主机包括:所述管理节点获取每个计算节点的实时资源使用信息,根据虚拟机的资源需求信息过滤出资源充足的节点;管理节点向镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得镜像服务器根据镜像亲和性特征值分析确定镜像相似度;管理节点根据节点资源充足率及镜像相似度,确定待部署节点及待部署节点上的亲和性虚拟机。
可选地,所述管理节点向所述镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得所述镜像服务器根据镜像亲和性特征值分析确定镜像相似度,包括:
设置最大镜像亲和性数值为第一预设值,所述第一预设值为不可能存在的亲和性数值(比如远大于或远小于经验数值、或者远远偏离可能的数值范围);依次从资源充足的备选节点中选取节点v;根据预存储的虚拟化集群节点信息表,依次选取节点v上的虚拟机,并从预存储的虚拟机信息表中获取虚拟机v对应的虚拟机镜像uuid;管理节点根据源虚拟机的uuid,从虚拟机信息表中查取到源虚拟机镜像uuid;管理节点向镜像服务器发出源虚拟机及虚拟机v镜像亲和性分析请求,以通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性,请求参数为源虚拟机镜像uuid及虚拟机v的镜像uuid。
可选地,所述通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性,包括::镜像服务器根据与存储的虚拟机镜像描述信息提取镜像OS属性,以通过镜像OS属性确定亲和性;在源虚拟机与虚拟机v镜像OS反亲和的情况下,直接返回第一预设值;在源虚拟机与虚拟机v镜像OS不反亲和的情况下,从镜像特征值数据库中查找源虚拟机镜像与虚拟机v镜像亲和性关系数值,并在查询到的情况下直接读取该数值,在没有查询到的情况下,根据镜像uuid,从镜像特征值数据库分别读取源虚拟机和虚拟机v的镜像亲和性位数组,以计算源虚拟机与虚拟机v的镜像亲和性;判断镜像亲和性关系数值是否大于当前最大值;在大于当前最大值的情况下,更新最大镜像亲和性数值,并记录最大镜像亲和性数值所对应的虚拟机v的uuid及其所在节点的宿主机地址。
可选地,所述管理节点结合目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据,实现快速启动虚拟机包括:
所述管理节点向目标宿主机发出准备虚拟机镜像请求;管理节点结合目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以使目标宿主机结合待部署虚拟机镜像增量数据实现虚拟机镜像本地重构。
可选地,所述管理节点结合目标宿主机上已有数据,将源虚拟机镜像数 据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据,实现快速启动虚拟机包括:
将亲和虚拟机镜像数据逐次分解为长度为L的多个定长数据块,对每块数据块用两种校验码算法分别生成两个校验码;将亲和虚拟机镜像的校验码信息数组传给镜像服务器,以将源虚拟机镜像与亲和虚拟机镜像按数据块粒度逐一比对;将源虚拟机镜像构建元信息数组,以将亲和虚拟机数据块编号与源虚拟机镜像差异数据集传输至目标宿主机。
本发明实施例还提供了一种虚拟机启动装置,该装置的结构示意如图2所示,包括:发送模块10,设置成向镜像服务器发送镜像分析请求,以使得镜像服务器分析待创建虚拟机镜像亲和性特征值;确定模块20,与发送模块10耦合,设置成根据虚拟机资源需求及虚拟机镜像亲和性特征值,确定源虚拟机的镜像亲和性虚拟机所在宿主机,以将所在宿主机作为目标宿主机;备份模块30,与确定模块20耦合,设置成结合目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据,从而实现快速启动虚拟机。
可选地,发送模块10的结构如图3所示,其可以包括:接收单元101,设置成接收来自客户端的创建虚拟机请求,并向镜像服务器注册镜像;第一发送单元102,与接收单元101耦合,设置成向镜像服务器发送镜像分析请求,以使得镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中。
可选地,所述第一发送单元102向镜像服务器发送镜像分析请求,以使得所述镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中包括:
所述第一发送单元向镜像服务器发送镜像分析请求,以使得所述镜像服务器构造一个m位的镜像亲和性特征值位数组,并将所有位置为0;定义一组从1至n的hash函数;将虚拟机镜像数据分解为长度为L的多个定长数据块;将第i个数据块逐次通过n个hash函数,以映射到镜像亲和性特征值位数组中;将i设为i+1,重复通过n个hash函数,直到所有数据块都完成映射,以生成当前虚拟机的镜像亲和性特征值位数组,实现镜像亲和性特征 值分析过程,并将分析结果保存在镜像特征值数据库中;其中,i初始为1,m和n均为大于或等于1的正整数。
可选地,如图4所示,确定模块20可以包括:获取单元201,设置成获取每个计算节点的实时资源使用信息,根据虚拟机的资源需求信息过滤出资源充足的节点;第二发送单元202,与获取单元201耦合,设置成向镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得镜像服务器根据镜像亲和性特征值分析确定镜像相似度;确定单元203,与第二发送单元202耦合,设置成根据节点资源充足率及镜像相似度,确定待部署节点及待部署节点上的亲和性虚拟机。
可选地,上述第二发送单元202向所述镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使的所述镜像服务器根据镜像亲和性特征值分析确定镜像相似度,包括:
所述第二发送单元202设置最大镜像亲和性数值为第一预设值,其中,第一预设值为不可能存在的亲和性数值;依次从资源充足的备选节点中选取节点v;根据预存储的虚拟化集群节点信息表,依次选取节点v上的虚拟机,并从预存储的虚拟机信息表中获取虚拟机v对应的虚拟机镜像uuid;根据源虚拟机的uuid,从虚拟机信息表中查取到源虚拟机镜像uuid;向镜像服务器发出源虚拟机及虚拟机v镜像亲和性分析请求,以通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性,其中,请求参数为源虚拟机镜像uuid及虚拟机v的镜像uuid。
可选地,所述第二发送单元通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性的包括:
所述第二发送单元通过所述镜像服务器,根据与存储的虚拟机镜像描述信息提取镜像OS属性,以通过镜像OS属性确定亲和性;在源虚拟机与虚拟机v镜像OS反亲和的情况下,直接返回第一预设值;在源虚拟机与虚拟机v镜像OS不反亲和的情况下,从镜像特征值数据库中查找源虚拟机镜像与虚拟机v镜像亲和性关系数值,并在查询到的情况下直接读取该数值,在没有查询到的情况下,根据镜像uuid,从镜像特征值数据库分别读取源虚拟机和虚拟机v的镜像亲和性位数组,以计算源虚拟机与虚拟机v的镜像亲和 性;判断镜像亲和性关系数值是否大于当前最大值;在大于当前最大值的情况下,更新最大镜像亲和性数值,并记录最大镜像亲和性数值所对应的虚拟机v的uuid及其所在节点的宿主机地址。
可选地,如图5所示,所述备份模块30可以包括:第三发送单元301,设置成向目标宿主机发出准备虚拟机镜像请求;备份单元302,与第三发送单元301耦合,设置成结合目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以使目标宿主机结合待部署虚拟机镜像增量数据实现虚拟机镜像本地重构。
可选地,所述备份模块30结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据包括:
所述备份模块将亲和虚拟机镜像数据逐次分解为长度为L的多个定长数据块,对每块数据块用两种校验码算法分别生成两个校验码;将亲和虚拟机镜像的校验码信息数组传给镜像服务器,以将源虚拟机镜像与亲和虚拟机镜像按数据块粒度逐一比对;将源虚拟机镜像构建元信息数组,以将亲和虚拟机数据块编号与源虚拟机镜像差异数据集传输至目标宿主机。
本发明实施例还提供了一种管理节点,其包括上述的虚拟机启动装置。本领域技术人员根据上述记载,知晓如何将上述虚拟机启动装置集成设置在管理节点中,此处不再赘述。
本发明实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述方法。
实施示例1
本实施示例提供一种虚拟机启动的方法,该方法通过分析虚拟机镜像亲和性特征值,并综合虚拟机资源需求及约束条件,确定源虚拟机的镜像亲和性虚拟机所在宿主机为目标宿主机,而后将源虚拟机镜像数据部分拷贝到目标宿主机,结合目标宿主机上已有数据,本地复原完整源虚拟机镜像数据。本实施示例加速虚拟机部署和启动时间的同时,降低虚拟机部署时带宽消耗,增强虚拟化集群的弹性扩展能力。
图6为虚拟化集群拓扑示意图,从图中可以看出虚拟化集群的架构;图 7为虚拟机启动方法实现的架构示意图,如图6所示,本实施示例所述虚拟化集群包括管理服务器(管理节点),通过网络连接镜像服务器和至少一个计算节点(物理主机),所述计算节点包括硬件层、运行在所述硬件层之上的VMM(虚拟机监督***)、以及运行在所述宿主机之上的至少一个VM(虚拟机),比如图6中的VM1和VM2;镜像服务器中包含一个或多个镜像,比如图6中的镜像1~镜像4。如图7所示,客户端、宿主机以及镜像服务器分别和管理中心(管理节点)相连。
所述方法概述过程如下:
(1)用户从管理节点的客户端发起创建虚拟机请求。
(2)管理节点接收到指令,将虚拟机状态置为pending。
(3)管理节点向镜像服务器注册该镜像,镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果记录在镜像特征值数据库中。
(4)管理节点通过每个计算节点获取实时资源使用信息,根据虚拟机的CPU(中央处理器)、MEM(存储器)、及磁盘空间等资源需求信息,过滤出资源充足的节点。
(5)管理节点向镜像服务器逐一发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,镜像服务器根据镜像亲和性特征值分析计算镜像相似度。
(6)管理节点综合节点资源充足率及镜像相似度,确定待部署节点及待部署节点上的亲和性虚拟机。
(7)管理节点向目标宿主机发出准备虚拟机镜像请求,并将虚拟机状态置为prolog。
(8)目标宿主机结合待部署虚拟机镜像增量数据,虚拟机镜像本地重构,从而完成虚拟机部署;如果不存在亲和性虚拟机,则将虚拟机镜像全量传输至目标节点。目标宿主机向管理节点返回虚拟机镜像准备完毕信息。
(9)管理节点向目标宿主机下达启动虚拟机指令,目标宿主机在本地启动虚拟机,虚拟机进入booting状态,当虚拟机启动完成则进入running状态,至此虚拟机完成部署并启动,开始执行业务处理。
实施示例2
在虚拟机镜像进行注册时,镜像服务器基于镜像数据特征降维进行亲和性特征值分析,包括如下过程:
(1)构造一个m位的镜像亲和性特征值位数组;
(2)将所有位置为0;
(3)定义一组hash函数:hash1,hash2,…,hashn;
(4)将虚拟机镜像数据分解为长度为L(譬如4K)的多个定长数据块;
(5)对于第i个数据块(i初始为1),逐次通过步骤(3)定义的n个hash函数,映射到镜像亲和性特征值位数组;
(6)将i设为i+1,重复步骤(5),直到所有数据块都完成向位数组的映射,生成当前虚拟机的镜像亲和性特征值位数组;
(7)将此位数组记录在数据库的镜像亲和性表中。其中,镜像亲和性数据结构如表1所示。
表1、镜像亲和性数据结构
Figure PCTCN2016083688-appb-000001
通过以上过程完成镜像降维,镜像由m位亲和性特征值位数组表征。越相似的镜像在它们的亲和性特征值位数组中有更多共同的1。由于hash函数会发生碰撞,相似性判断会有一定概率发生错误,而特征值位数组位数m越大,则相似性判断精确度越高,当然存储空间消耗也越大。
在启动虚拟机前,管理节点首先从每个计算节点获取实时资源使用信息,根据虚拟机的CPU、MEM、网络带宽、及磁盘空间等资源需求信息,过滤出初步可行性节点。管理节点对初步可行性节点按照资源充足度进行降序排序,对于虚拟机j,节点i的resource adequacy ratio(资源充足率)定义为:
Rari,j=Wcpu,j*CPUi+Wmem,j*MEMi+Wstorage,j*Storagej
其中,Wcpu,j为虚拟机j的CPU权重,Wmem,j为虚拟机j的MEM的权重,Wstorage,j为虚拟机j的存储权重,权重值可根据虚拟机的业务类型及资源需求情况调整,默认为1:1:1。CPUi,MEMi,Storagei为节点i的CPU、MEM、存储容量剩余资源比。
管理节点从初步可行性队列中找出源虚拟机的亲和虚拟机,方法如下:
(1)设置最大镜像亲和性数值为-1,目标放置节点为初步可行性队列首节点;
(2)依次从资源充足备选节点集合中选取节点n;
(3)根据虚拟化集群节点信息表,依次选取节点n上的虚拟机,如虚拟机v;
(4)从虚拟机信息表中获取虚拟机v对应的虚拟机镜像uuid;其中,虚拟化集群节点信息数据结构如表2所示,虚拟机信息数据结构如表3所示。
表2、虚拟化集群节点信息数据结构
Figure PCTCN2016083688-appb-000002
Figure PCTCN2016083688-appb-000003
表3、虚拟机信息数据结构
Figure PCTCN2016083688-appb-000004
(5)管理节点根据源虚拟机的uuid,从虚拟机信息表中查取到源虚拟机镜像uuid;
(6)管理节点向镜像服务器发出源虚拟机及虚拟机v镜像亲和性分析请求,请求参数为源虚拟机镜像uuid及虚拟机v的镜像uuid;
(7)镜像服务器根据虚拟机镜像描述信息提取镜像OS属性;
(8)若源虚拟机与虚拟机v镜像OS反亲和(如待部署为Ubuntu镜像,备选节点上虚拟机为Redhat镜像),直接返回-1,跳至步骤(12);其中,镜像亲和性关系数据结构如表4所示。
表4、镜像亲和性关系数据结构
名称 数据类型 描述
imageA_uuid String 虚拟机镜像标识符
imageB_uuid String 虚拟机镜像标识符
Affinity_value double 亲和性数值
(9)如果亲和,则从镜像亲和性关系数据库,查找源虚拟机镜像与虚拟机v镜像亲和性关系数值,若查询到,则直接读取,并返回请求跳至步骤(12);
(10)如果没有查询到,则根据镜像uuid,从镜像亲和性数据库分别读取源虚拟机和虚拟机v的镜像亲和性位数组;
(11)计算源虚拟机与虚拟机v的镜像亲和性。
亲和性可以采用多种方式进行定义,此处仅以一种方式举例说明。
亲和性定义为:Cosine_Sim(x,y)=dot(x,y)/(sqrt(|x|.|y|)),dot(x,y)=Σx[i].y[i],其中dot(x,y)相当于两个亲和性特征位数组中同时为1的位数;|x|表示亲和性特征为数组为1的位数。
将<源虚拟机镜像uuid,虚拟机v镜像uuid,镜像亲和性关系数值>,记录到镜像亲和性关系数据库中,并返回请求;
(12)若镜像亲和性关系数值大于最大值,则管理节点更新最大镜像亲和性数值,并记录最大镜像亲和性数值所对应的虚拟机v的uuid及其所在节点n的hostid;
(13)转到步骤(3),重复步骤(3)~(12),直到节点n上所有虚拟机比对完成;
(14)转到步骤(2),直到遍历完所有资源充足节点n;
(15)镜像服务器向管理节点返回<最大镜像亲和性数值,对应的虚拟机v,虚拟机所在节点n>;
若管理节点获取到的最大镜像亲和性数值不为-1,即通过亲和性关系分析,找到了镜像亲和性虚拟机,则确定请求返回值中的节点为目标放置节点,请求返回值中的虚拟机为源虚拟机在目标节点上的镜像亲和性虚拟机。 否则,源虚拟机与所有备选节点上虚拟机均反亲和,选取资源充足度最高的节点为目标放置节点。
对于镜像亲和虚拟机存在的情况,在目标放置节点上重构虚拟机镜像前,需生成源虚拟机镜像构建元信息,做法为:
(1)在目标放置节点上,将亲和虚拟机镜像数据逐次分解为长度为L的多个定长数据块。对每块数据块用两种checksum算法分别生成两个校验码(弱checksum,强checksum);
(2)将亲和虚拟机镜像的checksum信息数组传给镜像服务器;其中,Checksum信息数据结构如表5所示。
表5、Checksum信息数据结构
名称 数据类型 描述
Block_id long 数据块编号
Weak_checksum String 弱checksum
Strong_checksum String 强checksum
(3)将源虚拟机镜像与亲和虚拟机镜像按数据块粒度逐一比对;
a)将源虚拟机镜像的第i至i+L-1字节数据(i初始为1)生成弱checksum和强checksum,与亲和虚拟机镜像每个数据块的弱checksum逐一比对;
b)若源虚拟机镜像的第i至i+L-1字节数据块与亲和虚拟机镜像的数据块b存在一致的弱checksum,则说明这两个数据块大致相同,进入c),否则进入e);
c)进一步与亲和虚拟机镜像数据块b进行强checksum比对;如果也一致,则说明两个数据块完全相同,记录亲和虚拟机的数据块编号b;否则进入e);
d)源虚拟机镜像移动L个字节(i更新为i+L),重复步骤a),直至源虚拟机镜像所有数据块完成比对;
e)若存在一致的弱checksum,但对应强checksum不一致,或者不存在一致的弱checksum,则记录差异数据,即源虚拟机的第i个字节;
f)源虚拟机镜像移动1个字节(i更新为i+1),重复步骤a),直至源虚拟机镜像所有数据块完成比对。
(4)将源虚拟机镜像构建元信息数组,即亲和虚拟机数据块编号与源虚拟机镜像差异数据集传输至目标放置节点;其中,元信息数据结构如表6所示。
表6、元信息数据结构
Figure PCTCN2016083688-appb-000005
对于镜像亲和虚拟机存在的情况,在生成镜像构建元信息后,则在目标放置节点构建源虚拟机,做法为:
(1)在目标放置节点为源虚拟机创建本地目录;
(2)遍历源虚拟机镜像构建元信息数组;
a)如果元信息为long,则根据block id找到镜像亲和虚拟机的相应L字节长的数据块,添加到源虚拟机本地目录下的镜像;
b)如果元信息为byte,则将对应内容直接append到源虚拟机本地目录下的镜像。
当元信息数组遍历完成,在源虚拟机本地目录下生成了源虚拟机全量镜像。对于镜像亲和虚拟机不存在的情况,将虚拟机镜像通过网络全量传输至目标放置节点。
本发明实施例具有以下优点:适用性强,无需修改底层内核,对于VMware ESX、KVM、XEN等虚拟化技术均适用;平台无关性,对于windows、Linux等操作***均适用,且完全将Guest OS作为一个黑盒,无需修改Guest OS;通过对虚拟机镜像降维分析,准确判定镜像亲和性虚拟机,并选择对应节点进行部署,避免在多个节点上冗余预置,有效提升了存储空间利用效 率。
本发明实施例对于云计算大规模部署带来以下积极效果:通过选择镜像亲和性最高的虚拟机所在节点进行部署,减少远程数据拷贝数量,快速部署并启动虚拟机;提高部署效率,增强云计算在负载动态变化时的弹性扩展能力;减少数据拷贝造成的带宽消耗,有效降低混合云网络通信成本。
工业实用性
本发明实施例提供的方案在待创建虚拟机上进行镜像亲和性分析,得到源虚拟机的镜像亲和性虚拟机的目标宿主机,根据目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,减少了远程数据拷贝数量,快速部署并启动虚拟机,提高了部署效率,解决了相关技术中,云计算对大规模、大容量的虚拟机的快速部署提出了更高的要求,虚拟机部署方式已无法满足需求的问题。

Claims (17)

  1. 一种虚拟机启动方法,包括:
    管理节点向镜像服务器发送镜像分析请求,以使得所述镜像服务器分析待创建虚拟机镜像亲和性特征值;
    所述管理节点根据虚拟机资源需求及所述虚拟机镜像亲和性特征值,确定源虚拟机的镜像亲和性虚拟机所在宿主机,以将所述所在宿主机作为目标宿主机;
    所述管理节点结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据。
  2. 如权利要求1所述的虚拟机启动方法,其中,所述管理节点向镜像服务器发送镜像分析请求,以使得所述镜像服务器分析待创建虚拟机镜像亲和性特征值包括:
    所述管理节点接收来自客户端的创建虚拟机请求,并向所述镜像服务器注册镜像;
    所述管理节点向镜像服务器发送镜像分析请求,以使得所述镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中。
  3. 如权利要求2所述的虚拟机启动方法,其中,所述管理节点根据虚拟机资源需求及所述虚拟机镜像亲和性特征值,确定源虚拟机的镜像亲和性虚拟机所在宿主机,以将所述所在宿主机作为目标宿主机包括:
    所述管理节点获取每个计算节点的实时资源使用信息,根据虚拟机的资源需求信息过滤出资源充足的节点;
    所述管理节点向所述镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得所述镜像服务器根据镜像亲和性特征值分析确定镜像相似度;
    所述管理节点根据节点资源充足率及所述镜像相似度,确定待部署节点及待部署节点上的亲和性虚拟机。
  4. 如权利要求3所述的虚拟机启动方法,其中,所述管理节点结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据包括:
    所述管理节点向目标宿主机发出准备虚拟机镜像请求;
    所述管理节点结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到所述目标宿主机,以使所述目标宿主机结合待部署虚拟机镜像增量数据实现虚拟机镜像本地重构。
  5. 如权利要求2至4中任一项所述的虚拟机启动方法,其中,所述镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中,包括:
    构造一个m位的镜像亲和性特征值位数组,并将所有位置为0;
    定义一组从1至n的hash函数;
    将虚拟机镜像数据分解为长度为L的多个定长数据块;
    将第i个数据块逐次通过n个hash函数,以映射到镜像亲和性特征值位数组中;
    将i设为i+1,重复通过n个hash函数,直到所有数据块都完成映射,以生成当前虚拟机的镜像亲和性特征值位数组,作为镜像亲和性特征值的分析结果,并将所述分析结果保存在镜像特征值数据库中;
    其中,i初始为1,m和n均为大于或等于1的正整数。
  6. 如权利要求5所述的虚拟机启动方法,其中,所述管理节点向所述镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得所述镜像服务器根据镜像亲和性特征值分析确定镜像相似度,包括:
    设置最大镜像亲和性数值为第一预设值,所述第一预设值为不可能存在的亲和性数值;
    依次从资源充足的备选节点中选取节点v;
    根据预存储的虚拟化集群节点信息表,依次选取节点v上的虚拟机,并从预存储的虚拟机信息表中获取虚拟机v对应的虚拟机镜像uuid;
    管理节点根据源虚拟机的uuid,从所述虚拟机信息表中查取到源虚拟机镜像uuid;
    管理节点向镜像服务器发出源虚拟机及虚拟机v镜像亲和性分析请求,以通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性,请求参数为源虚拟机镜像uuid及虚拟机v的镜像uuid。
  7. 如权利要求6所述的虚拟机快速启动方法,其中,所述通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性,包括:
    所述镜像服务器根据与存储的虚拟机镜像描述信息提取镜像OS属性,以通过所述镜像OS属性确定亲和性;
    在源虚拟机与虚拟机v镜像OS反亲和的情况下,直接返回所述第一预设值;
    在源虚拟机与虚拟机v镜像OS不反亲和的情况下,从所述镜像特征值数据库中查找源虚拟机镜像与虚拟机v镜像亲和性关系数值,并在查询到的情况下直接读取该数值,在没有查询到的情况下,根据镜像uuid,从所述镜像特征值数据库分别读取源虚拟机和虚拟机v的镜像亲和性位数组,以计算源虚拟机与虚拟机v的镜像亲和性;
    判断镜像亲和性关系数值是否大于当前最大值;
    在大于当前最大值的情况下,更新最大镜像亲和性数值,并记录最大镜像亲和性数值所对应的虚拟机v的uuid及其所在节点的宿主机地址。
  8. 如权利要求1至4中任一项所述的虚拟机快速启动方法,其中,所述管理节点结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机确将源虚拟机镜像数据部分拷贝到目标宿主机包括:
    将亲和虚拟机镜像数据逐次分解为长度为L的多个定长数据块,对每块数据块用两种校验码算法分别生成两个校验码;
    将亲和虚拟机镜像的校验码信息数组传给镜像服务器,以将源虚拟机镜像与亲和虚拟机镜像按数据块粒度逐一比对;
    将源虚拟机镜像构建元信息数组,以将亲和虚拟机数据块编号与源虚拟机镜像差异数据集传输至目标宿主机。
  9. 一种虚拟机快速启动装置,包括:
    发送模块,设置成向镜像服务器发送镜像分析请求,以使得所述镜像服务器分析待创建虚拟机镜像亲和性特征值;
    确定模块,设置成根据虚拟机资源需求及所述虚拟机镜像亲和性特征值,确定源虚拟机的镜像亲和性虚拟机所在宿主机,以将所述所在宿主机作为目标宿主机;
    备份模块,设置成结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据。
  10. 如权利要求9所述的虚拟机快速启动装置,其中,所述发送模块包括:
    接收单元,设置成接收来自客户端的创建虚拟机请求,并向所述镜像服务器注册镜像;
    第一发送单元,设置成向所述镜像服务器发送镜像分析请求,以使得所述镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中。
  11. 如权利要求10所述的虚拟机快速启动装置,其中,所述确定模块包括:
    获取单元,设置成获取每个计算节点的实时资源使用信息,根据虚拟机的资源需求信息过滤出资源充足的节点;
    第二发送单元,设置成向所述镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得所述镜像服务器根据镜像亲和性特征值分析确定镜像相似度;
    确定单元,设置成根据节点资源充足率及所述镜像相似度,确定待部署节点及待部署节点上的亲和性虚拟机。
  12. 如权利要求11所述的虚拟机快速启动装置,其中,所述备份模块包括:
    第三发送单元,设置成向目标宿主机发出准备虚拟机镜像请求;
    备份单元,设置成结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到所述目标宿主机,以使所述目标宿主机结合待部署虚拟机镜像增量数据实现虚拟机镜像本地重构。
  13. 如权利要求10至12中任一项所述的虚拟机启动装置,其中,所述第一发送单元向镜像服务器发送镜像分析请求,以使得所述镜像服务器对虚拟机镜像进行镜像亲和性特征值分析,并将分析结果保存在镜像特征值数据库中包括:
    所述第一发送单元向镜像服务器发送镜像分析请求,以使得所述镜像服务器构造一个m位的镜像亲和性特征值位数组,并将所有位置为0;定义一组从1至n的hash函数;将虚拟机镜像数据分解为长度为L的多个定长数据块;将第i个数据块逐次通过n个hash函数,以映射到镜像亲和性特征值位数组中;将i设为i+1,重复通过n个hash函数,直到所有数据块都完成映射,以生成当前虚拟机的镜像亲和性特征值位数组,实现镜像亲和性特征值分析过程,并将分析结果保存在镜像特征值数据库中;其中,i初始为1,m和n均为大于或等于1的正整数。
  14. 如权利要求13所述的虚拟机启动装置,其中,所述第二发送单元向所述镜像服务器发出待部署虚拟机与备选节点上虚拟机镜像亲和性分析指令,以使得所述镜像服务器根据镜像亲和性特征值分析确定镜像相似度,包括:
    所述第二发送单元设置最大镜像亲和性数值为第一预设值,其中,所述第一预设值为不可能存在的亲和性数值;依次从资源充足的备选节点中选取节点v;根据预存储的虚拟化集群节点信息表,依次选取节点v上的虚拟机,并从预存储的虚拟机信息表中获取虚拟机v对应的虚拟机镜像uuid;根据源虚拟机的uuid,从所述虚拟机信息表中查取到源虚拟机镜像uuid;
    向镜像服务器发出源虚拟机及虚拟机v镜像亲和性分析请求,以通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性,请求参数为源虚拟机镜像uuid及虚拟机v的镜像uuid。
  15. 如权利要求14所述的虚拟机启动装置,其中,所述第二发送单元通过预设方式确定亲和性源虚拟机及虚拟机v镜像亲和性包括:
    所述第二发送单元通过所述镜像服务器,根据与存储的虚拟机镜像描述信息提取镜像OS属性,以通过所述镜像OS属性确定亲和性;
    在源虚拟机与虚拟机v镜像OS反亲和的情况下,直接返回所述第一预设值;
    在源虚拟机与虚拟机v镜像OS不反亲和的情况下,从所述镜像特征值数据库中查找源虚拟机镜像与虚拟机v镜像亲和性关系数值,并在查询到的情况下直接读取该数值,在没有查询到的情况下,根据镜像uuid,从所述镜像特征值数据库分别读取源虚拟机和虚拟机v的镜像亲和性位数组,以计算源虚拟机与虚拟机v的镜像亲和性;
    判断镜像亲和性关系数值是否大于当前最大值;
    在大于当前最大值的情况下,更新最大镜像亲和性数值,并记录最大镜像亲和性数值所对应的虚拟机v的uuid及其所在节点的宿主机地址。
  16. 如权利要求9至12中任一项所述的虚拟机启动装置,其中,所述备份模块结合所述目标宿主机上已有数据,将源虚拟机镜像数据部分拷贝到目标宿主机,以复原完整源虚拟机镜像数据包括:
    所述备份模块将亲和虚拟机镜像数据逐次分解为长度为L的多个定长数据块,对每块数据块用两种校验码算法分别生成两个校验码;将亲和虚拟机镜像的校验码信息数组传给镜像服务器,以将源虚拟机镜像与亲和虚拟机镜像按数据块粒度逐一比对;将源虚拟机镜像构建元信息数组,以将亲和虚拟机数据块编号与源虚拟机镜像差异数据集传输至目标宿主机。
  17. 一种管理节点,包括:权利要求9至16中任一项所述的虚拟机启动装置。
PCT/CN2016/083688 2015-07-15 2016-05-27 一种虚拟机启动方法、装置及管理节点 WO2017008584A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510415019.7 2015-07-15
CN201510415019.7A CN106339254B (zh) 2015-07-15 2015-07-15 一种虚拟机快速启动方法、装置及管理节点

Publications (1)

Publication Number Publication Date
WO2017008584A1 true WO2017008584A1 (zh) 2017-01-19

Family

ID=57756809

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/083688 WO2017008584A1 (zh) 2015-07-15 2016-05-27 一种虚拟机启动方法、装置及管理节点

Country Status (2)

Country Link
CN (1) CN106339254B (zh)
WO (1) WO2017008584A1 (zh)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284169A (zh) * 2018-09-10 2019-01-29 福建星瑞格软件有限公司 基于进程虚拟化的大数据平台进程管理方法及计算机设备
CN111090491A (zh) * 2019-07-03 2020-05-01 杭州海康威视***技术有限公司 虚拟机任务状态的恢复方法、装置及电子设备
CN111857944A (zh) * 2019-04-30 2020-10-30 北京嘀嘀无限科技发展有限公司 虚拟机热迁移的方法、装置、***和计算机可读存储介质
CN112000425A (zh) * 2020-07-21 2020-11-27 北京北通云服科技有限公司 一种基于idv模式下的镜像管理***
CN112398892A (zh) * 2019-08-19 2021-02-23 浙江宇视科技有限公司 服务分配方法、装置及设备
CN113535670A (zh) * 2021-07-13 2021-10-22 山东省计算中心(国家超级计算济南中心) 一种虚拟化资源镜像存储***及其实现方法
CN114567496A (zh) * 2022-03-03 2022-05-31 浪潮云信息技术股份公司 一种进行云服务器镜像完整性校验的方法及***
CN114884905A (zh) * 2022-04-18 2022-08-09 深信服科技股份有限公司 一种流量镜像方法、装置、设备和计算机存储介质
CN116192870A (zh) * 2023-04-21 2023-05-30 中国科学技术大学 基于镜像级元数据管理和负载感知的p2p下载镜像方法

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582433B (zh) * 2017-09-29 2022-02-01 腾讯科技(深圳)有限公司 一种资源调度方法、装置、云计算***及存储介质
CN110071880B (zh) * 2018-01-24 2021-06-18 北京金山云网络技术有限公司 报文转发方法、转发装置、服务器及存储介质
CN110147266B (zh) * 2019-04-29 2024-03-15 腾讯科技(深圳)有限公司 虚拟机启动方法和装置、存储介质及电子装置
CN110287004B (zh) * 2019-07-05 2021-07-30 中国工商银行股份有限公司 基于docker容器技术的基础环境镜像预热方法及装置
CN111371841B (zh) * 2020-02-17 2023-04-07 平安科技(深圳)有限公司 一种数据监控的方法及装置
CN112527325B (zh) * 2020-11-23 2024-07-09 山东乾云启创信息科技股份有限公司 一种应用于超融合架构的部署方法及***
CN114237830B (zh) * 2022-02-24 2022-05-20 南京赛宁信息技术有限公司 靶场中虚拟机快速启动的调度与物理机扩容方法及***
CN117033084B (zh) * 2023-10-09 2024-01-19 武汉吧哒科技股份有限公司 虚拟机备份方法、装置、电子设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067425A (zh) * 2011-10-20 2013-04-24 ***通信集团公司 虚拟机创建方法、虚拟机管理***及相关设备
CN103577271A (zh) * 2013-11-14 2014-02-12 浪潮(北京)电子信息产业有限公司 云管理平台、宿主机、虚拟机资源部署方法和***
CN103595780A (zh) * 2013-11-08 2014-02-19 中国人民解放军理工大学 基于消重的云计算资源调度方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761566B (zh) * 2011-04-26 2015-09-23 国际商业机器公司 迁移虚拟机的方法和装置
US8983961B2 (en) * 2012-11-29 2015-03-17 International Business Machines Corporation High availability for cloud servers
CN103049334B (zh) * 2012-12-14 2015-09-30 华为技术有限公司 一种任务处理的方法和虚拟机
CN104679527B (zh) * 2013-11-26 2017-12-01 ***股份有限公司 虚拟机镜像离线升级方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067425A (zh) * 2011-10-20 2013-04-24 ***通信集团公司 虚拟机创建方法、虚拟机管理***及相关设备
CN103595780A (zh) * 2013-11-08 2014-02-19 中国人民解放军理工大学 基于消重的云计算资源调度方法
CN103577271A (zh) * 2013-11-14 2014-02-12 浪潮(北京)电子信息产业有限公司 云管理平台、宿主机、虚拟机资源部署方法和***

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284169A (zh) * 2018-09-10 2019-01-29 福建星瑞格软件有限公司 基于进程虚拟化的大数据平台进程管理方法及计算机设备
CN109284169B (zh) * 2018-09-10 2022-10-25 福建星瑞格软件有限公司 基于进程虚拟化的大数据平台进程管理方法及计算机设备
CN111857944A (zh) * 2019-04-30 2020-10-30 北京嘀嘀无限科技发展有限公司 虚拟机热迁移的方法、装置、***和计算机可读存储介质
CN111090491A (zh) * 2019-07-03 2020-05-01 杭州海康威视***技术有限公司 虚拟机任务状态的恢复方法、装置及电子设备
CN111090491B (zh) * 2019-07-03 2023-10-10 杭州海康威视***技术有限公司 虚拟机任务状态的恢复方法、装置及电子设备
CN112398892B (zh) * 2019-08-19 2023-06-20 浙江宇视科技有限公司 服务分配方法、装置及设备
CN112398892A (zh) * 2019-08-19 2021-02-23 浙江宇视科技有限公司 服务分配方法、装置及设备
CN112000425A (zh) * 2020-07-21 2020-11-27 北京北通云服科技有限公司 一种基于idv模式下的镜像管理***
CN113535670A (zh) * 2021-07-13 2021-10-22 山东省计算中心(国家超级计算济南中心) 一种虚拟化资源镜像存储***及其实现方法
CN114567496A (zh) * 2022-03-03 2022-05-31 浪潮云信息技术股份公司 一种进行云服务器镜像完整性校验的方法及***
CN114567496B (zh) * 2022-03-03 2024-02-20 浪潮云信息技术股份公司 一种进行云服务器镜像完整性校验的方法及***
CN114884905A (zh) * 2022-04-18 2022-08-09 深信服科技股份有限公司 一种流量镜像方法、装置、设备和计算机存储介质
CN114884905B (zh) * 2022-04-18 2023-11-07 深信服科技股份有限公司 一种流量镜像方法、装置、设备和计算机存储介质
CN116192870A (zh) * 2023-04-21 2023-05-30 中国科学技术大学 基于镜像级元数据管理和负载感知的p2p下载镜像方法
CN116192870B (zh) * 2023-04-21 2023-07-11 中国科学技术大学 基于镜像级元数据管理和负载感知的p2p下载镜像方法

Also Published As

Publication number Publication date
CN106339254A (zh) 2017-01-18
CN106339254B (zh) 2020-06-12

Similar Documents

Publication Publication Date Title
WO2017008584A1 (zh) 一种虚拟机启动方法、装置及管理节点
US11288286B2 (en) Storage system with data consistency checking in synchronous replication using active snapshot set
US11082206B2 (en) Layout-independent cryptographic stamp of a distributed dataset
US10146697B1 (en) NUMA-aware perfect hash algorithm
US9727273B1 (en) Scalable clusterwide de-duplication
US10871960B2 (en) Upgrading a storage controller operating system without rebooting a storage system
US11249834B2 (en) Storage system with coordinated recovery across multiple input-output journals of different types
US11030053B2 (en) Efficient disaster rollback across heterogeneous storage systems
CA2923068C (en) Method and system for metadata synchronization
US8832130B2 (en) System and method for implementing on demand cloud database
TWI549060B (zh) Access methods and devices for virtual machine data
US10366091B2 (en) Efficient image file loading and garbage collection
WO2017143844A1 (zh) 数据操作方法和数据管理服务器
US20170115909A1 (en) Data replica control
US20140156866A1 (en) Efficient Data Transmission Between Computing Devices
US20060095435A1 (en) Configuring and deploying portable application containers for improved utilization of server capacity
CN102693230B (zh) 用于存储区域网络的文件***
EP4049130B1 (en) Updating a metadata structure for a firmware update
WO2018121025A1 (zh) 比较数据表的数据的方法和***
US20200249842A1 (en) Storage system indexed using persistent metadata structures
US9223517B1 (en) Scalable index store
US20160139957A1 (en) Method and system for scheduling virtual machines in integrated virtual machine clusters
US11386124B2 (en) Snapshot rollback for synchronous replication
US10031668B2 (en) Determining status of a host operation without accessing the host in a shared storage environment
US9916372B1 (en) Folded-hashtable synchronization mechanism

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16823731

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16823731

Country of ref document: EP

Kind code of ref document: A1