1. Technical Field
Embodiments of the present disclosure relate to cloud computing technology, and more particularly to virtual machine stock management system and method.
2. Description of Related Art
Virtual machines (VM) are software implementations that create one or more VMs on an operating system (kernel) layer of a server. A guest operating system (OS) is a virtualized environment, and by installing a guest OS in the VMs, multiple guest OS can co-exist and run independently on the same server, so that resources (e.g., such as CPU resource, hard disk resource) of the server can serve more clients. Often, the server provides the VMs to a client in such a manner: the client logs onto the server and selects configuration parameters (such as specifications of the OS, CPU, memory, and hard disk resources) of desired VMs, the server dynamically configures the desired VMs according to the configuration parameters, and assigns the configured VMs to the client. In such a manner, the client may need to wait a time for the desired VMs.
The present disclosure, including the accompanying drawings, is illustrated by way of examples and not by way of limitation. 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. 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.
As shown in
In step S100, the setting module 21 sets stocks and stock thresholds for VMs 10 with different configuration specifications. In one example, the cloud server 100 may provide four different types of operating systems, such as “OS1”, “OS2”, “OS3”, and “OS4”, and provides three different types of hardware specifications, such as “iVM-S”, “iVM-M”, and “iVM-L”. As shown in
As shown in
In step S101, the receiving module 22 receives a request of configuring one or more VMs 10 sent by a client 300, and determines a configuration specification and a number of the VMs 10 requested by the client 300 according to the request. For example, the client 300 may requests four VMs 10 with the configuration specification “(OS2, iVM-M).”
In step S102, the determination module 23 determines if the number of the VMs 10 requested by the client 300 is more than a stock of the VMs 10 with the configuration specification. If the number of the VMs 10 requested by the client 300 is less than or equal to the stock of the VMs 10 with the configuration specification, step S105 is implemented. Otherwise, if the number of the VMs 10 requested by the client 300 is more than the stock of the
VMs 10 with the configuration specification, step S111 is implemented.
In step S 103, the assignment module 24 assigns the number of VMs 10 with the configuration specification to the client 300. For example, if the cloud server 100 stock five VMs 10 with the configuration specification “(OS2, iVM-M),” and the number requested by the client 300 request is four, then the assignment module 24 assigns four VMs 10 with the configuration specification “(OS2, iVM-M)” to the client 300.
In step S104, the update module 25 updates the stock of the VMs 10 with the configuration specification. For example, the stock of the VMs 10 with the configuration specification “(OS2, iVM-M)” is updated from five to one after four VMs 10 have been assigned to the client 300.
In step S105, the determination module 23 determines if the updated stock of the VMs 10 with the configuration specification is less than a stock threshold of the VMs 10 with the configuration specification. If the updated stock is less than the stock threshold of the VMs 10 with the configuration specification, step S108 is implemented. For example, as shown in
In step S108, the notification module 26 notifies the cloud server 100 to supplement the VMs 10 with the configuration specification. For example, the notification module 26 may notify a manager of the cloud server 100 to add four VMs 10 with the configuration specification “(OS2, iVM-M).” In one example, the notification module 26 may send an email to an email box of the manager. Then, the procedure returns to step S104.
In step S103, if the number of the VMs 10 requested by the client 300 is more than the stock of the VMs 10 with the configuration specification, the procedure goes to step S106, the assignment module 24 an available number of the VMs 10 with the configuration specification to the client 300. For example, if the client 300 may requests six VMs 10 with the configuration specification “(OS2, iVM-M),” and the stock is five, then the assignment module 24 assigns five VMs 10 with the configuration specification “(OS2, iVM-M)” to the client 300. Then, step S107 is implemented, the assignment module 24 records shortage information of the requested VMs 10. The shortage information includes a shortage number of the VMs 10 that should be assigned to the client 300. For example, the assignment module 24 may record shortage information as follows: “the VMs 10 with the configuration specification “(OS2, iVM-M) has zero stock, the stock threshold is five, and the client 300 still requests one, please configure at least six VMs 10 with the configuration specification!” Then, the procedure goes to step S 108. After the cloud server 100 supplementing the stock, the assignment module 24 further assigns the shortage number of the VMs 10 to the client 300.
Although certain disclosed 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 |
---|---|---|---|
101135137 | Sep 2012 | TW | national |