A software implementation of a computing device is called a virtual machine. A virtual machine executes programs like a physical computing device. Virtual peripheral devices of the virtual machine may differ from physical peripheral devices of a physical computing device upon which the virtual machine executes. For example, a virtual machine may have a given number of virtual disks, while the physical computing device upon which the virtual machine executes may have a different number of physical disks, or no physical disks. Similarly, an operating system of a virtual machine may differ from an operating system of the physical computing device on which the virtual machine executes. In addition, a single physical computing device may have a number of virtual machines executing thereon.
A virtualization platform executes on a physical computing device and provides an infrastructure in which virtual machines can execute. The virtualization platform provides virtual devices to the virtual machines, manages resources of the virtual machines and a physical computing device on which the virtual machines execute, and manages application program interfaces (APIs) for the virtual machines, as well as performing other functions.
A process of moving a virtual machine from a first physical computing device, which currently executes the virtual machine (a source host), to a second physical computing device (a destination host) is called live migration. In this specification, the term “live migration” refers to a moving of an executing, or running, virtual machine from a source host to a destination host. One common implementation of live migration includes establishing a network connection between a first virtualization platform of the source host and a second virtualization platform of the destination host. A runtime state (including, but not limited to, a memory of a virtual machine, a state of virtual processors of the virtual machine and a state of virtual devices of the virtual machine) of the virtual machine executing within the first virtualization platform may be transferred to the second virtualization platform via the established network connection. In some implementations, the network connection may be a transmission control protocol (TCP) connection. However, other types of network connections are also possible.
A live migration moves the virtual machine from the first physical computing device to the second physical computing device. However, it is commonly understood that files used by the virtual machine are not moved during the live migration. As a result, the files used by the virtual machine, which may include, but not be limited to, virtual hard disk (VHD) files, are stored in some form of shared storage such that the first virtualization platform at the first physical computing device and the second virtualization platform at the second physical computing device both have access to the files used by the virtual machine. The shared storage may include, but not be limited to, a storage area network (SAN), a file share including, but not limited to, a server message block (SMB) or a network file system (NFS), or another form of shared storage accessible to the first physical computing device and the second physical computing device.
Typically, a live migration is performed in two phases, a “brownout phase” and a “blackout phase”. During the brownout phase, the first virtualization platform on the first physical computing device, or the source host, sets up a copy of the virtual machine on the second physical computing device, or the destination host while the virtual machine executes on the first physical computing device. In order to minimize a duration of the blackout phase, during the brownout phase, the live migration usually tracks changes to the runtime state of the executing virtual machine and potentially transfers, from the first virtualization platform to the second virtualization platform, a portion of the runtime state that changed in order to reduce a size of any remaining runtime state changes to be performed before leaving the blackout phase.
During the “blackout phase”, the virtual machine executing on the first virtualization platform is stopped (or paused), ownership of the virtual machine is transferred to the second virtualization platform, and the virtual machine is restored and started (or resumed) on the second virtualization platform. Only a small remaining portion of the runtime state is transferred to the second virtualization platform during the blackout phase.
A storage migration is a process in which files used by a virtual machine in a virtualization platform are moved from a current storage location (a source location) to another storage location (a destination location). The files may include, but not be limited to, VHD files and configuration files which store settings of a virtual machine. One common implementation of storage migration for a running virtual machine includes a “mirroring” phase, during which all disk write operations performed by the virtual machine are performed with respect to virtual disk files at the source location and at the destination location. After a complete copy of the virtual disk files from the source location is created at the destination location, the virtual machine is switched over to use only the virtual disk files at the destination location and the virtual disk files in the source location may be deleted. Storage migration does not move the virtual machine. Only the storage location of the files used by the virtual machine is changed. Therefore, one limitation of source migration is that the source location and the destination location are both accessible from the virtual machine.