A kind of method and apparatus for associating virtual site during virtual site migration
Technical field
The side of virtual site is associated the present invention relates to data communication technology field, more particularly to during a kind of migration of virtual site
Method and device.
Background technology
Increasingly mature with server virtualization technology, data center deployment virtualized server data are more and more.
The appearance of virtual machine makes data center server network access layer introduce virtual ether bridge (VEB, Virtual Ethernet
Bridge).The virtual switch (vSwitch) that the VEB realized on the server using Software-only method is just known as.
VSwitch is the current ripe and preferable technical scheme of commercialization.
Although the server virtualization of data center can greatly improve resource utilization and flexibility, it also brings
New management and design challenge.Have in physical network interchanger provide network service, also have in virtual world vSwitch,
Or make VEB, its communication between different virtual machine provides data exchange service.
Although vSwitch implementation is simple, compatibility is good, problems are also faced with.Such as:VSwitch is accounted for
With central processing unit (CPU) resource, virtual machine performance is caused to decline, the traffic policing of virtual machine, the network strategy reality of virtual machine
Impose and vSwitch management scalability the problems such as.
Another problem is that what vSwitch really will be managed and configured is the network traffics for flowing into server, and for one
The technical ability that individual server administrators need to be grasped is installation and configuration server main frame, it is not necessary to grasps data center network or general
Logical IP network communicating knowledge;Therefore, with the explosive growth of virtual machine quantity in data center, vSwitch is in some applications
The problem of on field, also more highlights, such as triggers serious problem of management.
Made in data center's bridge (DCB, Data Center Bridging) task groups of IEEE802.1 working groups
Determine IEEE 802.1Qbg standards, the standards define virtual ethernet trunking device (VEPA) technology and S-channel skills
Art, it is referred to as edge virtual bridge (EVB, Edge Virtual Bridging) technology, it is intended to will a large amount of strategies and safety and management
The processing method of aspect is unloaded down above the virtual machine and blade server on network interface card, and by it again give connection storage and
The physics ethernet switch of computing resource, simplify the management of data center systems, help network manager and system manager more
Add and advantageously cooperate.
In EVB environment, a NIC (NIC, Network Interface Card) have multiple virtual NIC,
That is vNIC, each vNIC can be independent and EVB in bridge communicated, this multiple vNIC shares a link.By VEPA,
It can realize that the data of multiple virtual sites in a physical site are multiplexed, and be transferred in network and forwarded, this
Kind mode strengthens monitoring management of the network to website.VEPA is the simple extension to VEB, VEB in existing physical site,
VEPA is as shown in Figure 1.In Fig. 1, the identical expression of dash area belongs to identical VLAN.Here, the adjoining being connected with physical site
Bridge is also referred to as bridge.Here vNIC interfaces are referred to as virtual switch interface (VSI, Virtual Switch Interface), VEB
Edge relaying (ER, Edge Relay) is referred to as with VEPA.
In addition, in order to realize VEB, VEPA and the function of direct-connected hubbed mode mixing in same physical site,
802.1Qbg also introduces S-channel technologies, and several tunnels are established between NIC and the interface of interchanger, wherein
" S " represent S-VLAN (business VLAN).S-channel technologies enclose different VEB, VEPA etc. flow different
S-TAG, relay to adjacent bridge.
For, the IEEE associated with the Site-oriented bridge port (SBP) of bridge by virtual site flow corresponding to VSI
802.1Qbg standards define a kind of VSI and find configuration protocol (VDP, VSI Discovery and Configuration
Protocol), the interaction between virtual site and bridge is realized by this agreement.Such as:Generating a new phantom station
During point, by VDP association messages by the SBP port associations on the VSI and bridge of virtual site, and to VSI on these ports
Corresponding flow application corresponding strategies.Virtual site migration walk or extinction time, association messages can also be gone by VDP protocol
The VSI is associated up from corresponding SBP ports.In addition, in VDP protocol, there is a pre-association message, can be used for VSI
It is more now to reserve resource in advance, without doing corresponding flow to VSI flow with bridge port SBP advance association
Control.
In general, when virtual site migrates, VSI corresponding to the virtual site also will be from a SBP port
Again it is associated with another SBP port, basic procedure is as shown in Fig. 2 mainly include:
1st, new virtual site corresponding to the establishment of virtual site management system;
2nd, new virtual site and corresponding SBP ports pre-association, state of this stylish virtual site still in no activation;
3rd, old virtual site is toward migrating on new virtual site, information, state synchronized;
4th, last synchronous step is completed;
5th, new virtual site is associated with corresponding new SBP ports;
6th, old virtual site goes to associate with corresponding SBP ports;
7th, virtual site management system notifies new virtual site to start working.
In the VDP protocol that virtual site interacts with bridge, there are two flags, one is M-bit, represents the virtual site
Migrate;One is S bit, represents that the virtual site is suspended, pause.
Therefore in general, in a certain section of particular moment, same VSI may associate two SBP ports, the two
SBP ports are probably on a bridge, it is also possible to belong to different bridges.Due to being the SBP port associations different with two, therefore
Newly, the association of old virtual site and association is gone not to be interfered, the migration of virtual site can be carried out normally.
But if virtual site is different downlink relay port (DRP, Downlink on an ER (VEB or VEPA)
Relay Port) on migrate, i.e., new, old virtual site will corresponding same SBP ports, now SBP ports are that None- identified is new
The VSI of virtual site or old virtual site VSI, their VDP associations with going to associate are applied in same SBP ports
When upper, confusion reigned can not be completed above-mentioned normal migration flow by the migration of virtual site.
The content of the invention
In view of this, it is a primary object of the present invention to provide a kind of method for associating virtual site during virtual site migration
And device, it can ensure that virtual site can also normally complete when being migrated on same ER, will not confusion reigned.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
The invention provides the method that virtual site is associated during a kind of migration of virtual site, this method includes:
When virtual site migrates, bridge retains virtual switch interface VSI corresponding to move target virtual site at this
The newest association status of bridge;
The migration that virtual site is perceived when the bridge occurs when on same edge relaying ER, virtual for migration source
Gone corresponding to website associate VSI find configuration protocol VDP message, the bridge do not perform go accordingly it is operation associated.
This method further comprises:
The bridge is judging VSI corresponding to virtual site when before and after migration with the SBP port associations on same bridge, sense
Know that the migration of virtual site occurs on same ER.
This method further comprises:
When the value for going to associate the hang-up mark carried in VDP message that the bridge joint is received is true, judge described in transmission
The virtual site for going to associate VDP message is source virtual site.
This method further comprises:
The migration that virtual site is perceived when the bridge occurs when on same edge relaying ER, empty for move target
Intend pre-association VDP message corresponding to website, the bridge does not perform corresponding pre-association operation;For move target virtual site pair
The association VDP message answered, the bridge do not perform corresponding operation associated.
This method further comprises:
When the bridge joint is received in the pre-association VDP message from purpose virtual site comprising the corresponding purpose phantom station
During the new strategy of point, the bridge installs the new strategy.
This method further comprises:
When the bridge joint is received in the association VDP message from purpose virtual site comprising the corresponding purpose virtual site
New strategy when, the bridge applies the new strategy.
Present invention also offers the device that virtual site is associated during a kind of migration of virtual site, the device includes:
State reservation module, it is virtual corresponding to move target virtual site for when virtual site migrates, retaining
Newest association status of the Fabric Interface VSI in bridge;
Message processing module, it is right for occurring in the migration for perceiving virtual site when on same edge relaying ER
In going association VSI to find configuration protocol VDP message corresponding to migration source virtual site, the message processing module does not perform accordingly
Go it is operation associated.
The message processing module is further used for, judge VSI corresponding to virtual site migration it is front and rear with it is same
During SBP port associations on bridge, the migration for perceiving virtual site occurs on same ER.
The message processing module is further used for, and is taken what the hang-up for going in association VDP message to carry of reception identified
When value is true, the virtual site for judging to go to associate VDP message described in sending is source virtual site.
The message processing module is further used for, and occurs to relay at same edge in the migration for perceiving virtual site
When on ER, for pre-association VDP message corresponding to move target virtual site, the message processing module does not perform corresponding pre-
It is operation associated;For associating VDP message corresponding to move target virtual site, the message processing module does not perform corresponding pass
Connection operation.
The message processing module is further used for, in the pre-association VDP message from purpose virtual site is received
During comprising the new strategy for corresponding to the purpose virtual site, the new strategy is installed.
The message processing module is further used for, and is wrapped in the association VDP message from purpose virtual site is received
During containing the new strategy for corresponding to the purpose virtual site, using the new strategy.
Present invention also offers the method that virtual site is associated during a kind of migration of virtual site, this method includes:
When management performs virtual site migration, judge whether source and destination virtual site belongs to same virtual trunk
ER;
When judging that source and destination virtual site belongs to same ER, to virtual corresponding to the source and destination virtual site
States of the Fabric Interface VSI on ER is not made an amendment, and does not send the states on corresponding SBP ports of VSI belonging to needs change
VSI has found configuration protocol VDP message.
It is described to need the VDP message of state on corresponding SBP ports of VSI belonging to change to include:The purpose virtual site
Pre-association, association VDP message, the source virtual site go associate VDP message.
This method further comprises:
When judging that source and destination virtual site is not belonging to same ER, the source and destination virtual site is controlled to perform just
Normal virtual site transition process, including the pre-association of purpose virtual site, operation associated, and source virtual site go to associate
Operation.
Present invention also offers the device that virtual site is associated during a kind of migration of virtual site, the device includes:
With virtual trunk ER judge modules, for when management performs virtual site migration, judging source and destination phantom station
Whether point belongs to same ER;
Processing module is right for when the same ER judge modules judge that source and destination virtual site belongs to same ER
States of the VSI on ER is not made an amendment corresponding to the source and destination virtual site, and does not send VSI belonging to needs change right
Answer the VDP message of state on SBP ports.
It is described to need the VDP message of state on corresponding SBP ports of VSI belonging to change to include:The purpose virtual site
Pre-association, association VDP message, the source virtual site go associate VDP message.
The processing module is further used for, and judges that source and destination virtual site is not belonging to together in the same RE judge modules
During one ER, the source and destination virtual site is controlled to perform normal virtual site transition process, including purpose virtual site
Pre-association, operation associated, and source virtual site go it is operation associated.
The method and apparatus for associating virtual site during a kind of virtual site migration provided by the present invention, send out in virtual site
During raw migration, bridge retains VSI corresponding to move target virtual site in the newest association status of this bridge;When bridge perceives phantom station
The migration of point occurs when on same ER, and for going to associate VDP message corresponding to migration source virtual site, the bridge does not perform
Go accordingly operation associated.
Or when management performs virtual site migration, judge whether source and destination virtual site belongs to same ER;
When judging that source and destination virtual site belongs to same ER, to states of the VSI on ER corresponding to source and destination virtual site not
Make an amendment, and do not send the VDP message for needing the states on corresponding SBP ports of VSI belonging to change.
By means of the invention it is possible to the pre-association of orderly management virtual site, associate, go it is operation associated, ensure virtual site
It can also be normally completed when being migrated on same ER, will not confusion reigned.
Brief description of the drawings
Fig. 1 is VEB, VEPA in physical site in the prior art, virtual site, VSI schematic diagram;
Fig. 2 is workflow schematic diagram when virtual site migrates in the prior art;
Fig. 3 is the method flow diagram that virtual site is associated during the virtual site migration of the embodiment of the present invention one;
Fig. 4 is the apparatus structure schematic diagram that virtual site is associated during the virtual site migration of the embodiment of the present invention two;
Fig. 5 is the method flow diagram that virtual site is associated during the virtual site migration of the embodiment of the present invention three;
Fig. 6 is the apparatus structure schematic diagram that virtual site is associated during the virtual site migration of the embodiment of the present invention four;
Fig. 7 is that the virtual site of the embodiment of the present invention five migrates schematic diagram.
Embodiment
The technical solution of the present invention is further elaborated with specific embodiment below in conjunction with the accompanying drawings.
The method flow of virtual site is associated during a kind of virtual site migration that the embodiment of the present invention one is provided, when virtual
When website migrates, bridge retains VSI corresponding to move target virtual site in the newest association status of this bridge;When bridge perceives
The migration of virtual site occurs when on same ER, for going to associate VDP message, the bridge corresponding to migration source virtual site
Do not perform go accordingly it is operation associated.Wherein, what the bridge joint was received, which goes to associate the value of the hang-up mark carried in VDP message, is
When true, the virtual site for judging to go to associate VDP message described in sending is source virtual site.
The specific implementation flow of embodiment one is as shown in figure 3, mainly include the following steps that:
Step 301, bridge joint receives the pre-association from virtual site, associates or go to associate VDP message.
Purpose virtual site in transition process sends pre-association to bridge, associates VDP message, and the source in transition process is virtual
Website sends to bridge and goes operation associated VDP message.
Step 302, identify the migration mark carried in VDP message or hang up whether the value identified is true, if it is, holding
Row step 303;If not, terminate flow.
The value of migration mark is 1 or TRUE (i.e. M=1 or TRUE), is expressed as true;Hang up the value of mark for 1 or
TRUE (i.e. S=1 or TRUE), it is expressed as true.
Step 303, judge whether the VSI belonging to the VDP message has been associated in corresponding to its operation on SBP ports, such as
Fruit is to perform step 305;If not, perform step 304.
Step 304, corresponding pre-association is performed, associate or goes association process, and changes the VSI in corresponding SBP ports
On state.
VSI belonging to VDP message is not associated in the source on SBP ports, shown corresponding to its operation in transition process, mesh
Virtual site be not belonging to same ER, so as to performing normal pre-association, associating or going association process, and change the VSI and exist
State on corresponding SBP ports.
Step 305, states of the VSI on corresponding SBP ports is kept, corresponding pre-association is not done, associates or go to associate
Processing.
Bridge perceives when judging VSI corresponding to virtual site in the SBP port associations before and after migration and on same bridge
The migration of virtual site occurs on same ER.In this step, it is corresponding that the VSI belonging to VDP message has been associated in its operation
SBP ports on, show that the source in transition process, purpose virtual site belong to same ER, so as to keep the VSI corresponding
State on SBP ports, then for pre-association, association VDP message corresponding to move target virtual site, migrate source phantom station
Go to associate VDP message corresponding to point, the bridge does not do corresponding pre-association, associates or goes association process.
If it should be noted that in the flow shown in Fig. 3, bridge joint receives the pre-association VDP from virtual site and disappeared
Included in breath to should virtual site new strategy, then bridge the new strategy is installed;If bridge joint is received from virtual site
Associate VDP message in include to should virtual site new strategy, then bridge apply the new strategy.The new strategy can be pair
Flow control policy of virtual site etc., set in actual applications according to real needs.
The method for associating virtual site during the virtual site migration of corresponding embodiment one, embodiments of the invention two also provide
The device of virtual site is associated during a kind of virtual site migration, suitable for the bridge.As shown in figure 4, the device mainly includes:Shape
State reservation module 401 and message processing module 402.
Wherein, state reservation module 401, for when virtual site migrates, retaining move target virtual site pair
Newest association status of the VSI answered in bridge;
Message processing module 402, for occurring in the migration for perceiving virtual site when on same edge relaying ER,
For going to associate VDP message corresponding to migration source virtual site, the message processing module 402 does not perform goes association to grasp accordingly
Make.
Preferably, message processing module 402 is further used for, judge VSI corresponding to virtual site migration it is front and rear with
During SBP port associations on same bridge, the migration for perceiving virtual site occurs on same ER.
Message processing module 402 is further used for, in the value for going to associate the hang-up mark carried in VDP message of reception
When being true, judge to send the virtual site for going to associate VDP message for source virtual site.
Message processing module 402 is further used for, and occurs to relay at same edge in the migration for perceiving virtual site
When on ER, for pre-association VDP message corresponding to move target virtual site, the message processing module 402 does not perform accordingly
Pre-association operation;For associating VDP message corresponding to move target virtual site, the message processing module 402 does not perform
It is corresponding operation associated.
Message processing module 402 is further used for, and is wrapped in the pre-association VDP message from purpose virtual site is received
During containing the new strategy for corresponding to the purpose virtual site, the new strategy is installed;
The new plan of the corresponding purpose virtual site is included in the association VDP message from purpose virtual site is received
When slightly, using the new strategy.
The method flow of virtual site is associated during a kind of virtual site migration that the embodiment of the present invention three is provided, is being managed
When performing virtual site migration, judge whether source and destination virtual site belongs to same ER;Judging source and destination phantom station
When point belongs to same ER, states of the VSI on ER corresponding to source and destination virtual site is not made an amendment, and do not send needs
The VDP message of the states on corresponding SBP ports of VSI belonging to change.
The specific implementation flow of embodiment three is as shown in figure 5, mainly include the following steps that:
Step 501, when management performs virtual site migration, judge whether source, purpose virtual site belong to same ER,
If it is, perform step 503;If not, perform step 502.
Judging whether source, purpose virtual site belong to same ER operation can be by hardware or software (such as virtual site
Management program hypervisor) realize.
Step 502, voltage input, purpose virtual site perform normal virtual site transition process, including purpose phantom station
The pre-association, operation associated of point, and source virtual site go it is operation associated.Normal virtual site transition process can be found in figure
Flow shown in 2.After step 502 has performed, flow terminates.
Step 503, determine whether that new strategy needs to be applied to purpose virtual site, if it is, performing step 505;Such as
Fruit is no, performs step 504.
The new strategy can be to flow control policy of virtual site etc., in actual applications according to real needs
Setting.
Step 504, voltage input, purpose virtual site, which are not sent, needs the states on corresponding SBP ports of VSI belonging to change
VDP message, until migration terminates.
Step 505, control purpose virtual site to send VDP message using new strategy to bridge, bridge is installed and applied pair
Answer the new strategy of the purpose virtual site.
The method for associating virtual site during the virtual site migration of corresponding embodiment three, embodiments of the invention four also provide
The device of virtual site is associated during a kind of virtual site migration, suitable for the physical site.As shown in fig. 6, the device is main
Including:With ER judge modules 601 and processing module 602.
Wherein, with ER judge modules 601, for when management performs virtual site migration, judging source, purpose virtual site
Whether same ER is belonged to;
Processing module 602, for when same ER judge modules 601 judge that source and destination virtual site belongs to same ER,
States of the VSI on ER corresponding to source and destination virtual site is not made an amendment, and does not send VSI belonging to needs change corresponding
The VDP message of state on SBP ports.
It is described to need the VDP message of state on corresponding SBP ports of VSI belonging to change to include:Purpose virtual site it is pre-
Association, operation associated VDP message, source virtual site go operation associated VDP message.
Preferably, processing module 602 can be further used for, source, purpose virtual site are judged not in same RE judge modules 601
When belonging to same ER, voltage input, purpose virtual site perform normal virtual site transition process, including purpose virtual site
Pre-association, operation associated, and source virtual site go it is operation associated.
With reference to the virtual site migration example shown in Fig. 7, phantom station is associated when being migrated to virtual site of the invention
The method of point is further elaborated on.In virtual site migration example shown in Fig. 7, there is one originally in a physical site
Virtual site 1, it is now desired to migrated in the physical site to the virtual site, phantom station is moved to from virtual site 1
Point 2, in transition process, virtual site 1 is source virtual site, and virtual site 2 is purpose virtual site.Due to virtual site 1
Be located at virtual site 2 in same VEB, therefore they are by VDP and bridge when being associated, be with it is same on same bridge
One SBP port association.
First, the method according to Fig. 3, for being normally carried out, it is necessary to which bridge carries out correlated judgment for virtual site migration
And respective handling is made, it is specially:
1st, after virtual site 2 creates, the VDP message of a VSI pre-association is sent, carries migration mark within the message
M=1.
2nd, after bridge receives the VDP message of the pre-association, detect that the message carries M=1 mark, void corresponding to judgement
It is the purpose migrated a virtual site to intend website 2.
3rd, bridge checks whether the VSI belonging to the VDP message has been associated in corresponding to the operation of its pre-association on SBP ports,
If it is, retaining states of the VSI at present on SBP ports, do not process;The VDP message of this pre-association has new plan
When slightly, the new strategy need to be installed;If it is not, then the VSI and the SBP ports are carried out into pre-association, install needs and apply at this
Strategy on VSI flows.
In the example shown in Fig. 7, judged result is yes.
4th, the synchronous working of row information is entered between virtual site 1 and virtual site 2, now virtual site 1 is also continuing it
Normal work;Before the final step of synchronous working is completed, virtual site 1 is suspended.
5th, virtual site 2 sends the VDP message for associating the VSI, and bridge detects that the VDP message carries M=1 mark after receiving
Will, it is the purpose migrated a virtual site to judge this virtual site 2.Check whether the SBP has been associated with this
VSI, if it is, retaining states of the VSI at present on SBP, do not process;When the VDP message of the association has new strategy
When, the new strategy need to be applied.If it is not, then perform normal operation associated.
In the example shown in Fig. 7, judged result is yes.Now virtual site 2 starts normal work.
6th, virtual site 1 send its VSI go association VDP message when, in the VDP message carry hang up mark S=1.
7th, after bridge receives the VDP message of association, detect that the VDP message carries S=1 mark, judge that this is empty
It is the source migrated a virtual site to intend website 1.
8th, bridge checks that this goes the VSI belonging to the VDP message of association whether to be associated in it and removes operation associated corresponding SBP
On port, if it is, not going the operation of association to the VSI, states of the current VSI on the SBP is kept.If it is not, then
The VSI is gone to associate with the SBP.
In the example shown in Fig. 7, judged result is yes.
Secondly, the method according to Fig. 5, for being normally carried out, it is necessary to which physical site carries out phase for virtual site migration
Close and judge and make respective handling, be specially:
Virtual site 1 migrates to virtual site 2, and the management program in the physical site learns virtual site 1 and phantom station
Point 2 belongs to same ER, and now virtual site 1 and virtual site 2 are corresponding same VSI on the ER, management program for
State corresponding to the VSI is not changed in variations of the VSI on same ER on different DRP ports, therefore for its state not
When changing, the related VDP message of modification VSI states will not be sent, until migration terminates to complete.
If virtual site 2 compares 1 diplomatic change of virtual site, need send using new strategy VDP message to
Controller bridge, new strategy is applied on corresponding SBP ports.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention.