Aspects of the disclosure generally relate to virtual machines and, more specifically, relate to an execution of a script based on properties of a virtual device associated with a virtual machine.
A virtual machine (VM) may be considered a software-based emulation of computer hardware. For example, the virtual machine may operate based on computer architecture and functions of the computer hardware resources. Thus, the virtual machine may emulate a physical computing environment, but requests for CPU, memory, hard disk, network, and other hardware resources may be managed by a virtualization layer which translates these requests to the underlying physical computing hardware resources.
The disclosure will be understood more fully from the detailed description given below and from the accompanying drawings of various embodiments of the disclosure. The drawings, however, should not be taken to limit the disclosure to the specific embodiments, but are for explanation and understanding only.
Embodiments of the disclosure relate to a script execution module to execute a script based on the occurrence of an event associated with a virtual machine and properties of virtual devices assigned to the virtual machine. A script (also referred to as a hook) may be used to execute one or more commands in response to conditions of the script being met or satisfied. In some embodiments, a script may be event-driven in that the occurrence of a particular event (e.g., the migration of a virtual machine, provisioning of a virtual machine, etc.) may be required before the script is executed.
The execution of an event-driven script may be applied to all virtual machines associated with the event. For example, a host system that operates virtual machines may be associated with a script that is executed in response to the start of a virtual machine. Thus, if any virtual machine is started on the host system, the script will be executed to perform one or more commands or operations on the virtual machine that is started. As such, such an event-driven script may be executed on multiple virtual machines that are started on the host system.
However, in some embodiments, it may be desirable to have the script be executed on specific virtual machines associated with the event (e.g., the start of a virtual machine) instead of any virtual machine that is associated with the event. As such, using an event-driven and property-driven script may provide for a more detailed level of granularity for determining when to execute a script for a virtual machine. For example, the script may also be property-driven in that the script may be executed on a virtual machine if one or more properties of the virtual machine match or satisfy conditions specified or required by the script.
Virtual machines may include virtual devices. Examples of virtual devices include, but are not limited to, virtual disks, virtual interfaces (e.g., virtual network interface controllers (vNIC)), virtual video devices, virtual sound devices, virtual controllers, etc. A virtual device may be assigned a property (i.e., a custom property). For example, a vNIC of a virtual machine may be assigned a configuration or property value. The value assigned to the virtual device may be used when executing the script. For example, the script may be executed on a virtual machine with a virtual device that has been assigned a value that is specified or required by the script. Thus, the value of a virtual device that is assigned to the virtual machine may be considered to be the property that must be satisfied in order for the script to be executed after the occurrence of the event.
In some embodiments, a script execution module may provide an event-driven and property-driven execution of the script. For example, the script execution module may identify the occurrence of an event associate with a virtual machine. A script associated with the event may be received. Furthermore, properties of the virtual devices of the virtual machine may be received. The script execution module may compare the properties of the virtual devices with conditions or parameters of the script that is associated with the event. If the properties of the virtual devices match or satisfy the conditions or parameters of the script, then the script may be executed on the virtual machine. For example, in some embodiments, the execution of the script on the virtual machine may manipulate or run operations for the virtual device of the virtual machine. However, if the properties of the virtual devices do not match or satisfy the conditions or parameters of the script, then the script may not be executed on the virtual machine.
The hardware resources 110 include a number of hosts 120A-120C (or host machines or systems) each including a portion of the hardware resources 110. The hosts 120A-120C may each include one or more processing devices and one or more storage devices. The hardware resources 110 may further include one or more additional processing devices 112 and one or more additional storage devices 115.
Each of the hosts 120A-120C includes a kernel space and a user space defined by the hardware resources of the host 120A-120C. A kernel-based virtual machine (KVM) 122A-122C is executed in the kernel space of the host 120A-120C. The KVM 122A-122C allows a host 120A-120C to make its hardware resources available to virtual machines 141A-143C which may be executed in the user space.
Each of the hosts 120A-120C may execute a virtual machine monitor (VMM) 124A-124C (or a hypervisor). The VMM 124A-124C is an application that executes on a host 120A-120C to manage virtual machines 141A-143C. In particular, the VMM 124A-124C may instantiate or start, migrate, pause, or perform another type of event associated with virtual machines 141A-143C. The VMM 124A-124C may include a virtualization API and a multi-platform emulator. Each virtual machine 141A-143C may execute a guest operating system that can be accessed by a user device 150A-150C over the network 101. Each virtual machine 141A-143C may further run guest applications using the guest operating system.
Each of the hosts 120A-120C may include an agent 126A-126C. The agent 126A-126C may facilitate inter-host communication and perform various monitoring and administrative tasks. The agent 126A-126C may also include functionality for acting as a storage pool manager (SPM) 130. However, in some embodiments, one of the hosts 120A may be active as the SPM at any one time. The host 120A may be designated an active SPM 130 by the engine 107. The SPM 130 coordinates metadata changes in the virtualization system 105, such as creating and deleting disk images, creating and merging snapshots, copying images between storage domains, creating templates and storage allocation for block devices of the hardware resources 110 such as hard drives or other storage devices.
A storage domain is a collection of data structures that have a common storage interface. A storage domain may contain complete images of templates and virtual machines (including snapshots). A storage domain may comprise one or more block devices, one or more storage devices, one or more file systems, one or more volumes, and/or portions thereof.
As shown in
Furthermore, in some embodiments, each event may be associated with a folder on a file system of the host systems 120A-120C. For example, a user may write a script and place the script in the folder. If an event associated with the folder is identified, then the script may be executed as may other scripts in the folder.
As shown in
Returning to
The script execution module 200 may include a virtual machine identifier sub-module 230. In some embodiments, the virtual machine identifier sub-module 230 may identify a particular virtual machine associated with the event. For example, the virtual machine identifier sub-module 230 may identify virtual machines that are subject to a migration event. Furthermore, the virtual device property receiver 240 may receive properties of virtual devices of the virtual machine that have been identified by the virtual machine identifier sub-module 230. Examples of a virtual device may include, but are not limited to, virtual disks, virtual network interface controllers (vNICs), video devices, sound devices, etc. In some embodiments, a virtual device may be assigned a property. For example, a virtual device may be assigned a value corresponding to a property of the virtual device. As an example, a virtual machine may be assigned a particular type of virtual network card and a property identifying the virtual network card may have a value of ‘ON.’
As shown in
In some embodiments, the execution of a script may perform one or more commands or actions on the virtual machine. For example, the commands or actions of a script may result in, but are not limited to, connecting a virtual disk of the virtual machine to a particular type of storage server or connecting the vNIC of the virtual machine to a particular type of network. Thus, the execution of a script may perform one or more commands or actions on a virtual device of the virtual machine.
As shown in
Thus, a script may be executed to perform one or more actions or commands on a virtual machine and/or the virtual device of a virtual machine based on an event and a property of a virtual device of the virtual machine matching conditions or requirements of the script.
As shown in
In some embodiments, a script may be specified to occur before or after a particular type of event associated with a virtual machine or a virtual device of a virtual machine. For example, a script may specify that it is to be executed before or after the stopping of a virtual machine, before or after the start of a virtual machine, before or after the ending or destroying of a virtual machine, before or after the pausing of a virtual machine, before or after the unpausing of a virtual machine, before or after the hibernating of a virtual machine, before or after the de-hibernating of a virtual machine, before or after the migration of a virtual machine, before or after the disconnecting of a virtual device of a virtual machine, before or after the connecting of a virtual device of a virtual machine, etc. Furthermore, the script may be executed on a host system to perform one or more actions or commands on a virtual machine. In some embodiments, the host system may run multiple virtual machines. A first subset of the virtual machines run on the host system may have an assigned property of a virtual device and the second subset of the virtual machines that run on the host system may not have the assigned property of the virtual device. Thus, if a script specifies a condition that includes the assigned property of the virtual device, then the script may be executed to perform actions or commands on the first subset of the virtual machines that run on the host system and to not execute the script to perform actions or commands on the second subset of the virtual machines that run on the host system.
The machine may be a personal computer (PC), a tablet PC, a set-top box (STB), a Personal Digital Assistant (PDA), a cellular telephone, a web appliance, a server, a network router, a switch or bridge, or any machine capable of executing a set of instructions (sequential or otherwise) that specify actions to be taken by that machine. Further, while a single machine is illustrated, the term “machine” shall also be taken to include any collection of machines that individually or jointly execute a set (or multiple sets) of instructions to perform any one or more of the methodologies discussed herein.
The example computer system 500 includes a processing device 502, a main memory 504 (e.g., read-only memory (ROM), flash memory, dynamic random access memory (DRAM) such as synchronous DRAM (SDRAM) or DRAM (RDRAM), etc.), a static memory 506 (e.g., flash memory, static random access memory (SRAM), etc.), and a data storage device 518, which communicate with each other via a bus 530.
Processing device 502 represents one or more general-purpose processing devices such as a microprocessor, a central processing unit, or the like. More particularly, the processing device may be complex instruction set computing (CISC) microprocessor, reduced instruction set computing (RISC) microprocessor, very long instruction word (VLIW) microprocessor, or processor implementing other instruction sets, or processors implementing a combination of instruction sets. Processing device 502 may also be one or more special-purpose processing devices such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a digital signal processor (DSP), network processor, or the like. The processing device 502 is configured to execute instructions 522 for performing the operations and steps discussed herein.
The computer system 500 may further include a network interface device 508. The computer system 500 also may include a video display unit 510 (e.g., a liquid crystal display (LCD) or a cathode ray tube (CRT)), an alphanumeric input device 512 (e.g., a keyboard), a cursor control device 514 (e.g., a mouse), and a signal generation device 516 (e.g., a speaker).
The data storage device 518 may include a machine-readable storage medium 528 (also known as a computer-readable medium) on which is stored one or more sets of instructions or software 522 embodying any one or more of the methodologies or functions described herein. The instructions 522 may also reside, completely or at least partially, within the main memory 504 and/or within the processing device 502 during execution thereof by the computer system 500, the main memory 504 and the processing device 502 also constituting machine-readable storage media.
In one implementation, the instructions 522 include instructions for a row module (e.g., script execution module 111A-111C of
Some portions of the preceding detailed descriptions have been presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the ways used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of operations leading to a desired result. The operations are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the above discussion, it is appreciated that throughout the description, discussions utilizing terms such as “identifying” or “determining” or “executing” or “performing” or “collecting” or “creating” or “sending” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage devices.
The present disclosure also relates to an apparatus for performing the operations herein. This apparatus may be specially constructed for the intended purposes, or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer readable storage medium, such as, but not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, or any type of media suitable for storing electronic instructions, each coupled to a computer system bus.
The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general purpose systems may be used with programs in accordance with the teachings herein, or it may prove convenient to construct a more specialized apparatus to perform the method. The structure for a variety of these systems will appear as set forth in the description below. In addition, the present disclosure is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the disclosure as described herein.
The present disclosure may be provided as a computer program product, or software, that may include a machine-readable medium having stored thereon instructions, which may be used to program a computer system (or other electronic devices) to perform a process according to the present disclosure. A machine-readable medium includes any mechanism for storing information in a form readable by a machine (e.g., a computer). For example, a machine-readable (e.g., computer-readable) medium includes a machine (e.g., a computer) readable storage medium such as a read only memory (“ROM”), random access memory (“RAM”), magnetic disk storage media, optical storage media, flash memory devices, etc.
In the foregoing specification, implementations of the disclosure have been described with reference to specific example implementations thereof. It will be evident that various modifications may be made thereto without departing from the broader spirit and scope of implementations of the disclosure as set forth in the following claims. The specification and drawings are, accordingly, to be regarded in an illustrative sense rather than a restrictive sense.
This application is a continuation of U.S. Pat. No. 10,296,362, filed on Feb. 26, 2014, the entire contents of which are incorporated by reference herein.
Number | Name | Date | Kind |
---|---|---|---|
6493755 | Hansen | Dec 2002 | B1 |
6650635 | Weinstein | Nov 2003 | B1 |
6678705 | Berchtold | Jan 2004 | B1 |
7707240 | Marascio | Apr 2010 | B2 |
7774444 | George | Aug 2010 | B1 |
8190641 | Ponnappan et al. | May 2012 | B2 |
8443365 | Kumar | May 2013 | B2 |
8449397 | Martone | May 2013 | B2 |
8516080 | Chow | Aug 2013 | B2 |
8566823 | Wagner | Oct 2013 | B2 |
8839245 | Khajuria | Sep 2014 | B1 |
8949364 | Miloushev | Feb 2015 | B2 |
8990809 | Jacob | Mar 2015 | B1 |
9021010 | Das | Apr 2015 | B1 |
9134991 | Arcese | Sep 2015 | B2 |
9451006 | Miller | Sep 2016 | B1 |
9501591 | Authement | Nov 2016 | B2 |
10296362 | Muller et al. | May 2019 | B2 |
20030167421 | Klemm | Sep 2003 | A1 |
20030233476 | Henry | Dec 2003 | A1 |
20040128585 | Hind | Jul 2004 | A1 |
20040172574 | Wing | Sep 2004 | A1 |
20050149940 | Calinescu | Jul 2005 | A1 |
20050165881 | Brooks | Jul 2005 | A1 |
20050231746 | Parry | Oct 2005 | A1 |
20060136914 | Marascio | Jun 2006 | A1 |
20060167891 | Blaisdell | Jul 2006 | A1 |
20060262915 | Marascio | Nov 2006 | A1 |
20070078841 | Lin | Apr 2007 | A1 |
20070078988 | Miloushev | Apr 2007 | A1 |
20080195624 | Ponnappan | Aug 2008 | A1 |
20080288622 | Gordon | Nov 2008 | A1 |
20090100420 | Sapuntzakis | Apr 2009 | A1 |
20090193173 | Joshi | Jul 2009 | A1 |
20090222461 | Alpern | Sep 2009 | A1 |
20090222462 | Alpern | Sep 2009 | A1 |
20090222468 | Alpern | Sep 2009 | A1 |
20090222474 | Alpern | Sep 2009 | A1 |
20090276771 | Nickolov | Nov 2009 | A1 |
20100074173 | Ewing | Mar 2010 | A1 |
20100138485 | Chow | Jun 2010 | A1 |
20100185930 | Scott | Jul 2010 | A1 |
20100235831 | Dittmer | Sep 2010 | A1 |
20110016453 | Grechanik | Jan 2011 | A1 |
20110022695 | Dalal | Jan 2011 | A1 |
20110046453 | Keil | Feb 2011 | A1 |
20110067040 | Nagahara | Mar 2011 | A1 |
20110197189 | Wagner | Aug 2011 | A1 |
20110197205 | Wagner | Aug 2011 | A1 |
20110265087 | Chen | Oct 2011 | A1 |
20110269111 | Elesseily | Nov 2011 | A1 |
20120050286 | Yockey | Mar 2012 | A1 |
20120054736 | Arcese | Mar 2012 | A1 |
20120110574 | Kumar | May 2012 | A1 |
20120221807 | Wade | Aug 2012 | A1 |
20120283008 | Martone | Nov 2012 | A1 |
20120284628 | Wong | Nov 2012 | A1 |
20120284712 | Nimmagadda | Nov 2012 | A1 |
20130007739 | Poddar | Jan 2013 | A1 |
20130044107 | Burch | Feb 2013 | A1 |
20130047039 | Manes | Feb 2013 | A1 |
20130139155 | Shah | May 2013 | A1 |
20130185715 | Dunning | Jul 2013 | A1 |
20130275595 | Hansen | Oct 2013 | A1 |
20130346842 | Koara | Dec 2013 | A1 |
20140115098 | Reich | Apr 2014 | A1 |
20140149978 | Subramanya | May 2014 | A1 |
20140188977 | Song | Jul 2014 | A1 |
20140196029 | Kannan | Jul 2014 | A1 |
20140245050 | Tsirkin | Aug 2014 | A1 |
20140283065 | Teddy | Sep 2014 | A1 |
20140283066 | Teddy | Sep 2014 | A1 |
20140289853 | Teddy | Sep 2014 | A1 |
20140380308 | Hassine | Dec 2014 | A1 |
20150058054 | Basu | Feb 2015 | A1 |
20150058837 | Govindankutty | Feb 2015 | A1 |
20150074646 | Herrin | Mar 2015 | A1 |
20150121086 | Smith | Apr 2015 | A1 |
20150128125 | Wilkinson | May 2015 | A1 |
20150142948 | Szabo | May 2015 | A1 |
20150149758 | Temporelli | May 2015 | A1 |
20150154081 | Javadekar | Jun 2015 | A1 |
20150160955 | Authement | Jun 2015 | A1 |
20150178108 | Tarasuk-Levin | Jun 2015 | A1 |
20150179999 | Kim | Jun 2015 | A1 |
20150350101 | Sinha | Dec 2015 | A1 |
Entry |
---|
Rimon Barr et al., JiST: Embedding Simulation Time into a Virtual Machine, 2003, [Retrieved on Aug. 21, 2020]. Retrieved from the internet: <URL: https://www.researchgate.net/profile/Robbert_Van_Renesse/publication/228704775> 16 Pages (1-16) (Year: 2003). |
Nuno Costa et al., Virtual Machines Applied to WSN's the state-of-the-art an classification, 2007 IEEE, [Retrieved on Aug. 21, 2020]. Retrieved from the internet: <URL: https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4300022> 8 pages (1-8) (Year: 2007). |
Jiang Bo et al., “MobileTest: A Tool Supporting Automatic Black Box Test for Software on Smart Mobile Devices,” May 20-26, 2007, Second International Workshop on Automation of Software Test (AST '07). [Retrieved on Jan. 10, 2019]. Retrieved from the internet: <URL: http://delivery.acm.org/10.1145/1280000/1270261/29710008.pdf> 7 pp. (1-7). |
Haikun Liu et al., “Live Migration of Virtual Machine Based on Full System Trace and Replay,” Jun. 11-13, 2009, HPDC '09 Proceedings of the 18th ACM international symposium on High performance distributed computing, [Retrieved on Jan. 10, 2019]. Retrieved from the internet: <URL: http://delivery.acm.org/10.1145/1560000/1551630/p101-liu.pdf> 10 pp. (101-110). |
Number | Date | Country | |
---|---|---|---|
20190243670 A1 | Aug 2019 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 14191322 | Feb 2014 | US |
Child | 16387328 | US |