Handling temporary files of a virtual machine

US 8 527 466B2

drawing #0

Show all 6 drawings

A method and system for handling temporary data of a virtual machine are described. In one embodiment, virtual machines are hosted by a server and accessed by remote clients over a network. The server assigns first storage and second storage to each virtual machine, where the first storage is designated for temporary data of a respective virtual machine and the second storage is designated for persistent data of a respective virtual machine. The server monitors events pertaining to the virtual machine. Upon detecting a predefined event pertaining to one of the virtual machines, the server causes at least a subset of the temporary data to be removed from the first storage of this virtual machine.

PatentSwarm provides a collaborative workspace to search, highlight, annotate, and monitor patent data.

Start free trial Sign in

Tip: Select text to highlight, annotate, search, or share the selection.

Claims

1. A computer-implemented method comprising:
identifying, by a virtual machine, a write operation requested by a guest operating system of the virtual machine or an application of the virtual machine;
determining, by the virtual machine, whether the write operation requested by the guest operating system or the application of the virtual machine pertains to a temporary file or persistent data;
if the write operation requested by the guest operating system or the application of the virtual machine pertains to the temporary file, causing the write operation requested by the guest operating system or the application of the virtual machine to be performed on a first disk assigned to the virtual machine, wherein the first disk assigned to the virtual machine is designated for temporary files of the virtual machine; and
if the write operation requested by the guest operating system or the application of the virtual machine pertains to the persistent data, causing the write operation requested by the guest operating system or the application of the virtual machine to be performed on a second disk assigned to the virtual machine, wherein the second disk assigned to the virtual machine is designated for the persistent data of the virtual machine.

Show 2 dependent claims

4. A computer-implemented method for a server hosting a plurality of virtual machines, the method comprising:
assigning, by the server, a first storage and a second storage to each of the plurality of virtual machines, the first storage being designated for temporary files of a respective virtual machine and the second storage being designated for persistent data of the respective virtual machine;
monitoring, by the server, events pertaining to the plurality of virtual machines;
upon detecting, by the server, a predefined event pertaining to one of the plurality of virtual machines, causing at least a subset of temporary files to be removed from the first storage of the one of the plurality of virtual machines; and
during a backup or archive operation, causing persistent data from the second storage of the one of the plurality of virtual machines to be copied without copying data from the first storage of the one of the plurality of virtual machines.

Show 5 dependent claims

10. A system comprising:
data storage to store a plurality of first disks designated for temporary files and a plurality of second disks designated for persistent data; and
a host computing device coupled to the data storage to run a plurality of virtual machines, wherein the host computing device further comprises a temporary files manager operable to
assign a first disk of the plurality of first disks designated for temporary files and a second disk of the plurality of second disks designated for persistent data to each virtual machine,
monitor events pertaining to the plurality of virtual machines,
detect a predefined event pertaining to one of the plurality of virtual machines,
in response to the detected event, cause at least a subset of temporary files to be removed from the first disk of the one of the plurality of virtual machines, and
during a backup or archive operation, cause persistent data from the second storage of the one of the plurality of virtual machines to be copied without copying data from the first storage of the one of the plurality of virtual machines.

Show 4 dependent claims

15. A non-transitory computer readable storage medium including instructions that, when executed by a processing system, cause the processing system to perform a method comprising:
assigning, by the server, a first storage and a second storage to each virtual machine, the first storage being designated for temporary files of a respective virtual machine and the second storage being designated for persistent data of the respective virtual machine;
monitoring, by the server, events pertaining to the plurality of virtual machines;
detecting, by the server, a predefined event pertaining to one of the plurality of virtual machines;
causing at least a subset of the temporary files to be removed from the first storage of the one of the plurality of virtual machines; and
during a backup or archive operation, causing the persistent data from the second storage of the one of the plurality of virtual machines to be copied without copying the temporary files from the first storage of the one of the plurality of virtual machines.

Show 5 dependent claims

Description

TECHNICAL FIELD

Embodiments of the present invention relate to management of virtual machines, and more specifically, to handling temporary files of virtual machines.

BACKGROUND

Virtualization allows multiplexing of the underlying host machine between different virtual machines. The host computer allocates a certain amount of its resources to each of the virtual machines. Each virtual machine is then able to use the allocated resources to execute applications, including operating systems (referred to as guest operating systems). The software layer providing the virtualization is commonly referred to as a hypervisor and is also known as a virtual machine monitor (VMM), a kernel-based hypervisor or a host operating system. The hypervisor emulates the underlying hardware of the host computer, making the use of the virtual machine transparent to the guest operating system and the user of the computer.

In some systems, the host is a centralized server that is partitioned into multiple virtual machines to provide virtual desktops to the users. The centralized host manages the allocation of disk storage to the virtual machines. Some hosts pre-allocate a fixed amount of disk storage to each virtual machine. However, a virtual machine often expands and outgrows the pre-allocated storage space. One reason for the expansion is a growing number of temporary files created by a virtual machine. In a non-virtualized environment, when a machine shuts down, temporary files are automatically discarded. In a virtualized environment, however, there is no efficient mechanism for removing temporary files created by virtual machines. As a result, the accumulation of the temporary files in the disk storage can affect the performance of virtual machines and reduce the speed of disk backup operations.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by way of limitation, and can be more fully understood with reference to the following detailed description when considered in connection with the figures in which:

FIG. 1 illustrates an exemplary network architecture in which embodiments of the present invention may operate.

FIG. 2 is a block diagram illustrating one embodiment of a virtual machine and a temporary files manager.

FIG. 3 is a flow diagram illustrating a method for handling temporary files by a guest operating system, in accordance with one embodiment of the present invention.

FIG. 4 is a flow diagram illustrating a server-based method for managing temporary files of virtual machines, in accordance with one embodiment of the present invention.

FIG. 5 illustrates a diagrammatic representation of a machine in the exemplary form of a computer system, in accordance with one embodiment of the present invention.

DETAILED DESCRIPTION

A method and system for handling temporary files of virtual machines are described. Virtual machines may be hosted by a server and accessed by remote clients over a network. Each virtual machine is configured to write temporary files to a separate storage device. The server monitors events pertaining to various virtual machines. Upon detecting a predefined event pertaining to one of the virtual machines, the server causes temporary files of this virtual machine to be removed from a corresponding storage device.

In the following description, numerous details are set forth. It will be apparent, however, to one skilled in the art, that the present invention may be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention.

Some portions of the detailed descriptions which follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means 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 steps leading to a desired result. The steps 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, transferred, 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 following discussion, it is appreciated that throughout the description, discussions utilizing terms such as deleting, de-allocating, linking, modifying, identifying, 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, transmission or display devices.

The present invention also relates to an apparatus for performing the operations herein. This apparatus may be specially constructed for the required 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 more specialized apparatus to perform the required method steps. The required structure for a variety of these systems will appear as set forth in the description below. In addition, the present invention 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 invention as described herein.

The present invention 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 invention. A machine-readable medium includes any mechanism for storing or transmitting 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 (e.g., read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash memory devices, etc.), a machine (e.g., computer) readable transmission medium (electrical, optical, acoustical or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.)), etc.

FIG. 1 illustrates an exemplary network architecture 100 in which embodiments of the present invention may operate. The network architecture 100 may include a host 103 coupled to one or more clients 101 over a network 102. The network 102 may be a private network (e.g., a local area network (LAN), wide area network (WAN), intranet, etc.) or a public network (e.g., the Internet). The host 103 may be coupled to a host controller 107 (via a network or directly). Alternatively, the host controller 107 may be part of the host 103.

In one embodiment, the clients 101 may include computing devices that have a wide range of processing capabilities. Some or all of the clients 101 may be thin clients, which serve as access terminals for users and depend primarily on the host 103 for processing activities. For example, the client 101 may be a desktop computer, laptop computer, cellular phone, personal digital assistant (PDA), etc. The client 101 may run client applications such as a Web browser and a graphic user interface (GUI). The client 101 may also run other client applications to receive multimedia data streams or other data sent from the host 103 and re-direct the received data to a display or other user interface.

In one embodiment, the host 103 includes a server or a cluster of servers to run one or more virtual machines 131. Each virtual machine 131 runs a guest operating system (OS) that may be different from one another. The guest OS may include Microsoft Windows, Linux, Solaris, Mac OS, etc. The host 103 may include a hypervisor (not shown) that emulates the underlying hardware platform for the virtual machines 131. The hypervisor may also be known as a virtual machine monitor (VMM), a kernel-based hypervisor or a host operating system.

Each virtual machine 131 can be accessed by one or more of the clients 101 over the network 102. In one scenario, the virtual machine 131 can provide a virtual desktop for the client 101. The virtual machines 131 can be managed by the host controller 107. The host controller 107 may also add a virtual machine, delete a virtual machine, balance the load on the server cluster, provide directory service to the virtual machines 131, and perform other management functions.

The host 103 may also be coupled to data stores hosting images 120 and 122 of storage devices (e.g., disks) that store data of the virtual machines 131. These storage devices may be part of local storage of the host 103 or remote storage (e.g., a storage area network (SAN) or network attached storage (NAS)) coupled to the host 103. The data stores (e.g., repositories) hosting images 120 and 122 may reside on a single or multiple storage devices that may also be part of local storage of the host 103 or remote storage coupled to the host 103. Images 120 and 122 of an individual virtual machine may be stored in one repository or different repositories. In addition, if a virtual machine has two or more users, a separate set of images 120, 122 may be associated with each individual user and may be stored in a single repository or different repositories.

During operation, virtual machines 131 may create persistent data such as user profiles, database records, word processing documents, etc. In addition, guest operating systems and applications of virtual machines 131 often create temporary files such as temporary Internet files created by a web browser or an email utility application. Some of these temporary files (e.g., cached web pages, cached video and audio files, etc.) are not getting deleted when a respective program is closed. The temporary files left behind by the programs accumulate over time and can take up a significant amount of storage space.

Embodiments of the present invention address the above problem by assigning, to each virtual machine 131, one or more disks designated for persistent data and a separate disk designated for temporary files. The disks designated for persistent data and the disks designated for temporary files may be of two different types. In particular, the disks designated for temporary files may use a significantly cheaper and less redundant storage due to the short-lived nature of their contents.

In FIG. 1, images of disks designated for persistent data are shown as virtual machine (VM) disk images 1 (images 122), and images of disks designated for temporary files are shown as VM disk images 2 (images 120). In one embodiment, the guest operating system of each virtual machine 131 is configured to use VM disk images 122 for write operations associated with persistent data and to use VM disk images 120 for write operations pertaining to temporary files. The temporary files are then periodically removed from VM disk images 120 by a temporary files manager 132 of the host 103.

Citations

US 8,365,020 B2 - Mechanism for saving crash dump files of a virtual machine on a designated disk
A mechanism for saving crash dump files of a virtual machine (VM) on a designated disk is disclosed. A method of embodiments of the invention...

US 2008 98,161 A1 - MEMORY DEVICE AND CONTROL METHOD THEREOF
A control method of a memory device including a storage area formed of a nonvolatile semiconductor memory, includes updating a file stored in the storage...

US 2009 157,942 A1 - Techniques For Data Storage Device Virtualization
A data storage device comprises virtual storage devices that are each assigned to a subset of data sectors in a non-volatile memory of the data...

US 2008 127,348 A1 - NETWORK COMPUTER SYSTEM AND METHOD USING THIN USER CLIENT AND VIRTUAL MACHINE TO PROVIDE IMMUNITY TO HACKING, VIRUSES AND SPY WARE
Network computer system and method using thin user client and virtual machine to provide immunity to hacking, viruses and spyware. A system architecture and computing...

US 2007 6,226 A1 - Failure management for a virtualized computing environment
For failure management for multiple operating systems in a virtual environment, an external virtual machine or agent is provided that has been granted rights to...

US 8,060,476 B1 - Backup systems and methods for a virtual computing environment
Improved backup and storage operations are disclosed for virtual computing environments using a backup proxy server to perform storage operations on one or more virtual...

US 2010 83,250 A1 - Virtual machine system, and method for managing thereof
According to an aspect of the embodiment, a host virtual machine operated on the CPU controls the virtual machine system and a guest virtual machine,...

US 2007 112,812 A1 - System and method for writing data to a directory
A system and method are provided for processing directory service operations. The system includes a client device communicatively coupled to one or more directory servers....

US 2009 172,409 A1 - CORE DUMP PRIVACY DURING APPLICATION FAILURE
Embodiments of the present invention address deficiencies of the art in respect to core dump generation during application fault handling and provide a method, system...

US 7,925,923 B1 - Migrating a virtual machine in response to failure of an instruction to execute
A virtual machine is migrated from a first physical machine to a second physical machine in response to a failure of an instruction to execute....

US 2007 255,926 A1 - RADIO FREQUENCY VOLTAGE CONTROLLED OSCILLATORS
An apparatus for file system management includes a non-volatile storage device, a volatile memory device, and a processing unit. The non-volatile storage device stores a...

US 8,024,566 B2 - Persistent storage implementations for session data within a multi-tiered enterprise network
A system is described in which similar session objects are managed within session domains. In addition, in one embodiment, a persistence storage interface is employed...

US 7,899,788 B2 - Using a data protection server to backup and restore data on virtual servers
A method and system for backing up and restoring data of virtual machines. A virtual machine may be discovered through a directory service or via...

US 2010 251,219 A1 - TRACING OBJECTS IN OBJECT-ORIENTED PROGRAMMING MODEL
A system and associated method for tracing state information of a target object. The target object is a data item of an application object executed...

US 8,041,887 B2 - Memory device and control method thereof
A control method of a memory device including a storage area formed of a nonvolatile semiconductor memory, includes updating a file stored in the storage...

US 2011 231,710 A1 - Mechanism for Saving Crash Dump Files of a Virtual Machine on a Designated Disk
A mechanism for saving crash dump files of a virtual machine (VM) on a designated disk is disclosed. A method of embodiments of the invention...

US 2008 162,760 A1 - EFFICIENT RESOURCE ARBITRATION
Resource requests are allocated by storing resource requests in a queue slots in a queue. A token is associated with one of the queue slots....

US 2009 234,987 A1 - Efficient, Scalable and High Performance Mechanism for Handling IO Requests
A system, apparatus and method for managing input/output requests in a multi-processor system is disclosed. An IO coherence unit includes an IO request handler, a...

US 2011 154,133 A1 - TECHNIQUES FOR ENHANCING FIRMWARE-ASSISTED SYSTEM DUMP IN A VIRTUALIZED COMPUTER SYSTEM EMPLOYING ACTIVE MEMORY SHARING
A technique for performing a system dump in a data processing system that implements active memory sharing includes assigning, via a hypervisor, a logical partition...

US 2009 248,949 A1 - System and Method for Increased System Availability In Virtualized Environments
A method is provided for managing errors in a virtualized information handling system that includes an error detection system and a hypervisor allowing multiple virtual...

US 2010 306,770 A1 - METHOD AND APPARATUS FOR SWAPPING VIRTUAL MACHINE MEMORY
A method and system for swapping memory of a virtual machine are described. In one embodiment, virtual machines are hosted by a server and accessed...

US 2009 228,743 A1 - DATA PROCESSING SYSTEM AND METHOD
A data processing system for logging memory access data; the data processing system having a memory management unit to support a virtual memory environment having...

US 2010 235,831 A1 - Method for dynamic configuration of virtual machine
A set of programs enable the start and the efficient and secure operation of an operating system (OS) installed on a virtual hard disk that...

US 8,019,789 B2 - System and method of object-oriented persistence
A system and method for handling an application's access of persisted objects for use within a mobile communications device. The device includes a non-volatile storage...

US 8,156,492 B2 - System and method to improve memory usage in virtual machines running as hypervisor guests
A system and method to improve memory usage in virtual machines running as hypervisor guests. In accordance with an embodiment, the invention provides a system...

US 2007 192,329 A1 - METHODS AND SYSTEMS FOR EXECUTING, BY A VIRTUAL MACHINE, AN APPLICATION PROGRAM REQUESTED BY A CLIENT MACHINE
A method for executing, by a virtual machine, an application program requested by a client machine includes the step of receiving a file including access...

US 2006 143,534 A1 - Diagnostic memory dumping
A computer-implemented method is disclosed which includes steps of: (A) receiving a memory dump request from a first operating system executing in a computer; and...

US 2008 163,008 A1 - SPECULATIVE CACHE TAG EVALUATION
A cache tag comparison unit in a cache controller evaluates tag data and error correction codes to determine if there is a cache hit or...

US 2006 26,585 A1 - Automatic upgrade of pluggable components
When a component is to be loaded or executed, the version of the component to be loaded may be compared with available versions of the...

US 2010 280,997 A1 - COPYING A DIFFERENTIAL DATA STORE INTO TEMPORARY STORAGE MEDIA IN RESPONSE TO A REQUEST
A plurality of differential data stores are stored in persistent storage media. In response to receiving a first request to store a particular data object,...

US 2007 271,610 A1 - Method and apparatus to detect kernel mode rootkit events through virtualization traps
Detecting a rootkit in a computing system may be achieved by detecting, by a virtual machine monitor, a virtualization trap occurring as a result of...

US 6,854,115 B1 - Process persistence in a virtual machine
A system and method for providing process persistence in a virtual machine are described. A virtual persistent heap may be provided. The virtual persistent heap...

US 7,529,897 B1 - Generating and using checkpoints in a virtual computer system
To generate a checkpoint for a virtual machine (VM), first, while the VM is still running, a copy-on-write (COW) disk file is created pointing to...

US 2007 226,443 A1 - File systems for data processing systems
A method for dynamically optimizing file systems based on user access patterns or other parameters. According to an embodiment of the present invention, a list...

PatentSwarm provides a collaborative workspace to search, highlight, annotate, and monitor patent data.

Start free trial Sign in