CN105786608A - Remote deduplication migration method and system for virtual machine - Google Patents

Remote deduplication migration method and system for virtual machine Download PDF

Info

Publication number
CN105786608A
CN105786608A CN201610176680.1A CN201610176680A CN105786608A CN 105786608 A CN105786608 A CN 105786608A CN 201610176680 A CN201610176680 A CN 201610176680A CN 105786608 A CN105786608 A CN 105786608A
Authority
CN
China
Prior art keywords
virtual
data
machine
machine data
migrated
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
CN201610176680.1A
Other languages
Chinese (zh)
Inventor
李小勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN HUACHENGFENG ELECTRONICS INDUSTRY Co Ltd
Original Assignee
SHENZHEN HUACHENGFENG ELECTRONICS INDUSTRY 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 SHENZHEN HUACHENGFENG ELECTRONICS INDUSTRY Co Ltd filed Critical SHENZHEN HUACHENGFENG ELECTRONICS INDUSTRY Co Ltd
Priority to CN201610176680.1A priority Critical patent/CN105786608A/en
Publication of CN105786608A publication Critical patent/CN105786608A/en
Pending legal-status Critical Current

Links

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
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

The invention relates to a remote deduplication migration method and system for a virtual machine. To-be-migrated virtual machine data in a source host are compared with virtual machine data in a preset database, repeated data and non-repeated data of the to-be-migrated virtual machine data in the source host and the virtual machine data in the preset database are acquired, the non-repeated data are transmitted to a target host from the source host, accordingly, the repeated data are acquired from the preset database and transmitted to the target host, only the non-repeated data are transmitted to the target host, accordingly, data existing in the preset database are prevented from being transmitted from the source host to the target host through the internet, data transmitted from the source host to the target host can be reduced, occupied network resources are reduced, virtual machine migration time is shortened, and the migration efficiency is improved.

Description

Strange land virtual machine duplicate removal moving method and system
Technical field
The present invention relates to field of computer technology, particularly to a kind of strange land virtual machine duplicate removal moving method and system.
Background technology
Virtual machine (virtualmachine) relative physical machine, it is, by the mode of software definition, physical machine cut into several demand assigned software, and by the integrated management to virtual resources, reduce IT complexity, improve resource utilization, save the occupation of land space of machine room physical machine, reduce cost.
The migration of virtual machine refers to and moves on destination host by operating system and the application program of the virtual machine on source host, and process that can be properly functioning on destination host, wherein, source host is the main frame needing to go out virtual machine (vm) migration, and destination host is the main frame receiving the virtual machine migrated.The migration of virtual machine needs internal memory and the data in magnetic disk of mobile virtual machine; virtual machine after migration; it is possible not only to be managed in a unified interface; and can combined with virtual machine high availability instrument; when these servers are because of various disorderly closedown; automatically switch in virtual server additionally identical in network, thus reaching the purpose of non-interrupting service.Online migrate (LiveMigration) refers to while ensureing that virtual in-fight service is properly functioning; virtual machine migrates between different physical hosts; in order to ensure the available of virtual machine service in transition process, transition process only has very of short duration shutdown switching time.The earlier stage migrated, virtual machine runs at source host, when migration proceeds to certain phase, destination host has had been provided with the necessary resource of system of running, through a very of short duration switching, source host is by control right transfer to destination host, and virtual machine continues to run with on destination host.For virtual machine itself, owing to the time of switching is very of short duration, the interruption of the imperceptible virtual machine of user, thus user is transparent by transition process.
At present, the heat mode of moving generally adopted is to use memory block dynamic migration technology to migrate online to the virtual machine realizing V2V (Virtual-to-Virtual, virtual machine to virtual machine).For the migration of the internal storage state of virtual machine, the product of current main flow is substantially all the strategy that have employed pre-copy (Pre-Copy).After migration starts, the virtual machine on source host is still running, and the virtual machine on destination host not yet starts.Migrate across a circulation, the virtual machine memory data on source host is sent to the virtual machine on destination host.The circulation first round sends all dsc datas or cold data block data, the containing dirty pages internal memory write by virtual machine in last round of pre-copy process is sent in ensuing each repeating query environment-development, wherein, containing dirty pages is the concept in linux kernel, because the read or write speed of hard disk is far unable to catch up with the speed of internal memory, system is just put into read-write in internal memory than data more frequently in advance, to improve read or write speed, this is just high-speed cache, Linux is the unit using page as high-speed cache, when process have modified the data in high-speed cache, this page is just containing dirty pages by kernel flag, kernel will be write the data of containing dirty pages in disk in the suitable time, to keep the data in high-speed cache to be consistent with the data in disk.Until ripe, pre-copy loop ends, entering and shut down the copy stage, source host is suspended, and no longer has memory refreshing.Last containing dirty pages taken turns in circulation is transferred to the virtual machine on destination host.
The above-mentioned heat based on memory block duplication technology is moved, and for the memory part that renewal speed is very fast, each cyclic process all can produce containing dirty pages, it is necessary to repeating pre-copy, also lead to cycle-index very many simultaneously, the time of migration is elongated.And two virtual machines running same or similar operating system, their internal memory comprises the identical dsc data of major part or cold data block.Such as two virtual machines running (SuSE) Linux OS, have substantial amounts of identical data in their internal memory, namely exist and repeat data, and this is owing to these virtual machines run the program of identical version, shared library and operating system nucleus.Therefore, data would be likely to occur in source host virtual machine to be migrated a large amount of repetition data identical with data in destination host virtual machine, then when migrating, this certainly will be caused huge waste with regard to limited network bandwidth resources by the copy repeated, and have a strong impact on the copy efficiency of virtual machine, cause that transport efficiency is low.
Summary of the invention
Based on this, it is necessary to for the inefficient problem of virtual machine (vm) migration, it is provided that a kind of strange land virtual machine duplicate removal moving method that can improve transport efficiency and system.
A kind of strange land virtual machine duplicate removal moving method, comprises the following steps:
Obtain in source host virtual-machine data in virtual-machine data to be migrated and presetting database, wherein, described preset data library storage have destination host the virtual-machine data of each network host in a local network;
Obtain in described source host the repeat number of virtual-machine data in virtual-machine data to be migrated and described presetting database according to this and in described source host virtual-machine data to be migrated with in described presetting database virtual-machine data do not repeat data;
By the transmission of described repetition data to described destination host, do not repeat data described in obtaining from described presetting database and transmit to described destination host.
The present invention also please provide a kind of strange land virtual machine duplicate removal migratory system, including:
Acquisition module, is used for obtaining in source host virtual-machine data to be migrated and virtual-machine data in presetting database, wherein, described preset data library storage have destination host the virtual-machine data of each network host in a local network;
Comparison module, for obtain in described source host the repeat number of virtual-machine data in virtual-machine data to be migrated and described presetting database according to this and in described source host virtual-machine data to be migrated with in described presetting database virtual-machine data do not repeat data;
Transferring module, for by described repetition data transmission extremely described destination host, not repeating data and transmit to described destination host from described presetting database described in obtaining.
Above-mentioned strange land virtual machine duplicate removal moving method and system, by virtual-machine data in virtual-machine data to be migrated in reference source main frame and presetting database, obtain virtual-machine data to be migrated and the repeat number of virtual-machine data in presetting database in source host according to this and in source host virtual-machine data to be migrated with in presetting database virtual-machine data do not repeat data, data will not be repeated from source host transmission to destination host, and obtain from presetting database and repeat data and transmit to destination host, transmit to destination host owing to data only will not be repeated, the data that presetting database has existed are avoided to be transmitted through the network to destination host from source host, thus the data from source host transmission to destination host can be reduced, reduce the Internet resources taken, shorten the time of virtual machine (vm) migration, thus improving transport efficiency.
Accompanying drawing explanation
Fig. 1 is the flow chart of the strange land virtual machine duplicate removal moving method of a kind of embodiment;
Fig. 2 is the flow chart of the strange land virtual machine duplicate removal moving method of another embodiment;
Fig. 3 be another embodiment strange land virtual machine duplicate removal moving method in the sub-process figure of step S200;
Fig. 4 be another embodiment strange land virtual machine duplicate removal moving method in the sub-process figure of step S200;
Fig. 5 is the migration schematic diagram of the strange land virtual machine duplicate removal moving method of a specific embodiment;
Fig. 6 is the module map of the strange land virtual machine duplicate removal migratory system of a kind of embodiment;
Fig. 7 is the module map of the strange land virtual machine duplicate removal migratory system of another embodiment;
Fig. 8 be another embodiment strange land virtual machine duplicate removal migratory system in the submodule figure of comparison module 200;
Fig. 9 be another embodiment strange land virtual machine duplicate removal migratory system in the submodule figure of comparison module 200.
Detailed description of the invention
Refer to Fig. 1, it is provided that the strange land virtual machine duplicate removal moving method of a kind of embodiment, comprise the following steps:
S100: obtain in source host virtual-machine data in virtual-machine data to be migrated and presetting database.
Wherein, preset data library storage have destination host the virtual-machine data of each network host in a local network.
Can running one or more virtual machine on the source host, destination host is the main frame receiving the virtual machine migrated from source host, migrates after successfully, and the virtual machine of this migration is controlled by destination host.Destination host equally also can run one or more virtual machine, during the migration of virtual machine to be migrated, it is necessary to migration is virtual-machine data to be migrated.In presetting database storage have destination host the virtual-machine data of each network host in a local network, destination host would be likely to occur multiple network host in a local network, namely LAN is built into by multiple network hosts, these network hosts are in same LAN, wherein, destination host is a network host in multiple network host, presetting database stores the virtual-machine data of these network hosts, owing to a network host can run one or more virtual machine, each virtual machine is to there being data, thus, presetting database has many virtual-machine data.
In actual application, source host sends virtual-machine data when being based on migrating, destination host is sink virtual machine data when being based on and migrating, when migrating next time, source host when this migrates may become destination host, receiving the virtual machine migrated, destination host when this migrates likely becomes source host, it is necessary to migrate virtual machine.It is appreciated that, when this migrates, receive main frame for the purpose of the main frame of the virtual machine migrated, but, when next time migrates, this destination host is likely to no longer receive the virtual machine of migration, it is likely to and does not migrate virtual machine, so this migrate time destination host neither next time migrate time source host, neither next time migrate time destination host, then this migrate time destination host become the non-destination host in network host when next time migrates.
S200: obtain virtual-machine data to be migrated and the repeat number of virtual-machine data in presetting database in source host according to this and in source host virtual-machine data to be migrated with in presetting database virtual-machine data do not repeat data.
The migration of virtual machine to be migrated in source host, need the migration of virtual-machine data to be migrated in source host, in presetting database for the purpose of virtual-machine data main frame multiple virtual-machine data of running on each network host in a local network, in source host, virtual-machine data to be migrated and virtual-machine data in presetting database would be likely to occur the data of repetition, such as, source host runs the virtual machine of (SuSE) Linux OS, destination host has network host to run the virtual machine of (SuSE) Linux OS in a local network, owing to these virtual machines run the program of identical version, shared library and operating system nucleus, their internal memory has substantial amounts of identical data, namely there are substantial amounts of repetition data.Thus, by data in virtual machine to be migrated in reference source main frame and virtual-machine data in presetting database, it is known that in source host virtual-machine data to be migrated and the repeat number of virtual-machine data in presetting database according to this and in source host virtual-machine data to be migrated with in presetting database virtual-machine data do not repeat data.Foundation is provided for subsequent migration.
S300: data will be repeated and transmit to destination host, and obtain from presetting database and do not repeat data and transmit to destination host.
In order to reduce the data of migration, improve transport efficiency, simply will not repeat data and be transferred to destination host, and in being present in source host virtual machine and the repetition data being present in presetting database in virtual machine without sending to destination host from source host again, directly obtain from presetting database and repeat data, reduce the data migrated from source host, reduce the utilization to Internet resources, improve transport efficiency.When needing what migrate not repeat data transmission to destination host, and after the repetition data in presetting database being transmitted and completing to destination host, source host virtual machine (vm) migration completes.Specifically, in source host in virtual-machine data to be migrated and presetting database virtual-machine data do not repeat data by wide area network transmission to destination host, realize the strange land transmission between source host and destination host, obtain from presetting database and repeat data and transmit to destination host, namely destination host directly obtains repetition data from presetting database, without transmitting from source host, due to for the purpose of presetting database main frame the virtual-machine data of each network host in a local network, be equivalent to directly from LAN, obtain repetition data, reduce network latency, improve transport efficiency.Specifically, when destination host virtual-machine data includes the data that in source host, virtual-machine data to be migrated repeats with virtual-machine data in presetting database, then obtain this repetition data from destination host self, it is not necessary to the virtual-machine data of other network hosts obtains these repetition data from LAN.
Above-mentioned strange land virtual machine duplicate removal moving method, by virtual-machine data in virtual-machine data to be migrated in reference source main frame and presetting database, obtain virtual-machine data to be migrated and the repeat number of virtual-machine data in presetting database in source host according to this and in source host virtual-machine data to be migrated with in presetting database virtual-machine data do not repeat data, data will not be repeated from source host transmission to destination host, and obtain from presetting database and repeat data and transmit to destination host, transmit to destination host owing to data only will not be repeated, the data that presetting database has existed are avoided to be transmitted through the network to destination host from source host, thus the data from source host transmission to destination host can be reduced, reduce the Internet resources taken, shorten the time of virtual machine (vm) migration, thus improving transport efficiency.
Refer to Fig. 2, wherein in an embodiment, also include after step S300:
S400: when repeat number repeat according to this and not data be transmitted time, destination host starts virtual machine to be migrated.
When in virtual-machine data to be migrated in source host and presetting database the repeat number of virtual-machine data according to this and in source host virtual-machine data to be migrated with in presetting database virtual-machine data do not repeat data be transmitted time, illustrate in source host that virtual machine Successful migration to be migrated is to destination host, namely source host virtual machine (vm) migration completes, start the Successful migration virtual machine to destination host, namely on destination host, virtual machine to be migrated in this source host is run, it is achieved the operation on destination host of the virtual machine of migration.
Refer to Fig. 3, wherein in an embodiment, obtain in source host virtual-machine data to be migrated and the repeat number of virtual-machine data in presetting database according to this and in source host virtual-machine data to be migrated include with the step S200 not repeating data of virtual-machine data in presetting database:
S210: in units of data block, virtual-machine data to be migrated in source host is each mapped to hashed value, form the source hashed value list of virtual-machine data to be migrated in source host, virtual-machine data in presetting database is each mapped to hashed value, forms the purpose hashed value list of virtual-machine data in presetting database.
In order to identify virtual-machine data to be migrated and the repetition data of virtual-machine data in presetting database in source host, utilize content addressed technology that data are carried out hash, namely the value in another territory is mapped the data into by hash function, that is according to data, re-establish hashed value, this hashed value represents the data of its correspondence, according to the recognizable data of hashed value, namely hashed value is used can quickly to find data, thus, virtual-machine data to be migrated in source host is each mapped to hashed value, form the source hashed value list of virtual-machine data to be migrated in source host, virtual-machine data in presetting database is each mapped to hashed value, form the purpose hashed value list of virtual-machine data in presetting database.Owing to generally, hashed value is identical, the data of its correspondence are identical, thus, by data identical with in virtual machine in presetting database in virtual machine to be migrated in the recognizable source host of hashed value.
S220: according to purpose hashed value list, sets up the distributed index of virtual-machine data in presetting database.
Owing to can recognize that identical data according to hashed value, thus according to purpose hashed value list, the distributed index of virtual-machine data in presetting database can be set up.According to this distributed index, namely fast searching is to the data identical with in source host virtual machine.
S230: according to source hashed value list and distributed index, the data that in virtual-machine data, retrieval repeats with virtual-machine data to be migrated in source host from presetting database, it is thus achieved that repeat data and record repetition data.
Virtual-machine data to be migrated in the hashed value list correspondence source host of source, virtual-machine data in presetting database can be retrieved by distributed index, thus according to the hashed value in the hashed value list of source, distributed index is retrieved the index of correspondence, if the hashed value in the hashed value list of source can correspond to the index in distributed index, namely the data illustrated in source host in virtual machine to be migrated have and there are the data repeated with virtual-machine data in presetting database, thus above-mentioned repetition data can be retrieved, and these repetition data are recorded.
S240: the repetition data according to record, it is thus achieved that in source host in virtual-machine data to be migrated and presetting database virtual-machine data do not repeat data.
Owing to repeating data record, namely in known virtual-machine data to be migrated, which data is the data repeated, thus in known source host in virtual-machine data to be migrated and presetting database virtual-machine data do not repeat data, follow-up when migrating, from source host, only migrate this do not repeat data.
Refer to Fig. 4, wherein in an embodiment, in units of data block, virtual-machine data to be migrated in source host is each mapped to hashed value, form the source hashed value list of virtual-machine data to be migrated in source host, virtual-machine data in presetting database is each mapped to hashed value, forms the step S210 of the purpose hashed value list of virtual-machine data in presetting database and include:
S211: in units of data block, is each mapped to preset the hashed value of regular length by cryptographic Hash function by virtual-machine data to be migrated in source host, forms the source hashed value list of virtual-machine data to be migrated in source host.
S212: in units of data block, is each mapped to preset the hashed value of regular length by cryptographic Hash function by virtual-machine data in presetting database, forms the purpose hashed value list of virtual-machine data in presetting database.
Hash function is a kind of method creating little numeral " fingerprint " from any data.Data are upset mixing by this function, re-create a fingerprint being called hashed value.Hashed value is commonly used to the character string representing a short random letters and numeral composition.Due to the multiformity of the application of hash function, they often aim at a certain application and design, and can improve reliability.Such as, cryptographic Hash function assumes that having one to find the enemy being originally inputted with same Hash value, for given hashed value, it does not have practical method can calculate one and be originally inputted, say, that be difficult to forge.It is first the Bit String of regular length by data by hash function computing, then with private key, this Bit String is carried out computing, obtain hashed value, the quality of hash function is applied most important for the hashed value of data, for the function of design for the purpose of keyed hash, such as MD5 (Message-DigestAlgorithm5), it is widely used as the hash function of inspection.
Wherein in an embodiment, in units of data block, by cryptographic Hash function, virtual-machine data in presetting database is each mapped to preset the hashed value of regular length, is formed in presetting database and also include after the step S210 of the purpose hashed value list of virtual-machine data:
Virtual-machine data in virtual-machine data to be migrated in source host and presetting database is carried out periodic test, and updates source hashed value list and purpose hashed value list.
In source host in virtual-machine data to be migrated or presetting database virtual-machine data it may happen that change, but data variation, hashed value corresponding to former data can not data after corresponding change again, thus needing the hashed value list of renewal source and purpose hashed value list.Can by virtual-machine data in virtual-machine data to be migrated in source host and presetting database be carried out periodic test, source hashed value list and purpose hashed value list are safeguarded, namely source hashed value list and purpose hashed value list are updated, so that source hashed value list and purpose hashed value list are more accurate.
Wherein in an embodiment, according to purpose hashed value list, set up the step S220 of the distributed index of virtual-machine data in presetting database and include:
According to purpose hashed value list, set up the distributed hashing value list of virtual-machine data in presetting database.
According to distributed hashing value list, set up the distributed index of virtual-machine data in presetting database.
Wherein, the list of purpose hashed value include purpose hashed value list corresponding to the virtual-machine data of destination host and destination host purpose hashed value list corresponding to the virtual-machine data of other non-destination hosts in a local network.Purpose hashed value list that virtual-machine data according to destination host is corresponding and destination host purpose hashed value list corresponding to the virtual-machine data of other non-destination hosts in a local network, the distributed hashing value list of virtual-machine data in presetting database can be set up, again through distributed hashing value list, set up the distributed index of virtual-machine data in presetting database.By the foundation of distributed index, to enable the data being quickly found out correspondence.
With a specific embodiment, above-mentioned strange land virtual machine duplicate removal moving method is illustrated below.
Refer to Fig. 5, source host IDC1 includes in virtual machine cold data and dsc data, destination host includes in virtual machine cold data and dsc data equally, wherein, data block in block_a, block_b, block_c and block_d respectively cold data, destination host place LAN potentially includes multiple main frame, and destination host is one of them, thus LAN includes the virtual machine of multiple main clause.The strange land virtual machine duplicate removal moving method of the present embodiment is to be performed by the virtual machine manager (VMM) being arranged on source host and destination host, wherein, including being arranged at least one VMM of source host IDC1 and being arranged at least one VMM of destination host IDC2, VMM is made up of two parts, first part includes two VMM kernel modules that can load, the second part is VMM user space program, wherein, the VMM kernel module that can load is linux kernel space program, VMM user space program realizes virtual machine facility simulation, start and close virtual machine, periodically in virtual machine, cold data directory updates, the function such as cold data directory and dynamic migration of virtual machine in distributed virtual machine.
Specifically, VMM user space program comprises three modules, and respectively the first module, the second module and three module, the first module and the second module form the indexing controller in Fig. 5.Wherein, first module is periodically interior cold data directory more new module, in periodically, cold data directory more new module is by communicating with VMM kernel module, cold data in all virtual machines run on main frame are carried out periodic test, set up and safeguard cold data hash value list in local virtual machine, a dsc data or cold data block is uniquely identified by hashed value, specifically, virtual-machine data to be migrated in source host can be each mapped to hashed value, form the source hashed value list of virtual-machine data to be migrated in source host, virtual-machine data in presetting database is each mapped to hashed value, form the purpose hashed value list of virtual-machine data in presetting database.
Second module is distributed interior cold data directory module, according to the hashed value list of cold data in local virtual machine, by with the virtual machine manager communication of other main frames in LAN, set up the distributed hashing value list of the cold data of whole LAN, the corresponding relation of cold data and main frame in maps virtual machine.According to purpose hashed value list, the distributed index of virtual-machine data in presetting database can be set up.
3rd module is dynamic migration module, and it realizes the dynamic migration of virtual machine, transmits the hashed value list of dsc data or cold data block and interior cold data between multiple virtual machine managers, and by the function of interface interchange the first two module.Specifically, dynamic migration module is utilized to transmit needing the migration data migrated to replicate (blockcopy) mode by Border Gateway Protocol (BGP) with data block to destination host, and the data that in presetting database, virtual-machine data to be migrated repeats with source host are transmitted to destination host, after being transmitted, in source host, virtual machine (vm) migration to be migrated completes, and runs and migrate successful virtual machine to be migrated in destination host.
Refer to Fig. 6, it is provided that the strange land virtual machine duplicate removal migratory system of a kind of embodiment, including:
Acquisition module 100, is used for obtaining in source host virtual-machine data to be migrated and virtual-machine data in presetting database.
Wherein, preset data library storage have destination host the virtual-machine data of each network host in a local network.
Can running one or more virtual machine on the source host, destination host is the main frame receiving the virtual machine migrated from source host, migrates after successfully, and the virtual machine of this migration is controlled by destination host.Destination host equally also can run one or more virtual machine, during the migration of virtual machine to be migrated, it is necessary to migration is virtual-machine data to be migrated.In presetting database storage have destination host the virtual-machine data of each network host in a local network, destination host would be likely to occur multiple network host in a local network, namely LAN is built into by multiple network hosts, these network hosts are in same LAN, wherein, destination host is a network host in multiple network host, presetting database stores the virtual-machine data of these network hosts, owing to a network host can run one or more virtual machine, each virtual machine is to there being data, thus, presetting database has many virtual-machine data.
In actual application, source host sends virtual-machine data when being based on migrating, destination host is sink virtual machine data when being based on and migrating, when migrating next time, source host when this migrates may become destination host, receiving the virtual machine migrated, destination host when this migrates likely becomes source host, it is necessary to migrate virtual machine.It is appreciated that, when this migrates, receive main frame for the purpose of the main frame of the virtual machine migrated, but, when next time migrates, this destination host is likely to no longer receive the virtual machine of migration, it is likely to and does not migrate virtual machine, so this migrate time destination host neither next time migrate time source host, neither next time migrate time destination host, then this migrate time destination host become the non-destination host in network host when next time migrates.
Comparison module 200, for obtain in source host the repeat number of virtual-machine data in virtual-machine data to be migrated and presetting database according to this and in source host virtual-machine data to be migrated with in presetting database virtual-machine data do not repeat data.
The migration of virtual machine to be migrated in source host, need the migration of virtual-machine data to be migrated in source host, in presetting database for the purpose of virtual-machine data main frame multiple virtual-machine data of running on each network host in a local network, in source host, virtual-machine data to be migrated and virtual-machine data in presetting database would be likely to occur the data of repetition, such as, source host runs the virtual machine of (SuSE) Linux OS, destination host has network host to run the virtual machine of (SuSE) Linux OS in a local network, owing to these virtual machines run the program of identical version, shared library and operating system nucleus, their internal memory has substantial amounts of identical data, namely there are substantial amounts of repetition data.Thus, by data in virtual machine to be migrated in reference source main frame and virtual-machine data in presetting database, it is known that in source host virtual-machine data to be migrated and the repeat number of virtual-machine data in presetting database according to this and in source host virtual-machine data to be migrated with in presetting database virtual-machine data do not repeat data.Foundation is provided for subsequent migration.
Transferring module 300, transmits to destination host for repeating data, obtains and do not repeat data and transmit to destination host from presetting database.
In order to reduce the data of migration, improve transport efficiency, simply will not repeat data and be transferred to destination host, and in being present in source host virtual machine and the repetition data being present in presetting database in virtual machine without sending to destination host from source host again, directly obtain from presetting database and repeat data, reduce the data migrated from source host, reduce the utilization to Internet resources, improve transport efficiency.When needing what migrate not repeat data transmission to destination host, and after the repetition data in presetting database being transmitted and completing to destination host, source host virtual machine (vm) migration completes.Specifically, in source host in virtual-machine data to be migrated and presetting database virtual-machine data do not repeat data by wide area network transmission to destination host, realize the strange land transmission between source host and destination host, obtain from presetting database and repeat data and transmit to destination host, namely destination host directly obtains repetition data from presetting database, without transmitting from source host, due to for the purpose of presetting database main frame the virtual-machine data of each network host in a local network, be equivalent to directly from LAN, obtain repetition data, reduce network latency, improve transport efficiency.Specifically, when destination host virtual-machine data includes the data that in source host, virtual-machine data to be migrated repeats with virtual-machine data in presetting database, then obtain this repetition data from destination host self, it is not necessary to the virtual-machine data of other main frames obtains these repetition data from LAN.
Above-mentioned strange land virtual machine duplicate removal migratory system, by virtual-machine data in virtual-machine data to be migrated in reference source main frame and presetting database, obtain virtual-machine data to be migrated and the repeat number of virtual-machine data in presetting database in source host according to this and in source host virtual-machine data to be migrated with in presetting database virtual-machine data do not repeat data, data will not be repeated from source host transmission to destination host, and obtain from presetting database and repeat data and transmit to destination host, transmit to destination host owing to data only will not be repeated, the data that presetting database has existed are avoided to be transmitted through the network to destination host from source host, thus the data from source host transmission to destination host can be reduced, reduce the Internet resources taken, shorten the time of virtual machine (vm) migration, thus improving transport efficiency.
Referring to Fig. 7, wherein in an embodiment, above-mentioned strange land virtual machine duplicate removal migratory system also includes:
Start module 400, for when repeat number repeat according to this and not data be transmitted time, destination host starts virtual machine to be migrated.
When in virtual-machine data to be migrated in source host and presetting database the repeat number of virtual-machine data according to this and in source host virtual-machine data to be migrated with in presetting database virtual-machine data do not repeat data be transmitted time, illustrate in source host that virtual machine Successful migration to be migrated is to destination host, namely source host virtual machine (vm) migration completes, start the Successful migration virtual machine to destination host, namely on destination host, virtual machine to be migrated in this source host is run, it is achieved the operation on destination host of the virtual machine of migration.
Referring to Fig. 8, wherein in an embodiment, comparison module 200 includes:
Hash value generation unit 210, for in units of data block, virtual-machine data to be migrated in source host is each mapped to hashed value, form the source hashed value list of virtual-machine data to be migrated in source host, virtual-machine data in presetting database is each mapped to hashed value, forms the purpose hashed value list of virtual-machine data in presetting database.
In order to identify virtual-machine data to be migrated and the repetition data of virtual-machine data in presetting database in source host, utilize content addressed technology that data are carried out hash, namely the value in another territory is mapped the data into by hash function, that is according to data, re-establish hashed value, this hashed value represents the data of its correspondence, according to the recognizable data of hashed value, namely hashed value is used can quickly to find data, thus, virtual-machine data to be migrated in source host is each mapped to hashed value, form the source hashed value list of virtual-machine data to be migrated in source host, virtual-machine data in presetting database is each mapped to hashed value, form the purpose hashed value list of virtual-machine data in presetting database.Owing to generally, hashed value is identical, the data of its correspondence are identical, thus, by data identical with in virtual machine in presetting database in virtual machine to be migrated in the recognizable source host of hashed value.
Unit 220 set up in index, for according to purpose hashed value list, setting up the distributed index of virtual-machine data in presetting database.
Owing to can recognize that identical data according to hashed value, thus according to purpose hashed value list, the distributed index of virtual-machine data in presetting database can be set up.According to this distributed index, namely fast searching is to the data identical with in source host virtual machine.
Repeat data retrieval unit 230, for according to source hashed value list and distributed index, the data that in virtual-machine data, retrieval repeats with virtual-machine data to be migrated in source host from presetting database, it is thus achieved that repeat data and record repetition data.
Virtual-machine data to be migrated in the hashed value list correspondence source host of source, virtual-machine data in presetting database can be retrieved by distributed index, thus according to the hashed value in the hashed value list of source, distributed index is retrieved the index of correspondence, if the hashed value in the hashed value list of source can correspond to the index in distributed index, namely the data illustrated in source host in virtual machine to be migrated have and there are the data repeated with virtual-machine data in presetting database, thus above-mentioned repetition data can be retrieved, and these repetition data are recorded.
Migrate data retrieval unit 240, for the repetition data according to record, it is thus achieved that in source host in virtual-machine data to be migrated and presetting database virtual-machine data do not repeat data.
Owing to repeating data record, namely in known virtual-machine data to be migrated, which data is the data repeated, thus in known source host in virtual-machine data to be migrated and presetting database virtual-machine data do not repeat data, follow-up when migrating, from source host, only migrate this do not repeat data.
Referring to Fig. 9, wherein in an embodiment, hash value generation unit 210 includes:
First generates unit 211, for, in units of data block, being each mapped to preset the hashed value of regular length by cryptographic Hash function by virtual-machine data to be migrated in source host, form the source hashed value list of virtual-machine data to be migrated in source host.
Second generates unit 212, for, in units of data block, being each mapped to preset the hashed value of regular length by cryptographic Hash function by virtual-machine data in presetting database, form the purpose hashed value list of virtual-machine data in presetting database.
Hash function is a kind of method creating little numeral " fingerprint " from any data.Data are upset mixing by this function, re-create a fingerprint being called hashed value.Hashed value is commonly used to the character string representing a short random letters and numeral composition.Due to the multiformity of the application of hash function, they often aim at a certain application and design, and can improve reliability.Such as, cryptographic Hash function assumes that having one to find the enemy being originally inputted with same Hash value, for given hashed value, it does not have practical method can calculate one and be originally inputted, say, that be difficult to forge.It is first the Bit String of regular length by data by hash function computing, then with private key, this Bit String is carried out computing, obtain hashed value, the quality of hash function is applied most important for the hashed value of data, for the function of design for the purpose of keyed hash, such as MD5 (Message-DigestAlgorithm5), it is widely used as the hash function of inspection.
Wherein in an embodiment, hash value generation unit 210 also includes:
Updating block, for virtual-machine data in virtual-machine data to be migrated in source host and presetting database carries out periodic test, and updates source hashed value list and purpose hashed value list.
In source host in virtual-machine data to be migrated or presetting database virtual-machine data it may happen that change, but data variation, hashed value corresponding to former data can not data after corresponding change again, thus needing the hashed value list of renewal source and purpose hashed value list.Can by virtual-machine data in virtual-machine data to be migrated in source host and presetting database be carried out periodic test, source hashed value list and purpose hashed value list are safeguarded, namely source hashed value list and purpose hashed value list are updated, so that source hashed value list and purpose hashed value list are more accurate.
Wherein in an embodiment, index is set up unit 220 and is included:
According to purpose hashed value list, set up the distributed hashing value list of virtual-machine data in presetting database.
Distributed index sets up unit, for according to distributed hashing value list, setting up the distributed index of virtual-machine data in presetting database.
Wherein, the list of purpose hashed value include purpose hashed value list corresponding to the virtual-machine data of destination host and destination host purpose hashed value list corresponding to the virtual-machine data of other non-destination hosts in a local network.Purpose hashed value list that virtual-machine data according to destination host is corresponding and destination host purpose hashed value list corresponding to the virtual-machine data of other non-destination hosts in a local network, the distributed hashing value list of virtual-machine data in presetting database can be set up, again through distributed hashing value list, set up the distributed index of virtual-machine data in presetting database.By the foundation of distributed index, to enable the data being quickly found out correspondence.
Each technical characteristic of above example can combine arbitrarily, for making description succinct, all possible combination of each technical characteristic in above-described embodiment is not all described, but, as long as the combination of these technical characteristics is absent from contradiction, all it is considered to be the scope that this specification is recorded.
Above example only have expressed the several embodiments of the present invention, and it describes comparatively concrete and detailed, but can not therefore be construed as limiting the scope of the patent.It should be pointed out that, for the person of ordinary skill of the art, without departing from the inventive concept of the premise, it is also possible to making some deformation and improvement, these broadly fall into protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (10)

1. a strange land virtual machine duplicate removal moving method, it is characterised in that comprise the following steps:
Obtain in source host virtual-machine data in virtual-machine data to be migrated and presetting database, wherein, described preset data library storage have destination host the virtual-machine data of each network host in a local network;
Obtain in described source host the repeat number of virtual-machine data in virtual-machine data to be migrated and described presetting database according to this and in described source host virtual-machine data to be migrated with in described presetting database virtual-machine data do not repeat data;
By the transmission of described repetition data to described destination host, do not repeat data described in obtaining from described presetting database and transmit to described destination host.
2. strange land according to claim 1 virtual machine duplicate removal moving method, it is characterized in that, described by the transmission of described repetition data to described destination host, also include after not repeating data the step transmitted to described destination host described in obtaining from described presetting database:
When described repeat number according to this and described do not repeat data be transmitted time, described destination host starts described virtual machine to be migrated.
3. strange land according to claim 1 virtual machine duplicate removal moving method, it is characterized in that, in the described source host of described acquisition in virtual-machine data to be migrated and described presetting database the repeat number of virtual-machine data according to this and in described source host virtual-machine data to be migrated include with the step not repeating data of virtual-machine data in described presetting database:
In units of data block, virtual-machine data to be migrated in described source host is each mapped to hashed value, form the source hashed value list of virtual-machine data to be migrated in described source host, virtual-machine data in described presetting database is each mapped to hashed value, forms the purpose hashed value list of virtual-machine data in described presetting database;
According to described purpose hashed value list, set up the distributed index of virtual-machine data in described presetting database;
According to the hashed value list of described source and described distributed index, the data that in virtual-machine data, retrieval repeats with virtual-machine data to be migrated in described source host from described presetting database, it is thus achieved that described repetition data also record described repetition data;
Described repetition data according to record, it is thus achieved that in described source host in virtual-machine data to be migrated and described presetting database virtual-machine data do not repeat data.
4. strange land according to claim 3 virtual machine duplicate removal moving method, it is characterized in that, described in units of data block, virtual-machine data to be migrated in described source host is each mapped to hashed value, form the source hashed value list of virtual-machine data to be migrated in described source host, virtual-machine data in described presetting database is each mapped to hashed value, and the step of the purpose hashed value list forming virtual-machine data in described presetting database includes:
In units of data block, by cryptographic Hash function, virtual-machine data to be migrated in described source host is each mapped to preset the hashed value of regular length, forms the source hashed value list of virtual-machine data to be migrated in described source host;
In units of data block, by cryptographic Hash function, virtual-machine data in described presetting database is each mapped to the hashed value of described default regular length, forms the purpose hashed value list of virtual-machine data in described presetting database.
5. strange land according to claim 3 virtual machine duplicate removal moving method, it is characterized in that, described in units of data block, virtual-machine data to be migrated in described source host is each mapped to hashed value, form the source hashed value list of virtual-machine data to be migrated in described source host, virtual-machine data in described presetting database is each mapped to hashed value, formed virtual-machine data in described presetting database purpose hashed value list step after also include:
Virtual-machine data in virtual-machine data to be migrated in described source host and described presetting database is carried out periodic test, and updates the hashed value list of described source and described purpose hashed value list.
6. a strange land virtual machine duplicate removal migratory system, it is characterised in that including:
Acquisition module, is used for obtaining in source host virtual-machine data to be migrated and virtual-machine data in presetting database, wherein, described preset data library storage have destination host the virtual-machine data of each network host in a local network;
Comparison module, for obtain in described source host the repeat number of virtual-machine data in virtual-machine data to be migrated and described presetting database according to this and in described source host virtual-machine data to be migrated with in described presetting database virtual-machine data do not repeat data;
Transferring module, for by described repetition data transmission extremely described destination host, not repeating data and transmit to described destination host from described presetting database described in obtaining.
7. strange land according to claim 6 virtual machine duplicate removal migratory system, it is characterised in that also include:
Start module, for when described repeat number according to this and described do not repeat data be transmitted time, described destination host starts described virtual machine to be migrated.
8. strange land according to claim 6 virtual machine duplicate removal migratory system, it is characterised in that described comparison module includes:
Hash value generation unit, for in units of data block, virtual-machine data to be migrated in described source host is each mapped to hashed value, form the source hashed value list of virtual-machine data to be migrated in described source host, virtual-machine data in described presetting database is each mapped to hashed value, forms the purpose hashed value list of virtual-machine data in described presetting database;
Unit set up in index, for according to described purpose hashed value list, setting up the distributed index of virtual-machine data in described presetting database;
Repeat data retrieval unit, for according to the hashed value list of described source and described distributed index, the data that in virtual-machine data, retrieval repeats with virtual-machine data to be migrated in described source host from described presetting database, it is thus achieved that described repetition data also record described repetition data;
Migrate data retrieval unit, for the described repetition data according to record, it is thus achieved that in described source host in virtual-machine data to be migrated and described presetting database virtual-machine data do not repeat data.
9. strange land according to claim 8 virtual machine duplicate removal migratory system, it is characterised in that described hash value generation unit includes:
First generates unit, for, in units of data block, being each mapped to preset the hashed value of regular length by cryptographic Hash function by virtual-machine data to be migrated in described source host, form the source hashed value list of virtual-machine data to be migrated in described source host;
Second generates unit, for, in units of data block, virtual-machine data in described presetting database being each mapped to by cryptographic Hash function the hashed value of described default regular length, forms the purpose hashed value list of virtual-machine data in described presetting database.
10. strange land according to claim 8 virtual machine duplicate removal migratory system, it is characterised in that described hash value generation unit also includes:
Updating block, for virtual-machine data in virtual-machine data to be migrated in described source host and described presetting database carries out periodic test, and updates the hashed value list of described source and described purpose hashed value list.
CN201610176680.1A 2016-03-24 2016-03-24 Remote deduplication migration method and system for virtual machine Pending CN105786608A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610176680.1A CN105786608A (en) 2016-03-24 2016-03-24 Remote deduplication migration method and system for virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610176680.1A CN105786608A (en) 2016-03-24 2016-03-24 Remote deduplication migration method and system for virtual machine

Publications (1)

Publication Number Publication Date
CN105786608A true CN105786608A (en) 2016-07-20

Family

ID=56392003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610176680.1A Pending CN105786608A (en) 2016-03-24 2016-03-24 Remote deduplication migration method and system for virtual machine

Country Status (1)

Country Link
CN (1) CN105786608A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766385A (en) * 2016-08-22 2018-03-06 阿里巴巴集团控股有限公司 A kind of method and apparatus for changing virtual disk files form
CN110531938A (en) * 2019-09-02 2019-12-03 广东紫晶信息存储技术股份有限公司 A kind of cold and hot data migration method and system based on various dimensions

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996091A (en) * 2010-11-04 2011-03-30 上海普元信息技术股份有限公司 System and method for realizing graph executing virtual machine supporting multiple flow operation
CN102455942A (en) * 2010-12-02 2012-05-16 中标软件有限公司 Method and system for dynamic migration of WAN virtual machines
CN103312729A (en) * 2012-03-07 2013-09-18 上海聚耘信息科技有限公司 Method for realizing virtual machine cloud sharing and cross-platform migration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996091A (en) * 2010-11-04 2011-03-30 上海普元信息技术股份有限公司 System and method for realizing graph executing virtual machine supporting multiple flow operation
CN102455942A (en) * 2010-12-02 2012-05-16 中标软件有限公司 Method and system for dynamic migration of WAN virtual machines
CN103312729A (en) * 2012-03-07 2013-09-18 上海聚耘信息科技有限公司 Method for realizing virtual machine cloud sharing and cross-platform migration

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766385A (en) * 2016-08-22 2018-03-06 阿里巴巴集团控股有限公司 A kind of method and apparatus for changing virtual disk files form
CN107766385B (en) * 2016-08-22 2021-09-03 阿里巴巴集团控股有限公司 Method and equipment for converting file format of virtual disk
CN110531938A (en) * 2019-09-02 2019-12-03 广东紫晶信息存储技术股份有限公司 A kind of cold and hot data migration method and system based on various dimensions

Similar Documents

Publication Publication Date Title
CN102455942B (en) Method and system for dynamic migration of WAN virtual machines
US10838829B2 (en) Method and apparatus for loading data from a mirror server and a non-transitory computer readable storage medium
EP2863310B1 (en) Data processing method and apparatus, and shared storage device
WO2017167171A1 (en) Data operation method, server, and storage system
JP6542909B2 (en) File operation method and apparatus
US11036393B2 (en) Migrating data between volumes using virtual copy operation
US20140195551A1 (en) Optimizing snapshot lookups
CN106484820B (en) Renaming method, access method and device
TW201220197A (en) for improving the safety and reliability of data storage in a virtual machine based on cloud calculation and distributed storage environment
US20160306741A1 (en) Data Migration Method and Apparatus, and Processor
CN104020961A (en) Distributed data storage method, device and system
US10635604B2 (en) Extending a cache of a storage system
JP6268116B2 (en) Data processing apparatus, data processing method, and computer program
WO2014094421A1 (en) Data processing method and virtual machine management platform
CN107153512B (en) Data migration method and device
CN108073352A (en) Virtual disk processing method and processing device
CN105786608A (en) Remote deduplication migration method and system for virtual machine
US10061725B2 (en) Scanning memory for de-duplication using RDMA
US20210141602A1 (en) Merging multiple sorted lists in a distributed computing system
US10073874B1 (en) Updating inverted indices
US9256648B2 (en) Data handling in a cloud computing environment
US11093169B1 (en) Lockless metadata binary tree access
US10712959B2 (en) Method, device and computer program product for storing data
CN107168646B (en) Distributed data storage control method and server
CN107153513B (en) Storage control method of distributed system server and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160720

RJ01 Rejection of invention patent application after publication