Backing up virtual machines

US 9 959 177B2

drawing #0

Show all 7 drawings

A processing device generates a live snapshot of a virtual disk image attached to a virtual machine, wherein generating the live snapshot comprises converting an existing read-write volume to a read-only volume. The processing device generates, from the read-only volume, a temporary snapshot of the virtual disk image, the temporary snapshot comprising a temporary read-write volume. The processing device attaches the temporary snapshot of the virtual disk image to a backup component and causes at least one of the backup component or a backup service to backup the virtual disk image from the attached temporary snapshot.

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 method comprising:
generating, by a processing device, a live snapshot of a virtual disk image attached to a virtual machine, wherein generating the live snapshot comprises:
generating a new read-write volume for the virtual machine;
flushing data from a cache of the virtual machine to the virtual disk image;
converting an existing read-write volume of the virtual disk image to a read-only volume; and
configuring the new read-write volume as an active volume for the virtual machine, the new read-write volume to record differences from the read-only volume;
generating, by the processing device, a temporary snapshot of the read-only volume of the live snapshot, the temporary snapshot comprising a temporary read-write volume and temporary read-only volumes, wherein the temporary read-only volumes of the temporary snapshot comprise previous temporary volumes that precede the temporary read-write volume, and wherein the temporary read-write volume is based on the previous temporary volumes and indicates differences from the previous temporary volumes;
attaching the temporary snapshot to a backup component comprising a virtual appliance hosted by a virtual machine executed by the processing device, wherein the temporary snapshot is exposed at a system level of the virtual machine and to the backup component while not exposed at a user level of the virtual machine, and wherein the temporary read-write volume is written to by the backup component without altering data in the temporary read-only volumes of the temporary snapshot; and
causing at least one of the backup component or a backup service to backup the virtual disk image from the attached temporary snapshot.

Show 4 dependent claims

6. A non-transitory computer-readable storage medium having instructions that, when executed by a processing device, cause the processing device to:
generate, by the processing device, a live snapshot of a virtual disk image attached to a virtual machine, wherein generating the live snapshot comprises the processing device to:
generate a new read-write volume for the virtual machine;
flush data from a cache of the virtual machine to the virtual disk image;
convert an existing read-write volume of the virtual disk image to a read-only volume; and
configure the new read-write volume as an active volume for the virtual machine, the new read-write volume to record differences from the read-only volume;
generate, by the processing device, a temporary snapshot of the read-only volume of the live snapshot, the temporary snapshot comprising a temporary read-write volume and temporary read-only volumes, and wherein the temporary read-only volumes of the temporary snapshot comprise previous temporary volumes that precede the temporary read-write volume, and wherein the temporary read-write volume is based on the previous temporary volumes and indicates differences from the previous temporary volumes;
attach the temporary snapshot to a backup component comprising a virtual appliance hosted by a virtual machine executed by the processing device, wherein the temporary snapshot is exposed at a system level of the virtual machine and to the backup component while not exposed at a user level of the virtual machine, and wherein the temporary read-write volume is written to by the backup component without altering data in the temporary read-only volumes of the temporary snapshot; and
cause at least one of the backup component or a backup service to backup the virtual disk image from the attached temporary snapshot.

Show 4 dependent claims

11. A computing device comprising:
a memory; and
a processing device operatively coupled to the memory, wherein the processing device is to:
generate a live snapshot of a virtual disk image attached to a virtual machine, wherein generating the live snapshot comprises the processing device to:
generate a new read-write volume for the virtual machine;
flush data from a cache of the virtual machine to the virtual disk image;
convert an existing read-write volume of the virtual disk image to a read-only volume; and
configure the new read-write volume as an active volume for the virtual machine, the new read-write volume to record differences from the read-only volume;
generate a temporary snapshot of the read-only volume of the live snapshot, the temporary snapshot comprising a temporary read-write volume and temporary read-only volumes, and wherein the temporary read-only volumes of the temporary snapshot comprise previous temporary volumes that precede the temporary read-write volume, and wherein the temporary read-write volume is based on the previous temporary volumes and indicates differences from the previous temporary volumes;
attach the temporary snapshot to a backup component comprising a virtual appliance hosted by a virtual machine executed by the processing device, wherein the temporary snapshot is exposed at a system level of the virtual machine and to the backup component while not exposed at a user level of the virtual machine, and wherein the temporary read-write volume is written to by the backup component without altering data in the temporary read-only volumes of the temporary snapshot; and
cause at least one of the backup component or a backup service to backup the virtual disk image from the attached temporary snapshot.

Show 4 dependent claims

Description

TECHNICAL FIELD

Embodiments of the present invention relate to virtual machines, and more specifically to backing up virtual machines.

BACKGROUND

Many backup services are unable to backup disks attached to running virtual machines, or to backup the state of live virtual machines.

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 is a block diagram of a network architecture for a virtual machine management system, in accordance with one implementation.

FIG. 2 is a block diagram that illustrates an embodiment of a computer system that hosts one or more virtual machines and virtual appliances.

FIG. 3 is a sequence diagram illustrating one embodiment for importing a virtual disk image to a virtual machine management system.

FIG. 4 is a flow diagram illustrating one embodiment for a method of backing up a live virtual machine.

FIG. 5 is a flow diagram illustrating one embodiment for a method of recovering from a crash that occurred during backup of a virtual machine.

FIG. 6 illustrates a diagrammatic representation of a machine in the exemplary form of a computer system.

DETAILED DESCRIPTION

Described herein is a method and system for backing up virtual disk images attached to virtual machines. Traditionally backup systems have difficulty generating successful backups of active virtual disk images that are attached to live virtual machines. Backup systems may also have difficulty backing up a state of a running virtual machine. Embodiments described herein provide a virtual machine management system that facilitates the backup and restore of virtual disk images and of the states of running virtual machines.

In some embodiments a backup manager and/or backup module prepares an active (in-use) virtual disk image for backup by generating a live snapshot of the virtual disk image while the virtual disk image is attached to a virtual machine. The backup manager or backup module subsequently creates a temporary snapshot of a read-only volume created by the live snapshot operation. The temporary snapshot is then attached to a virtual backup appliance or to a backup application running on a host. A backup service is then able to perform a backup of the temporary snapshot.

As part of the backup process the backup service may write to the temporary snapshot. This written data is inconsequential to the virtual disk image that is being backed up. Once the backup of the virtual disk image as represented by the temporary snapshot is complete, the temporary snapshot (including any new data written to the temporary snapshot by the backup service) is detached from the virtual backup appliance or backup application and then deleted. Thus, the temporary snapshot enables backup of the read-only volume to be performed even by backup services that write to the virtual disk image as part of the backup operation.

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 embodiments of the present invention.

FIG. 1 is a block diagram of a network architecture of a virtual machine management system 100. Machines in the virtual machine management system 100 may be connected via a network (not shown). The network may include a private network (e.g., a local area network (LAN), wide area network (WAN), intranet, etc.) and/or a public network (e.g., the Internet). The virtual machine management system 100 may include one or more host machines 103, 104, one or more data stores, 135, 180 and/or a server system 102 that includes a backup service. Alternatively, the server system 102 may be external to the virtual machine management system 100, and may communicate with the host machines 103, 105 via the network or another network.

The host machines 103, 105 may be computer systems that run and/or manage virtual machines. One example host machine is illustrated and discussed in greater detail with reference to FIG. 2. Host machines may have independent data stores (e.g., independent data store 180) and/or may have access to a shared data store (e.g., shared data store 135). Data stores may include internal or external disk drives, solid state drives (SSDs) and/or other persistent storage devices that are connected to individual host machines or a network. Some or all of the host machines 103, 105 may be arranged into one or more clusters. A shared data store 135 may be a network attached storage (NAS), storage area network (SAN), cloud storage, or other shared storage that is accessible to multiple host machines in a cluster.

Host machine 103 includes a global manager 170. The global manager 170 may be a virtualization management application that manages hardware nodes (host machines 105), storage and network resources. The global manager 170 deploys and monitors virtual machines (VMs) running in a data center. The global manager 170 may provide a user interface that enables an administrator to view and manage all aspects of a data center. Additionally, the global manager 170 may perform such actions as migrating virtual machines between host machines, configuring new host machines to act as nodes in the virtual management system 100, managing loads and resource utilization on host machines and virtual machines, managing resource quotas (e.g., storage quotas), facilitating backup of VMs, and so on.

The VM management system 100 may include multiple host machines 105, which may be arranged in one or more clusters. Each host machine 105 may include a node manager 175 that manages a hypervisor (not shown) running on the host machine 105 and that further interfaces with the global manager 170. The node manager 175 may load new virtual machines onto the hypervisor, perform or initiate backup operations for virtual disk images and/or for the state of virtual machines, coordinate with other node managers to migrate VMs, and perform other operations with respect to the virtual machines and the hypervisor running on a same host machine as the node manager 175.

In one embodiment, global manager 170 includes a backup manager 110. Backup service 130 running on a server system 102 (that may be internal or external to the virtual machine management system 100) may coordinate with backup manager 110 to backup virtual disk images (e.g., virtual disk image 138). Examples of backup services include IBM® Tivoli® Storage Manager, Symantec® Backup Exec, EMU® RecoverPoint, and so on.

In one embodiment, backup manager 110 includes an application programming interface (API) that the backup service 130 or another application can access to perform live snapshots, to attach and/or detach snapshots, and/or to perform other operations associated with backing up a virtual disk image. To initiate a backup of a virtual disk image (and possibly the state of a virtual machine), the backup service 130 may use the API to designate a particular virtual machine and/or virtual disk image using one or more of a storage pool identifier that identifies a storage pool in which the virtual disk image is located, a storage domain identifier that identifies a storage domain within the storage pool, an image identifier that identifies the virtual disk image, a volume identifier that identifies which version of the virtual disk image is to be backed up, a media access control (MAC) address of the virtual machine, a port associated with the virtual machine, a virtual local area network (VLAN) address used by the virtual machine, and so on. The backup service may also request to backup, for example, all virtual disk images that are stored in a particular storage pool or storage domain. The backup service may also request to backup all volumes of a particular virtual disk image. Embodiments are described herein with reference to backup of a single virtual disk image or virtual machine, and in particular to a particular volume of a single virtual disk image. However, the described embodiments may also apply to backup of multiple virtual disk images and/or multiple volumes of virtual disk images.

Some or all of the host machines 105 may include a backup component 172, which may be a host backup application that runs on the host machine or a virtual backup appliance that runs inside of a virtual machine hosted by the host machine 105. The backup component 172 may be responsible for attaching or mounting a virtual disk image that is to be backed up, as well as performing or initiating backup operations.

The node manager 175 running on each host machine 105 may additionally include a backup module 112 that performs one or more operations to facilitate a backup operation based on instructions received from the backup manager 110.

Responsive to a request from backup service 130 or another requestor to backup a particular virtual disk image or virtual machine, backup manager 110 may perform a sequence of operations to prepare that virtual disk image or virtual machine for backup. Backup manager 110 may additionally perform such operations to prepare a virtual disk image or virtual machine for backup without first receiving any request from the backup service 130 or other requestor. In either instance, backup manager 110 may instruct or notify the backup service 130 to perform backup of the prepared virtual machine after that virtual machine has been prepared.

In one embodiment, to prepare a running virtual machine and/or a virtual disk image attached to the running virtual machine for backup, a snapshot initiator 132 of the backup manager 110 causes a snapshot to be taken of the virtual disk image. This may include directing a snapshot module 134 of the backup module 112 to generate a live snapshot of the virtual disk image. Generating the live snapshot may include creating a new empty read-write volume of the virtual disk image, flushing all data from a cache of the virtual machine to a current volume of the virtual disk image, transitioning the current volume from a read-write state to a read-only state, and then making the new volume active. Thereafter, any new writes are made to the new volume, and not to the volume that was transitioned to a read-only state. Snapshot module 134 may additionally save a virtual machine configuration of the virtual machine and/or a disk configuration of the virtual disk image to capture the state of the virtual machine.

After the live snapshot is complete, snapshot module 134 generates a temporary snapshot of the read-only volume that represents the state of the virtual disk image at the time that the backup was requested. In one embodiment, snapshot module 134 generates the temporary snapshot responsive to a request from the backup manager 110 to attach the read-only volume to the backup component 172. Temporary snapshots are discussed in greater detail below with reference to FIG. 3.

Embodiments of the present invention also relate 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 system selectively programmed by a computer program stored in the computer system. 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 disk storage media, optical storage media, flash memory devices, other type of machine-accessible storage media, 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 above. 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.

It is to be understood that the above description is intended to be illustrative, and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. Although the present invention has been described with reference to specific exemplary embodiments, it will be recognized that the invention is not limited to the embodiments described, but can be practiced with modification and alteration within the spirit and scope of the appended claims. Accordingly, the specification and drawings are to be regarded in an illustrative sense rather than a restrictive sense. The scope of the invention should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.

Citations

US 2010 11,178 A1 - SYSTEMS AND METHODS FOR PERFORMING BACKUP OPERATIONS OF VIRTUAL MACHINE FILES
Backup systems and methods are disclosed for a virtual computing environment. Certain examples include a system having a backup management server that communicates with a...

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 2014 365,740 A1 - Virtual Machine Backup from Storage Snapshot
Disclosed herein are system, method, and computer program product embodiments for virtual machine (VM) backup from a storage snapshot. An embodiment operates by receiving selective...

US 8,566,542 B1 - Backup using storage array LUN level snapshot
A method is provided to back up a virtual machine running on a physical host server. The virtual machine has a virtual disk stored on...

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

Start free trial Sign in