CN104780071B - The upgrade method and device of virtual switch - Google Patents

The upgrade method and device of virtual switch Download PDF

Info

Publication number
CN104780071B
CN104780071B CN201510190818.9A CN201510190818A CN104780071B CN 104780071 B CN104780071 B CN 104780071B CN 201510190818 A CN201510190818 A CN 201510190818A CN 104780071 B CN104780071 B CN 104780071B
Authority
CN
China
Prior art keywords
ovs
virtual machine
information
port
control equipment
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.)
Active
Application number
CN201510190818.9A
Other languages
Chinese (zh)
Other versions
CN104780071A (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201510190818.9A priority Critical patent/CN104780071B/en
Publication of CN104780071A publication Critical patent/CN104780071A/en
Application granted granted Critical
Publication of CN104780071B publication Critical patent/CN104780071B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention provides the upgrade method and device of a kind of virtual switch, this method is applied on master control equipment, master control equipment and at least one other control equipment constitute cluster, each control equipment in cluster is connected at least two servers respectively, OVS is installed, each OVS connects at least one virtual machine on each server;This method comprises: being to move into the port configuration that virtual machine is done to update stored virtual machine information based on the 2nd OVS;It will be under live migration of virtual machine to the 2nd OVS based on the virtual machine information updated;It is the corresponding informance addition mark that the port that virtual machine is done is configured in virtual machine information of moving out based on the first OVS;The first OVS is upgraded based on the information identified;After upgrading is completed, virtual machine is moved back on the first OVS for completing upgrading from the 2nd OVS based on the information identified.The present invention can guarantee to upgrade during OVS that virtual machine is not offline does not stop, and not influence user experience.

Description

The upgrade method and device of virtual switch
Technical field
The present invention relates to network communication technology field more particularly to the upgrade methods and device of a kind of virtual switch.
Background technique
OVS (Open Virtual Switch, open virtual switch) be can support multiple standards management interface and Agreement, and can support the virtual switch of the distributed environment of multiple physical servers.
When the OVS on server is upgraded, needed before upgrading all online void under the server Quasi- machine is all offline, it is also necessary to delete all OVS port informations on the server, then by control assembly control server go into The update and upgrading of row OVS version.
All virtual machine industry under server it can be seen that in the prior art, in the escalation process of OVS where it Business is all interrupted, and the case where virtual machine of whole network offline cutout can greatly reduce the efficiency of whole network, influence to use Family experience.
Summary of the invention
The present invention provides the upgrade method and device of virtual switch, is caused virtually with solving OVS upgrading in the prior art Machine service disconnection and the low problem of network efficiency.
According to a first aspect of the embodiments of the present invention, a kind of upgrade method of virtual switch, the method application are provided In on master control equipment, the master control equipment and at least one other control equipment constitute cluster, each control in the cluster Control equipment is connected at least two servers respectively, and open virtual switch OVS, Mei Gesuo are equipped on each server It states OVS and connects at least one virtual machine;The described method includes:
It is the port configuration moving into virtual machine and being done based on the 2nd OVS, updates stored virtual machine information, to move into institute The virtual machine for stating the 2nd OVS is the online virtual machine connecting with the first OVS;
It will be under the live migration of virtual machine to the 2nd OVS based on the virtual machine information updated;
It is the port configuration that virtual machine done of moving out based on the first OVS, is the corresponding letter in the virtual machine information Breath addition mark;
The first OVS is upgraded based on the information identified;
After upgrading completion, the virtual machine is moved back to from the 2nd OVS by completion based on the information identified On the first OVS of upgrading.
According to a second aspect of the embodiments of the present invention, a kind of update device of virtual switch, described device application are provided In on master control equipment, the master control equipment and at least one other control equipment constitute cluster, each control in the cluster Control equipment is connected at least two servers respectively, and open virtual switch OVS, Mei Gesuo are equipped on each server It states OVS and connects at least one virtual machine;Described device includes:
Information updating unit updates stored void for being the port configuration moving into virtual machine and being done based on the 2nd OVS Quasi- machine information, the virtual machine that move into the 2nd OVS is the online virtual machine connecting with the first OVS;
It moves out unit, for will be under the live migration of virtual machine to the 2nd OVS based on the virtual machine information updated;
Adding unit is identified, is described virtual for being the port configuration that virtual machine done of moving out based on the first OVS Corresponding informance in machine information adds mark;
Upgrade unit, for being upgraded based on the information identified to the first OVS;
Unit is moved back to, for after the upgrading is completed, based on the information identified by the virtual machine from described the Two OVS are moved back on the first OVS for completing upgrading.
By above technical scheme as it can be seen that the present invention is matched by the port done before moving into virtual machine based on the 2nd OVS The port configuration done after virtual machine of moving out with the first OVS is set, updates stored virtual machine information, and update the first OVS The flow table of server where with the 2nd OVS ensure that in escalation process that virtual machine is not offline and do not stop, and upgrade in the prior art OVS is offline by online virtual machine before and removing OVS port information is compared, and simplifies operation, and can guarantee to upgrade The network environment before upgrading is quickly recovered to later, does not influence user experience.
Detailed description of the invention
Fig. 1 is the application scenarios schematic diagram of the more new embodiment of virtual switch of the present invention;
Fig. 2 is one embodiment flow chart of the upgrade method of virtual switch of the present invention;
Fig. 3 is one embodiment flow chart that virtual machine information is updated in the upgrade method for virtual switch of the present invention;
Fig. 4 is a kind of hardware structure diagram of the update device of virtual switch of the present invention;
Fig. 5 is one embodiment block diagram of the update device of virtual switch of the present invention.
Specific embodiment
Technical solution in embodiment in order to enable those skilled in the art to better understand the present invention, and make of the invention real The above objects, features, and advantages for applying example can be more obvious and easy to understand, with reference to the accompanying drawing to technical side in the embodiment of the present invention Case is described in further detail.
It is the application scenarios schematic diagram of the more new embodiment of virtual switch of the present invention referring to Fig. 1.
Fig. 1 shows a kind of network architecture, which includes at least two control equipment, and each equipment that controls is connected with Several servers, are equipped with the software of the OVS for undertaking function of exchange on each server, each OVS connect several it is virtual Machine.It should be noted that multiple control equipment constitute control device clusters, a control equipment conduct in device clusters is controlled Main (leader) controls equipment, controls other control equipment.The information of each OVS all can be in each control equipment of cluster In synchronize.The server at least two under equipment is respectively controlled, the virtual machine under each OVS is at least one, for example It is convenient, two control equipment 11 and 12 are illustrated only in Fig. 1, control equipment 11 connects two-server 121 and 122, wherein clothes OVS 131, and 131 connecting virtual machine 141 of OVS are installed on business device 121, OVS 132 is installed on server 122, and 132 connecting virtual machine 142 of OVS;It controls equipment 12 and connects two-server 123 and 124, OVS is installed on server 123 133, and 133 connecting virtual machine 143 of OVS, OVS 134, and 134 connecting virtual machine of OVS are installed on server 124 144。
Specifically, the network architecture can be VCF (Virtual Converged Framework, virtual fusion cage Structure) or SDN (Software Defined Network, software defined network) framework.Wherein master control equipment, that is, VCF or SDN The core control component (Controller) of framework.By taking SDN framework as an example, OVS usually can carry out message by following manner Forwarding: master control equipment issues flow table to OVS by Openflow (open flows) agreement, which is stored in the DB of server On (Data Base, database), OVS is based on the flow table and deposits VM (Virtual Machine, the virtual machine) flow forwarded It stores up on OVS, then is further forwarded.
The upgrade method and device of virtual switch provided in an embodiment of the present invention, it is online by being connect with OVS to be upgraded Under live migration of virtual machine to other OVS, then OVS to be upgraded is upgraded, during this, VCF master control equipment or SDN master Control equipment is configured and timely based on the port done by migration migration corresponding source OVS (OVS i.e. to be upgraded) and purpose OVS Port information is updated, and source OVS and purpose OVS updates local flow table also based on the configuration done to port, then source OVS exists The live migration of virtual machine moved out is returned after upgrading, is not stopped to ensure that in escalation process that virtual machine is not offline, is guaranteed The web experience of user.Realization process of the invention is described in detail combined with specific embodiments below.
It referring to fig. 2, is one embodiment flow chart of the upgrade method of virtual switch of the present invention, the embodiment is from master control Control equipment side is described, and includes the following steps:
Step 201 based on the 2nd OVS is to move into the port configuration that virtual machine done, and updates stored virtual machine information.
Wherein, virtual machine information includes virtual machine address in vPort (virtual port) list item, virtual machine institute connectivity port Port information.Port information include OVS be connected with virtual machine port port numbers, with some information of port binding for example QoS (Quality of Service, service quality) flow restriction, precedence information etc., further includes port policy.
In an optional implementation, as shown in figure 3, step 201 can be accomplished in the following manner:
Step 2011, the first OVS to be upgraded for determining virtual machine of moving out and the 2nd OVS for moving into virtual machine.
For the first OVS to be upgraded, master control equipment can usually determine that Servers-all connected to it requires to rise Grade OVS.For the upgrading sequence of each OVS to be upgraded, can be upgraded in a random order, it can also be according to the serial number of OVS Or the serial number of server successively upgrades, the present embodiment does not limit the upgrading sequence of each OVS, each server.
For the 2nd OVS, master control equipment based on OVS to be upgraded virtual-machine data determination on the server to move into The purpose OVS of virtual machine.All online virtual machines connected on OVS to be upgraded are all virtual machine to be moved out.
Due to the virtual machine (vm) migration moved out can also be returned after OVS completes upgrading, for ease of description, below will The OVS to be upgraded of source OVS, i.e., the virtual machine that move out are referred to as the first OVS, and the server where the first OVS is referred to as first The port that virtual machine to be moved out is connected on the first OVS is referred to as first port by server, and corresponding port information is the Address of the virtual machine to be moved out in first server is referred to as the first address by Single port information;Virtual machine will be moved into Purpose OVS is referred to as the 2nd OVS, and the server where the 2nd OVS is referred to as second server, will virtual machine be moved out will be The port connected on 2nd OVS is referred to as second port, and corresponding port information is second port information, will be virtual wait move out Address on second server is referred to as the second address by machine.That is, before the first OVS upgrading, it will be with the first OVS The online virtual machine (vm) migration of connection moves the virtual machine moved out from the 2nd OVS after the first OVS completes upgrading to the 2nd OVS Return the first OVS.
Firstly, obtain the first OVS virtual-machine data on the server.
Specifically, each server can be connect with cloud platform, by cloud platform to clothes in an optional implementation Business device is managed collectively, and the information of each server is stored in cloud platform, the operation ginseng including virtual-machine data, each server The information such as number.Master control equipment can obtain virtual-machine data from cloud platform.In the present embodiment, master control equipment and cloud platform It all supports and provides API (Application Programming Interface, application programming interface), master control is set up The standby API by calling cloud platform can get the virtual-machine data on each server.The cloud platform can be Openstack (cloud computing of open source manages platform), Virtual Machine Ware Center (software virtual machine center) etc..
Wherein virtual-machine data may include the quantity of the online virtual machine below each server, the quantity of offline virtual machine And not using the quantity of shared storage in online virtual machine.It is shared to be stored as being arranged under server or memory, energy Enough for the shared memory space used of other servers, can be preset by user, to be used when thermophoresis.
Then, master control equipment judges whether to need to be connected by the first OVS based on accessed virtual-machine data Virtual machine to be moved out establishes interim shared storage.If it is determined that needing is that virtual machine to be moved out establishes interim shared storage, then Selection can establish the second server of interim shared storage, and interim shared storage is established on second server, and by the OVS on two servers is as the 2nd OVS.
When in virtual-machine data not using the quantity of the online virtual machine of shared storage be 0 when, control equipment be judged as It does not need to establish interim shared storage for virtual machine to be moved out, in this case since virtual machine to be moved out has been deposited using shared Storage, thus under the server where the shared storage that can directly use live migration of virtual machine to be moved out to it;When not making With shared storage when the quantity for virtual machine of moving out is at least 1, master control equipment is judged as that needs are that virtual machine to be moved out is built Vertical interim shared storage.
The process that storage is temporarily shared in the foundation can be, firstly, master control equipment can notify cloud platform to need to establish Interim shared storage.
Secondly, cloud platform is by the quantity for the online virtual machine without using shared storage connecting with the first OVS come based on Storage size needed for calculating thermophoresis.
Then, cloud platform based on calculated storage size determine one for interim shared storage to be arranged or Multiple second servers.
In an optional implementation, cloud platform calculates each service based on the data information of each server stored The hard drive space size of device, and calculated hard drive space size is compared with above-mentioned storage size, if at least The hard drive space size of one server is greater than the calculated storage size of institute, then a clothes are selected from these servers Device be engaged in as second server.Preferably, using the maximum server of hard drive space in these servers as second server.? It can be in the following way when determining the maximum server in present hard discs space:
First optional implementation determines that the mode of the maximum server in present hard discs space can be with are as follows: will be online The all least server of the quantity of virtual machine and offline virtual machine is determined as the maximum server of hard drive space.In addition, working as hard disk Space size be greater than the server of calculated storage size when having multiple, it is preferable that can be in multiple server It is middle to select that CPU usage is minimum or the least server of EMS memory occupation is as second server, to guarantee subsequent execution thermophoresis Speed and efficiency.
Second optional implementation, if the hard drive space size of each server is respectively less than institute, calculated storage is empty Between size, then selected from these servers the sum of hard drive space be greater than calculated storage size at least two clothes Device be engaged in combine as second server.Preferably, the biggish server of hard drive space is selected to form from these servers Second server, to reduce the number of servers for forming second server to the greatest extent.
Finally, cloud platform is based on the calculated storage size of institute establishes interim shared storage under second server. Facing when the interim shared storage is used as all online live migration of virtual machine that shared storage is not used that each first OVS is connected When memory space.Using the OVS installed on second server as the 2nd OVS.
It should be noted that the movement of memory space needed for above-mentioned calculating thermophoresis and the interim shared storage of foundation It can be completed by master control equipment, master control equipment is only needed to get operating parameter of each server etc. from cloud platform in advance Information, detailed process repeat no more.
Other control equipment of step 2012, master control equipment into cluster send migration label (vmotion) message, should Mark, the second address of virtual machine to be moved out are carried in migration label message, and the second end of the second port to be moved into Message breath.
Wherein, the second address of virtual machine to be moved out includes MAC Address and IP address, is based on by master control equipment aforementioned The 2nd OVS determined in step is to be somebody's turn to do virtual machine to be moved out to be allocated;Other control equipment of master control equipment into cluster Migration label message is sent, so that other control equipment based on virtual machine identifier lookup to the information for corresponding to the virtual machine, and Its second address and second port information are recorded, to realize the synchronized update of the information in each control equipment.
Step 2013, master control equipment issue migration to the 2nd OVS by Openflow and prepare message, and migration preparation disappears The second end message of the mark of virtual machine to be moved out, the second address of virtual machine to be moved out and second port is carried in breath Breath, also, master control equipment sends the notification message for updating flow table to the 2nd OVS.
2nd OVS prepares the second address of message based on migration and second port information is virtual machine configuration second to be moved out Port, also, the second port that configures based on received notification message and newly of the 2nd OVS updates the on second server The mark of virtual machine to be moved out, the second address and second port information are deposited into the second flow table by two flow tables.
Step 2014, master control equipment receive the 2nd OVS after completing port configuration, the 2nd port_ reported Status (port status) information may include the second end configured for virtual machine to be moved out in the second port status message The second port state of mouth, and it is somebody's turn to do the second address of virtual machine to be moved out.
Wherein, the second port status message that the 2nd OVS is reported may include port ADD event, and port ADD event indicates Existing virtual machine will be moved into and cause to create the virtual machine on target OVS, port ADD event carries virtual wait move out Second address of machine also carries the second port state for the second port that promising virtual machine to be moved out is configured.The second port Status message can also include port MODIFY event, and port MODIFY event can also carry the second of virtual machine to be moved out The second port state of address and configured second port.Wherein port status can be indicated with UP or DOWN.
The second port status message that step 2015, master control equipment are reported based on the 2nd OVS updates vPort list item, and Other control equipment second port status message being synchronized in cluster.
It include virtual machine address, port status and port information in vPort list item, master control equipment is based on the 2nd OVS The second port status message of report learns that the 2nd OVS is ready for live migration of virtual machine, then master control equipment is according to Two-port netwerk status message increases the second address of virtual machine in vPort list item, and corresponding in vPort list item increases by the Two-port netwerk state, moreover, the second port status message is synchronized to other control equipment in cluster, so that other controls are set It is standby that also vPort list item is similarly updated.
That is in vPort list item, the mark of corresponding virtual machine to be moved out is corresponding be stored with two parts of address informations and Two parts of port informations, address and port information respectively before migration and after migration.
Step 202, will be under the online live migration of virtual machine to the 2nd OVS that connect with the first OVS.
In the embodiment of the present disclosure, firstly, master control equipment to the first OVS and the 2nd OVS transmission treat move out virtual machine into The notification message of row thermophoresis.
Then, the first OVS and the 2nd OVS is moved from the first OVS heat virtual machine to be moved out based on the notification message received Move on to the 2nd OVS.
Then, the virtual machine moved into and the 2nd OVS second port newly configured are attached by the 2nd OVS, and are made Second port strategy comes into force.
The process of the thermophoresis can be with are as follows: by the first OVS to be upgraded connected without using the online of shared storage Under live migration of virtual machine to second server, and/or shared it will be deposited using the online live migration of virtual machine of shared storage to it Under server where storing up.
The detailed process of the thermophoresis may include: the online void that shared storage is not used connected for the first OVS Quasi- machine, cloud platform or master control equipment, notify the first OVS and the 2nd OVS that will carry out thermophoresis.First OVS will not make Be sent to the 2nd OVS with the file data of the online virtual machine of shared storage, that is, be sent to established under second server it is interim Shared storage, and the file data in the migration is locked;The file data received is stored in interim total by the 2nd OVS It enjoys in storage.For having used the online virtual machine of shared storage, the shared storage that the purpose OVS to be moved into uses for it OVS under the server at place, also referred to as the 2nd OVS, cloud platform or master control equipment notify the first OVS and this Two OVS will carry out thermophoresis, and the first OVS will be sent to its use using the file data of the online virtual machine of shared storage Shared storage in.First server deletes these number of files stored thereon after the file data of virtual machine is sent completely According to.
Here it to be not only connected with the online virtual machine for having used shared storage on the first OVS, but also is connected with to be not used and share The online virtual machine instance of storage is illustrated, and the online void of shared storage may also have only been used under actually each OVS Quasi- machine, it is also possible to the online virtual machine of shared storage only be not used.The online virtual machine that first OVS is connected all migrates out it Afterwards, cloud platform sends migration completion notice to master control equipment.
Step 203 based on the first OVS is the port configuration that virtual machine done of moving out, and is the corresponding letter in virtual machine information Breath addition mark.
Firstly, master control equipment receives the first port status message that reports of the first OVS, based on moved out virtual machine the One address search vPort list item updates the port in vPort list item based on the first port state in first port status message State, and first port information is marked based on mark of moving out, then notify the first OVS and gateway to update flow table, and Other control equipment into cluster send the first port status message for carrying mark of moving out.
After the first OVS virtual machine to be moved out connected is moved out in the previous step, the first OVS is deleted should be wait move out First port used in virtual machine, and first port status message is reported to master control equipment;Wherein, first port state disappears Breath can be port delete event, may include the virtual machine of moving out the first of the first OVS in the delete event of the port Address, the first port deleted first port state, moreover, further including mark of moving out in the delete event of the port.
Due to that also the virtual machine (vm) migration that moved out before can be returned after the first OVS completes upgrading, thus should deleting Before first port used in virtual machine, the first port information of the first port is recorded.Due in the prior art, source OVS, which moves out, will be deleted relevant port and port information after virtual machine, and to master control equipment sending port delete event, And master control equipment can also delete relevant port information based on port delete event in the table entry, in this way in the first OVS After upgrading, the virtual machine moved out cannot be migrated back.Thus, one, which is carried, in the delete message of the present embodiment moves Identify out, with inform master control equipment without deleting first port information, thus master control equipment do not delete this move out it is virtual First address of the machine on the first OVS does not delete the virtual machine used first port information on the first OVS yet, but It is marked and stores, so as to after the first OVS completes upgrading, according to the information of the record and mark by moved out virtual machine It migrates again back.
The notice that first OVS is sent according to master control equipment updates the first flow table in first server, by deleted end The first port information of mouth makes marks in the first flow table.
When other control equipment in cluster receive the first port status message for carrying mark of moving out, with master control Control equipment similarly updates vPort list item, makes marks for corresponding first port information.
Step 204 upgrades the first OVS based on the information identified.
In step 203, all online virtual machines connecting with the first OVS have all been moved out, therefore, it is possible to this first OVS is upgraded, and master control equipment receives imported OVS new version, and selects the server where the first OVS, thus into Row OVS upgrading.
It can be seen from the above description that since the first OVS all online virtual machines connected have all been moved out, institute Directly can be carried out OVS upgrading.The flow table moreover, because master control equipment, the first OVS and the 2nd OVS have timely updated Or vPort list item, thermophoresis not will lead to the loss of virtual machine traffic, and can guarantee that virtual machine does not stop, it is thus possible to Guarantee the flow for not influencing user in OVS escalation process.
In an optional implementation, after upgrading is completed, master control equipment is sent to the first server to be upgraded The notification message of completion.
Step 205 will be moved out based on first port information of the moved out virtual machine on the first OVS and the first address Virtual machine is moved back on the first OVS for completing upgrading from the 2nd OVS.
In this step, the source OVS that the 2nd OVS is migrated as this, the purpose OVS that the first OVS is migrated as this, this is moved The process of shifting can be with are as follows:
Other control equipment of master control equipment into cluster send migration label message, carry in migration label message The first port information of the mark of virtual machine to be moved back to, the first address and the first port to be moved back to.
Wherein the first address and first port information are all the information stored originally on master control equipment.
Master control equipment sends migration to the first OVS by Openflow and prepares message, which prepares to carry in message Need to be moved back to the first port information of the mark of virtual machine, the first address and first port;
First OVS is based on migration to prepare message being virtual machine configuration first port to be moved back to, and configures after completing to master control Control equipment reports first port status information;It include the first address of virtual machine to be moved back in first port status information, and The first port state of configured first port.In this step, because not deleting the first flow table when virtual machine is moved out In corresponding first port information and the information of virtual machine, thus the first OVS is not necessarily to update the first flow table of first server.
Master control equipment receives first port status information, based on the first address of virtual machine in first port status information VPort list item is searched, the first port state in vPort list item is updated;And first port status message is sent in cluster Other control equipment.
Master control equipment instruction returns to the moved into live migration of virtual machine of the 2nd OVS connection under the first OVS.
Master control equipment receives the second port status message that the 2nd OVS is reported after virtual machine of moving out, the second end It is carried in mouth status message and moves back to mark, second address and second port state of the virtual machine on the 2nd OVS.
After migration is completed, the 2nd OVS will be in the second port of move out virtual machine and the second flow table of second server Corresponding virtual machine address information, the second port information stored is all deleted, and is sent to carry to master control equipment and moved back to mark The second port status message of knowledge.
Master control equipment is based on corresponding in virtual machine the second address search vPort list item in second port status message Port information, based on move back to mark by vPort list item second port information and the second address delete.
The second port status message is sent to other control equipment in cluster by master control equipment, so as to other controls Equipment updates vPort list item.
From the above, it can be seen that master control equipment is not necessarily to divide wait virtual machine of moving out back during moving back to virtual machine With the second address, first address and first port information of the virtual machine on the first OVS are searched directly in vPort list item is Can, and be that the first OVS configures first port based on the first address of virtual machine found and first port information.Also, After virtual machine is moved back to the first OVS from the 2nd OVS, the 2nd OVS is sent in second port status message to master control equipment, is taken Band moves back to mark, and master control equipment is identified based on moving back in the second port status message by void corresponding in vPort list item Quasi- the second address of machine and second port information are all deleted.Also, the 2nd OVS also updates the second flow table on second server, will The information of the virtual machine of having moved out stored and corresponding second port information are all deleted.
In addition, master control equipment is also based on OVS configuration information to liter after virtual machine is moved back to the first OVS from the 2nd OVS The first OVS after grade is completed is configured.It is stored with the OVS configuration information of the first OVS in cloud platform, master control equipment can be with The OVS configuration information is got from cloud platform.OVS configuration information include OVS which port connect which virtual machine (including Online virtual machine and offline virtual machine), the information such as IP address externally with which exit port and each exit port.Upgrading During first OVS, these information in the first migration server are all deleted, after upgrading is completed, master control equipment Or master control equipment controls cloud platform, the quantity of quantity and offline virtual machine based on online virtual machine, port information and should OVS configuration information configures the first OVS after upgrading, including the port of the first OVS is connected to virtual machine, and is the Port setting IP address of one OVS etc..It does not stop to which realization is not offline during virtual machine (vm) migration.
Above-mentioned steps 201-205 successively is executed to other servers for needing to upgrade OVS in addition to second server.
So far, only remaining 2nd OVS does not upgrade also in all OVS to be upgraded.
By the online live migration of virtual machine being connect with the 2nd OVS to being completed on the server of upgrading OVS, to the 2nd OVS Upgraded, live migration of virtual machine is returned again after upgrading.2nd OVS escalation process can refer to the first OVS escalation process, This is repeated no more.
Above-described embodiment is as it can be seen that the embodiment is configured by the port done before moving into virtual machine based on the 2nd OVS The port configuration done after virtual machine of moving out with the first OVS, updates stored virtual machine information, and update the first OVS and The flow table of server where 2nd OVS ensure that in escalation process that virtual machine is not offline and do not stop, and upgrade in the prior art OVS is offline by online virtual machine before and removing OVS port information is compared, and simplifies operation, and can guarantee to upgrade The network environment before upgrading is quickly recovered to later, does not influence user experience.
Corresponding with the embodiment of the upgrade method of aforementioned virtual interchanger, the present invention also provides the liters of virtual switch The embodiment of stage arrangement.
The embodiment of the update device of virtual switch provided by the invention can be applied in the equipment with hardware configuration On, which can be the controller in VCF or SDN framework.The Installation practice can also be passed through by software realization The mode of hardware or software and hardware combining is realized.It taking software implementation as an example, is to pass through it as the device on a logical meaning Computer program instructions corresponding in nonvolatile memory are read into memory what operation was formed by the processor of place equipment. For hardware view, as shown in figure 4, for a kind of hardware structure diagram of equipment where the back-up device of configuration file of the present invention, Other than processor shown in Fig. 4, network interface, memory and nonvolatile memory, setting where device in embodiment Standby usually can also include other hardware, such as be responsible for handling the forwarding chip of message, to being no longer shown specifically in this Fig. 4.
It is one embodiment block diagram of the update device of virtual switch of the present invention referring to Fig. 5, which can apply In the control equipment of VCF or SDN, which includes: information updating unit 510, unit 520 of moving out, mark adding unit 530, upgrade unit 540 and unit 550 is moved back to.
Wherein, information updating unit 510 update institute for being the port configuration moving into virtual machine and being done based on the 2nd OVS The virtual machine information of storage, the virtual machine that move into the 2nd OVS is the online virtual machine connecting with the first OVS;
It moves out unit 520, for will be under live migration of virtual machine to the 2nd OVS based on the virtual machine information updated;
Adding unit 530 is identified, for being the port configuration that virtual machine done of moving out based on the first OVS, is believed for virtual machine Corresponding informance in breath adds mark;
Upgrade unit 540, for being upgraded based on the information identified to the first OVS;
Unit 550 is moved back to, for moving back to virtual machine from the 2nd OVS based on the information identified after upgrading is completed On the first OVS for completing upgrading.
In an optional implementation: information updating unit 510 includes (being not shown in Fig. 5):
Subelement is determined, for determining the first OVS to be upgraded for virtual machine of moving out and moving into the 2nd OVS of virtual machine;
Migration label message transmission sub-unit, for sending migration label message to other control equipment, migration label disappears Mark that virtual machine is carried in breath, virtual machine by the second address being connect with the 2nd OVS and second port information so that other The virtual machine information that control equipment is respectively stored based on the information update carried in migration label message;
Notification message transmission sub-unit, for sending the notification message that migration prepares message and update flow table to the 2nd OVS, Migration prepares mark, the second address and second port information that virtual machine is carried in message, so that the 2nd OVS is based on migration standard The information carried in standby message is to move into virtual machine configuration second port and update flow table;
First updates subelement, the second port status information for being reported later based on the configuration of the 2nd OVS completing port, Update virtual machine information;
Second port status information transmission sub-unit, for second port status information to be sent to other control equipment, So that the virtual machine information that other control equipment are respectively stored based on second port state information updating
In another optional implementation: determine that subelement includes (being not shown in Fig. 5):
Virtual-machine data obtains subelement, for the virtual-machine data in first server where obtaining the first OVS;
Shared store determines subelement, for based on the online virtual machine without using shared storage in virtual-machine data Quantity, it is determined whether need the online virtual machine for the first OVS connection to establish interim shared storage;
Second server determines subelement, for being shared based on no use when shared storing sub-units are determined as The quantity of the online virtual machine of storage determines the second server for establishing interim shared storage;
2nd OVS determines subelement, and the OVS for connecting second server is determined as the 2nd OVS.
In another optional implementation: mark adding unit 530 includes (being not shown in Fig. 5):
First port status information receiving subelement, first reported after virtual machine of moving out for receiving the first OVS Port status information;
Mark addition subelement, for based on the first identifier in first port status information, in virtual machine information Corresponding informance addition mark;
It updates flow table and notifies subelement, for sending the notice for updating flow table to the first OVS based on added identify;
First port status information transmission sub-unit, for first port status information to be sent to other control equipment, So that other control equipment add mark based on first port status information in the virtual machine information respectively stored.
In another optional implementation, the update device of the virtual switch further include:
Configuration unit, for being configured based on the OVS configuration information, the port information that are stored to the OVS after upgrading.
In another optional implementation: moving back to unit 550 includes (being not shown in Fig. 5):
Migration prepares message transmission sub-unit, prepares message for sending migration to the first OVS, and update the notice of flow table Message, migration prepare to carry the mark of virtual machine, virtual machine and the first address connecting the first OVS and first port in message Information, so that it is to move into virtual machine configuration first port and update stream that the first OVS, which prepares the information carried in message based on migration, Table;
Second updates subelement, the first port status information for being reported later based on the configuration of the first OVS completing port, Update virtual machine information;
Subelement is deleted, is taken in the second port status information for being reported after virtual machine of moving out based on the 2nd OVS The second identifier of band deletes the second port information in virtual machine information and the second address;
Transmission sub-unit, for second port status information to be sent to other control equipment, so that other described controls The virtual machine information that equipment is respectively stored based on second port state information updating.
In another optional implementation, the virtual machine information that information updating unit 510 updates includes virtual machine Location, the port information with virtual machine institute connectivity port.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual The purpose for needing to select some or all of the modules therein to realize the present invention program.Those of ordinary skill in the art are not paying Out in the case where creative work, it can understand and implement.
As can be seen from the above-described embodiment, the upgrade method and device of virtual switch provided in an embodiment of the present invention is led to Crossing based on OVS is the configuration moving out and moving into virtual machine and done to port, is carried out to the flow table of the virtual machine information sum stored Update, ensure that in escalation process that virtual machine is not offline and do not stop, with before upgrading OVS in the prior art by online virtual machine Offline and removing OVS port information is compared, and operation is simplified, and can guarantee to quickly recover to before upgrading after upgrading Network environment, do not influence user experience.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.

Claims (12)

1. a kind of upgrade method of virtual switch, which is characterized in that the method is applied on master control equipment, the master control Control equipment and at least one other control equipment constitute cluster, and each control equipment in the cluster is serviced at least two respectively Device is connected, and open virtual switch OVS is equipped on each server, each OVS connects at least one virtual machine; The described method includes:
It is to move into the port configuration that virtual machine done based on the 2nd OVS, updates stored virtual machine information, moves into described the The virtual machine of two OVS is the online virtual machine connecting with the first OVS;
It will be under the live migration of virtual machine to the 2nd OVS based on the virtual machine information updated;
It is the port configuration that virtual machine done of moving out based on the first OVS, adds for the corresponding informance in the virtual machine information Mark-on is known;It specifically includes: receiving the first port status information that the first OVS is reported after the virtual machine of moving out;Base First identifier in the first port status information adds mark to the corresponding informance in the virtual machine information;It is based on It is added to identify the notice for sending to the first OVS and updating flow table;The first port status information is sent to described Other control equipment, so that other described control equipment are based on the first port status information in the virtual machine letter respectively stored The mark is added in breath;
The first OVS is upgraded based on the information identified;
After upgrading completion, the virtual machine is moved back to from the 2nd OVS by completion upgrading based on the information identified The first OVS on.
2. based on the 2nd OVS being the end moving into virtual machine and being done the method according to claim 1, wherein described Mouth configuration, updates stored virtual machine information, comprising:
It determines the first OVS to be upgraded for virtual machine of moving out and moves into the 2nd OVS of virtual machine;
Migration label message is sent to other described control equipment, the mark of the virtual machine is carried in the migration label message Knowledge, the virtual machine are by the second address connecting with the 2nd OVS and second port information, so that other described control equipment The virtual machine information respectively stored based on the information update carried in the migration label message;
The notification message that migration prepares message and update flow table is sent to the 2nd OVS, the migration prepares to carry in message There are mark, second address and the second port information of the virtual machine, so that the 2nd OVS is based on the migration Preparing the information carried in message is to move into virtual machine configuration second port and update flow table;
Based on the second port status information reported after the 2nd OVS completing port configuration, the virtual machine information is updated;
The second port status information is sent to other described control equipment, so that other described control equipment are based on described The virtual machine information that second port state information updating respectively stores.
3. according to the method described in claim 2, it is characterized in that, the 2nd OVS of virtual machine is moved into the determination, comprising:
Virtual-machine data where obtaining the first OVS in first server;
Quantity based on the online virtual machine without using shared storage in the virtual-machine data, it is determined whether need for institute The online virtual machine for stating the first OVS connection establishes interim shared storage;
If so, being deposited without using the quantity of the online virtual machine of shared storage to determine for establishing interim share based on described The second server of storage;
The OVS that the second server connects is determined as the 2nd OVS.
4. the method according to claim 1, wherein described by the live migration of virtual machine to the 2nd OVS After lower, the method also includes:
The OVS after upgrading is configured based on OVS configuration information, the port information stored.
5. the method according to claim 1, wherein it is described based on the information identified by the virtual machine from institute The 2nd OVS is stated to move back on the first OVS for completing upgrading, comprising:
Migration is sent to the first OVS and prepares message, and updates the notification message of flow table, and the migration prepares to carry in message There are the mark of the virtual machine, the virtual machine and the first address connecting the first OVS and first port information, so that institute Stating the first OVS to prepare the information carried in message based on the migration is to move into virtual machine configuration first port and update flow table;
Based on the first port status information reported after the first OVS completing port configuration, the virtual machine information is updated;
The second mark carried in the second port status information reported after the virtual machine of moving out based on the 2nd OVS Know, deletes the second port information in the virtual machine information and the second address;
The second port status information is sent to other described control equipment, so that other described control equipment are based on described The virtual machine information that second port state information updating respectively stores.
6. method according to claim 1-5, which is characterized in that the virtual machine information includes virtual machine Location, the port information with virtual machine institute connectivity port.
7. a kind of update device of virtual switch, which is characterized in that described device is applied on master control equipment, the master control Control equipment and at least one other control equipment constitute cluster, and each control equipment in the cluster is serviced at least two respectively Device is connected, and open virtual switch OVS is equipped on each server, each OVS connects at least one virtual machine; Described device includes:
Information updating unit updates stored virtual machine for being the port configuration moving into virtual machine and being done based on the 2nd OVS Information, the virtual machine that move into the 2nd OVS is the online virtual machine connecting with the first OVS;
It moves out unit, for will be under the live migration of virtual machine to the 2nd OVS based on the virtual machine information updated;
Adding unit is identified, for being the port configuration that virtual machine done of moving out based on the first OVS, is believed for the virtual machine Corresponding informance in breath adds mark;
Upgrade unit, for being upgraded based on the information identified to the first OVS;
Unit is moved back to, for after the upgrading is completed, based on the information identified by the virtual machine from the 2nd OVS It moves back on the first OVS for completing upgrading;
Wherein, the mark adding unit includes:
First port status information receiving subelement is reported after the virtual machine of moving out for receiving the first OVS First port status information;
Mark addition subelement, for based on the first identifier in the first port status information, to the virtual machine information In corresponding informance add mark;
It updates flow table and notifies subelement, for sending the notice for updating flow table to the first OVS based on added identify;
First port status information transmission sub-unit is set for the first port status information to be sent to other described controls It is standby, so that other described control equipment add institute based on the first port status information in the virtual machine information respectively stored State mark.
8. device according to claim 7, which is characterized in that the information updating unit includes:
Subelement is determined, for determining the first OVS to be upgraded for virtual machine of moving out and moving into the 2nd OVS of virtual machine;
Migration label message transmission sub-unit, for sending migration label message, the migration mark to other described control equipment The mark of the virtual machine is carried in note message, the second address and second that the virtual machine will be connect with the 2nd OVS Port information, so that the void that other described control equipment are respectively stored based on the information update carried in the migration label message Quasi- machine information;
Notification message transmission sub-unit, for sending the notification message that migration prepares message and update flow table to the 2nd OVS, The migration prepares mark, second address and the second port information that the virtual machine is carried in message, so that It is to move into virtual machine configuration second port and update stream that 2nd OVS, which prepares the information carried in message based on the migration, Table;
First updates subelement, the second port status information for being reported later based on the 2nd OVS completing port configuration, Update the virtual machine information;
Second port status information transmission sub-unit is set for the second port status information to be sent to other described controls It is standby, so that the virtual machine information that other described control equipment are respectively stored based on the second port state information updating.
9. device according to claim 8, which is characterized in that the determining subelement includes:
Virtual-machine data obtains subelement, for the virtual-machine data in first server where obtaining the first OVS;
Shared store determines subelement, for based on the online virtual machine without using shared storage in the virtual-machine data Quantity, it is determined whether need the online virtual machine for the first OVS connection to establish interim shared storage;
Second server determines subelement, for not used based on described when the shared storing sub-units are determined as The quantity of the online virtual machine of shared storage determines the second server for establishing the interim shared storage;
2nd OVS determines subelement, and the OVS for connecting the second server is determined as the 2nd OVS.
10. device according to claim 7, which is characterized in that described device further include:
Configuration unit, for being matched based on the OVS configuration information, the port information that are stored to the OVS after upgrading It sets.
11. device according to claim 7, which is characterized in that the unit of moving back to includes:
Migration prepares message transmission sub-unit, prepares message for sending migration to the first OVS, and update the notice of flow table Message, the migration prepares to carry the mark of the virtual machine in message, the virtual machine is connect with the first OVS the One address and first port information, so that it is to move into void that the first OVS, which prepares the information carried in message based on the migration, Quasi- machine configuration first port and update flow table;
Second updates subelement, the first port status information for being reported later based on the first OVS completing port configuration, Update the virtual machine information;
Delete subelement, the second port status information for reporting after the virtual machine of moving out based on the 2nd OVS The second identifier of middle carrying deletes the second port information in the virtual machine information and the second address;
Transmission sub-unit, for the second port status information to be sent to other described control equipment so that it is described other The virtual machine information that control equipment is respectively stored based on the second port state information updating.
12. according to the described in any item devices of claim 7-11, which is characterized in that the information updating unit updates described Virtual machine information includes virtual machine address, the port information with virtual machine institute connectivity port.
CN201510190818.9A 2015-04-21 2015-04-21 The upgrade method and device of virtual switch Active CN104780071B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510190818.9A CN104780071B (en) 2015-04-21 2015-04-21 The upgrade method and device of virtual switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510190818.9A CN104780071B (en) 2015-04-21 2015-04-21 The upgrade method and device of virtual switch

Publications (2)

Publication Number Publication Date
CN104780071A CN104780071A (en) 2015-07-15
CN104780071B true CN104780071B (en) 2018-12-25

Family

ID=53621327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510190818.9A Active CN104780071B (en) 2015-04-21 2015-04-21 The upgrade method and device of virtual switch

Country Status (1)

Country Link
CN (1) CN104780071B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591802B (en) * 2015-08-24 2019-06-04 新华三技术有限公司 Switching equipment upgrade method and device
CN105589731B (en) * 2015-09-16 2019-01-18 新华三技术有限公司 A kind of virtual machine migration method and device
CN107493180B (en) * 2016-06-13 2021-04-30 阿里巴巴集团控股有限公司 Upgrading method and device of virtual switch
CN106603409B (en) * 2016-11-30 2020-02-14 中国科学院计算技术研究所 Data processing system, method and equipment
CN108964949A (en) * 2017-05-19 2018-12-07 中兴通讯股份有限公司 Virtual machine migration method, SDN controller and computer readable storage medium
CN107547242B (en) * 2017-05-24 2019-11-12 新华三技术有限公司 The acquisition methods and device of VM configuration information
CN107360104B (en) * 2017-07-31 2021-04-02 郑州云海信息技术有限公司 Method and device for realizing tunnel endpoint network
CN108183871B (en) * 2017-11-23 2019-03-12 北京三快在线科技有限公司 A kind of virtual switch, virtual switch start method, electronic equipment
CN109873768B (en) * 2017-12-01 2021-06-22 华为技术有限公司 Method for updating forwarding table, hardware accelerator, OVS and server
CN108958889A (en) * 2018-07-12 2018-12-07 郑州云海信息技术有限公司 The management method and device of virtual machine in cloud data system
CN109039909B (en) * 2018-07-17 2021-12-24 新华三技术有限公司 Message forwarding method and device
CN109450676B (en) * 2018-10-29 2022-04-26 锐捷网络股份有限公司 Switch upgrading method and device, electronic equipment and computer readable medium
CN109450701B (en) * 2018-12-07 2020-04-17 北京金山云网络技术有限公司 Virtual switch switching method and device, host machine and computer readable storage medium
CN111404810B (en) * 2019-01-02 2022-11-15 中国移动通信有限公司研究院 Openflow flow table recovery method and device, electronic equipment and medium
CN110795211A (en) * 2019-10-25 2020-02-14 北京金山云网络技术有限公司 Method and device for upgrading configuration of virtual machine, electronic equipment and readable storage medium
CN111221561B (en) * 2020-01-14 2024-05-31 平安科技(深圳)有限公司 Stream table updating method, device, system, computer equipment and storage medium
CN113495777B (en) * 2020-04-03 2024-07-26 中移动信息技术有限公司 Virtual machine online method, device, equipment and medium
CN116319310A (en) * 2021-12-07 2023-06-23 中兴通讯股份有限公司 Virtual switch upgrading method, equipment, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025535A (en) * 2010-11-17 2011-04-20 福建星网锐捷网络有限公司 Virtual machine management method and device and network equipment
CN103368768A (en) * 2012-04-04 2013-10-23 思科技术公司 Automatically scaled network overlay with heuristic monitoring in hybrid cloud environment
CN103763121A (en) * 2013-12-24 2014-04-30 杭州华三通信技术有限公司 Method and device for quickly issuing network configuration information
CN104407911A (en) * 2014-10-31 2015-03-11 杭州华三通信技术有限公司 Virtual machine migration method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8332848B2 (en) * 2009-03-12 2012-12-11 Red Hat Israel, Ltd. Mechanism for staged upgrades of a virtual machine system
US9063905B2 (en) * 2013-05-22 2015-06-23 Steven Lloyd Baird System and method for virtualized shared use environment with dynamic IP address injection
CN103458055A (en) * 2013-09-22 2013-12-18 广州中国科学院软件应用技术研究所 Clout competing platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025535A (en) * 2010-11-17 2011-04-20 福建星网锐捷网络有限公司 Virtual machine management method and device and network equipment
CN103368768A (en) * 2012-04-04 2013-10-23 思科技术公司 Automatically scaled network overlay with heuristic monitoring in hybrid cloud environment
CN103763121A (en) * 2013-12-24 2014-04-30 杭州华三通信技术有限公司 Method and device for quickly issuing network configuration information
CN104407911A (en) * 2014-10-31 2015-03-11 杭州华三通信技术有限公司 Virtual machine migration method and device

Also Published As

Publication number Publication date
CN104780071A (en) 2015-07-15

Similar Documents

Publication Publication Date Title
CN104780071B (en) The upgrade method and device of virtual switch
WO2016107418A1 (en) Allocation method, apparatus and system for cloud network communication path
CN106301876B (en) Physical machine upgrade method, business migration method and device
US9866408B2 (en) Methods, systems, and computer readable media for configuring a flow interface on a network routing element
CN104202264B (en) Distribution method for beared resource, the apparatus and system of cloud data center network
WO2017036288A1 (en) Network element upgrading method and device
US10623415B2 (en) Virtual network function (VNF) hardware trust in a network function virtualization (NFV) software defined network (SDN)
CN104601680B (en) A kind of method for managing resource and device
KR20180002771A (en) Network Service Lifecycle Management Methods and Devices
CN108011846B (en) Method and device for managing service in network function virtualization architecture
CN104618264A (en) Method and system for Adaptive Scheduling of Data Flows in Data Center Networks for Efficient Resource Utilization
CN105791175A (en) Method and equipment for controlling transmission resources in software defined network SDN
CN109697120A (en) Method, electronic equipment for application migration
CN108011732A (en) Method, controller and the system of configuration service resource
CN113179299B (en) Service function chain cooperative control system and method for industrial internet application
CN109474449A (en) A kind of method and device of processing network slice example
CN109587286A (en) A kind of equipment connection control method and device
CN106130802A (en) A kind of configuration smoothing method and device
US9712455B1 (en) Determining availability of networking resources prior to migration of a server or domain
CN115915404A (en) Network slice deployment system and method based on NFV-MANO
CN107534577A (en) A kind of method and apparatus of Network instantiation
WO2019129033A1 (en) Transport network subslice management method and device
CN114124740B (en) VNF instantiation method and device
CN107894874A (en) Data read-write control method, terminal and system based on super fusion storage system
CN108540408A (en) A kind of management method and system of the distributed virtual switch based on Openstack

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant