This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2016-059688, filed on Mar. 24, 2016, the entire contents of which are incorporated herein by reference.
This embodiment relates to a technique for deploying virtual machines.
In an infrastructure-as-a-service (IaaS) system, the processing performance of virtual machines (VMs) and communication speed between the VMs change depending on a physical machine in which the VMs are deployed. Accordingly, VMs are deployed according to a configuration for deployment created in advance by the user of the VMs.
The configuration for deployment is created in consideration of the functions of the individual VMs (for example, a web server, an application server, and a database server), the specifications of the physical machine, and so on, but this operation takes much time and labor.
As examples of the related art, Japanese Laid-open Patent Publication No. 2009-199395, International Publication Pamphlet No. WO 2015/040788, and Japanese Laid-open Patent Publication No. 2010-140134 are known.
According to an aspect of the invention, a method for deploying virtual machines, the method includes: first determining a group in which communication between virtual machines that belong to the group is not permitted by referring information regarding communication rules on virtual machines that belong to individual groups in a first data storage; storing deployment information indicating dispersed deployment in a second data storage in association with identification information on the determined group; second determining whether the deployment information associated with identification information on a first group is stored in the second data storage when receiving an instruction to deploy a first virtual machine that belongs to the first group; and third determining a target physical machine in which the first virtual machine is to be deployed from among one or more physical machines in which a second virtual machine that belongs to the first group is not running out of a plurality of physical machines when the second determining determines that the deployment information is stored in the second data storage in association with the identification information on the first group, the second virtual machine being a virtual machine other than the first virtual machine.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
An object of this embodiment is to provide a technique for deploying virtual machines in suitable physical machines even if a configuration for deployment is not prepared.
The deployment apparatus 1 includes a VM controller 10, a network controller 11, a storage controller 12, a receiving unit 13, and a management-data storage unit 14. The VM controller 10 executes a process for deploying, updating, and removing VMs in the physical resource 5. The network controller 11 executes a process for deploying, updating, and removing virtual network devices such as a virtual switch and a virtual router in the physical resource 5. The storage controller 12 executes a process for deploying, updating, and removing virtual storage devices in the physical resource 5. The VM controller 10, the network controller 11, and the storage controller 12 acquire information on the status of use, failure information, and so on from the physical resource 5 and store the information in the management-data storage unit 14. The receiving unit 13 executes a process for receiving instructions from the user via a network or an input device.
The group generating section 101 generates an AAF-group management table based on the management table stored in the SG-data storage section 103 and the management table stored in the rule-data storage section 104 and stores the generated AAF-group management table in the AAF-group-data storage section 105. The deployment section 102 performs processing based on the management table stored in the AAF-group-data storage section 105 and stores the processing result in the VM-management-data storage section 107. The deployment section 102 executes a process for deploying VMs in the physical resource 5 based on the VM management table stored in the VM-management-data storage section 107 and the management table stored in the COM-group-data storage section 106.
In physical machines in the physical resource 5, hypervisors (also referred to as virtualization software) run, and VMs and so on run on the virtualization software.
Although the management-data storage unit 14 may store other data, a description thereof is omitted here.
Referring now to
Deploying VMs in different physical machines may be undesirable from the viewpoint of communication efficiency. For communication between VM1 and VM2, deploying VM1 and VM2 in the same physical machine, as illustrated in
In this embodiment, an AAF group and a COM group are generated for a target security group. In newly starting a VM of the target security group, a destination physical machine is determined based on the generated AAF group and COM group. Referring to
First, the group generating section 101 clears an AAF group corresponding to a security group (hereinafter referred to as a security group SG) stored in the SG-data storage section 103 and indicated by an update instruction, (
The group generating section 101 determines whether rules on the security group SG stored in the SG-data storage section 103 include an unprocessed rule (step S13). If the rules include an unprocessed rule (step S15: Yes), the group generating section 101 specifies one unprocessed rule (step S17).
The group generating section 101 specifies a communication partner stipulated by the rule specified at step S17 from the rule-data storage section 104. Then, the group generating section 101 determines whether the specified communication partner is the security group (that is, the security group SG) (step S19).
If the specified communication partner is not the security group SG (step S19: No), the process returns to the process at step S13 to process the next rule. In contrast, if the specified communication partner is the security group SG (step S19: Yes), communication is performed between VMs in the security group SG, so that no AAF group may be generated. Therefore, the process returns to the process of the invoker.
In contrast, if the rules include no unprocessed rule (step S15: No), the group generating section 101 newly generates an AAF-group management table in the AAF-group-data storage section 105 (step S21). At step S21, an empty management table is generated.
The group generating section 101 registers a group name (that is, UUID) in the management table generated at step S21. Furthermore, the group generating section 101 registers the group name (that is, UUID) of the security group SG as a corresponding security group name in the management table generated at step S21 (step S23).
The group generating section 101 registers the UUID of a generated AAF group in the security-group-SG management table stored in the SG-data storage section 103 (step S25). Then the process returns to the process of the invoker.
Executing the above process allows an AAF group to be generated when communication between VMs in the security group SG is not performed.
Referring back to
First, the group generating section 101 sets a security group list SGL to NULL (that is, empty) (
The group generating section 101 determines whether a COM group corresponding to the security group SG is registered in the SG-data storage section 103 (step S33).
If a COM group corresponding to the security group SG is registered (step S33: Yes), the process goes to step S41. In contrast, if a COM group corresponding to the security group SG is not registered, (step S33: No), the group generating section 101 newly generates a COM-group management table in the COM-group-data storage section 106 (step S35).
The group generating section 101 registers the group name (in this embodiment, UUID) in the COM-group management table generated at step S35 (step S37).
The group generating section 101 registers the same group name as that registered at step S37 as a COM group corresponding to the security group SG in the security-group-SG management table stored in the SG-data storage section 103 (step S39).
The group generating section 101 specifies a rule to be applied to the security group SG from the security-group-SG management table stored in the SG-data storage section 103 (step S41).
The group generating section 101 determines whether the rules specified at step S41 include an unprocessed rule (step S43).
If the specified rules include an unprocessed rule (step S43: Yes), the group generating section 101 specifies one unprocessed rule (step S45). Then, the group generating section 101 adds identification information on a communication partner defined by the rule specified at step S45 to SGL (step S47). The process returns to step S41.
In contrast, if the specified rules include no unprocessed rule (step S43: No), the group generating section 101 registers the SGL as a communication partner in the COM-group management table having the group name registered at step S37 (step S49). The process returns to the process of the invoker and ends.
Executing the above process allows a COM group including a security group that may be a communication partner of a VM that belongs to the security group SG to be generated.
Referring next to
First, the deployment section 102 executes an AAF setting process (
First, the deployment section 102 specifies a list of security groups to which a VM to be started belongs from the VM-management-data storage section 107 and determines whether the specified list includes an unprocessed security group (
If the specified list includes no unprocessed security group (step S63: No), the process returns to the process of the invoker. In contrast, if the specified list includes an unprocessed security group (step S63: Yes), the deployment section 102 specifies one unprocessed security group (step S65).
The deployment section 102 determines whether an AAF group corresponding to the security group specified at step S65 is registered in the SG-data storage section 103 (step S67). If an AAF group corresponding to the security group specified at step S65 is not registered in the SG-data storage section 103 (step S67: No), the process returns to step S61.
In contrast, if an AAF group corresponding to the security group specified at step S65 is registered in the SG-data storage section 103 (step S67: Yes), the deployment section 102 stores a startup parameter for the AAF group corresponding to the security group in the VM-management-data storage section 107 (step S69). The process returns to the process at step S61.
The above process allows consideration of settings for an AAF group corresponding to the security group to which the VM belongs when the VM is to be started. An example of a command executed at startup is illustrated in
Referring back to
The deployment section 102 executes a communication-cost calculation process (step S55). The communication-cost calculation process is described with reference to
First, the deployment section 102 specifies one unprocessed physical machine from among physical machines contained in the result of the narrowing process at step S53 (that is, physical machines in which VMs that belong to the same security group are not running) (
The deployment section 102 sets a variable cost, indicating the communication cost to cost=0 (step S71).
The deployment section 102 specifies a list of security groups to which the VM to be started belongs from the VM-management-data storage section 107 and determines whether the specified list includes an unprocessed security group (step S73).
If the specified list includes no unprocessed security group (step S75: No), the deployment section 102 stores the communication cost calculated for the physical machine specified at step S70 in a storage device, such as a main memory. The deployment section 102 determines whether physical machines included in the result of the narrowing process at step S53 (that is, physical machines in which VMs that belong to the same security group are not running) includes an unprocessed physical machine (step S76).
If the result of the narrowing process includes an unprocessed physical machine (step S76: Yes), the process returns to step S70. In contrast, if no unprocessed physical machine is present (step S76: No), the process returns to the process of the invoker.
In contrast, if the specified list includes an unprocessed security group (step S75: Yes), the deployment section 102 specifies one unprocessed security group (step S77).
The deployment section 102 specifies a COM group corresponding to the security group specified at step S77 from the SG-data storage section 103. Then, the deployment section 102 specifies a list of security groups of the communication partner of the specified COM group from the COM-group-data storage section 106 (step S79).
The deployment section 102 determines whether the list specified at step S79 includes an unprocessed security group (step S81). If the list includes no unprocessed security group (step S83: No), the process returns to the process at step S73. In contrast, if the list includes an unprocessed security group (step S83: Yes), the process goes to step S85 in
Referring to
If the list includes no unprocessed VM (step S87: No), the process returns to step S81 in
Then, the deployment section 102 specifies a physical machine in which the VM specified at step S89 is running from the VM-management-data storage section 107 and determines whether the specified physical machine is the same as the physical machine specified at step S70 (step S91). That is, the deployment section 102 determines whether the VM specified at step S89 and the VM to be started run in the same physical machine.
If the VM specified at step S89 and the VM to be started run in the same physical machine (step S91: Yes), the communication cost is 0, and therefore the process returns to the process at step S85.
In contrast, if the VM specified at step S89 and the VM to be started do not run in the same physical machine (step S91: No), the deployment section 102 sets the communication cost to cost=cost+1 (step S93). The process returns to the process at step S85.
Thus, the communication cost is calculated for each physical machine, as illustrated in
Referring back to
The deployment section 102 generates a command for starting a VM in the physical machine specified at step S57 and transmits the command to the physical resource 5 (step S59), and the process ends.
First, the hypervisor in the destination physical machine receives a command to start a VM from the deployment apparatus 1 (
As described above, in this embodiment, AAF groups are established from information about communication rules on VMs that belong to security groups. This allows VMs to be deployed in appropriate destinations even if the user does not prepare a configuration for deployment.
Furthermore, optimum physical machines may be specified based on the communication costs. This may reduce occurrence of problems in communication (for example, network congestion) after VMs are deployed.
An example of the operation of the deployment apparatus 1 is described hereinbelow with reference to
Here, assume a virtual system as illustrated in
As illustrated in
As illustrated in
As illustrated in
Since AP2 belongs to AP-SG as AP1 does, AP2 is started in a physical machine other than the physical machine 1 due to a startup parameter for the AAF group. In other words, candidates of destination are physical machines 2 to n, as illustrated in
As illustrated in
The above embodiment is given for mere illustration. For example, the functional block configuration of the deployment apparatus 1 described above may not agree with an actual program module.
The configurations of the management tables described above are given for mere illustration and are not limited to the configurations. Also in the flowcharts, the order of the processes may be changed unless the processing result changes. Furthermore, the processes may be executed in parallel.
A trigger for the process illustrated in
If it is preferable to calculate the communication cost not on a physical machine basis but on a rack or zone basis, the communication costs of deploying VMs may be calculated on such basis.
A summary of the embodiments is as follows.
A method of deployment according to an embodiment includes (A) specifying a group in which communication between virtual machines that belong to the group is not permitted using a first data storage unit that stores information regarding communication rules on virtual machines that belong to individual groups, (B) storing deployment information indicating dispersed deployment in a second data storage unit in association with identification information on the specified group, (C) determining whether the deployment information associated with identification information on a first group is stored in the second data storage unit when receiving an instruction to deploy a first virtual machine that belongs to the first group, and (D) determining a target physical machine in which the first virtual machine is to be deployed from among physical machines in which a virtual machine other than the first virtual machine that belongs to the first group is not running out of a plurality of physical machines when the deployment information is stored in the second data storage unit in association with the identification information on the first group.
This allows dispersed deployment when communication in one group seems not to be permitted even if a configuration for deployment is not prepared. In other words, virtual machines may be deployed in appropriate physical machines.
The process of determining a destination physical machine for the first virtual machine may include (d1) calculating a communication cost when the first virtual machine is operated on each of physical machines in which a virtual machine other than the first virtual machine that belongs to the first group is not running and (d2) specifying a target physical machine in which the first virtual machine is to be deployed based on the calculated communication costs. This allows an optimum physical machine to be determined as a destination in terms of communication costs.
The process of calculating a communication cost may include (d11) calculating a communication cost when the first virtual machine is operated on the physical machine by obtaining a total of communication costs calculated for a plurality of communication partners of the first virtual machine by a predetermined method. The predetermined method may be a method for reducing a communication cost when a communication partner of the first virtual machine runs in an identical physical machine as compared to a communication cost when a communication partner of the first virtual machine runs in a different physical machine. Communication between VMs in an identical physical machine reduces consumption of the band of a network connecting the physical machine. This allows appropriate communication costs to be calculated.
This method of deployment may further include (E) determining a target physical machine in which the first virtual machine is to be deployed from the plurality of physical machines when the deployment information is not stored in the second data storage unit in association with the identification information on the first group. Deploying virtual machines that belong to an identical group in an identical physical machine enhances the efficiency of communication between the virtual machines in the group.
The method of deployment may further include (F) outputting a command to start the first virtual machine in the determined target physical machine. This allows the virtual machine to be started in the destination physical machine.
A program for causing a computer to execute the process according to the above method may be generated. The program is stored in a computer-readable storage medium or a storage unit, such as a flexible disk, a CD-ROM, a magneto-optical disk, a semiconductor memory, or a hard disk. An intermediate processing result is temporarily stored in a storage unit, such as a main memory.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2016-059688 | Mar 2016 | JP | national |