Summary of the invention
In view of this, it is an object of the invention to provide the virtual machine multi-network management system under a kind of cloud computing environment and method, virtual machine can be linked in multiple network.
In order to achieve the above object, the invention provides the virtual machine multi-network management system under a kind of cloud computing environment, include calculating Resource Server and Virtual Machine Management Service device, wherein, calculate Resource Server and farther included:
Network area construction device, for partitioning the network into into several security domains, continue to be divided into several network areas by each security domain again, then configure actual access switch for each network area and build corresponding VLAN pond and IP pond, described VLAN pond includes all available VLAN numbering sections in described network area, and IP pond includes all available IP address fields in described network area;
Virtual switch creates device, for multiple physical nodes are respectively divided in different security domains, and on the physical node of each security domain, create virtual switch, described physical node is 1 physical host or the computer cluster being made up of multiple physical hosts, described virtual switch includes distribution switch and standard switchboard, then the access switch that the virtual switch in each security domain and each network area configure is connected one by one, and the connection between virtual switch and access switch is configured to trunk pattern.
In order to achieve the above object, present invention also offers the virtual machine multi-network management method under a kind of cloud computing environment, include:
Step one, partition the network into into several security domains, continue to be divided into several network areas by each security domain again, then configure actual access switch for each network area and build corresponding VLAN pond and IP pond, described VLAN pond includes all available VLAN numbering sections in described network area, and IP pond includes all available IP address fields in described network area;
Step 2, multiple physical nodes are respectively divided in different security domains, and on the physical node of each security domain, create virtual switch, described physical node is 1 physical host or the computer cluster being made up of multiple physical hosts, and described virtual switch includes distribution switch and standard switchboard;
Step 3, the access switch that the virtual switch in each security domain and each network area configure is connected one by one, and the connection between virtual switch and access switch is configured to trunk pattern.
Compared with prior art, the invention has the beneficial effects as follows: due to virtual network and the diversity of physical network, want to be shunted away the network traffics of virtual machine by the network interface card of physical host, the intercommunication between virtual network and physical network have to be realized, the present invention sets up the tie between virtual network and real network by the interconnection between virtual switch and actual access switch, and in virtual network, set up the network model corresponding with real network, including security domain, VLAN numbers, IP address etc., the virtual machine being so created can be concurrently accessed under one or more network type the network area of different security domain, thus meet the multiple demand of operation system;The VLAN that each network interface card application of the virtual machine for being created is different numbers, and stamp corresponding network type label for each network interface card, so can find the uplink virtual switch having beaten identical network type label according to the network type label of network interface card when configuring the switch of virtual machine, then in virtual switch, select the port set that a numbering is the same with network interface card VLAN, owing to being configured to trunk pattern between virtual switch and up actual access switch, therefore the port set of virtual machine configuration is equivalent to directly be configured on the access switch in real network model, it is achieved thereby that virtual network and the intercommunication of real network, technical scheme facilitates feasible.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with the accompanying drawings.
As it is shown in figure 1, the virtual machine multi-network management system under a kind of cloud computing environment of the present invention, include calculating Resource Server and Virtual Machine Management Service device, wherein, calculate Resource Server and farther included:
Network area construction device, for partitioning the network into into several security domains, continue to be divided into several network areas by each security domain again, then configure actual access switch for each network area and build corresponding VLAN pond and IP pond, described VLAN pond includes all i.e. VLANs of available VLAN(in described network area) numbering section, IP pond includes all available IP address fields in described network area;
Virtual switch creates device, for multiple physical nodes are respectively divided in different security domains, and on the physical node of each security domain, create virtual switch, described physical node can be 1 physical host or the computer cluster being made up of multiple physical hosts, described virtual switch includes distribution switch and standard switchboard, then the access switch that the virtual switch in each security domain and each network area configure is connected one by one, and the connection between virtual switch and access switch is configured to trunk pattern;Now, the port set of virtual switch configuration is equivalent to directly be configured on access switch, it is achieved thereby that virtual network and the intercommunication of real network;
nullVirtual machine creating request processing means,Message is asked for receiving the establishment virtual machine of user,Described establishment virtual machine request message includes the security domain belonging to the virtual machine being created、The information such as the network type label of virtual machine network interface card,Virtual machine for being created distributes a new virtual machine numbering,And in being set to create by the virtual machine state being created,Then the virtual machine numbering being created、The information such as the VLAN numbered list in user-specified network region and corresponding IP address return to user,The most also send virtual machine creating notification message to Virtual Machine Management Service device,Described virtual machine creating notification message includes the virtual machine numbering being created、The VLAN numbered list in user-specified network region、The information such as security domain belonging to virtual machine and the network type label of virtual machine network interface card,Finally when receiving the establishment successful result that Virtual Machine Management Service device returns,Virtual machine state is updated to ready,And notify that user can access, by the IP address in virtual machine creating response message, the virtual machine being created;
Virtual machine network selects device, for reading each network area one by one and judge whether each network area there are a vlan network created from the application VLAN of user request message, if it is, the VLAN of the vlan network created is numbered in the VLAN numbered list adding user-specified network region to;If it is not, then create VLAN numbering and the IP address of a new vlan network selected described new vlan network in described network area, then the VLAN of newly created vlan network is numbered in the VLAN numbered list adding user-specified network region to.
The configuration mode of the network equipment has generally included trunk and access two kinds, wherein:
1, trunk pattern is used as main line, transmits each vlan information, and the connection between the network equipment of the usual trunk mouth, such as the connection between switch and switch or switch and router, the port of trunk pattern can pass through multiple VLAN;
2, access pattern is that network equipment port is divided into certain VLAN, is typically used as main frame and accesses, and the port of accsee pattern can only pass through a VLAN, i.e. port place VLAN.
Network can be divided into different security domains and network area according to purposes, safe class, access strategy etc. by the configuration on the network equipment (such as switch, fire wall) by network area construction device, described network can include one or more different types of network, when including a network type, all security domains belong to same network type (business network is such as divided into the security domains such as DMZ district, TEST district, core production district);When including multiple network type (the such as network type such as business, storage or heart beating), all security domains are belonging respectively to different network types.
Considering from Safety Redundancy, the network of server at least wants double netting twine trend, is connected in the access switch of 2 equal functional roles, and described network area construction device can also include:
2 access switch for configuring 2 access switch for each network area, and are used Intel Virtualization Technology to virtualize, thus 2 access switch invent 1 access switch equipment of logic by access switch virtualization unit respectively.
Can further include as in figure 2 it is shown, virtual switch creates device:
Virtual switch construction unit, for the network type according to network area each in security domain, the physical node of each security domain creates several distribution switch and shares network (such as business network distribution switch or storage network distribution type switch) for the cluster dividing different purposes, and 1 standard switchboard of establishment monopolizes network (such as heart beating network standard switch) for the physical host dividing different purposes on every physical host;
Virtual switch tag unit, for stamping different network type label (such as business, store, manage) to the virtual switch of each security domain (including distribution switch and standard switchboard), and be that each security domain builds 1 computing pool, described computing pool is preserved the information such as the virtual switch in security domain and network type label thereof.
Virtual machine can be concurrently accessed in multiple network area according to multi-business diversification demand, and described virtual machine network selects device can further include:
Vlan network creating unit, for creating a new vlan network in network area: selected available VLAN numbering from the VLAN pond of described network area, then according to network size to be created, an IP subnet section is marked off in the IP pond of described network area, the information such as the gateway and the mask that configure VLAN again on fire wall, thus it is created that a vlan network having not less than required IP address space, a last selected idle IP address from the IP subnet section marked off, preserve the network area of described newly created vlan network, and the information such as selected VLAN numbering and IP address.
Described Virtual Machine Management Service device has farther included:
nullVirtual machine creating device,The virtual machine creating notification message that Resource Server is sent is calculated for receiving,Described virtual machine creating notification message includes the virtual machine numbering being created、The VLAN numbered list in user-specified network region、Security domain belonging to virtual machine and the network type label of virtual machine network interface card,1 physical host is selected from the security domain belonging to virtual machine,And find virtual switch consistent with the network type label of virtual machine network interface card in security domain,Then from the VLAN numbered list in user-specified network region, extract each VLAN numbering one by one、And judge on virtual switch, whether to there are the most consistent port set numbering,If not,A then newly-built port set consistent with VLAN numbering on described virtual switch,And each port in described port set is configured to access pattern,After having extracted all VLAN numbering from the VLAN numbered list in user-specified network region,Gateway is configured again on virtual machine network interface card、The information such as mask and IP address,And successively virtual machine network interface card is linked in the virtual switch port set consistent with a VLAN numbering in the VLAN numbered list in user-specified network region,Finally start and create virtual machine process,Start to create virtual machine on selected physical host,After creating virtual machine success,Described virtual machine information is increased in the computing pool of the security domain belonging to virtual machine,Simultaneously to calculating Resource Server return establishment successful result.
Fig. 3 shows that the present invention creates the inside annexation schematic diagram of an embodiment after virtual machine on physical host.As shown in Figure 3, physical host creates 2 distribution switch (i.e. service distribution formula switch and distributed storage switch) for different purposes, 1 standard switchboard and 2 virtual machines (i.e. VM-1 and VM-2), virtual machine respectively with service distribution formula switch, distributed storage switch, standard switchboard is connected, A, B, C, D, E, F is the network interface card of physical host, A`, B`, C`, D`, E`, F` is the network interface card of fictitious host computer (i.e. gathering the physical host after Intel Virtualization Technology virtualizes), A``, B``, C``, D`` is the uplink port of two distribution type switches.
From figure 3, it can be seen that the uplink port group of distribution switch is connected with the port of access switch, wherein the pattern configurations of vlan trunking is pressed in distribution switch side, and access switch side is configured to trunk pattern.Downlink port group (the i.e. business network port set 1 of virtual switch, ..., business network port set n, storage network port group 1, ..., storage network port group m, management network port group 1, ..., each port set in management network port group p) acquiescence when creating has 256 ports, assigned vlan numbering simultaneously, a port under port set and network interface card (the such as eth0 of virtual machine being created, eth1, eth2) it is connected, be equivalent to one group of switch ports themselves of physical switches, and each port is configured to access pattern, the network traffics i.e. only allowing particular vlan numbering are passed through.The uplink port group of distribution switch (allow network traffics that all VLAN number by) is responsible for the data flow outlet of all downlink port groups (network traffics only allowing particular vlan numbering are passed through), so uplink port group and downlink port group are the relations of one-to-many, the port in the uplink port group of distribution switch is configurable to active and standby or load-sharing mode.Standard switchboard is mainly used in fictitious host computer aspect and carries out the network needed for Virtual Machine Manager.
As shown in Figure 4, the virtual machine multi-network management method under a kind of cloud computing environment of the present invention, include:
Step one, partition the network into into several security domains, continue to be divided into several network areas by each security domain again, then configure actual access switch for each network area and build corresponding VLAN pond and IP pond, described VLAN pond includes all available VLAN numbering sections in described network area, and IP pond includes all available IP address fields in described network area;
Step 2, multiple physical nodes are respectively divided in different security domains, and on the physical node of each security domain, create virtual switch, described physical node can be 1 physical host or the computer cluster being made up of multiple physical hosts, and described virtual switch includes distribution switch and standard switchboard;
Step 3, the access switch that the virtual switch in each security domain and each network area configure is connected one by one, and the connection between virtual switch and access switch is configured to trunk pattern;Now, the port set of virtual switch configuration is equivalent to directly be configured on access switch, it is achieved thereby that virtual network and the intercommunication of real network.
In described step one, by the configuration on the network equipment (such as switch, fire wall), network can be divided into different security domains and network area according to purposes, safe class, access strategy etc..
It is worth mentioning that, network in step one can include one or more different types of network, when including a network type, all security domains belong to same network type (business network is such as divided into the security domains such as DMZ district, TEST district, core production district);When including multiple network type (the such as network type such as business, storage or heart beating), all security domains are belonging respectively to different network types.
Considering from Safety Redundancy, the network of server at least wants double netting twine trend, is connected in the access switch of 2 equal functional roles, and Fig. 4 step one also includes:
Configure 2 access switch for each network area, and use Intel Virtualization Technology to virtualize 2 access switch respectively, thus 2 access switch are invented 1 access switch equipment of logic.
As it is shown in figure 5, Fig. 1 step 2 has farther included:
Step 21, network type according to network area each in security domain, the physical node of each security domain creates several distribution switch and shares network (such as business network distribution switch or storage network distribution type switch) for the cluster dividing different purposes, and 1 standard switchboard of establishment monopolizes network (such as heart beating network standard switch) for the physical host dividing different purposes on every physical host of security domain;
Step 22, stamp different network type label (such as business, store, manage) to the virtual switch (including distribution switch and standard switchboard) of each security domain;
Step 23, for each security domain build 1 computing pool, described computing pool is preserved the information such as the virtual switch in security domain and network type label thereof.
As shown in Figure 6, when user creates a new virtual machine, also include:
Step A1, user send establishment virtual machine request message to calculating Resource Server, include the information such as network type label of the security domain belonging to the virtual machine being created, virtual machine network interface card in described establishment virtual machine request message;
Step A2, calculating Resource Server are that the virtual machine being created distributes a new virtual machine numbering, and are set to by the virtual machine state being created in establishment;
Step A3, user select one or more network area in the security domain belonging to virtual machine, and send application VLAN request message to calculating Resource Server;The virtual machine being created can support one or more network area, thus meets the multiple demand of operation system;
Step A4, calculating Resource Server read each network area one by one and judge whether there are a vlan network created in each network area from application VLAN request message, if it is, the VLAN of the vlan network created is numbered in the VLAN numbered list adding user-specified network region to;If it is not, then create VLAN numbering and the IP address of a new vlan network selected described new vlan network in described network area, then the VLAN of newly created vlan network is numbered in the VLAN numbered list adding user-specified network region to;
Step A5, calculating Resource Server and return virtual machine creating response message to user, described virtual machine creating response message includes the information such as the virtual machine numbering, the VLAN numbered list in user-specified network region and the corresponding IP address that are created;
Step A6, calculate Resource Server and send virtual machine creating notification message to Virtual Machine Management Service device, described virtual machine creating notification message includes the information such as network type label of the virtual machine numbering, security domain belonging to the VLAN numbered list in user-specified network region, virtual machine and the virtual machine network interface card that are created;
Step A7, Virtual Machine Management Service device select 1 physical host from the security domain belonging to virtual machine, and find virtual switch consistent with the network type label of virtual machine network interface card in security domain, then from the VLAN numbered list in user-specified network region, extract each VLAN one by one number and judge on virtual switch, whether to there are the most consistent port set numbering, if it is, continue to extract next VLAN numbering;If it is not, then on described virtual switch newly-built one with the VLAN consistent port set of numbering, and each port in port set is configured to access pattern, then proceedes to extract next VLAN numbering;
Step A8, Virtual Machine Management Service device configure the information such as gateway, mask and IP address on virtual machine network interface card, and successively virtual machine network interface card is linked in the virtual switch port set consistent with a VLAN numbering in the VLAN numbered list in user-specified network region, then start and create virtual machine process, start to create virtual machine on selected physical host, after creating virtual machine success, described virtual machine information is increased, simultaneously to calculating Resource Server return establishment successful result in the computing pool of the security domain belonging to virtual machine;
Virtual machine state is updated to ready by step A9, calculating Resource Server, and notifies that user can access, by the IP address in virtual machine creating response message, the virtual machine being created.
In Fig. 6 step A4, described network area creates VLAN numbering and the IP address of a new vlan network selected described new vlan network, has farther included:
Selected available VLAN numbering from the VLAN pond of described network area, then according to network size to be created, an IP subnet section is marked off in the IP pond of described network area, gateway and the mask of VLAN is configured again on fire wall, thus it is created that a vlan network having not less than required IP address space, a last selected idle IP address from the IP subnet section marked off, the network area and the selected VLAN that preserve described newly created vlan network number and IP address.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. done, within should be included in the scope of protection of the invention.