CN101859263B - Quick communication method between virtual machines supporting online migration - Google Patents

Quick communication method between virtual machines supporting online migration Download PDF

Info

Publication number
CN101859263B
CN101859263B CN2010101989709A CN201010198970A CN101859263B CN 101859263 B CN101859263 B CN 101859263B CN 2010101989709 A CN2010101989709 A CN 2010101989709A CN 201010198970 A CN201010198970 A CN 201010198970A CN 101859263 B CN101859263 B CN 101859263B
Authority
CN
China
Prior art keywords
submodule
data
migration
vmm
management
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.)
Expired - Fee Related
Application number
CN2010101989709A
Other languages
Chinese (zh)
Other versions
CN101859263A (en
Inventor
任怡
刘晓建
吴庆波
戴华东
管剑波
谭郁松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
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 National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN2010101989709A priority Critical patent/CN101859263B/en
Publication of CN101859263A publication Critical patent/CN101859263A/en
Application granted granted Critical
Publication of CN101859263B publication Critical patent/CN101859263B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a quick communication method between virtual machines supporting online migration. The scheme comprises that: a shared memory mechanism-based communication acceleration kernel module supporting VM migration is constructed, and six submodules, namely an initialization submodule, a system call analyzer submodule, a connection management and control submodule, a notice processing submodule, a data transmission management submodule and a VM migration supporting submodule, are arranged in the communication acceleration kernel module; the VMM functions are expanded, two submodules, namely a virtual machine set management submodule and a notice management submodule are arranged, and an online migration submodule is modified; and a VMM and the VMs constitute a virtual machine system to accelerate the communication between the VMs, namely the VMs are subjected to group management, the software environment required by communication acceleration between the VMs and the system call analysis is constructed, the system call unrelated to network operation is bypassed, and the system call related to the network operation is selected for classification processing so as to complete the shared memory-based quick communication between the VMs on the same physical computer. The method is realized in Socket and TCP/IP layers, and is transparent to applications, and supports the online migration of the virtual machines.

Description

High-speed traffic method between a kind of virtual machine of supporting online migration
Technical field
The present invention relates to communication means between the virtual machine in the operating system field, on the especially same physical computer based on the communication means between a plurality of virtual machines of shared drive.
Background technology
Along with the fast development of computer and network technologies, the kind of customer service continues to increase, scale constantly increases, and for satisfying the ever-increasing demand of user, the user can purchase more computing machine and dispose the business that operation increases usually; And meanwhile; The appearance of polycaryon processor makes the processing power of computing machine improve fast, then often cause the computing machine utilization factor to reduce, to calculate usefulness low, and cause hardware resource and waste of electric energy; From the consideration of management and cost control, need to reduce the quantity of computing machine.On the other hand; In traditional operating system environment, the degree of coupling was bigger between each was formed, and the inefficacy of certain parts possibly cause the fault or the collapse of total system; The controllability of service operation environment be need effectively isolate, thereby the security and the reliability of system improved with raising inefficacy scope.
For usefulness, safety and the reliability that improves computer system; Virtual method has appearred; Promptly through CPU (the Central Processing Unit of monitor of virtual machine VMM (Virtual Machine Monitor) software to physical computer; CPU), internal memory and other hardware device carry out virtual; On a physical computer, fictionalize a plurality of virtual machine VM (Virtual Machine), each VM moves a client operating system (Guest OS), just a plurality of client operating systems of operation on a physical computer; Be used to support that the underlying operating system of client operating system operation is called host operating system (Host OS), the various operating systems on the VMM are commonly referred to as territory (Domain).Traditional VMM like Xen, mainly is made up of Interrupt Process submodule, the virtual submodule of cpu instruction, the virtual submodule of MMU, incident injection submodule, inter-domain sharing internal memory submodule, online migration (Live Migration) submodule.
Early stage virtual machine method is mainly used in large scale computer and server field, is used to improve the physical hardware utilization factor, supports Legacy System etc.In recent years, along with the high speed development of unit hardware performance, to Server Consolidation, resource management, cut down the consumption of energy, safety is isolated and high available demand urgent day by day, the virtual machine method has got into a stage that develops rapidly.A remarkable advantage that uses virtual machine technique to bring is exactly to realize load balancing or fault-tolerant recovery efficiently through the online migration of VM.Online migration is meant under the prerequisite of not break in service, and the VM that is moving is transplanted on another physical computer from a physical computer.Through with physical computer online the move to load light physical computer of VM, can realize the load balancing of total system from the load weight; Through with VM from the online physical computer of moving to normal operation of the physical computer that breaks down, need not to interrupt telex network, can realize the zero fault-tolerant recovery of downtime.Traditional VMM supports the online migration of VM through online migration submodule.
Intel Virtualization Technology improve the server resource integration ability, enhance system security and reliability in, also brought losing on the performance.For in operating in virtual machine such as for the network-intensive type application programs such as Web service, high-performance Grid application, issued transaction, distributed graphic support, the communication efficiency between VM is most important for the raising of using integral performance.Therefore; The communication efficiency of optimizing between VM is very necessary, especially for being positioned at same the communication between the different virtual machine on the physical computer, if still adopt communication means between the virtual machine of striding physical computer; Then data transfer path is long partially, is unfavorable for reducing communication overhead.
At present; Be positioned at that the communication means between different virtual machine is divided into two types on same the physical computer; First kind method is common network service; It is to realize communicating by letter between virtual machine towards the TCP/IP network protocol stack, and its all data transmission all pass through ICP/IP protocol and NIC driver is handled, and have increased the message transmissions expense.Along with the development of Intel Virtualization Technology, a plurality of VM of physical host deploy have become universal phenomenon, if still carry out the network service between different VM on the same physical computer through ICP/IP protocol, then performance loss is bigger.So second class methods occurred, these class methods are positioned at the characteristics of same physical computer to communicating pair, and the mode through shared drive realizes communication and message exchange between the VM.
Second type of representativeness work based on the communication means of shared drive comprises virtual machine communication interface socket VMCI Socket (Virtual Machine Communication Interface Socket), XenSocket, XWay, IVC (Inter Virtual Machine Communication), MNNet and XenLoop.(first kind method is that the data buffer with send_process process among the virtual machine VM_1 is mapped to a physical memory through VMM to be different from communication means between first kind virtual machine; With the copying data that sends to this buffer zone; Then in another piece physical memory with the recv_process process mapping in the virtual machine VM_2 of the copying data in this physical memory; Be copied at last in the user's space data buffer of recv_process; This wherein will carry out the repeatedly switching between VM and the VMM), data at first are copied in the shared buffer of setting up between VM_1 and the VM_2, and then VM_1 notice VM_2 has deposit data to be read in shared drive; VM_2 receives after this notice the user's space that data is copied to VM_2 from shared buffer; Notify the VM_1 DTD then,, after it receives this notice, will be waken up if the transmission process is in sleep state owing to the reason of shared buffer insufficient space among the VM_1.Compare with first kind method, second class methods have reduced the copy number of times of data and the switching times between VM and the VMM, can effectively reduce the communication overhead between VM.
According to realize level, to using the whether transparent and whether online migration of virtual support machine of programming, can classify to the above-mentioned representative work of second class methods respectively:
● under the IP layer, Socket and tcp/ip layer, three of application layers realize that level: MNet and XenLoop method realize that implementation complexity is bigger below the IP layer; The IVC method realizes that through the MPI storehouse of revising application layer versatility is lower; XenSocket and XWay method then are to realize at Socket, tcp/ip layer.
● the transparency of application programming: application programming is transparent to make program development more simple with maintenance, and IVC, VMCI and XenSocket method have been introduced new DLL, and be opaque to using programming; XWay, MNNet, XenLoop method are programmed transparent to application.
● the support of the online migration of virtual machine: the online migration when whether supporting the VM operation is an important indicator weighing high-speed traffic mechanism between virtual machine; VMCI, XenSocket, XWay and MNNet method be the online migration of virtual support machine not, the online migration of IVC and XenLoop method virtual support machine.
The XWay method is Socket and the tcp/ip layer realization and transparent to using programming on IP, but this method is not supported the online migration of VM.Based on the data of present announcement, this method adopts following steps to accomplish the data communication between different VM on the same physical computer:
The first step makes up between VM the communication support scheme based on shared drive in client operating system.In order to support to communicate by letter between the VM based on shared drive, the client operating system among the VM not only will provide TCP Socket agreement, and the XWay communication protocol that adopts shared drive also will be provided.And this proprietary protocol is not supported in traditional Socket application; In order to reach to using the transparent purpose of programming; Need when receiving Socket message and can between TCP Socket agreement and XWay agreement, switch; Therefore at first make up an XWay changeover module, the XWay changeover module through retouching operation system kernel network protocol stack, and the mode of beating the operating system nucleus patch realize.When related news arrive; The XWay changeover module judges that according to the Socket recalls information target VM is on another physical computer or on local physical computer; Still use traditional T CP Socket agreement for the former, then switch to the XWay agreement for second kind of situation and handle.The processing of XWay agreement is accomplished by the XWay protocol component, and it receives the data transfer request of sending from the XWay changeover module, and sets up the transmission channel based on shared drive between source VM and the target VM.Control of XWay device drives assembly and management are based on the transmission channel of shared drive.XWay changeover module, XWay protocol component and XWay device drives assembly three accomplish in the client operating system Core Feature of communicating by letter and supporting based on shared drive from top to bottom jointly.
In second step, set up the connection between communication sources VM and the target VM.When the XWay changeover module receives the connection request of Socket, at first set up a TCP passage and transmit to connect and set up the control information in the process, to set up in case connect, this passage will be destroyed.Then the XWay changeover module judges that source VM and target VM are whether on a physical computer, if then send to XWay device drives assembly and ask, after the latter receives request, with the one group transmission channel of foundation based on the XWay agreement.Wherein, Each transmission channel is made up of two circle queues and an event channel; Two circle queues are respectively applied for and send data and receive data, and event channel is used between source VM and target VM, transmitting incidents such as " having data to put into transmit queue ", " recipient reads and receives queuing data ".
In the 3rd step, the data between source VM and the target VM are sent and are received.Detailed process is following:
3.1 data are sent.When the XWay changeover module received the transmission request, it was forwarded to the XWay protocol component with this request, and the latter is through calling XWay device drives assembly write data in transmit queue.When space in the transmit queue is not enough; Under Non-Blocking I/O pattern, turn back in the XWay device drives; XWay device drives notice " transmit queue insufficient space " message is given the XWay protocol component under obstruction I/O pattern; The latter is responsible for checking the transmit queue state variation, when the transmit queue space meets the demands, and XWay device drives notice XWay protocol layer retransmission data.
3.2 Data Receiving.When the XWay changeover module receives the Data Receiving request, this request is forwarded to the XWay protocol component, the latter attempts reading of data from corresponding reception formation through XWay device drives assembly.If in the reception formation data are arranged, XWay device drives and XWay protocol component return wherein data available immediately, even the data volume that actual amount of data receives less than request.If the report of XWay device drives assembly receives queue empty, and current for blocking the I/O pattern, the XWay protocol component begins to wait for, up to there being data to deposit the reception formation in.At this moment XWay device drives assembly sends " receiving the formation non-NULL " message and gives the XWay protocol component, and the latter is waken up, wakes up through XWay device drives assembly.If XWay device drives assembly report receives queue empty, and current be Non-Blocking I/O pattern, the XWay protocol component does not then process directly and returns.
The 4th step, the connection between communication close source VM and the target VM.After the XWay changeover module receives to close connection request, at first remove and receive the mapping of formation to kernel address space, discharge transmit queue then and take up space, last release event passage.
The subject matter of this communication means based on shared drive is:
1) do not support the online migration of VM
A remarkable advantage that uses virtual machine technique to bring is exactly to reach purposes such as load balancing or fault-tolerant recovery through the migration of VM on different physical computers, and the online migration when whether supporting the VM operation becomes an important indicator weighing high-speed traffic mechanism between virtual machine.The auxiliary process method that migration detects, migration back data channel is rebuild and other migration is relevant is not provided in the XWay communication means, thereby when online migration takes place the VM of ongoing communication, communication failure will occurs.
2) need to revise client operating system nucleus code
In order to support the high-speed traffic between the VM on the same physical computer, this method must realize: the operating system nucleus module that can load is used to realize XWay changeover module, XWay protocol component and XWay device drives assembly; The kernel patch of operating system network protocol stack is used to revise the part kernel code, thereby supports the switching between Transmission Control Protocol and the XWay agreement; The demons of an outer user's attitude of nuclear are used to carry out XWay telecommunication management and control.This has not only revised, and operating system nucleus is existing forms code, and has realized the demons of a new kernel module and user's attitude, and workload is big and need revise client operating system nucleus code.
In sum, in two class methods of supporting to communicate by letter between VM on the same physical computer, first kind method copying data often, the switching between VMM and the client operating system is comparatively frequent, so communication overhead is bigger.And the exemplary process of second class methods can not possess following characteristic simultaneously: realize at Socket and tcp/ip layer, to using transparent, the online migration of virtual support machine of programming.
How to provide a kind of and realize at Socket and tcp/ip layer, programming is transparent to using, the high-speed traffic method is that the technical matters that solves is badly in need of in this area between the virtual machine of the online migration of virtual support machine.
Summary of the invention
The technical matters that the present invention will solve is: do not support the online migration of VM based on XWay method in the communication means of shared drive and need to revise problem such as client operating system nucleus code to second type, provide a kind of and realize with tcp/ip layer at Socket, programming is transparent to using, the support online migration of VM and need not to the same physical computer of client operating system nucleus patch installing on high-speed traffic method between VM.
Technical scheme of the present invention is:
The first step, the structure shared drive communication support module in the client operating system, expansion VMM function on the basis of existing computer hardware, is formed a dummy machine system by the VMM that has expanded with a plurality of VM that quicken support that communicate by letters that comprise.
Support the communication based on shared drive mechanism of VM migration to quicken kernel module 1.1 in client operating system, make up.Method is: do not revise existing operating system nucleus code; Follow standard operating system nucleus Development of Module interface, add a self-contained communication that loads in the Socket communication layers and quicken kernel module, and at this inside modules structure and add initialization, system call analyzer, connect management and control, announcement processing, data transfer management, VM migration support totally six sub-module.Concrete grammar is following:
1.1.1 structure also adds the initialization submodule.The initialization submodule successfully starts and the communication that loads client operating system is quickened to be triggered after the kernel module at VM; According to following realization flow and and other submodule between interface construct and add this submodule: according to the group ID configuration of current VM; At first call the virtual unit management submodule (virtual unit management submodule is referring to the 1.2.1 step) of VMM and create group or this VM of registration in corresponding group; Then the solicit operation system keeps continuous virtual address space, and sends request to the inter-domain sharing internal memory submodule of VMM, sets up the shared drive buffer zone by it, is used to deposit the network connection of the VM of intercommunication mutually and the information such as data that will be received and dispatched; The online migration submodule that calls VMM then is with the current location number (the unique tick lables information of each VM in the dummy machine system) that generates VM and the current location number table that upgrades VMM (for all VM on its place physical computer safeguard a current location number table, each is the current location number of ID and the correspondence thereof of VM to the online migration submodule of VMM in shared drive).Call VM migration and support submodule (submodule is supported in the VM migration, referring to the 1.1.6 step), notice VM migration is supported submodule to obtain and is safeguarded a copy of the current location number of this VM; When generation systems calls, forwarding system call analyzer submodule (system call analyzer submodule is referring to the 1.1.2 step) to carries out quickening using transparent communication.
1.1.2 structure and add-on system invoke submodule.According to following realization flow and and other submodule between interface structure and add this submodule: intercept and capture system call request from network application; At first filter out and the irrelevant system call of network operation; For other system call,, then still adopt towards the traditional mechanism of TCP/IP procotol and handle if communicate by letter between the VM on the different physical computer; If be positioned at the communication between the VM on the same physical computer; Then call connection management and control submodule (connecting the management and control submodule) or data transfer management submodule (the data transfer management submodule goes on foot referring to 1.1.5) and create or close operations such as connection, data transmission referring to the 1.1.3 step.
1.1.3 structure also adds connection management and control submodule.Connect the management and control submodule and be responsible for the maintenance and management of network connection information, be network connection information structure link control module data structure, this data structure comprises following information: the VM both sides' of communication IP address and port numbers; I/O mode flags position (block type or unblock formula); One is sent buffer zone and a send buffer (send the buffer zone physical memory corresponding different with send buffer, local reception buffer zone and transmission buffer zone are far shared with a slice physical memory); Sleep VM formation etc. sleep VM formation to be sent, wait reception.After the above-mentioned data structure of structure, all link control modules are organized into the link control module table, each is ID number that a network connects in the table, and the corresponding link control module of this ID.Then according to following flow process and with other submodule between interface structure and add and to be connected the management and control submodule: when connecting, closing connection or carrying out data transmit-receive; By system call analyzer submodule, data transfer management submodule (data transfer management submodule; Referring to the 1.1.5 step) or VM migration support submodule (VM migration support submodule; Referring to the 1.1.6 step) call; Be used to visit the shared drive that VMM inter-domain sharing internal memory submodule is created, thereby create, register, read, revise or reclaim link control module, the communication of keeping based on shared drive connects.
1.1.4 structure also adds the announcement processing sub.According to following flow process and and other submodule between interface structure and add the announcement processing sub: receive VMM announcement management submodule (announcement management submodule; Referring to 1.2.2 step) inject the interruption corresponding of submodule forwarding with incident with current event; Read event buffer; Obtain required incident, event type comprises that wake up target VM reception data, wake source VM transmission data, network connection are closed, the data buffer can be released four kinds; According to event type wake source VM send or target VM receive data or notifying communication the opposing party VM network connect close, the data buffer can be released.
1.1.5 structure also adds the data transfer management submodule.The data transfer management submodule is used for deal with data and sends or receive request; These requests have two sources: system call analyzer submodule and VM migration support that (submodule is supported in the VM migration to submodule; Referring to the 1.1.6 step); Wherein VM migration supports that the request of submodule is when online migration takes place, to the processing request of the data of sending but not receiving as yet.According to following flow process and and other submodule between interface structure and add the data transfer management submodule: at first call the VM migration and support that submodule judges whether to have taken place online migration; If migration has taken place; Then event of data loss possibly appear; Need to rebuild and connect or data retransmission; If do not move; Then send out request acquisition link control module, thereby obtain the positional information of shared buffer, then send or receive data by this shared buffer to connecting the management and control submodule.
1.1.6 structure also adds the VM migration and supports submodule.Whether the VM migration supports submodule connected tube control submodule, data transfer management submodule to call, taken place to move and handle in order to detect.According to following flow process and and other submodule between interface structure and add VM migration and support submodule: when carrying out connection closed, data transmissions/reception etc. and operate; Judge current location number copy and the online migration submodule of VMM (online migration submodule that VM migration support submodule is safeguarded; Referring to 1.2.3 step) in current location in the current location number table number whether identical; If it is different; Then show migration has taken place; At this moment at first read the current location number in the current location number table that the online migration submodule of VMM safeguards, and its VM migration that is updated to this VM is supported in the copy that submodule safeguards, then according to the concrete condition of migration; Rebulid that TCP connects or based on the connection of shared drive, and call connect management and control submodule and data transfer management submodule to sending but as yet not the data of reception handle.
1.2 expansion VMM function makes VMM have communication and quickens tenability.Method is to keep the existing Interrupt Process submodule of VMM, the virtual submodule of cpu instruction, the virtual submodule of MMU, incident injection submodule, inter-domain sharing internal memory submodule and online migration submodule; Add virtual unit management and announcement management two sub-module; And revise online migration submodule, concrete grammar is following:
1.2.1 structure also adds virtual unit management submodule.Virtual unit management submodule is carried out global packet management with all VM, as communicating pair VM during at same virtual unit, adopts the accelerated method based on shared drive to quicken communication.According to following flow process and and other submodule between interface structure and add virtual unit management submodule: virtual unit management submodule is provided with the group ID of VM according to the group information configuration of VM when starting VM, having mutually on the same group, the VM of ID constitutes a virtual unit; Virtual unit management submodule is deleted this VM from its virtual group when VM destroys, and judges whether the VM number of members is 0 in the group, if 0, then delete this virtual unit; Virtual unit management submodule is called the announcement management submodule when VM starts or closes be virtual machine creation or recovery event buffer.
1.2.2 structure also adds the announcement management submodule.The announcement management submodule is called to the virtual machine creation by virtual unit management submodule when VM starts or closes or is reclaimed event buffer, announces management submodule this moment and calls the memory-mapped that the inter-domain sharing internal memory submodule of VMM is accomplished event buffer.In addition; The announcement management submodule is also registered and the incident of buffer memory from the request correspondence of VM; And through announcing processing sub to target VM transmission incident, the step of sending incident is: according to the network connection information of current VM, and the event buffer position that positioning and communicating the opposing party VM is corresponding; Current event type and parameter are registered in this event buffer; Inject the corresponding interruption of current event type to communication the opposing party VM; After finishing, Interrupt Process removes this incident in the event buffer.
1.2.3 revise online migration submodule.The online shift function that keeps the online migration submodule of VMM adds migration auxiliary process function.The migration auxiliary process function of adding with the interface that quickens between the kernel module of communicating by letter of the original online shift function of the online migration submodule of VMM and VM is: load in operating system and move the auxiliary process function submodule that is initialised when kernel module is quickened in communication and call; After receiving outside online migration order and accomplishing the migration of VM through the original online shift function of the online migration submodule of VMM, migration auxiliary process function is activated.The flow process of migration auxiliary process and specific as follows: when the acceleration kernel module of communicating by letter is loaded with the interface of other submodule; The initialization submodule activation that the migration auxiliary process function of adding is communicated by letter and quickened kernel module; Generate the current location number of VM; And in the current location of current VMM number table, add ID and the current location number of this VM; Calling communication quickens the VM migration of kernel module and supports submodule, makes the latter obtain a copy of this VM current location number, is used for when data transmission and connection closed, judging whether VM migration has taken place; After receiving outside online migration order and migration through original online shift function completion VM; The link control module that the migration auxiliary process function of adding in the online migration submodule is preserved among the source VMM on the physical computer of place before with current VM migration, send and received among the target VMM after byte number is synchronized to migration; The online migration submodule of notification target VMM generates by the current location of migration VM number then, and upgrades the information in the current location number table.
In second step, the dummy machine system that adopts the first step to make up quickens communication between VM, and concrete steps are:
2.1VMM start VM, the virtual unit management submodule of VMM is organized management to the VM that need communicate acceleration in the dummy machine system.Method is:
2.1.1 it is addr that the IP of VM is set according to the property value in the VM configuration file, group ID is gid (having the VM of communication acceleration demand to be assigned with identical group ID) under it, and group key is key;
2.1.2 judge whether it is the VM that the virtual unit ID of startup is gid on this VMM first:
If 2.1.2.1 then virtual unit management submodule is created the virtual unit that is numbered gid, its access key is key;
2.1.2.2 if not; Then obtain gid corresponding virtual unit and judge whether the key that provides is consistent with the key of virtual unit: if consistent; Then create the virtual unit that is numbered gid, its access key is key, this VM of registration in the VM of virtual unit chained list; Inter-domain sharing internal memory submodule in VMM sends request, creates event buffer by the latter for this VM; If inconsistent, then report " VM starts failure " information.
2.2 required software environment is analyzed in communication acceleration and system call between the initialization submodule structure VM of communication acceleration kernel module, method is:
2.2.1 initialization submodule solicit operation system keeps continuous virtual address space; And send request to the inter-domain sharing internal memory submodule of VMM; Set up the shared drive buffer zone by VMM, be used to deposit link control module information, data waiting for transmission and the pending incident of the VM of intercommunication mutually.
2.2.2 the initialization submodule obtains the IP address of current VM and MAC (the Media Access Control) address of place physical computer thereof; Call the online migration submodule of VMM; Through function conversion, generate the unique tick lables information of each VM in this dummy machine system---current location number.The online migration submodule of VMM is that in shared buffer all VM safeguard a current location number table, the up-to-date current location of the ID of each VM and this VM number in the storage virtual machine system.After generating current location number; The initialization submodule calls among the ID and current location number adding current location number table thereof of online migration submodule with this VM; And the VM migration that calling communication quickens kernel module supports submodule, makes the latter obtain and safeguards a copy of the current location number of this VM.
2.3VM the communication in the client operating system is quickened kernel module and is received the system call in application program or the external command; Be transmitted to system call analyzer submodule; System call analyzer submodule at first bypasses the system call irrelevant with network operation (handling by the operating system old process); Select the system call classification relevant to handle then, accomplish the high-speed traffic between the VM on the same physical computer based on shared drive with network operation.Method is:
2.3.1 if the classification of current system call is to set up network to connect, then:
At first obtain the group ID of current VM and the MAC Address of place physical computer thereof 2.3.1.1 connect the management and control submodule through VMM; Whether the virtual group ID that then judges communicating pair VM is identical; If the virtual unit ID of communicating pair is different; Then need not to communicate acceleration, by the conventional flow processing of setting up the connection of TCP network of operating system; If virtual unit ID is identical for communicating pair, judge then whether communicating pair is positioned on same the physical computer, handle by following method:
2.3.1.1.1 if communicating pair is not positioned at same physical computer, then by the conventional flow processing of setting up the connection of TCP network of operating system;
2.3.1.1.2 if communicating pair is positioned at same physical computer; And the link control module that the corresponding network of this system call connects is not added in the link control module table that connects in the management and control submodule as yet; Be that communicating pair is arranged in same physical computer and the corresponding network connection of this system call is not registered to connection management and control submodule as yet, then call the inter-domain sharing internal memory submodule of VMM, the data buffer that obtains source VM and target VM; The byte number that initialization has been sent and received is 0; In the 2.2.1 shared drive buffer zone that VMM sets up in the step, create link control module, the initial value of link control module is set, divide to be used in the shared buffer that data are sent or received; Registration should connect in connecting the management and control submodule at last, was about to the corresponding link control module of this connection and added in the link control module table.
2.3.2 if current system call is the data transmit operations, then:
Call the VM migration and support submodule 2.3.2.1 the data transfer management submodule of kernel module is quickened in communication, whether the corresponding current location during this VM current location number copy of judging its maintenance and VMM current location number are shown is number consistent.If consistent, show that communicating pair VM moves, change the 2.3.2.2 step and carry out sending based on the rapid data of shared drive.If it is inconsistent; Be illustrated in and carry out that migration has taken place this VM before this transmit operation; Move auxiliary process: the current location in the current location that the online migration submodule that VM migration supports submodule to read VMM the is safeguarded number table number, and it is updated in the current location number copy of self maintained; For the data of sending but not being received are as yet handled, the VM migration is supported the submodule inquiry to connect and whether has been registered the corresponding link control module of this connection in the management and control submodule:
If, show that then the VM of the preceding communicating pair of migration is positioned at same physical computer, the high-speed traffic method that is based on shared drive of employing 2.3.2.1.1 registered.Read the byte number that sends He received among the VMM; If the former is greater than the latter; Then showing in the data buffer that 2.3.1.1.2 step distributed still has data not received by target VM; The data transfer management submodule waits for that the send buffer up to target VM is empty, and upgrades the byte number that has received among the VMM, otherwise shows that data all are received.Because migration back communicating pair is not on same physical computer; Therefore reclaim current link control module and data buffer; Transfer the data transmission to mode from mode, by the conventional data transmitting flow processing of operating system based on the TCP connection based on Transmission Control Protocol based on shared drive.
If 2.3.2.1.2 unregistered, the VM that then shows the preceding communicating pair of migration is not on same physical computer, the data of data transfer management submodule wait on network are received and finish.Judge migration back communicating pair then whether on same physical computer, if not, then still adopt and send data, by the conventional data transmitting flow processing that connects based on TCP of operating system based on the mode of Transmission Control Protocol; If then migration back communicating pair is on same physical computer.At this moment; Whether the group ID that judges the current VM that sends data is identical with the group ID of target VM: if identical; Show that then migration opisthogenesis VM is positioned on the same physical computer with target VM and should adopts the shared drive mode that it is communicated by letter and quicken, and needs the connection of foundation based on shared drive, so current system call is set to this data transmit operation; So that, change the 2.3.1.1 step then and carry out rebuilding the transmission of this secondary data of connection continued; If inequality, then need not to quicken communication with the shared drive mode, still adopt mode based on Transmission Control Protocol, connect based on TCP according to the operating system old process and send data.
2.3.2.2 quickening the data transfer management submodule of kernel module, communication carries out sending based on the rapid data of shared drive.The data transfer management submodule at first reads the link control module table, judges whether to exist the connection of current transmit operation correspondence, if do not exist; Show that then communicating pair VM is not on same physical computer; Connect based on TCP by the operating system old process and to send data, otherwise judge that the virtual group ID of communicating pair VM is identical, if inequality; Then connect based on TCP and send data, otherwise send data fast according to the mode of shared drive by the operating system old process.If the data length that request is sent is m, the transmission buffer length of describing in the link control module is n, and method is: if m is not less than n, then transmits n byte to sending buffer zone, and add n for sending byte number, the data length m=m-n that request is sent is set; Otherwise to sending m byte of buffer zone transmission, sent byte number and added m, the data length m that request is sent is made as 0.If this I/O is block type and m>0; With this transmission task add to link control module etc. sleep VM formation to be sent; The call operation systemic-function is slept; The announcement processing sub transmission of quickening kernel module through communication until target VM receives and goes to the 2.3.2 step when data event wakes this task up, otherwise if the 2.3.2 step is directly changeed in m>0.
2.3.3 if current system call is the Data Receiving operation, then:
Call the VM migration and support submodule 2.3.3.1 the data transfer management submodule of kernel module is quickened in communication, whether the respective value during this VM current location number copy of judging its maintenance and VMM current location number are shown is consistent.If consistent, show that communicating pair VM moves, directly change the 2.3.3.2 step and carry out receiving based on the rapid data of shared drive.If it is inconsistent; Be illustrated in carry out this receive operation before this VM migration has taken place; Move auxiliary process: at first read the current location number in the current location number table that the online migration submodule of VMM safeguards, and its VM migration that is updated to this VM is supported in the copy that submodule safeguards; For the data of sending but not being received are as yet handled, inquiry connects whether registered the corresponding link control module of this connection in the management and control submodule:
If, show that then the VM of the preceding communicating pair of migration is positioned on same the physical computer high-speed traffic method that is based on shared drive of employing 2.3.3.1.1 exist.Read the byte number that sends He received among the VMM,, then show in the data buffer that the 2.3.1.1.2 step distributed to still have data not received by target VM if the former is greater than the latter.Because migration back communicating pair is not on same physical computer; Then when still having data not to be received; The data re-transmitting of the data buffer that at first please data receiver will be used for sending one time, receive the remaining data of transmission over networks after, reclaim current link control module and data buffer; Data are sent transfer mode to, connect based on TCP by the operating system old process and receive data based on Transmission Control Protocol from mode based on shared drive.
If 2.3.3.1.2 do not exist; The VM that then shows the preceding communicating pair of migration is not on same physical computer; The communication mode that is based on TCP that adopts, the data of data transfer management submodule wait target VM continuation reception data on network are received and finish.Judge migration back communicating pair then whether on same physical computer, if not, then still adopt and send data based on the mode of Transmission Control Protocol, connect based on TCP by the operating system old process and receive data; If then migration back communicating pair is on same physical computer.At this moment; Whether the group ID that judges the current VM that receives data is identical with the group ID of source VM: if identical; Show that then migration opisthogenesis VM is positioned on the same physical computer with target VM and should adopts the shared drive mode that it is communicated by letter and quicken, need to set up connection, operate so current system call is set to this Data Receiving based on shared drive; So that, change the 2.3.1.1 step then rebuilding this Data Receiving of connection continued; If inequality, then need not to quicken to communicate by letter with the shared drive mode, still adopt mode based on Transmission Control Protocol, connect based on TCP according to the operating system old process and receive data.
2.3.3.2 quickening the data transfer management submodule of kernel module, communication carries out receiving based on the rapid data of shared drive.The data transfer management submodule that kernel module is quickened in communication at first reads the link control module table that connects management and control submodule maintenance and management; Judge whether to exist the corresponding connection of current reception operation; If do not exist, then show communicating pair VM not on same physical computer, change the operating system old process and connect based on TCP and receive data; Otherwise whether the virtual group ID that judges communicating pair VM is identical; If inequality, then change the operating system old process and connect based on TCP and receive data, otherwise receive data: if send buffer is for empty according to the mode of shared drive; Then target VM receives data wherein, and the data accepted byte number is increased corresponding value.If receive end of operation, then the Data Receiving flow process finishes, otherwise handles by following method:
2.3.3.2.1 when this I/O is the unblock formula, change the 2.3.3 step;
2.3.3.2.2 when this I/O is block type; Then this reception task is added to the sleep VM formation of the wait reception of link control module; The call operation systemic-function is slept; The announcement processing sub transmission transmission data event that quickens kernel module through communication until source VM wakes this task up, changes the 2.3.3 step.
2.3.4 if current system call is to close network to connect, then:
Whether consistent 2.3.4.1 the connection management and control submodule of kernel module is quickened in communication if calling this VM current location number copy that the VM migration supports that submodule judges its maintenance and the VMM current location respective value in number showing.If consistent, show that communicating pair VM moves, directly change the 2.3.4.2 step and close connection.If it is inconsistent; Be illustrated in be about to close network connect before VM migration has taken place; Move auxiliary process: at first read the current location number in the current location number table that the online migration submodule of VMM safeguards, and its VM migration that is updated to this VM is supported in the copy that submodule safeguards; For the data of sending but not being received are as yet handled, inquiry connects whether registered the corresponding link control module of this connection in the management and control submodule:
If, show that then the VM of the preceding communicating pair of migration is positioned on same the physical computer high-speed traffic method that is based on shared drive of employing 2.3.4.1.1 registered.Read the byte number that sends He received among the VMM, if the former greater than the latter, then shows to still have data not to be received.When still having data not to be received; Because migration back communicating pair VM is not on a physical computer; If current VM is source VM, wait for that then the send buffer up to target VM is sky, if current VM is target VM; The data re-transmitting of the data buffer that then please data receiver will be used for sending one time, and receive the retransmission data of transmission over networks.
If 2.3.4.1.2 unregistered, then show the VM that moves preceding communicating pair not on same physical computer, the communication mode that is based on TCP of employing.Judge that then current VM is source VM or target VM,, wait for then that data until online transmission are received to finish if current VM is source VM; If current VM is target VM, then read the remaining data of transmission over networks.
2.3.4.2 communication is quickened the data transfer management submodule of kernel module and is read the link control module table that connects management and control submodule maintenance and management; Judge whether to exist the corresponding connection of current operation; If do not exist, then show communicating pair VM not on same physical computer, change the operating system old process and close the TCP connection; Otherwise whether the opposing party VM that judges communication is in sleep; If it sleeps, then ask the announcement management submodule of VMM to send incident to the other side through event buffer, be used to notify latter's network to connect to have broken off and can the release data buffer zone; The announcement management submodule is injected the corresponding interruption of current event through the incident injection submodule of VMM to VM, and the announcement processing sub that kernel module is quickened in the communication among the VM receives interruption.
2.3.4.3 the inter-domain sharing internal memory submodule that calls VMM judges to discharge both sides' data buffer whether the other side has closed connection, if close, then reclaims current link control module through connecting the management and control submodule.
2.4VMM close IP is that addr, affiliated group of ID are that gid, group key are the VM of key, and the virtual unit management submodule of VMM is this VM of deletion from group.Method is:
2.4.1 virtual unit management submodule obtains gid corresponding virtual unit;
2.4.2 judge whether the key that provides is consistent with the key of virtual unit, if inconsistent, then newspaper " Insufficient privilege, VM deletes failure " information goes to the operating system old process;
Handle incident in the event buffer of current VM 2.4.3 call the announcement management submodule, when event buffer is sky, call the shared internal memory of inter-domain sharing internal memory submodule release event buffer zone;
Carry out conventional VM deletion flow process 2.4.4 call VMM:
If 2.4.4.1 the deletion failure, then newspaper " VM deletes failure " goes to the operating system old process.
If, then current VM is deleted from this virtual unit information, and report " VM deletes successfully " 2.4.4.2 delete successfully; VMM judges that whether current virtual unit is empty, if be empty, then discharges the shared memory headroom of this virtual unit link control module table, and deletion group ID is the virtual unit of gid, report " group ID is that the virtual unit of gid is deleted ".
Adopt the present invention can reach following technique effect:
1. adopt the present invention can greatly quicken the communication efficiency between VM on same the physical computer.Common communication means based on network interface card is for the communication between VM on same the physical computer, and switching times between VMM and the client operating system and copying data number of times are many, and performance loss is bigger.And the present invention adopts the method based on shared drive; The VM of communicating pair shares and is positioned at the data buffer based on shared drive on same the physical computer; Mode through shared drive is carried out data transmission; Switching between VM and the client operating system is less, and the minimizing of copying data number of times, can effectively improve communication efficiency.
2. the correctness of communication when adopting the present invention can guarantee the online migration of VM.At first, when migration takes place, support link control module, current location number, send and received byte number synchronously, receive and dispatch with online data and connection reconstruction provides necessary information for migration detects; The second, after VM moves, can support submodule detect through the VM migration in the communication acceleration kernel module and whether take place to move and handle according to actual conditions; The 3rd, prevent mechanism of data loss, lose the data of transmitting when avoiding between the acceleration I/O mode of shared drive and the conventional I/O mode of TCP conversion.
3. the present invention is transparent to user and programmer.The present invention calls the mode of shunting processing through intercepting system; Network operation between the VM on same the physical computer is carried out quickening based on the communication of shared drive; The realization of bottom shared drive mechanism is to user transparent; Socket interface and other network communication interface were not made any modification, application program still can use the Socket interface of standard to communicate.Therefore, not perception of user base layer support mechanism, and need not to revise application programming and use pattern, in addition, when network communication protocol changes, need not to use and transplant.
4. adopt the present invention to need not retouching operation system kernel code.The present invention follows the operating system nucleus Development of Module interface of standard; Realize a self-contained brand-new communication acceleration kernel module that loads at the Socket layer; The intrinsic composition to operating system nucleus does not make a change, and therefore, need not to revise the code of client operating system and host operating system.
Description of drawings
Fig. 1 is the dummy machine system structural drawing of XWay in second type of communication means in the background technology;
Fig. 2 is an overview flow chart of the present invention;
Fig. 3 is the structural drawing of the dummy machine system of first step structure of the present invention;
Fig. 4 is the link control module of the present invention 1.1.3 step structure and the data structure of link control module table;
Fig. 5 is required data and the control information interaction figure based on shared drive of high-speed traffic of the present invention;
Migration auxiliary process flow process when Fig. 6 receives that for the present invention 1.2.3 step outside online migration is ordered;
Fig. 7 supports the connection building process figure of the online migration of VM for the present invention 2.3.1 step;
Fig. 8 supports the data transmission flow figure of the online migration of VM for the present invention 2.3.2 step;
Fig. 9 supports the Data Receiving process flow diagram of the online migration of VM for the present invention 2.3.3 step;
Figure 10 supports the connection closed process flow diagram of the online migration of VM for the present invention 2.3.4 step.
Embodiment
Fig. 1 is the dummy machine system structural drawing of XWay in second type of communication means in the background technology, and this dummy machine system is formed by three layers from bottom to top: the bottom is a physical computer hardware, comprises hardware devices such as CPU, internal memory, network interface card and disk; The middle layer is a monitor of virtual machine, is made up of Interrupt Process submodule, the virtual submodule of cpu instruction, the virtual submodule of MMU, incident injection submodule, inter-domain sharing internal memory submodule, online migration submodule; The superiors are host operating system and a plurality of client operating system; Client operating system comprises that the Socket that examines outer user's attitude uses, the XWay finger daemon; Operating system nucleus and XWay kernel module in the nuclear; In order to realize the transparent switching between TCP Socket agreement and the XWay agreement, must in the network protocol stack of operating system nucleus, add the kernel patch that is used to realize the XWay changeover module, the XWay kernel module is made up of XWay protocol component and XWay device drives assembly.The XWay protocol component comprises connection management and control submodule and data transmit-receive Request Processing submodule.
When the Socket message call arrives; XWay changeover module in the operating system nucleus judges that according to this information target VM is on another physical computer or just on local physical computer; Still use Traditional TCP protocol for the former, then switch to the XWay agreement for second kind of situation and handle.The XWay protocol component receives the data transfer request of sending from the XWay changeover module; To be transmitted to the relevant request of control and connect the processing of management and control submodule; And the request relevant with data transmission is transmitted to data transmit-receive Request Processing submodule; Connecting management and control submodule and data transmit-receive Request Processing submodule carries out control and management or prepares transceive data; And ask control of XWay device drives assembly and management based on the transmission channel of shared drive, set up or safeguard the transmission channel between source VM and the target VM by the transmission channel management submodule based on shared drive.
Fig. 2 is an overview flow chart of the present invention.The first step; At first structure supports the communication based on shared drive mechanism of VM migration to quicken kernel module; Method is to follow the operating system nucleus Development of Module interface of standard, add a self-contained kernel module that loads in the Socket communication layers, adds initialization, system call analyzer in this inside modules, connects management and control, announcement processing, data transfer management, VM migration support six sub-module; Expand the VMM function then; Method is to keep the existing Interrupt Process submodule of VMM, the virtual submodule of cpu instruction, the virtual submodule of MMU, incident injection submodule, inter-domain sharing internal memory submodule and online migration submodule; Add virtual unit management and announcement management two sub-module, and revise online migration submodule; At last on the basis of existing computer hardware, form a dummy machine system with a plurality of VM that quicken support that communicate by letters that comprise by the VMM that has expanded.In second step, the dummy machine system that adopts the first step to make up quickens communication between VM.Method is: at first VMM starts VM; The virtual unit management submodule of VMM is organized management to the VM that need communicate acceleration in the dummy machine system; Then making up between VM communication and quickening to analyze required software environment, bypassing then and system call that network operation is irrelevant, selecting the system call relevant to classify and handle with network operation with system call; Accomplish the high-speed traffic based on shared drive of the online migration of support between the VM on the same physical computer; Comprise that setting up network connects, sends data, receives data and close network and is connected, last VMM closes and specifies VM, and the virtual unit management submodule of VMM is deleted this VM from group.
Fig. 3 is the structural drawing of the dummy machine system of first step structure of the present invention, and whole dummy machine system also is divided into three parts from bottom to up: the bottom is the hardware of physical computer; The middle layer is a monitor of virtual machine; The superiors are host operating system and a plurality of client operating system.
Monitor of virtual machine injects submodule, inter-domain sharing internal memory submodule, online migration submodule, virtual unit management submodule and announcement management submodule by Interrupt Process submodule, the virtual submodule of cpu instruction, the virtual submodule of MMU, incident and forms.Wherein, five sub-module in the virtual machine monitoring machine that XWay uses in the first five sub-module and the background technology are identical; In order to support the online shift function of high-speed traffic and VM simultaneously, the online migration submodule of monitor of virtual machine is revised, and added virtual unit management submodule and announcement management submodule.
Client operating system comprises the operating system nucleus that Socket uses, nuclear is interior of examining outer user's attitude and communicates by letter and quicken kernel module; Be different from the XWay method; The present invention does not make amendment to operating system nucleus code; And need not to examine outer finger daemon, in addition, it is also different with the XWay kernel module that kernel module is quickened in communication.Communication is quickened kernel module and is supported submodule to form by initialization submodule, system call analyzer submodule, connection management and control submodule, announcement processing sub, data transfer management submodule, VM migration.Connect in management and control submodule and the XWay protocol component to be connected the management and control submodule basic identical on connection basic management function, be used to handle and control relevant request, but increased the support of online migration; The data transfer management submodule on data-transformation facility with the XWay protocol component in request of data transmitting-receiving processing sub and the transmission channel management submodule in the XWay device drives assembly basic identical; Be used to handle the request relevant, but increased the support of online migration with data transmission; Initialization submodule, system call analyzer submodule and VM to move and to support that submodule is that the present invention quickens kernel module initialization, system call filtration and shunting processing and supports the VM migration and the submodule of interpolation in order realizing communicating by letter.The method of interpolation or modification submodule is following;
1) virtual unit management submodule.Virtual unit management submodule is carried out global packet management with all VM, as communicating pair VM during at same virtual unit, adopts the accelerated method based on shared drive to quicken communication.According to following flow process and and other submodule between interface structure and add virtual unit management submodule: virtual unit management submodule is provided with the group ID of VM according to the group information configuration of VM when starting VM, having mutually on the same group, the VM of ID constitutes a virtual unit; Virtual unit management submodule is deleted this VM from its virtual group when VM destroys, and judges whether the VM number of members is 0 in the group, if 0, then delete this virtual unit; Virtual unit management submodule is called the announcement management submodule when VM starts or closes be virtual machine creation or deletion event buffer zone.
2) announcement management submodule.The announcement management submodule is called to the virtual machine creation by virtual unit management submodule when VM starts or closes or is reclaimed event buffer, and announce management submodule and will call the memory-mapped that inter-domain sharing internal memory submodule is accomplished event buffer this moment.The announcement management submodule is also registered and the incident of buffer memory from the request correspondence of VM; And the announcement processing sub of passing through the announcement accelerating module is sent incident to target VM; The step of transmission incident is: based on the network connection information of current VM, and the event buffer position that positioning and communicating the opposing party VM is corresponding; Current event type and parameter are registered in this event buffer; Inject the corresponding interruption of current event type to communication the opposing party VM; After finishing, Interrupt Process removes this incident in the event buffer.
3) online migration submodule.The online shift function that keeps the online migration submodule of VMM, and add migration auxiliary process function in online migration submodule.The migration auxiliary process function of adding shows as with the interface that quickens between the kernel module of communicating by letter of the original online shift function of the online migration submodule of VMM and VM: load in operating system and move the auxiliary process function submodule that is initialised when kernel module is quickened in communication and call; After receiving outside online migration order and accomplishing the migration of VM through the original online shift function of the online migration submodule of VMM, migration auxiliary process function is activated.The flow process of migration auxiliary process and specific as follows: when the acceleration kernel module of communicating by letter is loaded with the interface of other submodule; The initialization submodule activation that the migration auxiliary process function of adding is communicated by letter and quickened kernel module; Generate the current location number of VM; And in the current location of current VMM number table, add ID and the current location number of this VM; Calling communication quickens the VM migration of kernel module and supports submodule, makes the latter obtain a copy of this VM current location number, is used for when data transmission and connection closed, judging whether VM migration has taken place; After receiving outside online migration order and migration through original online shift function completion VM; The link control module that online migration submodule is preserved among the source VMM on the physical computer of place before with current VM migration, send and received among the target VMM after byte number is synchronized to migration; The online migration submodule of target VMM generates by the current location of migration VM number, upgrades the information in the current location number table.
The structure and the adding method of each sub-module are following in the communication acceleration kernel module:
1) initialization submodule.The initialization submodule successfully starts and the communication that loads client operating system is quickened to be triggered after the kernel module at VM; According to following realization flow and and other submodule between interface construct and add this submodule: according to the group ID configuration of current VM, at first call the virtual unit management submodule of VMM and create group or this VM of registration in corresponding group; Then the solicit operation system keeps continuous virtual address space, and sends request to the inter-domain sharing internal memory submodule of VMM, sets up the shared drive buffer zone by it, is used to deposit the network connection of the VM of intercommunication mutually and the information such as data that will be received and dispatched; The online migration submodule that calls VMM then is with the current location that generates VM number and upgrade the current location number table of VMM.Call VM migration and support submodule, notice VM migration is supported submodule to obtain and is safeguarded a copy of the current location number of this VM; When generation systems calls, forwarding system call analyzer submodule to carries out quickening using transparent communication.
2) system call analyzer submodule.According to following realization flow and and other submodule between interface structure and add this submodule: intercept and capture system call request from network application; At first filter out and the irrelevant system call of network operation; For other system call; If communicate by letter between the VM on the different physical computers; Then still adopt towards the traditional mechanism of TCP/IP procotol and handle,, then call connection management and control submodule or data transfer management submodule and create or close operations such as connection, data transmission if be positioned at the communication between the VM on the same physical computer.
3) connect the management and control submodule.Connect the management and control submodule and be responsible for the maintenance and management of network connection information; Be network connection information structure link control module data structure; All link control modules are organized into the link control module table, and each is ID number that a network connects in the table, and the corresponding link control module (see figure 4) of this ID.Then according to following flow process and with other submodule between interface structure and add and to be connected the management and control submodule: when connecting, closing connection or carrying out data transmit-receive; Supported that by system call analyzer submodule, data transfer management submodule or VM migration submodule calls; Be used to visit the shared drive that VMM inter-domain sharing internal memory submodule is created; Thereby create, register, read, revise or reclaim link control module, the communication of keeping based on shared drive connects.
4) announcement processing sub.Announce processing sub according to following flow process with interface structure and interpolation between other submodule: receive the interruption corresponding that VMM announcement management submodule and incident are injected the submodule forwarding with current event; Read event buffer; Obtain required incident, according to event type wake source VM send or target VM receive data or notifying communication the opposing party VM network connect close, the data buffer can be released.
5) data transfer management submodule.The data transfer management submodule is used for deal with data and sends or receive request; These requests have two sources: submodule is supported in system call analyzer submodule and VM migration; Wherein second type of request is when online migration takes place, to the processing request of the data of sending but not receiving as yet.According to following flow process and and other submodule between interface structure and add the data transfer management submodule: at first call the VM migration and support that submodule judges whether to have taken place online migration; If migration has taken place; Then event of data loss possibly appear; Need to rebuild and connect or data retransmission; If do not move; Then send out request acquisition link control module, thereby obtain the positional information of shared buffer, then send or receive data by this shared buffer to connecting the management and control submodule.
6) submodule is supported in the VM migration.Whether the VM migration supports submodule connected tube control submodule, data transfer management submodule to call, taken place to move and handle in order to detect.According to following flow process and and other submodule between interface structure and add VM migration and support submodule: when carrying out connection closed, data transmissions/reception etc. and operate; Judge whether the current location in number showing of current location in current location number copy that VM migration supports that submodule safeguards and the online migration submodule of VMM is number identical; If it is different; Then show migration has taken place; At this moment at first read the current location number in the current location number table that the online migration submodule of VMM safeguards, and its VM migration that is updated to this VM is supported in the copy that submodule safeguards, then according to the concrete condition of migration; Rebulid in case of necessity that TCP connects or based on the connection of shared drive, and call connect management and control submodule and data transfer management submodule to sending but as yet not the data of reception handle.
Fig. 4 is the link control module of the present invention 1.1.3 step structure and the data structure of link control module table.The link information of this data structure correspondence is by connecting management and control submodule maintenance and management, and this data structure is a struct type, and the territory that comprises has: the VM both sides' of communication IP address and port numbers; I/O mode flags position (block type or unblock formula); One is sent buffer zone and a send buffer (send the buffer zone physical memory corresponding different with send buffer, local reception buffer zone and transmission buffer zone are far shared with a slice physical memory); Sleep VM formation etc. sleep VM formation to be sent, wait reception.All link control modules are organized into the link control module table, and each is ID number that a network connects in the table, and the corresponding link control module of this ID.
Fig. 5 carries out the data and the control information synoptic diagram based on shared drive of high-speed traffic for the present invention.Client operating system VM_1 and client operating system VM_2 are two VM that communicate, and both comprise link control module information, data buffer and event buffer through the mode interactive information of shared drive in the shared drive.
In 2.2.1 goes on foot; Initialization submodule solicit operation system keeps continuous virtual address space; And send request to the inter-domain sharing internal memory submodule of VMM, and set up the shared drive buffer zone by VMM, be used for mutual link information, data and the incident of the VM of intercommunication mutually.Wherein, the establishment of link control module and data buffer is accomplished with obtaining when setting up network and is connected in 2.3.1 step, and generally speaking, the 2.3.4 that is recovered in of link control module and data buffer goes on foot and closes completion when being connected.In when, in data transmission or the receiving course online migration taking place when; If communicating pair is on same physical computer and in same virtual group before the migration; And after the migration not on same physical computer or not in same virtual group, then data send or receiving course in reclaim current controll block and data buffer (going on foot with 2.3.3.1.1 referring to the 2.3.2.1.1 step).Data are sent or are received through data buffer 1 and data buffer 2, and when VM_1 is transmit leg, VM_2 during for the take over party, the transmission buffer zone of VM_1 is mapped as data buffer 1, and the send buffer of VM_2 also is mapped as data buffer 1; When VM_2 is transmit leg, VM_1 during for the take over party, the transmission buffer zone of VM_2 is mapped as data buffer 2, and the send buffer of VM_1 also is mapped as data buffer 2.Event buffer is used for the event notification between communicating pair VM, when VM starts or closes, calls the announcement management submodule by virtual unit management submodule, and the latter is the virtual machine creation or reclaims event buffer.
Migration auxiliary process flow process when Fig. 6 receives that for the present invention 1.2.3 step outside online migration is ordered.After receiving outside online migration order and migration through original online shift function completion VM; The migration auxiliary process function of adding in the online migration submodule is at first with the link control module of preserving among the source VMM on the place physical computer before the current VM migration, send and received among the target VMM after byte number is synchronized to migration; The online migration submodule of notification target VMM generates by the current location of migration VM number then, and upgrades the information in the current location number table.
Below be the present invention's process flow diagram in the 2.3rd step, be divided into four kinds of situation, describe with Fig. 7, Fig. 8, Fig. 9, Figure 10 respectively.
Fig. 7 has described the flow process that the present invention 2.3.1 step source VM and target VM connect.Connect the management and control submodule and at first obtain the group ID of current VM and the MAC Address of place physical computer thereof, judge then whether the virtual group ID of communicating pair VM is identical through VMM.If the virtual unit ID of communicating pair is different, then need not to communicate acceleration, by the conventional flow processing of setting up the connection of TCP network of operating system.If virtual unit ID is identical for communicating pair, judge then whether communicating pair is positioned on same the physical computer.If communicating pair is not positioned on same the physical computer, then by the conventional flow processing of setting up the connection of TCP network of operating system.If communicating pair is positioned at same physical computer; And the link control module that the corresponding network of this system call connects is not added in the link control module table that connects in the management and control submodule as yet; Be that communicating pair is arranged in same physical computer and the corresponding network connection of this system call is not registered to connection management and control submodule as yet, then call the inter-domain sharing internal memory submodule of VMM, the data buffer that obtains source VM and target VM; The byte number that initialization has been sent and received is 0; In the 2.2.1 shared drive buffer zone that VMM sets up in the step, create link control module, the initial value of link control module is set, divide to be used in the shared buffer that data are sent or received; Registration should connect in connecting the management and control submodule at last, was about to the corresponding link control module of this connection and added in the link control module table.
Fig. 8 has described the data transmission flow of the online migration of the present invention 2.3.2 step support:
Call the VM migration and support submodule 2.3.2.1 the data transfer management submodule of kernel module is quickened in communication, whether the corresponding current location during this VM current location number copy of judging its maintenance and VMM current location number are shown is number consistent.If consistent, show that communicating pair VM moves, change the 2.3.2.2 step and carry out sending based on the rapid data of shared drive.If it is inconsistent; Be illustrated in and carry out that migration has taken place this VM before this transmit operation; Move auxiliary process: the current location in the current location that the online migration submodule that VM migration supports submodule to read VMM the is safeguarded number table number, and it is updated in the current location number copy of self maintained; For the data of sending but not being received are as yet handled; The VM migration supports the submodule inquiry to connect and whether has registered the corresponding link control module of this connection in the management and control submodule promptly whether inquiry exists the corresponding link control module of this connection in the link control module table:
If, show that then the VM of the preceding communicating pair of migration is positioned at same physical computer, the high-speed traffic method that is based on shared drive of employing 2.3.2.1.1 exist.Read the byte number that sends He received among the VMM; If the former is greater than the latter; Then showing in the data buffer that 2.3.1.1.2 step distributed still has data not received by target VM; The data transfer management submodule waits for that the send buffer up to target VM is empty, and upgrades the byte number that has received among the VMM, otherwise shows that data all are received.Because migration back communicating pair is not on same physical computer; Therefore reclaim current link control module and data buffer; Transfer the data transmission to mode from mode, by the conventional data transmitting flow processing of operating system based on the TCP connection based on Transmission Control Protocol based on shared drive.
2.3.2.1.2 if do not exist, the VM that then shows the preceding communicating pair of migration is not on same physical computer, and the data of data transfer management submodule wait on network are received and finish.Judge migration back communicating pair then whether on same physical computer, if not, then still adopt and send data, by the conventional data transmitting flow processing that connects based on TCP of operating system based on the mode of Transmission Control Protocol; If then migration back communicating pair is on same physical computer.At this moment; Whether the group ID that judges the current VM that sends data is identical with the group ID of target VM: if identical; Show that then migration opisthogenesis VM is positioned on the same physical computer with target VM and should adopts the shared drive mode that it is communicated by letter and quicken, and needs the connection of foundation based on shared drive, so current system call is set to this data transmit operation; So that, change the 2.3.1.1 step then and carry out rebuilding the transmission of this secondary data of connection continued; If inequality, then need not to quicken communication with the shared drive mode, still adopt mode based on Transmission Control Protocol, connect based on TCP according to the operating system old process and send data.
2.3.2.2 quickening the data transfer management submodule of kernel module, communication carries out sending based on the rapid data of shared drive.The data transfer management submodule at first reads the link control module table, judges whether to exist the connection of current transmit operation correspondence, if do not exist; Show that then communicating pair VM is not on same physical computer; Connect based on TCP by the operating system old process and to send data, otherwise judge that the virtual group ID of communicating pair VM is identical, if inequality; Then connect based on TCP and send data, otherwise send data fast according to the mode of shared drive by the operating system old process.If the data length that request is sent is m, the transmission buffer length of describing in the link control module is n, and method is: if m is not less than n, then transmits n byte to sending buffer zone, and add n for sending byte number, the data length m=m-n that request is sent is set; Otherwise to sending m byte of buffer zone transmission, sent byte number and added m, the data length m that request is sent is made as 0.If this I/O is block type and m>0; With this transmission task add to link control module etc. sleep VM formation to be sent; The call operation systemic-function is slept; The announcement processing sub transmission of quickening kernel module through communication until target VM receives and goes to the 2.3.2 step when data event wakes this task up, otherwise if the 2.3.2 step is directly changeed in m>0.
Fig. 9 has described the flow process of the Data Receiving of the online migration of the present invention 2.3.3 step support:
Call the VM migration and support submodule 2.3.3.1 the data transfer management submodule of kernel module is quickened in communication, whether the respective value during this VM current location number copy of judging its maintenance and VMM current location number are shown is consistent.If consistent, show that communicating pair VM moves, directly change the 2.3.3.2 step and carry out receiving based on the rapid data of shared drive.If it is inconsistent; Be illustrated in carry out this receive operation before this VM migration has taken place; Move auxiliary process: at first read the current location number in the current location number table that the online migration submodule of VMM safeguards, and its VM migration that is updated to this VM is supported in the copy that submodule safeguards; For the data of sending but not being received are as yet handled, inquiry connects whether registered the corresponding link control module of this connection in the management and control submodule, and promptly whether inquiry exists the corresponding link control module of this connection in the link control module table:
If, show that then the VM of the preceding communicating pair of migration is positioned on same the physical computer high-speed traffic method that is based on shared drive of employing 2.3.3.1.1 exist.Read the byte number that sends He received among the VMM,, then show in the data buffer that the 2.3.1.1.2 step distributed to still have data not received by target VM if the former is greater than the latter.Because migration back communicating pair is not on same physical computer; Then when still having data not to be received; The data re-transmitting of the data buffer that at first please data receiver will be used for sending one time, receive the remaining data of transmission over networks after, reclaim current link control module and data buffer; Data are sent transfer mode to, connect based on TCP by the operating system old process and receive data based on Transmission Control Protocol from mode based on shared drive.
If 2.3.3.1.2 do not exist; The VM that then shows the preceding communicating pair of migration is not on same physical computer; The communication mode that is based on TCP that adopts, the data of data transfer management submodule wait target VM continuation reception data on network are received and finish.Judge migration back communicating pair then whether on same physical computer, if not, then still adopt and send data based on the mode of Transmission Control Protocol, connect based on TCP by the operating system old process and receive data; If then migration back communicating pair is on same physical computer.At this moment; Whether the group ID that judges the current VM that receives data is identical with the group ID of source VM: if identical; Show that then migration opisthogenesis VM is positioned on the same physical computer with target VM and should adopts the shared drive mode that it is communicated by letter and quicken, need to set up connection, operate so current system call is set to this Data Receiving based on shared drive; So that, change the 2.3.1.1 step then rebuilding this Data Receiving of connection continued; If inequality, then need not to quicken to communicate by letter with the shared drive mode, still adopt mode based on Transmission Control Protocol, connect based on TCP according to the operating system old process and receive data.
2.3.3.2 quickening the data transfer management submodule of kernel module, communication carries out receiving based on the rapid data of shared drive.The data transfer management submodule that kernel module is quickened in communication at first reads the link control module table that connects management and control submodule maintenance and management; Judge whether to exist the corresponding connection of current reception operation; If do not exist, then show communicating pair VM not on same physical computer, change the operating system old process and connect based on TCP and receive data; Otherwise the virtual group ID that judges communicating pair VM is identical; If inequality, then change the operating system old process and connect based on TCP and receive data, otherwise receive data: if send buffer is for empty according to the mode of shared drive; Then target VM receives data wherein, and the data accepted byte number is increased corresponding value.If receive end of operation, then the Data Receiving flow process finishes, otherwise handles by following method:
2.3.3.2.1 when this I/O is the unblock formula, change the 2.3.3 step;
2.3.3.2.2 when this I/O is block type; Then this reception task is added to the sleep VM formation of the wait reception of link control module; The call operation systemic-function is slept; The announcement processing sub transmission transmission data event that quickens kernel module through communication until source VM wakes this task up, changes the 2.3.3 step.
Figure 10 has described the flow process of the connection closed of the online migration of the present invention 2.3.4 step support:
Whether consistent 2.3.4.1 the connection management and control submodule of kernel module is quickened in communication if calling this VM current location number copy that the VM migration supports that submodule judges its maintenance and the VMM current location respective value in number showing.If consistent, show that communicating pair VM moves, directly change the 2.3.4.2 step and close connection.If it is inconsistent; Be illustrated in be about to close network connect before VM migration has taken place; Move auxiliary process: at first read the current location number in the current location number table that the online migration submodule of VMM safeguards, and its VM migration that is updated to this VM is supported in the copy that submodule safeguards; For the data of sending but not being received are as yet handled, inquiry connects whether registered the corresponding link control module of this connection in the management and control submodule, and promptly whether inquiry exists the corresponding link control module of this connection in the link control module table:
If, show that then the VM of the preceding communicating pair of migration is positioned on same the physical computer high-speed traffic method that is based on shared drive of employing 2.3.4.1.1 exist.Read the byte number that sends He received among the VMM, if the former greater than the latter, then shows to still have data not to be received.When still having data not to be received; Because migration back communicating pair VM is not on a physical computer; If current VM is source VM, wait for that then the send buffer up to target VM is sky, if current VM is target VM; The data re-transmitting of the data buffer that then please data receiver will be used for sending one time, and receive the retransmission data of transmission over networks.
If, then show the VM that moves preceding communicating pair not on same physical computer, the communication mode that is based on TCP of employing 2.3.4.1.2 do not exist.If current VM is source VM, wait for then that data until online transmission are received to finish; If current VM is target VM, then read the remaining data of transmission over networks.
2.3.4.2 communication is quickened the data transfer management submodule of kernel module and is read the link control module table that connects management and control submodule maintenance and management; Judge whether to exist the corresponding connection of current operation; If do not exist, then show communicating pair VM not on same physical computer, change the operating system old process and close the TCP connection; Otherwise whether the opposing party VM that judges communication is in sleep; If it sleeps, then ask the announcement management submodule of VMM to send incident to the other side through event buffer, be used to notify latter's network to connect to have broken off and can the release data buffer zone; The announcement management submodule is injected the corresponding interruption of current event through the incident injection submodule of VMM to VM, and the announcement processing sub that kernel module is quickened in the communication among the VM receives interruption.
2.3.4.3 the inter-domain sharing internal memory submodule that calls VMM judges to discharge both sides' data buffer whether the other side has closed connection, if close, then reclaims current link control module through connecting the management and control submodule.

Claims (4)

1. high-speed traffic method between a virtual machine of supporting online migration is characterized in that may further comprise the steps:
The first step; Shared drive communication support module in the structure client operating system, EVM(extended virtual machine) watch-dog VMM function is on the basis of existing computer hardware; Form a dummy machine system by the VMM that has expanded with a plurality of virtual machine VM that quicken to support that communicate by letter that comprise, method is:
Support the communication based on shared drive mechanism of VM migration to quicken kernel module 1.1 in client operating system, make up; Method is: do not revise existing operating system nucleus code; Follow standard operating system nucleus Development of Module interface, add a self-contained communication that loads in the Socket communication layers and quicken kernel module; And at this inside modules structure and add initialization, system call analyzer, connect management and control, announcement processing, data transfer management, VM migration support totally six sub-module, method is:
1.1.1 structure also adds the initialization submodule:, at first call the virtual unit management submodule of VMM and create group or this VM of registration in corresponding group according to the group ID configuration of current VM; Then the solicit operation system keeps continuous virtual address space, and sends request to the inter-domain sharing internal memory submodule of VMM, sets up the shared drive buffer zone by it; The online migration submodule that calls VMM then is with the current location that generates VM number and upgrade the current location number table of VMM, and each of current location number table be the current location number of ID and the correspondence thereof of VM; Call VM migration and support submodule, notice VM migration is supported submodule to obtain and is safeguarded a copy of the current location number of this VM; When generation systems calls, forwarding system call analyzer submodule to carries out quickening using transparent communication;
1.1.2 structure and add-on system invoke submodule: intercept and capture system call request from network application; At first filter out and the irrelevant system call of network operation; For other system call; If communicate by letter between the VM on the different physical computers; Then still adopt towards the traditional mechanism of TCP/IP procotol and handle,, then call connection management and control submodule or data transfer management submodule and create or close connection, data transmission if be positioned at the communication between the VM on the same physical computer;
1.1.3 structure also adds connection management and control submodule; Connect the management and control submodule and be responsible for the maintenance and management of network connection information; Be network connection information structure link control module data structure, this data structure comprises following information: the VM both sides' of communication IP address and port numbers; I/O mode flags position; One is sent buffering area and a reception buffering area; Sleep VM formation etc. sleep VM formation to be sent, wait reception; After the above-mentioned data structure of structure, all link control modules are organized into the link control module table, each is ID number that a network connects in the table, and the corresponding link control module of this ID; Then according to following flow process and with other submodule between interface structure and add and be connected the management and control submodule: when connecting, closing connection or carrying out data transmit-receive; Supported that by system call analyzer submodule, data transfer management submodule or VM migration submodule calls; Be used to visit the shared drive that VMM inter-domain sharing internal memory submodule is created; Thereby create, register, read, revise or reclaim link control module, keep communicating to connect based on shared drive;
1.1.4 structure also adds the announcement processing sub: receive VMM announcement management submodule and incident and inject the interruption corresponding with current event that submodule is transmitted; Read event buffer; Obtain required incident, event type comprises that wake up target VM reception data, wake source VM transmission data, network connection are closed, the data buffer can be released four kinds; According to event type wake source VM send or target VM receive data or notifying communication the opposing party VM network connect close, the data buffer can be released;
1.1.5 structure also adds the data transfer management submodule: at first call the VM migration and support that submodule judges whether to have taken place online migration; If migration has taken place; Then event of data loss possibly appear; Need to rebuild and connect or data retransmission; If do not move; Then send out request acquisition link control module, thereby obtain the positional information of shared buffer, then send or receive data by this shared buffer to connecting the management and control submodule;
1.1.6 structure also adds the VM migration and supports submodule: when carrying out connection closed, data transmission/reception; Judge whether the current location in number showing of current location in current location number copy that VM migration supports that submodule safeguards and the online migration submodule of VMM is number identical; If it is different; Then show migration has taken place; At this moment at first read the current location number in the current location number table that the online migration submodule of VMM safeguards; And its VM migration that is updated to this VM supported in the copy that submodule safeguards, rebulid according to the concrete condition of migration that TCP connects then or based on the connection of shared drive, and call connect management and control submodule and data transfer management submodule to sending but as yet not the data of reception handle;
1.2 expansion VMM function; Make VMM have communication and quicken tenability; Method is to keep the existing Interrupt Process submodule of VMM, the virtual submodule of cpu instruction, the virtual submodule of MMU, incident injection submodule, inter-domain sharing internal memory submodule and online migration submodule; Add virtual unit management and announcement management two sub-module, and revise online migration submodule, concrete grammar is following:
1.2.1 structure also adds virtual unit management submodule: virtual unit management submodule is provided with the group ID of VM according to the group information configuration of VM when starting VM, having mutually on the same group, the VM of ID constitutes a virtual unit; Virtual unit management submodule is deleted this VM from its virtual group when VM destroys, and judges whether the VM number of members is 0 in the group, if 0, then delete this virtual unit; Virtual unit management submodule is called the announcement management submodule when VM starts or closes be virtual machine creation or recovery event buffer;
1.2.2 structure also adds the announcement management submodule; The announcement management submodule is called to the virtual machine creation by virtual unit management submodule when VM starts or closes or is reclaimed event buffer, announces management submodule this moment and calls the memory-mapped that the inter-domain sharing internal memory submodule of VMM is accomplished event buffer; The announcement management submodule is also registered and the incident of buffer memory from the request correspondence of VM; And through announcing processing sub to target VM transmission incident; The step of transmission incident is: based on the network connection information of current VM, and the event buffer position that positioning and communicating the opposing party VM is corresponding; Current event type and parameter are registered in this event buffer; Inject the corresponding interruption of current event type to communication the opposing party VM; After finishing, Interrupt Process removes this incident in the event buffer;
1.2.3 revise online migration submodule; The online shift function that keeps the online migration submodule of VMM; Add migration auxiliary processing function, migration auxiliary processing function with the interface that quickens between the kernel module of communicating by letter of online shift function and VM is: load in operating system and move the auxiliary processing function submodule that is initialised when kernel module is quickened in communication and call; After receiving outside online migration order and accomplishing the migration of VM by the original online shift function of the online migration submodule of VMM, migration auxiliary processing function is activated; The flow process of migration auxiliary processing and specific as follows: when the acceleration kernel module of communicating by letter is loaded with the interface of other submodule; The initialization submodule activation that the migration auxiliary processing function of adding is communicated by letter and quickened kernel module; Generate the current location number of VM; And in the current location of current VMM number table, add ID and the current location number of this VM; Calling communication quickens the VM migration of kernel module and supports submodule; Make the latter obtain a copy of this VM current location number, be used for when transfer of data and connection closed, judging whether VM migration has taken place; After receiving outside online migration order and migration by original online shift function completion VM; The link control module that the migration auxiliary processing function of adding in the online migration submodule is preserved among the source VMM on the physical computer of place before with current VM migration, send and received among the target VMM after byte number is synchronized to migration; The online migration submodule of notification target VMM generates by the current location of migration VM number then, and upgrades the information in the current location number table;
Second step, adopt dummy machine system that communication between VM is quickened, concrete steps are:
2.1VMM start VM, the virtual unit management submodule of VMM is organized management to the VM that need communicate acceleration in the dummy machine system;
2.2 required software environment is analyzed in communication acceleration and system call between the initialization submodule structure VM of communication acceleration kernel module, method is:
2.2.1 initialization submodule solicit operation system keeps continuous virtual address space; And send request to the inter-domain sharing internal memory submodule of VMM; Set up the shared drive buffer zone by VMM, be used to deposit link control module information, data waiting for transmission and the pending incident of the VM of intercommunication mutually;
2.2.2 the initialization submodule obtains the IP address of current VM and the MAC Address of place physical computer thereof, calls the online migration submodule of VMM, through the function conversion, generates the unique tick lables information of each VM in this dummy machine system---current location number; The online migration submodule of VMM is that in shared buffer all VM safeguard a current location number table, the up-to-date current location of the ID of each VM and this VM number in the storage virtual machine system; After generating current location number; The initialization submodule calls among the ID and current location number adding current location number table thereof of online migration submodule with this VM; And the VM migration that calling communication quickens kernel module supports submodule, makes the latter obtain and safeguards a copy of the current location number of this VM;
2.3VM the communication in the client operating system is quickened kernel module and is received the system call in application program or the external command; Be transmitted to system call analyzer submodule; System call analyzer submodule at first bypasses and the irrelevant system call of network operation; Select the system call classification relevant with network operation to handle then, accomplish the high-speed traffic based on shared drive between the VM on the same physical computer, method is:
2.3.1 if the classification of current system call is to set up network to connect, then:
At first obtain the group ID of current VM and the MAC Address of place physical computer thereof 2.3.1.1 connect the management and control submodule through VMM; Whether the virtual group ID that then judges communicating pair VM is identical; If the virtual unit ID of communicating pair is different; Then need not to communicate acceleration, by the conventional flow processing of setting up the connection of TCP network of operating system; If virtual unit ID is identical for communicating pair, judge then whether communicating pair is positioned on same the physical computer, handle by following method:
2.3.1.1.1 if communicating pair is not positioned at same physical computer, then by the conventional flow processing of setting up the connection of TCP network of operating system;
2.3.1.1.2 if communicating pair is positioned at same physical computer; And the link control module that the corresponding network of this system call connects is not added in the link control module table that connects in the management and control submodule as yet; Then call the inter-domain sharing internal memory submodule of VMM; Obtain the data buffer of source VM and target VM, the byte number that initialization has been sent and received is 0, in the 2.2.1 shared drive buffer zone that VMM sets up in the step, creates link control module; The initial value of link control module is set; Divide to be used in the shared buffer that data are sent or received, registration should connect in connecting the management and control submodule at last, was about to the corresponding link control module of this connection and added in the link control module table;
2.3.2 if current system call is the data transmit operations, then:
Call the VM migration and support submodule 2.3.2.1 the data transfer management submodule of kernel module is quickened in communication, whether the corresponding current location during this VM current location number copy of judging its maintenance and VMM current location number are shown is number consistent; If consistent, show that communicating pair VM moves, change the 2.3.2.2 step and carry out sending based on the rapid data of shared drive; If it is inconsistent; Be illustrated in and carry out that migration has taken place this VM before this transmit operation; Move auxiliary process: the current location in the current location that the online migration submodule that VM migration supports submodule to read VMM the is safeguarded number table number, and it is updated in the current location number copy of self maintained; For the data of sending but not being received are as yet handled, the VM migration is supported the submodule inquiry to connect and whether has been registered the corresponding link control module of this connection in the management and control submodule:
If 2.3.2.1.1 registered; Read the byte number that sends He received among the VMM; If the former is greater than the latter, show then in the data buffer that the 2.3.1.1.2 step distributed to still have data not received that the data transfer management submodule waits for that the send buffer up to target VM be a sky by target VM; And upgrade the byte number that has received among the VMM, otherwise show that data all are received; Reclaim current link control module and data buffer, transfer the data transmission to mode from mode, by the conventional data transmitting flow processing of operating system based on the TCP connection based on Transmission Control Protocol based on shared drive;
If it is 2.3.2.1.2 unregistered; The data of data transfer management submodule wait on network are received and finish; Judge that then migration back communicating pair is whether on same physical computer; If not, then still adopt and send data, by the conventional data transmitting flow processing of operating system based on the TCP connection based on the mode of Transmission Control Protocol; If then migration back communicating pair is on same physical computer; Whether the group ID that judges the current VM that sends data is identical with the group ID of target VM: if identical; Show that then migration opisthogenesis VM is positioned on the same physical computer with target VM and should adopts the shared drive mode that it is communicated by letter and quicken; Need to set up connection based on shared drive; So current system call is set to this data transmit operation, changes the 2.3.1.1 step and carry out; If inequality, then still adopt mode based on Transmission Control Protocol, connect based on TCP according to the operating system old process and send data;
2.3.3 if current system call is the Data Receiving operation, then:
Call the VM migration and support submodule 2.3.3.1 the data transfer management submodule of kernel module is quickened in communication, whether the respective value during this VM current location number copy of judging its maintenance and VMM current location number are shown is consistent; If consistent, show that communicating pair VM moves, directly change the 2.3.3.2 step and carry out receiving based on the rapid data of shared drive; If it is inconsistent; Be illustrated in carry out this receive operation before this VM migration has taken place; Move auxiliary process: at first read the current location number in the current location number table that the online migration submodule of VMM safeguards, and its VM migration that is updated to this VM is supported in the copy that submodule safeguards; For the data of sending but not being received are as yet handled, inquiry connects whether registered the corresponding link control module of this connection in the management and control submodule:
If, read the byte number that sends He received among the VMM,, then show in the data buffer zone that the 2.3.1.1.2 step distributed to still have data not received by target VM if the former is greater than the latter 2.3.3.1.1 registered; Because migration back communicating pair is not on same physical computer; Then when still having data not to be received; The data re-transmitting of the data buffer zone that at first please data receiver will be used for sending one time; After receiving the remaining data of transmission over networks; Reclaim current link control module and data buffer zone; Data are sent transfer mode to, connect based on TCP by the operating system old process and receive data based on Transmission Control Protocol from mode based on shared drive;
If 2.3.3.1.2 unregistered, the data of data transfer management submodule wait target VM continuation reception data on network are received and finish; Judge migration back communicating pair then whether on same physical computer, if not, then still adopt and send data based on the mode of Transmission Control Protocol, connect based on TCP by the operating system old process and receive data; If then migration back communicating pair is on same physical computer; Whether the group ID that judges the current VM that receives data is identical with the group ID of source VM: if identical; Show that then migration opisthogenesis VM is positioned on the same physical computer with target VM and should adopts the shared drive mode that it is communicated by letter and quicken; Need to set up connection based on shared drive; So current system call is set to this Data Receiving operation, so that, change the 2.3.1.1 step then rebuilding this Data Receiving of connection continued; If inequality, then need not to quicken to communicate by letter with the shared drive mode, still adopt mode based on Transmission Control Protocol, connect based on TCP according to the operating system old process and receive data;
2.3.3.2 quickening the data transfer management submodule of kernel module, communication carries out receiving based on the rapid data of shared drive; The data transfer management submodule that kernel module is quickened in communication at first reads the link control module table that connects management and control submodule maintenance and management; Judge whether to exist the corresponding connection of current reception operation; If do not exist, then show communicating pair VM not on same physical computer, change the operating system old process and connect based on TCP and receive data; Otherwise whether the virtual group ID that judges communicating pair VM is identical; If inequality, then change the operating system old process and connect based on TCP and receive data, otherwise receive data: if send buffer is for empty according to the mode of shared drive; Then target VM receives data wherein, and the data accepted byte number is increased corresponding value; If receive end of operation, then the Data Receiving flow process finishes, otherwise handles by following method:
2.3.3.2.1 when this I/O is the unblock formula, change the 2.3.3 step;
2.3.3.2.2 when this I/O is block type; Then this reception task is added to the sleep VM formation of the wait reception of link control module; The call operation systemic-function is slept; The announcement processing sub transmission transmission data event that quickens kernel module through communication until source VM wakes this task up, changes the 2.3.3 step;
2.3.4 if current system call is to close network to connect, then:
Whether consistent 2.3.4.1 the connection management and control submodule of kernel module is quickened in communication if calling this VM current location number copy that the VM migration supports that submodule judges its maintenance and the VMM current location respective value in number showing; If consistent, show that communicating pair VM moves, directly change the 2.3.4.2 step and close connection; If it is inconsistent; Be illustrated in be about to close network connect before VM migration has taken place; Move auxiliary process: at first read the current location number in the current location number table that the online migration submodule of VMM safeguards, and its VM migration that is updated to this VM is supported in the copy that submodule safeguards; For the data of sending but not being received are as yet handled, inquiry connects whether registered the corresponding link control module of this connection in the management and control submodule:
If, read the byte number that sends He received among the VMM, if the former greater than the latter, then shows to still have data not to be received 2.3.4.1.1 registered; When still having data not to be received; Because migration back communicating pair VM is not on a physical computer; If current VM is source VM, wait for that then the send buffer up to target VM is sky, if current VM is target VM; The data re-transmitting of the data buffer that then please data receiver will be used for sending one time, and receive the retransmission data of transmission over networks;
If 2.3.4.1.2 unregistered, judge that then current VM is source VM or target VM, if be source VM, wait for then that data until online transmission are received to finish; If current VM is target VM, then read the remaining data of transmission over networks;
2.3.4.2 communication is quickened the data transfer management submodule of kernel module and is read the link control module table that connects management and control submodule maintenance and management; Judge whether to exist the corresponding connection of current operation; If do not exist; Then change the operating system old process and close the TCP connection, otherwise whether the opposing party VM that judges communication is in sleep, if it is slept; Then ask the announcement management submodule of VMM to send incident to the other side through event buffer; Be used to notify latter's network to connect to have broken off and can the release data buffer zone, the announcement management submodule be injected submodule through the incident of VMM and is injected the corresponding interruption of current event to VM, and the announcement processing sub that kernel module is quickened in the communication among the VM receives interrupts;
2.3.4.3 the inter-domain sharing internal memory submodule that calls VMM judges to discharge both sides' data buffer whether the other side has closed connection, if close, then reclaims current link control module through connecting the management and control submodule;
2.4VMM close IP is that addr, affiliated group of ID are that gid, group key are the VM of key, and the virtual unit management submodule of VMM is this VM of deletion from group.
2. high-speed traffic method between the virtual machine of the online migration of support as claimed in claim 1 is characterized in that said link control module data structure comprises following information: the VM both sides' of communication IP address and port numbers; I/O mode flags position; One is sent buffer zone and a send buffer, sends the buffer zone physical memory corresponding different with send buffer, and local reception buffer zone and transmission buffer zone are far shared with a slice physical memory.
3. high-speed traffic method between the virtual machine of the online migration of support as claimed in claim 1 is characterized in that said virtual unit management submodule to the method that the VM that need communicate acceleration in the dummy machine system organizes management is:
3.1 it is addr that the IP of VM is set according to the property value in the VM configuration file, group ID is gid under it, has the VM of communication acceleration demand to be assigned with identical group ID, and group key is key;
3.2 judge whether it is the VM that the virtual unit ID of startup is gid on this VMM first:
If 3.2.1 then virtual unit management submodule is created the virtual unit that is numbered gid, its access key is key;
3.2.2 if not; Then obtain gid corresponding virtual unit and judge whether the key that provides is consistent with the key of virtual unit: if consistent; Then create the virtual unit that is numbered gid, its access key is key, this VM of registration in the VM of virtual unit chained list; Inter-domain sharing internal memory submodule in VMM sends request, creates event buffer by the latter for this VM; If inconsistent, then report " VM starts failure " information.
4. high-speed traffic method between the virtual machine of the online migration of support as claimed in claim 1 is characterized in that said virtual unit management submodule deletion IP from group is that addr, affiliated group of ID are that gid, group key are that the method for the VM of key is:
4.1 virtual unit management submodule obtains gid corresponding virtual unit;
4.2 judge whether the key that provides is consistent with the key of virtual unit, if inconsistent, then newspaper " Insufficient privilege, VM deletes failure " information goes to the operating system old process;
Handle incident in the event buffer of current VM 4.3 call the announcement management submodule, when event buffer is sky, call the shared internal memory of inter-domain sharing internal memory submodule release event buffer zone;
Carry out conventional VM deletion flow process 4.4 call VMM:
If 4.4.1 the deletion failure, then newspaper " VM deletes failure " goes to the operating system old process;
If, then current VM is deleted from this virtual unit information, and report " VM deletes successfully " 4.4.2 delete successfully; VMM judges that whether current virtual unit is empty, if be empty, then discharges the shared memory headroom of this virtual unit link control module table, and deletion group ID is the virtual unit of gid, report " group ID is that the virtual unit of gid is deleted ".
CN2010101989709A 2010-06-12 2010-06-12 Quick communication method between virtual machines supporting online migration Expired - Fee Related CN101859263B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101989709A CN101859263B (en) 2010-06-12 2010-06-12 Quick communication method between virtual machines supporting online migration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101989709A CN101859263B (en) 2010-06-12 2010-06-12 Quick communication method between virtual machines supporting online migration

Publications (2)

Publication Number Publication Date
CN101859263A CN101859263A (en) 2010-10-13
CN101859263B true CN101859263B (en) 2012-07-25

Family

ID=42945184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101989709A Expired - Fee Related CN101859263B (en) 2010-06-12 2010-06-12 Quick communication method between virtual machines supporting online migration

Country Status (1)

Country Link
CN (1) CN101859263B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108694092A (en) * 2018-05-11 2018-10-23 华中科技大学 A kind of container communication means and system towards Parallel application

Families Citing this family (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8707301B2 (en) * 2010-11-08 2014-04-22 Microsoft Corporation Insertion of management agents during machine deployment
CN102122255B (en) * 2011-03-15 2012-09-05 合肥华云通信技术有限公司 Method for realizing inter-process communication in Linux system by utilizing virtual character equipment and genetlink
CN102185774A (en) * 2011-05-10 2011-09-14 中兴通讯股份有限公司 Method, monitor and system for seamless migration of virtual machine
EP2675127B1 (en) 2011-08-29 2015-07-15 Huawei Technologies Co., Ltd. Method and device for automatically migrating system configuration item
CN102333037A (en) * 2011-10-20 2012-01-25 中兴通讯股份有限公司 Method and device for migrating virtual machine
CN103064733A (en) * 2011-10-20 2013-04-24 电子科技大学 Cloud computing virtual machine live migration technology
CN102768629B (en) * 2012-04-16 2017-02-08 中兴通讯股份有限公司 Method and device for realizing communication between virtual machines on basis of scheduling layer
CN103425500B (en) * 2012-05-14 2018-02-16 腾讯科技(深圳)有限公司 The load operating method and device of portable equipment application program
CN103294958B (en) * 2013-05-21 2015-07-22 中国人民解放军国防科学技术大学 Kernel-level virtual polymerization and parallel encryption method for class-oriented Linux system
CN103729233A (en) * 2013-12-20 2014-04-16 中电长城网际系统应用有限公司 Multiple virtual machines management method and device
CN104951357B (en) * 2014-03-28 2018-06-26 华为技术有限公司 The management method and protocol stack system of concurrent user state protocol stack
CN104184729B (en) * 2014-08-20 2018-05-08 新华三技术有限公司 A kind of message processing method and device
CN104615485B (en) * 2015-03-02 2017-07-14 中国人民解放军国防科学技术大学 A kind of dynamically transparent changing method of virtual machine inter-domain communication pattern
CN106326044B (en) * 2015-06-30 2019-09-03 华为技术有限公司 A kind of net card failure method for implanting and device
CN105119993B (en) * 2015-08-24 2019-02-26 华为技术有限公司 Virtual machine deployment method and device
CN106997306B (en) * 2016-01-26 2021-03-09 阿里巴巴集团控股有限公司 Method, device and system for migrating physical machine data to cloud
EP3223456B1 (en) 2016-03-24 2018-12-19 Alcatel Lucent Method for migration of virtual network function
CN109426547B (en) * 2017-09-04 2022-05-17 华为技术有限公司 Thermal migration method, device and system of virtual machine
WO2019237261A1 (en) * 2018-06-12 2019-12-19 华为技术有限公司 Memory management method, device and system
CN108848098B (en) * 2018-06-26 2021-02-23 宿州学院 Communication channel management method and system of embedded terminal equipment
CN109101319B (en) * 2018-08-09 2021-07-27 郑州云海信息技术有限公司 Working method of platform for realizing TPCM full virtualization on QEMU
CN109361693B (en) * 2018-11-21 2020-11-24 南京中孚信息技术有限公司 Virtual device communication method and device
US20200244772A1 (en) * 2019-01-30 2020-07-30 Huawei Technologies Co., Ltd. Method and system for cloud application and service integration using pattern-based discovery
CN111796902B (en) * 2019-04-08 2024-03-19 维塔科技(北京)有限公司 Method and device for switching shared memory area, storage medium and electronic equipment
CN110262875B (en) * 2019-06-25 2021-04-27 苏州浪潮智能科技有限公司 Communication method and system of Windows virtual machine and KVM host based on patch mechanism
WO2021023379A1 (en) * 2019-08-06 2021-02-11 Huawei Technologies Co., Ltd. Method and appartaus for processing data in a network
CN111488247B (en) * 2020-04-08 2023-07-25 上海云轴信息科技有限公司 High availability method and equipment for managing and controlling multiple fault tolerance of nodes
CN113301004B (en) * 2020-06-17 2023-05-09 阿里巴巴集团控股有限公司 Data processing method, device, communication method and single-network-card virtual machine
CN112351089B (en) * 2020-10-29 2022-05-13 苏州浪潮智能科技有限公司 Data transmission method, system and device between virtual machine and accelerator
CN114237818B (en) * 2021-12-01 2022-11-11 科东(广州)软件科技有限公司 Method, system, computing device and storage medium for sharing resources among virtual machines
CN116049096B (en) * 2022-05-05 2024-04-16 荣耀终端有限公司 Data migration method, electronic equipment and storage medium
CN116149820B (en) * 2023-02-20 2024-02-06 亿咖通(湖北)技术有限公司 Xen-based inter-domain communication method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383781A (en) * 2008-10-30 2009-03-11 中国人民解放军国防科学技术大学 Virtual inter-domain short message communicating method
CN101430674A (en) * 2008-12-23 2009-05-13 北京航空航天大学 Intraconnection communication method of distributed virtual machine monitoring apparatus
CN101436966A (en) * 2008-12-23 2009-05-20 北京航空航天大学 Network monitoring and analysis system under virtual machine circumstance
CN101493797A (en) * 2009-03-12 2009-07-29 华为技术有限公司 Data dynamic migration method and device
CN101561769A (en) * 2009-05-25 2009-10-21 北京航空航天大学 Process migration tracking method based on multi-core platform virtual machine

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8479194B2 (en) * 2007-04-25 2013-07-02 Microsoft Corporation Virtual machine migration
US9715401B2 (en) * 2008-09-15 2017-07-25 International Business Machines Corporation Securing live migration of a virtual machine from a secure virtualized computing environment, over an unsecured network, to a different virtualized computing environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383781A (en) * 2008-10-30 2009-03-11 中国人民解放军国防科学技术大学 Virtual inter-domain short message communicating method
CN101430674A (en) * 2008-12-23 2009-05-13 北京航空航天大学 Intraconnection communication method of distributed virtual machine monitoring apparatus
CN101436966A (en) * 2008-12-23 2009-05-20 北京航空航天大学 Network monitoring and analysis system under virtual machine circumstance
CN101493797A (en) * 2009-03-12 2009-07-29 华为技术有限公司 Data dynamic migration method and device
CN101561769A (en) * 2009-05-25 2009-10-21 北京航空航天大学 Process migration tracking method based on multi-core platform virtual machine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李志伟,吴庆波,谭郁松.基于设备代理机制的虚拟机动态迁移技术研究.《计算机应用研究》.2009,第26卷(第4期), *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108694092A (en) * 2018-05-11 2018-10-23 华中科技大学 A kind of container communication means and system towards Parallel application

Also Published As

Publication number Publication date
CN101859263A (en) 2010-10-13

Similar Documents

Publication Publication Date Title
CN101859263B (en) Quick communication method between virtual machines supporting online migration
CN101465863B (en) Method for implementing high-efficiency network I/O in kernel virtual machine circumstance
CN101354693B (en) Communication scheduling system and method among cores of isomerization multi-core processor
CN104094231B (en) For the system and method for the dynamic migration for supporting the virtual machine in InfiniBand network
CN110710168B (en) Intelligent thread management across isolated network stacks
CN101436966B (en) Network monitoring and analysis system under virtual machine circumstance
CN101765225B (en) Virtual cluster management method and cluster node
US7149832B2 (en) System and method for interrupt handling
CN100399273C (en) System of virtual machine, and method for configuring hardware
CN101901207B (en) Operating system of heterogeneous shared storage multiprocessor system and working method thereof
CN102609298B (en) Based on network interface card virtualization system and the method thereof of hardware queue expansion
CN101430674B (en) Intraconnection communication method of distributed virtual machine monitoring apparatus
US20150111567A1 (en) Apparatus for End-User Transparent Utilization of Computational, Storage, and Network Capacity of Mobile Devices, and Associated Methods
Ren et al. Shared-memory optimizations for inter-virtual-machine communication
CN101968746A (en) Method for implementing organizational architecture mode of kernel-based virtual machine (KVM)
CN101535965A (en) Technique for improving scalability and portability of a storage management system
CN101211271A (en) Controlling virtual machines based on activity state
CN103593189A (en) Method for implementing user mode drive program in embedded Linux
CN102073501A (en) Method for implementing central controller of network equipment based on logic functional block
CN109918230A (en) A kind of business board abnormal restoring method and system
CN101290590A (en) Embedded operating system task switching method and unit
CN107220102A (en) The dormancy of virtual machine and awakening method and system
CN106339257A (en) Method and system for lightweighting client computer operating system and virtualized operating system
CN103036759A (en) System reducing overhead of central processing unit (CPU) of network input/output (I/O) operation under condition of X86 virtualization
CN102147840B (en) Method for realizing network control through virtual machine

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120725

Termination date: 20190612

CF01 Termination of patent right due to non-payment of annual fee