A hypervisor-exchange process includes: suspending, by an “old” hypervisor, resident virtual machines; exchanging the old hypervisor for a new hypervisor, and resuming, by the new hypervisor, the resident virtual machines. The suspending can include “in-memory” suspension of the virtual machines until the virtual machines are resumed by the new hypervisor. Thus, there is no need to load the virtual machines from storage prior to the resuming. As a result, any interruption of the virtual machines is minimized. In some embodiments, the resident virtual machines are migrated onto one or more host virtual machines to reduce the number of virtual machines being suspended.
|
1. A hypervisor-exchange process comprising:
suspending, by an old hypervisor, each virtual machine instance of a virtual-machine set of at least one virtual machine executing on the old hypervisor, at least a portion of each virtual machine instance being stored in memory controlled by the old hypervisor;
in response to the suspending, creating, by the old hypervisor, a memory map, the memory map preserving a state of each virtual machine instance of the virtual machine set of the at least one virtual machine executing on the old hypervisor;
replacing the old hypervisor with a new hypervisor while each virtual machine instance of the virtual machine set is suspended, the replacing including tearing down the old hypervisor and launching the new hypervisor so that the new hypervisor assumes control of the memory originally controlled by the old hypervisor, wherein said old hypervisor suspends said each virtual machine instance of said virtual-machine set of said at least one virtual machine in memory such that said each virtual machine instance of said virtual-machine set of said at least one virtual machine can be resumed without having to be loaded first into memory, and wherein the old hypervisor passes the memory map to the new hypervisor while completing the tearing down and after the new hypervisor is launched; and
resuming, by the new hypervisor, each virtual machine instance having at least a portion stored in the memory originally controlled by the old hypervisor, said resuming performed without requiring copying of any portion of any of said each virtual machine instance.
6. A hypervisor-exchange system comprising media encoded with code that, when executed by a processor, implements a process including:
suspending, by an old hypervisor, each virtual machine instance of a virtual-machine set of at least one virtual machine executing on the old hypervisor, at least a portion of each virtual machine instance being stored in memory controlled by the old hypervisor;
in response to the suspending, creating, by the old hypervisor, a memory map, the memory map preserving a state of each virtual machine instance of the virtual machine set of the at least one virtual machine executing on the old hypervisor;
replacing the old hypervisor with a new hypervisor while each virtual machine instance of the virtual machine set is suspended, the replacing including tearing down of the old hypervisor and launching the new hypervisor so that the new hypervisor assumes control of the memory originally controlled by the old hypervisor, wherein said old hypervisor suspends said each virtual machine instance of said virtual-machine set of said at least one virtual machine in memory such that said each virtual machine instance of said virtual-machine set of said at least one virtual machine can be resumed without having to be loaded first into memory, and wherein the old hypervisor passes the memory map to the new hypervisor while completing the tearing down and after the new hypervisor is launched; and
resuming, by the new hypervisor, each virtual machine instance having at least a portion stored in the memory originally controlled by the old hypervisor, said resuming performed without requiring copying of any portion of any of said each virtual machine instance.
2. The hypervisor-exchange process of
3. The hypervisor-exchange process of
4. The hypervisor-exchange process of
5. The hypervisor-exchange process of
7. The hypervisor-exchange process of
8. The hypervisor-exchange system of
9. The hypervisor-exchange system of
10. The hypervisor-exchange system of
|
Upgrading a hypervisor can involve shutting down the virtual-machines hosted by the hypervisor. Depending on the mission(s) to which the virtual machines have been dedicated, the shutdown may be costly or otherwise unacceptable. To avoid the shutdown, the virtual machines can be migrated to a standby machine, e.g., using a product such as vMotion, available from VMware, Inc. For example, when upgrading ESX, available from VMware, Inc., the host is put in a maintenance mode that will migrate all the virtual machines from the host machine to a standby machine. While the virtual machines execute on the standby machine, the original host machine can be provided with an upgraded hypervisor. The virtual machines can be migrated back, completing the upgrade. Of course, if the standby machine has an instance of the upgraded hypervisor, the return migration may be omitted.
Relying on migration to a standby machine to avoid shutting down virtual machines can be problematic. First of all, the required standby machine may not be available. Also, depending on the number of virtual machines and/or their average size, each migration may consume considerable network bandwidth for an extended duration, depriving other network nodes of the bandwidth they may need. For example, a large virtual-machine system can include more than 100 gigabytes (GB) that must be migrated. Accordingly, there remains a need for a less burdensome approach to upgrading (or reverting, downgrading, cross-grading or otherwise updating or exchanging) hypervisors.
The present invention calls for: suspending, by an old hypervisor, virtual machines; exchanging the old hypervisor for a new hypervisor; and the new hypervisor resuming the virtual machines. Some hypervisors suspend a virtual machine to disk. However, in accordance with an aspect of the invention, the old hypervisor suspends virtual machines in memory so that they can be resumed without having to be loaded first into memory. This in-memory suspension greatly reduces any interruption of virtual machines involved in upgrading or otherwise exchanging hypervisors.
For example, as shown in
Host machine 102 includes processors 108, communications devices 110, and memory 112. Communications devices 110 can include network interface cards (NICs) for network connections and storage controllers for communicating with storage 106. Memory 112 can be volatile dynamic random-access memory (DRAM) or non-volatile random-access memory NVRAM.
Memory 112 and storage 106 are media encoded with code that, when executed by processors, defines software processes of an “old” hypervisor 120, and virtual machines VM1, VM2, . . . VMN, that execute on old hypervisor 120. Each software entity can include components stored in memory 112 and components stored in storage 106. For old hypervisor 120, component 120′ is stored in memory 112 and component 120″ is stored in storage 106. For virtual machines VM1, VM2, VMN, components VM1′, VM2′, VMN′ are stored in memory 112; components VM1″, VM2″, VMN″ are stored in storage 106.
In addition to old hypervisor component 120′ and virtual memory components VM1′-VMN′, memory 112 includes a memory map 122. Memory map 122 includes metadata that describes the virtual machines and identifies the portions (e.g., pages, ranges) of memory 112 used to store virtual machines, in this case where VM1′-VMN′ are stored. In the illustrated embodiment the memory map is created when the virtual machines are suspended; in an alternative embodiment, the memory map is maintained and updated while the virtual machines are running. Memory map 122 can be a table in memory that has records for each virtual machine. In addition to old hypervisor image 120″ and virtual machine images VM1″-VMN″, storage 106 stores, at the time represented in
A hypervisor-exchange process 200,
Hypervisor exchange 203 includes, at 211, tearing down and removing the old hypervisor from memory 112. Memory map 122 is used to avoid writing over any memory required for preserving the states of the suspended virtual-machines. During the tear down of the old hypervisor, the new hypervisor version is launched using a soft boot at 212. Before tear down 211 is complete, the old hypervisor passes, e.g., via memory or via storage, the memory map and any other configuration data for the virtual machines to the new hypervisor at 213. As 212 proceeds, the memory map is used to avoid overwriting virtual-machine state data in memory. Once the new hypervisor is fully booted, the hypervisor exchange is complete. The new hypervisor can then resume the virtual machines (e.g., one by one) to complete process 200. The result of process 200 is shown in
When the new hypervisor is launched, it is passed the memory map of the system. On a cold reboot, this is usually the map that is generated by the BIOS (Basic Input Output System) and passed on to the system. This map includes memory ranges that are reserved for BIOS as well as free memory ranges. In the case of doing the soft reboot, we change the memory map to include new memory ranges that contain all the memory associated with suspended virtual machines. These ranges are marked by a separate memory type. When the new hypervisor launches, it knows that these ranges have virtual-machine data and need to be handled as such. There are two new memory types in the map: 1) a memory type for the metadata associated with the suspended virtual machines. (e.g., the number of virtual machines and their descriptions); and 2) a memory type that has the actual data/state of the respective virtual machines in different memory ranges.
Process 200 does not shut down the resident virtual machines VM1-VMN and they are not removed from memory. There is no need to launch them after the hypervisors are exchanged, and there is no need to load their in-memory components after the hypervisors are exchanged. Therefore, any interruption in the activity of the resident virtual machines is limited to the time taken to exchange the hypervisors. Also note that “hypervisor exchange” encompasses upgrades, downgrades, cross grades, updates, and reversions.
In process 200, virtual machines are suspended and resumed one by one. In some cases, it may be desirable to suspend all resident virtual machines at once and/or to resume them all at once. A synchronous suspend and resume can be achieved using a hypervisor exchange process 400, which is flow-charted in
At the time represented in
From the state represented in
During exchange 405, the old hypervisor is torn down, at 411. The memory map is used to preserve the in-memory component VM0′ of the host virtual machine VM0. During the tear down of the old hypervisor, at 412, the new hypervisor disk image is used for launching the new hypervisor. During the overlap between tear down 411 and launch 412, the memory map and other state and configuration data is passed from the old hypervisor to the new, e.g., over memory or storage. The new hypervisor uses the memory map during launch to preserve the in-memory component of the host virtual machine.
In some cases, if the total resource demand by the resident virtual machines is sufficiently large, consolidating them all into a single host virtual machine can cause performance problems. Accordingly, a process 600, flow-charted in
At 601, resident virtual machines are executed on an old hypervisor. In some embodiments, at 602, the resident virtual machines are assigned to groups, e.g., synchronous groups for which a shared state might be important. In other embodiments, the assignment into groups is omitted. At 603, host virtual machines are created. At 604, the resident virtual machines are respectively migrated to the guest hypervisors, e.g., according to the grouping.
Computer system 100 is shown in
From the state represented in
Exchange 606 includes tearing down, at 611, the old hypervisor while the host virtual machines are suspended in memory. The memory map is used to ensure that the in-memory portions of the host virtual machines are not overwritten. During the tear down, at 612, the new hypervisor is launched. At 613, the old hypervisor passes the memory map to the new hypervisor. The tear down of the old hypervisor completes. The new hypervisor uses the memory map to preserve the in-memory portions of the host virtual machines (and thus the in-memory portions of the resident virtual machines. Once the new hypervisor is fully launched, exchange 606 is complete and process 600 continues at 607, as described above.
Processes 200, 400, and 600 share a suspend-exchange-resume sequence. The suspend is a suspend-in-memory in which the in-memory portions of the virtual machines are maintained in memory during the exchange, the interruption of the virtual machines is only the time taken for the exchange itself. There is no need to store the in-memory portions of the resident virtual machines to storage prior to removing the old hypervisor and no need to load the in-memory portion of the resident virtual machines before resuming them.
Herein, art labelled “prior art”, if any, is admitted prior art; art not labelled “prior art” is not admitted prior art. The illustrated embodiments along with variations thereupon and modification thereto are provided for by the present invention, the scope of which is defined by the following claims.
Venkatasubramanian, Rajesh, Gunti, Mukund, Sekhar, Vishnu
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
6961941, | Jun 08 2001 | VMware, Inc. | Computer configuration for resource management in systems including a virtual machine |
7814495, | Mar 31 2006 | VMware LLC | On-line replacement and changing of virtualization software |
7818726, | Jan 25 2006 | Microsoft Technology Licensing, LLC | Script-based object adaptation |
8181007, | Jan 14 2009 | GIGA COMPUTING TECHNOLOGY CO , LTD | Electronic device and method for secure operating system update in embedded system |
20060242442, | |||
20080184373, | |||
20100125845, | |||
20120017031, | |||
20130263118, | |||
20140019968, | |||
20140149635, | |||
20140282539, | |||
20150135175, | |||
20150169329, | |||
20150212844, | |||
20150324227, | |||
20160026489, | |||
20170147452, | |||
WO20141149583, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Jun 22 2016 | VMware, Inc. | (assignment on the face of the patent) | / | |||
Jul 18 2016 | GUNTI, MUKUND | VMWARE, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 039182 | /0049 | |
Jul 18 2016 | SEKHAR, VISHNU | VMWARE, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 039182 | /0049 | |
Jul 18 2016 | VENKATASUBRAMANIAN, RAJESH | VMWARE, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 039182 | /0049 | |
Nov 21 2023 | VMWARE, INC | VMware LLC | CHANGE OF NAME SEE DOCUMENT FOR DETAILS | 067102 | /0395 |
Date | Maintenance Fee Events |
Dec 20 2023 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Date | Maintenance Schedule |
Jul 07 2023 | 4 years fee payment window open |
Jan 07 2024 | 6 months grace period start (w surcharge) |
Jul 07 2024 | patent expiry (for year 4) |
Jul 07 2026 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jul 07 2027 | 8 years fee payment window open |
Jan 07 2028 | 6 months grace period start (w surcharge) |
Jul 07 2028 | patent expiry (for year 8) |
Jul 07 2030 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jul 07 2031 | 12 years fee payment window open |
Jan 07 2032 | 6 months grace period start (w surcharge) |
Jul 07 2032 | patent expiry (for year 12) |
Jul 07 2034 | 2 years to revive unintentionally abandoned end. (for year 12) |