1. Technical Field
Embodiments of the present disclosure relate to virtual machine technology, and particularly to a virtual machine monitoring system and method.
2. Description of Related Art
Virtual machine (VM)s are software implementation that virtualizes a personal computer or a server on an operating system (kernel) layer. By using the VMs, multiple operating systems can co-exist and run independently on the same computer. Each VM may use some resources (e.g., CPU time takes up part of the memory) of the computer. The computer may run too slow when the resources used by the VMs exceed a threshold. In such a situation, a user may shutdown or transfer one or more virtual machines from the computer to other computer, so as to reduce resource usage of the computer. However, for most VMs, the user manually transfers the virtual machine to another computer. This is tedious and time consuming and thus, there is room for improvement in the art.
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 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.
The cloud servers 500 store the resource utilization rate. The resource utilization rate may show performance of the cloud servers 500 and be generated by the cloud servers 500 themselves when the cloud servers 500 run. For example, the resource utilization rate includes a CPU utilization rate of the cloud server 500, a memory utilization rate of the cloud server 500, a disk utilization rate of the cloud server 500, and a network traffic of the cloud server 500. Additionally, the cloud servers 500 may store a serial number of each cloud server 500, a voltage of the cloud server 500, a rotational speed of a fan of the cloud server 500, a temperature of the cloud server 500, a status of the cloud server 500 (e.g., power on/off).
The remote computer 20 stores a virtual machine image file. The virtual machine image file is defined as a compressed file that contains complete contents and structures of a virtual machine. A user can use the virtual machine image file to install one or more virtual machines in the cloud servers 500. In one embodiment, the virtual machine image file may be, but is not limited to, a VMWARE ESX. In order to manage the one or more virtual machines, each of the cloud servers 500 installs a virtual machine management application (e.g., HYPERVISOR). The HYPERVISOR is used to manage and monitor execution of the one or more virtual machines. The HYPERVISOR also obtains the resource utilization rate of each of the one or more virtual machines.
The remote computer 20, in one example, can be also a dynamic host configuration protocol (DHCP) server. The remote computer 20 is installed with a DHCP service. In one embodiment, the remote computer 20 assigns Internet protocol (IP) addresses to the cloud servers 500 by the DHCP service. The remote computer 20 may provide three modes for allocating IP addresses to the cloud servers 500. The modes are dynamic allocation, automatic allocation, and static allocation. In one embodiment, the remote computer 20 uses dynamic allocation to assign the IP addresses to the cloud servers 500. For example, when the remote computer 20 receives a request from a cloud server 500 via the network 40, the remote computer 20 dynamically assigns an IP address, and offers the remote computer 10 with the IP address. In this embodiment, the remote computer 20 may be a personal computer (PC), a network server, or any other data-processing equipment.
The setting module 210 sets a predetermined resource utilization rate for each of the cloud servers 500. In one embodiment, the predetermined resource utilization rate includes a predetermined CPU utilization rate of the cloud server 500, a predetermined memory utilization rate of the cloud server 500, a predetermined disk utilization rate of the cloud server 500, a predetermined network traffic of the cloud server 500.
The obtaining module 220 obtains a resource utilization rate of each of the virtual machines in the cloud server 500. In one embodiment, the obtaining module 220 obtains the resource utilization rate of each of the virtual machines from the HYPERVISOR installed in the cloud server 500.
The calculating module 230 calculates the resource utilization rate of the cloud server 500 according to the resource utilization rate of each of the virtual machines. In one embodiment, the CPU utilization rate of the cloud server 500 is equal to a summation of all CPU utilization rates of the virtual machines. The memory utilization rate of the cloud server 500 is equal to the summation of all memory utilization rates of the virtual machines. The disk utilization rate of the cloud server 500 is equal to the summation of all disk utilization rates of the virtual machines. The network traffic of the cloud server 500 is equal to the summation of all network traffic of the virtual machines.
The determination module 240 determines if the calculated resource utilization rate is greater than the predetermined resource utilization rate. In one embodiment, the calculated CPU utilization rate is greater than the predetermined CPU utilization rate, or the calculated memory utilization rate is greater than the predetermined memory utilization rate, or the calculated disk utilization rate is greater than the predetermined disk utilization rate, or the calculated network traffic is greater than the predetermined network traffic, then the calculated resource utilization rate is greater than the predetermined resource utilization rate.
In other words, the calculated resource utilization rate includes four parameters, if one of the parameters is greater than corresponding predetermined parameter, then the calculated resource utilization rate is greater than the predetermined resource utilization rate. For example, if the calculated CPU utilization rate is greater than the predetermined CPU utilization rate, regardless of the calculated memory utilization rate, the calculated disk utilization rate and the network traffic, the calculated resource utilization rate is greater than the predetermined resource utilization rate.
Additionally, the determination module 240 adds a time factor to determine if the calculated resource utilization rate is greater than the predetermined resource utilization rate. For example, if the calculated CPU utilization rate is greater than the predetermined CPU utilization rate and such a situation lasts for five minutes, the determination module 250 determines the calculated resource utilization rate is greater than the predetermined resource utilization rate.
The transferring module 250 transfers one or more virtual machines from the cloud server 500 to other cloud servers 500 until the resource utilization rate of the cloud server 500 is equal to or less than the predetermined resource utilization rate, in the respond to a determination that the calculated resource utilization rate is greater than predetermined resource utilization rate. In one embodiment, the transferring module 250 invokes HYPERVISOR to transfer the one or more virtual machines.
In step S10, the setting module 210 sets a predetermined resource utilization rate for each of the cloud servers 500. As mentioned above, a predetermined CPU utilization rate of the cloud server 500 is set as 80% (e.g., a percentage capacity usage of a CPU). A predetermined memory utilization rate of the cloud server 500 is set as 85% (e.g., a percentage capacity usage of memory). A predetermined disk utilization rate of the cloud server 500 is 85% (e.g., a percentage capacity usage of a disk). In addition, a predetermined network traffic of the cloud server 500 is set as fifty GB.
In step S20, the obtaining module 220 obtains a resource utilization rate of each of the virtual machines in the cloud server 500. In one embodiment, the obtaining module 220 obtains the resource utilization rate of each of the virtual machines from the HYPERVISOR installed in the cloud server 500.
In step S30, the calculating module 230 calculates the resource utilization rate of the cloud server 500 according to the resource utilization rate of each of the virtual machines. For example, assuming that the cloud server 500 includes two virtual machines A and B, if the CPU utilization rate of the virtual machine A is 30% and the CPU utilization rate of the virtual machine B is 20%, then the CPU utilization rate of the cloud server 500 is equal to 50%. If the memory utilization rate of the virtual machine A is 20% and the memory utilization rate of the virtual machine B is 20%, then the memory utilization rate of the cloud server 500 is equal to 40%. If the disk utilization rate of the virtual machine A is 21% and the disk utilization rate of the virtual machine B is 20%, then the disk utilization rate of the cloud server 500 is equal to 41%. If the network traffic of the virtual machine A is five GB and the network traffic of the virtual machine B is six GB, then the network traffic of the cloud server 500 is equal to eleven GB.
In step S40, the determination module 240 determines if the calculated resource utilization rate is greater than the predetermined resource utilization rate. In one embodiment, if the disk utilization rate of the virtual machine A is 61% and the disk utilization rate of the virtual machine B is 22%, the calculated resource utilization rate is greater than the predetermined resource utilization rate 80%, the procedure goes to step S50. Otherwise, if the calculated CPU utilization rate is 78%, the calculated memory utilization rate is 80%, the calculated disk utilization rate is 81%, and the calculated network traffic utilization rate is 30 GB, the calculated resource utilization rate is equal to or less than the predetermined resource utilization rate, the procedure ends.
In step S50, the transferring module 250 transfers one or more virtual machines from the cloud server 500 to other cloud servers 500 until the resource utilization rate of the cloud server is equal to or less than the predetermined resource utilization rate. For example, if the disk utilization rate of the virtual machine A is 61% and the disk utilization rate of the virtual machine B is 22%, the transferring module 250 invokes HYPERVISOR to transfer the virtual machine A to another cloud server 500. Additionally, the transferring module 250 checks the resource utilization rate of the another cloud server 500 to make sure that the another cloud server 500 are not overloading.
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 |
---|---|---|---|
100119133 | Jun 2011 | TW | national |