Abstract:
A computer receives at least one requirement for a new VM. The computer identifies an existing VM to be modified during the generation of the new VM. The computer determines at least one step necessary to create the new VM configuration from the existing VM. The computer presents at least one pathway to the new VM from the existing VM. The computer receives a selection of a presented pathway to create the new VM.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates generally to the field of virtual machines, and more particularly to the creation of virtual machines with specific attributes. 
       BACKGROUND OF THE INVENTION 
       [0002]    Virtual machines (VMs) are commonly utilized by software development teams to test new software across many Operating Systems and different software configurations without needing to use a different physical machine to create each testing environment. Use of a virtual machine instead of a physical machine for each test environment allows for increased efficiency and lower costs of running tests. Testing software on a large scale can often require the use of many virtual machines, which has lead to new methods for creating virtual machines. 
       SUMMARY 
       [0003]    Embodiments of the present invention disclose a method, computer program product, and system for determining optimal pathways for creating a virtual machine (VM) with a given set of requirements. A computer receives at least one requirement for a new VM. The computer identifies an existing VM to be modified during the generation of the new VM. The computer determines at least one step necessary to create the new VM configuration from the existing VM. The computer presents at least one pathway to the new VM from the existing VM. The computer receives a selection of a presented pathway to create the new VM. 
     
    
     
       BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS 
         [0004]      FIG. 1  is a functional block diagram illustrating a data processing environment, in accordance with an embodiment of the present invention. 
           [0005]      FIG. 2  is a flowchart depicting operational steps of a search application, executing on a computing device within the data processing environment of  FIG. 1 . 
           [0006]      FIG. 3  depicts a block diagram of components of a computing device executing a search application, in accordance with an embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION 
       [0007]    The traditional method of creating a virtual machine involves installing an operating system and additional software onto a virtual system running on a host computing device. Because many virtual machines can share the same physical hardware, virtual machines can also be created by duplicating, or “cloning” existing virtual machines. This is particularly useful if an identical copy of an existing virtual machine is required. 
         [0008]    Snapshots are used to save the state of a virtual machine at a given point in time. Snapshots capture all data, applications, settings, and the Operating System present on a virtual machine at the point in time when the snapshot is taken. Snapshots can be used to restore a virtual machine in the event that an error occurs or data becomes corrupted. Another user for a snapshot is to create a new virtual machine from a previous state of a virtual machine captured by a snapshot. 
         [0009]    As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit”, “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer-readable medium(s) having computer readable program code/instructions embodied thereon. 
         [0010]    Any combination of computer-readable media may be utilized. Computer-readable media may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of a computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. 
         [0011]    A computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. 
         [0012]    Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. 
         [0013]    Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on a user&#39;s computer, partly on the user&#39;s computer, as a stand-alone software package, partly on the user&#39;s computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user&#39;s computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). 
         [0014]    Aspects of the present invention are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. 
         [0015]    These computer program instructions may also be stored in a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks. 
         [0016]    The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. 
         [0017]    The present invention will now be described in detail with reference to the Figures.  FIG. 1  is a functional block diagram illustrating a Data Processing Environment, generally designated  100 , in accordance with one embodiment of the present invention. Data processing environment  100  includes network  105 , computing device  110 , hypervisor  120 , virtual machine repository  130 , virtual machines  140  and  150 , data collection agents  145  and  155 , snapshot repository  160 , snapshot  165 , database  170 , search application  180 , and system controller  190 . 
         [0018]    In an exemplary embodiment, hypervisor  120 , virtual machine repository  130 , virtual machines  140  and  150 , data collection agents  145  and  155 , snapshot repository  160 , snapshot  165 , database  170 , search application  180 , and system controller  190  are stored on computing device  110 . However, in other embodiments, hypervisor  120 , virtual machines  140  and  150 , snapshot  165 , database  170 , search application  180 , and system controller  190  may be stored externally and accessed through a communication network, such as network  105 . Network  105  can be, for example, a local area network (LAN), a wide area network (WAN) such as the internet, or a combination of the two, and may include wired, wireless, fiber optic or any other connection known in the art. In general, network  105  can be any combination of connections and protocols that will support communications between computing device  110 , hypervisor  120 , virtual machine repository  130 , virtual machines  140  and  150 , data collection agents  145  and  155  snapshot repository  160 , snapshot  165 , database  170 , search application  180 , and system controller  190  are stored on computing device  110 . However, in other embodiments, hypervisor  120 , virtual machines  140  and  150 , snapshot  165 , database  170 , search application  180 , and system controller  190  in accordance with a desired embodiment of the present invention. 
         [0019]    In various embodiments of the present invention, computing device  110  is a computing device that can be a standalone device, a server, a laptop computer, a tablet computer, a netbook computer, a personal computer (PC), or a desktop computer. In another embodiment, computing device  110  represents a computing system utilizing clustered computers and components to act as a single pool of seamless resources. In general, computing device  110  can be any computing device or a combination of devices with access to network  105 , hypervisor  120 , virtual machines  140  and  150 , snapshot  165 , database  170 , search application  180  and system controller  190  and is capable of executing search application  180 . Computing device  110  may include internal and external hardware components, as depicted and described in further detail with respect to  FIG. 5 . 
         [0020]    In various embodiments of the current invention, hypervisor  120  is an emulation program that allows virtual machines to be executed on computing device  110 . Hypervisor  120  can be (a) a virtual machine monitor that runs along the host operating system, (b) a specialized host operating system having native emulation capabilities, or (c) a host operating system with a hypervisor component wherein the hypervisor component performs the emulation. In general, hypervisor  120  can be any program or software capable of emulating an environment to execute virtual machines. 
         [0021]    In an exemplary embodiment, VM repository  130  is a computer database containing virtual machines  140  and  150 . Virtual machines  140  and  150  are virtual machines stored within VM repository  130 . Virtual machines  140  and  150  are software implemented abstractions of hardware included in computing device  110 . In general, virtual machines  140  and  150  can be utilized to emulate functions of a physical computer (e.g., execute programs). In another embodiment, virtual machines  140  and  150  are representations of virtual devices that are being implemented on computing device  110 . In one embodiment, the resources of computing device  110  (e.g., memory, central processing units (CPUs), storage devices, and I/O devices) can be partitioned for use by one or more virtual machines including virtual machines  140  and  150 . 
         [0022]    In exemplary embodiments, data collection agents  145  and  155  are computer programs installed onto virtual machines  140  and  150 . Data collection agents  145  and  155  generate application install data and communicate collected data to database  170 . Data collection agent  145  and  155  operate by detecting an installation occurring on a virtual machine on which either data collection agent is installed e.g.,  145  or  155 . In an exemplary embodiment of the present invention, data collection agents  145  and  155  will generate data such as the number of steps required to complete an installation of a software component, the total time required for the installation of a software component, and the amount of user input required during the installation of a software component upon completion of an installation process. The generated data is sent to and stored as part of database  170 . 
         [0023]    In exemplary embodiments, snapshot repository  160  is a computer database containing all snapshots taken of virtual machines present in virtual machine repository  130 . Snapshot library  160  contains snapshot  165 . In certain embodiments, snapshot  165  includes a record of an earlier state of a virtual machine present in virtual machine repository  130 . 
         [0024]    In general, snapshot  165  includes a record of an earlier state of a virtual machine present in virtual machine repository  130 . Snapshot  165  facilitates the operation of restoring its corresponding virtual machine to its state at the time the snapshot was created. The record comprising snapshot  165  includes a copy of all data present on the virtual machine&#39;s storage which may be an emulated version of a hard drive, solid state drive, or any other computer storage device known in the art. Snapshot  165  also includes the state of virtual machine  165 &#39;s memory, which may be an emulated version of random access memory or any other computer storage medium known in the art. 
         [0025]    Database  170  is a computer database containing records of all present virtual machines and snapshots in virtual machine repository  130  as well as snapshot repository  160 . Database  170  receives data from data collection agents  145 , data collection agent  155 , and system controller  190 . 
         [0026]    Search application  180  is a software program that utilizes data stored in database  170  to determine possible sequences of steps required to create a new virtual machine with a given set of attributes. In an exemplary embodiment of the present invention, the process of determining the sequence of steps required to create a new virtual machine with a given set of attributes comprises (a) receiving the requirements for a new virtual machine from a user, (b) searching through records of existing virtual machines and snapshots stored in database  170  for a record which includes similar software properties, and (c) determining the additional steps required to create a new virtual machine using an existing record as a starting point, if any. 
         [0027]    System controller  190  is a system controller for hypervisor  120 . System controller  190  observes the behavior and actions of hypervisor  120  and sends a record of any action performed to database  170 . In an exemplary embodiment, actions recorded include (a) a virtual machine being copied to create a new virtual machine, (b) a virtual machine being deleted, (c) a snapshot being created from a virtual machine, and (d) a virtual machine being restored from a record contained in a snapshot. 
         [0028]      FIG. 2  is a flowchart depicting operational steps of search application  180  for determining the possible sequences of steps required to create the desired virtual machine, in accordance with an embodiment of the present invention. 
         [0029]    Search application  180  is a software program which determines all possible sequences of steps required for creating a new virtual machine with a given set of attributes and presents them to the user. 
         [0030]    In an exemplary embodiment of the present invention, a user inputs requirements for a new virtual machine into search application  180 . Search application  180  receives requirements for a new virtual machine from a user in step  205 . 
         [0031]    Search application  180  performs a query of database  170  to search for available virtual machines or snapshots possessing attributes required for the new virtual machine to be created in decision step  210 . These attributes can include at least one of (a) an operating system, (b) an installed software application, (c) an amount of hardware resources available to the virtual machine. 
         [0032]    If no virtual machines or snapshots within virtual machine repository  130  or snapshot repository  160  have any of the attributes required for the new virtual machine (decision step  210 , no branch), search application  150  will recommend creating a new virtual machine without using an existing virtual machine or snapshot as a starting point, in step  215 . Once a recommendation to create a new virtual machine without the use of an existing virtual machine or snapshot is made, the new virtual machine will be created using the determined sequence of steps in step  235 . 
         [0033]    If a virtual machines or snapshots can be used as a starting point to create the new required virtual machine (decision step  210 , yes branch), all the possible sequences of steps to create the new virtual machine using the existing virtual machines and snapshots are determined in step  220 . A sequence of steps can include one or more of (a) making a copy of a virtual machine, (b) restoring a virtual machine from a snapshot, (c) installing or uninstalling additional software onto a virtual machine, or (d) changing the amount of hardware resources available to a virtual machine. 
         [0034]    Possible sequences of steps which can be used to create the new virtual machine are presented to the user in step  225 . In various embodiments of the current invention, additional information may be displayed along with each set of possible steps determined. Additional information can include one or more of (a) the total time required for the sequence of steps to be performed, (b) the number of steps required to complete the generation of the virtual machine, or (c) the complexity of the steps required within the sequence of steps. The complexity of a sequence of steps can be determined using one or more of (a) the number of keystrokes required to install a software component, (b) the amount of manual data input required to install additional software, or (c) the number of carriage returns required to install additional software. 
         [0035]    Once all possible sequences of steps are determined, the user selects a presented sequence of steps to be used to build the new virtual machine, in step  230 . 
         [0036]    The new virtual machine is created using the selected pathway, which was generated in step  220  and was selected by the user in step  230 . In an exemplary embodiment of the present invention, the user manually creates the virtual machine by following the selected sequence of steps provided. In other embodiments, search application  180  triggers the creation of the new virtual machine by an automated system. An automated system for creating a desired virtual machine can include running scripting created by search application  180  which provides program instructions allowing a configuration management application such as puppet or chef to follow the selected sequence of steps to create the new virtual machine. 
         [0037]      FIG. 3  depicts a block diagram of components of computing device  110  in accordance with an illustrative embodiment of the present invention. It should be appreciated that  FIG. 3  provides only an illustration of one implementation and does not imply any limitations with regard to the environments in which different embodiments may be implemented. Many modifications to the depicted environment may be made. 
         [0038]    Computing device  110  includes communications fabric  302 , which provides communications between computer processor(s)  304 , memory  306 , persistent storage  308 , communications unit  310 , and input/output (I/O) interface(s)  312 . Communications fabric  302  can be implemented with any architecture designed for passing data and/or control information between processors (such as microprocessors, communications and network processors, etc.), system memory, peripheral devices, and any other hardware components within a system. For example, communications fabric  302  can be implemented with one or more buses. 
         [0039]    Memory  306  and persistent storage  308  are computer-readable storage media. In this embodiment, memory  306  includes random access memory (RAM)  314  and cache memory  316 . In general, memory  306  can include any suitable volatile or non-volatile computer-readable storage media. 
         [0040]    Hypervisor  120 , virtual machine repository  130 , virtual machines  140  and  150 , data collection agents  145  and  155 , snapshot repository  160 , snapshot  165 , database  170 , search application  180 , and system controller  190  are stored in persistent storage  308  for execution and/or access by one or more of the respective computer processors  304  via one or more memories of memory  306 . In this embodiment, persistent storage  308  includes a magnetic hard disk drive. Alternatively, or in addition to a magnetic hard disk drive, persistent storage  308  can include a solid state hard drive, a semiconductor storage device, read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, or any other computer-readable storage media that is capable of storing program instructions or digital information. 
         [0041]    The media used by persistent storage  308  may also be removable. For example, a removable hard drive may be used for persistent storage  308 . Other examples include optical and magnetic disks, thumb drives, and smart cards that are inserted into a drive for transfer onto another computer-readable storage medium that is also part of persistent storage  308 . 
         [0042]    Communications unit  310 , in these examples, provides for communications with other data processing systems or devices, including resources of enterprise grid  112  and client devices  104 ,  106 , and  108 . In these examples, communications unit  310  includes one or more network interface cards. Communications unit  310  may provide communications through the use of either or both physical and wireless communications links. Hypervisor  120 , virtual machine repository  130 , virtual machines  140  and  150 , data collection agents  145  and  155 , snapshot repository  160 , snapshot  165 , database  170 , search application  180 , and system controller  190  may be downloaded to persistent storage  308  through communications unit  310 . 
         [0043]    I/O interface(s)  312  allows for input and output of data with other devices that may be connected to server computer  102 . For example, I/O interface  312  may provide a connection to external devices  318  such as a keyboard, keypad, a touch screen, and/or some other suitable input device. External devices  318  can also include portable computer-readable storage media such as, for example, thumb drives, portable optical or magnetic disks, and memory cards. Software and data used to practice embodiments of the present invention, e.g., search application  180 , database  170 , data collection agent  145 , and data collection agent  155 , can be stored on such portable computer-readable storage media and can be loaded onto persistent storage  308  via I/O interface(s)  312 . I/O interface(s)  312  also connects to a display  320 . 
         [0044]    Display  320  provides a mechanism to display data to a user and may be, for example, a computer monitor. 
         [0045]    The programs described herein are identified based upon the application for which they are implemented in a specific embodiment of the invention. However, it should be appreciated that any particular program nomenclature herein is used merely for convenience, and thus the invention should not be limited to use solely in any specific application identified and/or implied by such nomenclature. 
         [0046]    The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the Figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.