1. Technical Field
Embodiments of the present disclosure relate to virtual machine technology, and particularly to a control computer and method for integrating available computing resources of physical machines in a data center.
2. Description of Related Art
In cloud computing technology, a plurality of physical machines (e.g., servers) are included in a data center. Each physical machine can be installed with one or more virtual machines (VMs) for providing multiple services to users. Each virtual machine occupies certain computing resources such as CPU, memory, and hard disk resources of the physical machines. If available computing resources of individual physical machine are insufficient, a new virtual machine cannot be installed in the data center.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In general, the word “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
In this embodiment, the control computer 10 further includes a storage system 16 and at least one processor 17. The storage system 16 may be a dedicated memory, such as an EPROM, a hard disk drive (HDD), or flash memory. In some embodiments, the storage system 16 may be an external storage device, such as an external hard disk, a storage card, or a data storage medium.
In step S301, the receipt module 200 receives a user request for installing a virtual machine in the data center 12 from a client computer 15, and receives a specified amount of computing resources required by the virtual machine. The computing resources required by the virtual machine may include CPU resource, memory resource, and hard disk resource. For example, the computing resources required by the virtual machine include three CPUs.
If there are no physical machine 13 that satisfies the specified amount of computing resources required by the virtual machine, in step S302, the calculation module 210 calculates a total amount of available computing resources of the physical machines 13. The calculation module 210 may compare the specified amount of computing resources required by the virtual machine with an amount of available computing resources of each of the physical machines 13, to determine whether there are any physical machines 13 satisfying the specified amount of computing resources required by the virtual machine. In one example, three physical machines 13 are included in the data center 12. Identifiers of the three physical machines 13 are Server1, Server2, and Server3 respectively. Server1 includes one available CPU. Server2 includes one available CPU. Server3 includes two available CPUs. If the virtual machine requires three CPUs, there are no physical machine 13 that satisfies the specified amount of computing resources required by the virtual machine. In this example, a total number of available CPUs of the three physical machines 13 is four.
In step S303, the calculation module 210 compares the total amount of available computing resources of the physical machines 13 with the specified amount of computing resources required by the virtual machine. If the total amount of available computing resources of the physical machines 13 is less than the specified amount of computing resources required by the virtual machine, the process ends.
If the total amount of available computing resources of the physical machines 13 is equal to or greater than the specified amount of computing resources required by the virtual machine, in step S304, the setup module 220 sets a resource collection strategy of the physical machines 13. In one embodiment, the resource collection strategy of the physical machines 13 includes a sequential collection strategy and a largest available first collection strategy. According to the sequential collection strategy, the available computing resources of the physical machines 13 are collected in a predetermined sequence. For example, the data center 12 includes three physical machines 13 Server1, Server2, and Server3. The available computing resources are first collected from Server1 and last collected from Server3. According to the largest available first collection strategy, the available computing resources are first collected from a physical machine 13 with the largest available computing resources.
If the sequential collection strategy is set, in step S305, the deployment module 230 collects the available computing resources of the physical machines 13 in the predetermined sequence, until an amount of the collected available computing resources is equal to or larger than the specified amount of computing resources required by the virtual machine. The sequence may be determined according to identifiers of the physical machines 13 (e.g. from Server1 to Server3).
In step S306, the deployment module 230 transfers virtual machines previously installed in a physical machine 13 in the first place of the predetermined sequence to other physical machines 13, and deploys the virtual machine required by the client computer 15 in the physical machine 13 in the first place of the predetermined sequence. Then the process ends. For example, three physical machines 13 Server1, Server2, and Server3 are included in the data center 12. The available computing resources are first collected from Server1 and last collected from Server3. Therefore, virtual machines previously installed in Server1 are transferred to Server2 and Server3, and the virtual machine required by the client computer 15 is deployed in Server1.
In step S304, if the largest available first collection strategy is set, in step S307, the deployment module 230 first collects the available computing resources from a physical machine 13 with the largest available computing resources, until the amount of the collected available computing resources is equal to or larger than the specified amount of computing resources required by the virtual machine.
In step S308, the deployment module 230 transfers virtual machines previously installed in the physical machine 13 with the largest available computing resources to other physical machines 13, and deploys the virtual machine required by the client computer 15 in the physical machine 13 with the largest available computing resources.
Although certain inventive embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
101108786 | Mar 2012 | TW | national |