Update a virtual machine while keeping the device attached to it

By suspending and saving the status of virtual machine components during the virtual machine update process, the problems of downtime and resource consumption during the virtual machine update process are solved, and more efficient updates and resource utilization are achieved.

CN112673345BActive Publication Date: 2024-08-30MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201980060109.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-25
Publication Date
2024-08-30
Estimated Expiration
2039-06-25

AI Technical Summary

Technical Problem

During virtual machine updates, traditional methods require rebooting the host operating system, resulting in workload downtime, and when the storage subsystem is slow or the amount of memory is large, the update operation is slow and can cause interruptions, especially due to the deconstruction and disruption of guest-to-host page mappings. The time and resources required for refactoring.

Method used

During the virtual machine update process, keep the operations of the first virtual machine component and the second virtual machine component suspended, save the state of the first virtual machine component, and save the identification pointer for recovery without removing the underlying data structure. , allowing directly attached devices to communicate with virtual machines, reducing rebuild time and resource consumption.

Benefits of technology

Reduces downtime and resource consumption during updates, improves update efficiency, allows devices to remain attached during updates, reduces power consumption, and improves utilization of processing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112673345B_ABST
    Figure CN112673345B_ABST
Patent Text Reader

Abstract

The operation of a VM running a first VM component and a second VM component is suspended so that a service operation for the VM can be performed. The VM has a device directly attached to the VM. The state of the first VM component is saved. Without removing any underlying data structures of the second VM component from the computing system physical hardware, an identification pointer for the second VM component is saved in a portion of the computing system physical memory. While the VM is suspended and while the service operation is being performed, the directly attached device remains configured to be attached to the VM and remains configured to communicate with the VM. The first VM component is shut down and then restored using the saved state when the service operation is completed. Using the identification pointer, the restored first VM component is reconnected to the second VM component. The operation of the VM is restored.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to updating a virtual machine while keeping a device attached to the virtual machine. Background Art

[0002] Updates to the host operating system traditionally require a reboot and therefore workload downtime. For a virtualization host running virtual machine (VM) instances, downtime also means downtime for the workloads in the hosted virtual machines. Virtualization technologies often allow for the preservation of a running VM context by pausing the execution of the VM and writing its associated RAM context to disk. However, such operations are typically relatively slow and may result in detectable outages, especially if the storage subsystem is slow or the amount of memory to be preserved, and therefore the amount of IO required, is large.

[0003] In some update operations, host memory pages used for VM memory are cataloged so that the virtualization software can reassemble the state of the VM in the update operation, rather than writing the VM memory contents to disk. During the update operation, the current operating system catalogs the VM artifacts, dismantles the VM, prepares the new software for execution, uninstalls the current software, and loads the updated software, which reads the metadata and reconstructs the VM using the same memory pages used previously. Although this may be faster than writing the memory contents to disk, the duration of the operation and therefore the downtime window is still negatively affected by several factors, including: 1) the amount and continuity of memory to be preserved; 2) the deconstruction (including demapping) and reconstruction (including remapping) of VM artifacts, especially guest to host page mappings. In addition, VM instances that have devices assigned cannot participate in the update operation because the assigned devices cannot be suspended or quiesced during the operation, and their state cannot be saved and restored.

[0004] The subject matter claimed herein is not limited to embodiments that solve any disadvantages such as those described above or that operate only in environments such as those described above. Rather, this background is provided merely to illustrate one exemplary technology area in which some embodiments described herein may be practiced. Summary of the invention

[0005] This summary introduces some concepts in a simplified form that will be further described in the detailed description below. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.

[0006] At least one embodiment disclosed herein relates to a computing system and method for performing a servicing operation on a virtual machine (VM). The computing system has a first virtual machine component and a second VM component, which remains loaded in the computing system physical hardware during the servicing operation. The operation of the VM running the first VM component and the second VM component is suspended so that the servicing operation for the VM can be performed. The VM has a device directly attached to it. The state of the first VM component is saved. Without removing any underlying data structure of the second VM component from the computing system physical hardware, an identification pointer for the second VM component is saved in a portion of the computing system physical memory. While the VM is suspended and while the servicing operation is performed, the directly attached device remains configured to be attached to the VM and remains configured to communicate with the VM. The first VM component is shut down and then restored using the saved state when the servicing operation is completed. Using the identification pointer, the restored first VM component is reconnected to the second VM component. The operation of the VM is restored.

[0007] Additional features and advantages will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the teachings herein. The features and advantages of the present invention may be realized and obtained by the means and combinations particularly pointed out in the appended claims. The features of the present invention will become more apparent from the following description and the appended claims or may be learned by practicing the present invention as set forth below. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to describe the manner in which the above-recited and other advantages and features can be obtained, a more particular description of the subject matter briefly described above will be rendered by reference to specific embodiments that are illustrated in the accompanying drawings. Understanding that these drawings depict only typical embodiments and are not therefore to be considered limiting of the scope of the invention, the embodiments will be described and explained with additional specificity and detail through the use of the accompanying drawings, in which:

[0009] Figure 1 An example computing system in which the principles disclosed herein may be embodied is illustrated.

[0010] Figure 2 An example host computing system for a virtual machine (VM) is illustrated.

[0011] Figure 3A-3C An example VM and an environment for performing service operations on the VM are illustrated.

[0012] Figure 4 An example method for performing a service operation on a VM is illustrated. DETAILED DESCRIPTION

[0013] Updates to the host operating system traditionally require a reboot and therefore workload downtime. For a virtualization host running a virtual machine (VM) instance, downtime also means downtime for the workload in the hosted virtual machine. Virtualization technology often allows the running VM context to be preserved by pausing the execution of the VM and writing its associated RAM context to disk. However, such operations are typically relatively slow and may result in detectable outages, especially if the storage subsystem is slow or the amount of memory to be preserved, and therefore the amount of IO required, is large.

[0014] In some update operations, host memory pages used for VM memory are cataloged so that the virtualization software can reassemble the state of the VM in the update operation, rather than writing the VM memory contents to disk. During the update operation, the current operating system catalogs the VM artifacts, dismantles the VM, prepares the new software for execution, uninstalls the current software, and loads the updated software, which reads the metadata and reconstructs the VM using the same memory pages used previously. Although this may be faster than writing the memory contents to disk, the duration of the operation and therefore the downtime window is still negatively affected by several factors, including: 1) the amount and continuity of memory to be preserved; 2) the deconstruction (including demapping) and reconstruction (including remapping) of VM artifacts, especially guest to host page mappings. In addition, VM instances that have devices assigned cannot participate in the update operation because the assigned devices cannot be suspended or quiesced during the operation, and their state cannot be saved and restored.

[0015] Embodiments disclosed herein provide improvements over previous update methods for updating a computing system running a VM.

[0016] At least one embodiment disclosed herein relates to a computing system and method for performing a service operation on a virtual machine (VM). During the service operation, the computing system has a first virtual machine component and a second VM component that remain loaded in the computing system physical hardware. The operation of the VM running the first VM component and the second VM component is suspended so that the service operation for the VM can be performed. The VM has a device directly attached to it. The state of the first VM component is saved. Without removing any underlying data structure of the second VM component from the computing system physical hardware, an identification pointer for the second VM component is saved in a portion of the computing system physical memory. While the VM is suspended and while the service operation is being performed, the directly attached device remains configured to be attached to the VM and remains configured to communicate with the VM. The first VM component is shut down and then restored using the saved state when the service operation is completed. Using the identification pointer, the restored first VM component is reconnected to the second VM component. The operation of the VM is restored.

[0017] By implementing various aspects of the disclosed embodiments, there are various technical effects and benefits that can be achieved. By way of example, at least some of the embodiments operate unaffected by the number and continuity of guest-to-host memory mappings, as will be explained in more detail below. Advantageously, this is an improvement over current methods, where the memory stack must be traversed to determine the guest-to-host mappings. It will be appreciated that when there are a large number of discontinuous memory page mappings, this may be timely and take up computing system resources to traverse the memory stack.

[0018] It is additionally an improvement over conventional methods because in the disclosed embodiments, some of the VM components keep their underlying data structures loaded in computing system physical resources such as memory and processing resources. This saves time because these components do not have to be rebuilt. In conventional methods, these components are destroyed and rebuilt, thus taking more time.

[0019] Furthermore, the embodiments disclosed herein provide a technical improvement that allows a device to remain directly attached to a VM during the update process. This capability does not exist in traditional update methods.

[0020] Furthermore, technical effects associated with the disclosed embodiments may also include reduced power consumption, and may also include efficiency gains because faster times will require fewer processing resources, which may instead be used by other processes of the computing system.

[0021] Will refer to Figure 1Some introductory discussions of computing systems are described. Computing systems are now increasingly taking a variety of forms. For example, a computing system may be a handheld device, an appliance, a laptop computer, a desktop computer, a mainframe, a distributed computing system, a data center, or even a device that has not been conventionally considered a computing system, such as a wearable device (e.g., glasses). In this specification and claims, the term "computing system" is broadly defined to include any device or system (or combination thereof) that includes at least one physical and tangible processor and a physical and tangible memory capable of having computer executable instructions executable by the processor thereon. The memory may take any form and may depend on the nature and form of the computing system. The computing system may be distributed over a network environment and may include multiple constituent computing systems.

[0022] like Figure 1 As shown, in its most basic configuration, computing system 100 generally includes at least one hardware processing unit 102 and memory 104. Memory 104 can be physical system memory, which can be volatile, non-volatile, or some combination of the two. The term "memory" may also be used herein to refer to non-volatile mass storage devices such as physical storage media. If the computing system is distributed, then processing, memory, and / or storage capabilities may also be distributed.

[0023] The computing system 100 also has a number of structures thereon that are often referred to as "executable components." For example, the memory 104 of the computing system 100 is illustrated as including an executable component 106. The term "executable component" is a name for a structure that is well known to those of ordinary skill in the computing arts, which structure is a structure that can be software, hardware, or a combination thereof. For example, when implemented in software, one of ordinary skill in the art will understand that the structure of the executable component can include software objects, routines, methods, etc. that can be executed on the computing system, whether such executable component is present in the computing system's stack or whether the executable component is present on a computer-readable storage medium.

[0024] In such cases, one of ordinary skill in the art will recognize that the structure of the executable component exists on a computer-readable medium so that when interpreted by one or more processors of a computing system (e.g., by a processor thread), the computing system is caused to perform a function. Such a structure can be directly computer-readable by the processor (e.g., if the executable component is a binary). Alternatively, the structure can be structured to be interpretable and / or compiled (whether in a single stage or in multiple stages) to generate such a binary that is directly interpretable by the processor. When the term "executable component" is used, such an understanding of the example structure of an executable component is well within the understanding of one of ordinary skill in the computing arts.

[0025] The term "executable component" is also well understood by those of ordinary skill in the art to include structures that are implemented exclusively or almost exclusively in hardware, such as in a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or any other special circuit. Therefore, the term "executable component" is a term for a structure that is well understood by those of ordinary skill in the field of computing, whether it is implemented in software, hardware, or a combination thereof. In this specification, the terms "component", "agent", "manager", "service", "engine", "module", "virtual machine", etc. may also be used. As used in this specification, and in this case, these terms (whether or not with modifying clauses) are also intended to be synonymous with the term "executable component", and therefore also have structures that are well understood by those of ordinary skill in the field of computing.

[0026] In the following description, embodiments are described with reference to actions performed by one or more computing systems. If such actions are implemented in software, then in response to having executed the computer-executable instructions constituting the executable component, one or more processors (of the associated computing system that performs the action) direct the operation of the computing system. For example, such computer-executable instructions may be embodied on one or more computer-readable media forming a computer program product. Examples of such operations involve manipulation of data.

[0027] Computer-executable instructions (and manipulated data) may be stored in memory 104 of computing system 100. Computing system 100 may also contain communication channels 108 that allow computing system 100 to communicate with other computing systems over, for example, network 100.

[0028] Although not all computing systems require a user interface, in some embodiments, computing system 100 includes a user interface system 112 for docking with a user. User interface system 112 may include output mechanism 112A and input mechanism 112B. The principles described herein are not limited to precise output mechanism 112A or input mechanism 112B, because this will depend on the nature of the device. However, output mechanism 112A may include, for example, a speaker, a display, a tactile output, a hologram, etc. The example of input mechanism 112B may include, for example, a microphone, a touch screen, a hologram, a camera, a keyboard, a mouse of other pointer inputs, any type of sensor, etc.

[0029] The embodiments described herein may include or utilize a dedicated or general-purpose computing system including computer hardware (such as, for example, one or more processors and system memory), as discussed in more detail below. The embodiments described herein may also include physical and other computer-readable media for carrying or storing computer-executable instructions and / or data structures. Such computer-readable media may be any available media that can be accessed by a general or dedicated computing system. The computer-readable medium storing computer-executable instructions is a physical storage medium. The computer-readable medium carrying computer-executable instructions is a transmission medium. Therefore, by way of example and not limitation, embodiments of the present invention may include at least two significantly different types of computer-readable media: a storage medium and a transmission medium.

[0030] Computer-readable storage media include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other physical and tangible storage media that can be used to store desired program code in the form of computer-executable instructions or data structures and can be accessed by general-purpose or special-purpose computing systems.

[0031] "Network" is defined as one or more data links that support the transport of electronic data between computing systems and / or modules and / or other electronic devices. When information is transmitted or provided to a computing system via a network or another communication connection (hardwired, wireless, or a combination of hardwired or wireless), the computing system appropriately treats the connection as a transmission medium. The transmission medium may include a network and / or a data link that may be used to carry a desired program code device in the form of a computer executable instruction or data structure and may be accessed by a general or special computing system. The above combination should also be included within the scope of computer-readable media.

[0032] Furthermore, in implementing various computing system components, program code means in the form of computer executable instructions or data structures may be automatically transferred from a transmission medium to a storage medium (or vice versa). For example, computer executable instructions or data structures received over a network or data link may be buffered in RAM within a network interface module (e.g., a "NIC") and then ultimately transferred to computing system RAM and / or a less volatile storage medium at the computing system. Thus, it should be understood that storage media may be included in computing system components that also (or even primarily) utilize transmission media.

[0033] Computer executable instructions include, for example, instructions and data that, when executed at a processor, cause a general purpose computing system, a special purpose computing system, or a special purpose processing device to perform certain functions or groups of functions. Alternatively or additionally, computer executable instructions may configure a computing system to perform certain functions or groups of functions. Computer executable instructions may be, for example, binary or even instructions that have undergone some translation (e.g., compilation) before being directly executed by a processor, such as intermediate format instructions (such as assembly language), or even source code.

[0034] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the features or acts described above. Rather, the described features and acts are disclosed as example forms of implementing the claims.

[0035] Those skilled in the art will recognize that the present invention can be practiced in a network computing environment with many types of computing system configurations, including personal computers, desktop computers, laptop computers, message processors, handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, mobile phones, PDAs, pagers, routers, switches, data centers, wearable devices (e.g., glasses), etc. The present invention can also be practiced in a distributed system environment, in which local and remote computing systems that are linked (or by a hardwired data link, a wireless data link, or a combination of a hardwired data link and a wireless data link) through a network both perform tasks. In a distributed system environment, program modules can be located in both local memory devices and remote memory storage devices.

[0036] Those skilled in the art will also appreciate that the present invention may be practiced in a cloud computing environment. A cloud computing environment may be distributed, although this is not required. When distributed, a cloud computing environment may be distributed internationally within an organization and / or have components owned across multiple organizations. In this specification and the appended claims, "cloud computing" is defined as a model for supporting on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage devices, applications, and services). The definition of "cloud computing" is not limited to any of the other numerous advantages that may be gained from such a model when properly deployed.

[0037] In an embodiment, computing system 100 may be implemented as a host computing system capable of running one or more virtual machines (VMs), and potentially many virtual machines. Figure 2 The host 200 is abstractly illustrated in more detail. Figure 2 In the case of FIG. 2 , host 200 is illustrated as operating three virtual machines 210 including virtual machines 210A, 210B, and 210C. However, ellipsis 210D again indicates that the principles described herein are not limited to the number of virtual machines running on host 200. There may be as few as zero virtual machines running on the host, with the only upper limit being defined by the physical capabilities of host 200.

[0038] During operation, the virtual machine simulates a fully operational computing system that includes at least one operating system and may also include one or more other applications. Each virtual machine is assigned to a specific client computer and is responsible for supporting the desktop environment for that client. When a user interacts with the desktop at the client, the user input is transmitted from the client to the virtual machine. The virtual machine processes the user input and changes the desktop state if appropriate. If such a change in the desktop state is to cause a change in the drawn desktop, the virtual machine changes the image or drawing instructions as appropriate, and transmits the changed image or drawing instructions to the client computing system for appropriate drawing. From the user's perspective, this is like the client computing system itself performing desktop processing.

[0039] Host 200 includes a hypervisor 220 that emulates virtual resources for virtual machines 210 using physical resources 221 that are abstracted from the perspective of virtual machines 210. Hypervisor 220 also provides appropriate isolation between virtual machines 210. Thus, from the perspective of any given virtual machine, hypervisor 220 provides the illusion that the virtual machine is interfacing with physical resources, even though the virtual machine is interfacing only with the appearance of physical resources (e.g., virtual resources) and not directly with the physical resources. Figure 2In the embodiment, physical resources 221 are abstractly represented as including resources 221A to 221F. Examples of physical resources 221 include processing capacity, memory, disk space, network bandwidth, media drives, etc. Host 200 can operate host agent 202, which monitors the performance of the host and performs other operations to manage the host. In addition, host 200 can include other components 203.

[0040] Note that the embodiment of the illustrated host 300 is now Figure 3A-3C , the host 300 may correspond to the host 200 previously described. As will be explained, the host 300 may include various components or functional blocks that may implement the various embodiments disclosed herein. The various components or functional blocks of the host 300 may be implemented on a local computing system, or may be implemented on a distributed computing system that includes elements that reside in the cloud or implement aspects of cloud computing. The various components or functional blocks of the host 300 may be implemented as software, hardware, or a combination of software and hardware. The host 300 may include, for example, Figure 3A-3C More or fewer components may be shown in the drawings, and some of these components may be combined as appropriate.

[0041] As illustrated, the host 300 may include or otherwise have access to physical memory 305, which may correspond to the memory 104 or one of the physical resources 221 previously described. In an embodiment, as will be explained in more detail below, the physical memory 305 represents volatile and non-volatile physical memory resources of the host 300 that can be utilized by one or more virtual machines. Thus, any reference to computing system physical memory in the present disclosure or in the claims may refer to volatile RAM memory, persistent RAM memory, disk memory, storage device memory, or any type of volatile and non-volatile memory source. Therefore, the embodiments and claims disclosed herein are not limited by the specific type of computing system physical memory implemented when practicing the embodiments disclosed herein.

[0042] Host 300 may also include or otherwise have access to a physical processor 306, which may correspond to previously described processor 102 or one of physical resources 221. In an embodiment, as will be explained in more detail below, physical processor 306 represents a physical processing resource of host 300 that may be utilized by one or more virtual machines.

[0043] As illustrated, the host 300 may operate a virtual machine (VM) 310 instance, which may correspond to one of the VMs 210 previously described. Although only one VM is shown as being operated by the host 300, this is for ease of explanation only, and thus the embodiments disclosed herein contemplate that the host 300 may operate any number of additional VMs as appropriate. The host 300 may also include a host operating system (OS) 322 that may be capable of controlling the operation and functionality of the VM 310. The VM 310 and the host OS 322 will be explained in more detail below.

[0044] As previously mentioned Figure 2 As mentioned, the host may include a manager such as manager 220. Thus, the embodiments disclosed herein contemplate a manager associated with host 300 and VM 310. However, for ease of explanation, Figure 3A The manager is not shown. Instead, Figure 3A A hypervisor partition 315 is shown that is generated by the hypervisor for VM 310. As illustrated, hypervisor partition 315 includes virtual processor 320 and virtual processor 325. It will be noted that hypervisor partition 315 may include additional virtual processors as needed. Virtual processor 320 and virtual processor 325 are viewed as actual processors by VM 310. However, as illustrated by the dashed line in physical processor 306, the virtual processor uses the hypervisor to access the processing resources of physical processor 306.

[0045] The hypervisor partition 315 also includes VM memory 330, which has a corresponding guest page address (GPA) space that is used to map the physical memory 305 to the VM memory 330. For example, as shown in Figure 3A , portion 305A of physical memory having address range 307 and portion 305B of physical memory having address range 309 may be mapped by the hypervisor to portion 331 of VM memory having address range 331A. Similarly, portion 305C of physical memory having address range 308 may be mapped by the hypervisor to portion 332 of VM memory having address range 332A. In other words, the hypervisor is able to create and maintain a page table of mappings between the GPA space and the physical memory space.

[0046] The host OS 322 may include a VM worker process instance 340, which is instantiated for running or configuring the VM 310. As illustrated, the VM worker process 340 may include a virtual device (Vdev) 345 and a virtual device (Vdev) 346. It will be noted that additional virtual devices may be included, as illustrated by ellipsis 347. In an embodiment, the virtual device may be configured to simulate various devices associated with the VM 310. In an embodiment, the VM worker process 340 may include additional components also represented by ellipsis 347. Additional components may include one or more of a state machine, a virtual motherboard, an IC agent, or an RDP encoder. In operation, the VM worker process 340 may guide the manager to create a mapping between the VM memory 330 and the physical memory 305 described previously.

[0047] In an embodiment, the host OS 322 may include a driver 350. In one embodiment, the driver 350 may be a virtual PCI driver that allows control of one or more devices directly assigned to or attached to the VM 310, such as a graphics processing unit (GPU) 370 and / or a field programmable gate array (FPGA) 380. The directly attached device will be explained in more detail below. As illustrated by ellipsis 351, additional drivers may also be included in the host OS as needed. In an embodiment, the driver 350 may be able to map a portion 333 of the VM memory 330 to a portion 305D of the physical memory 305 for use with the attached device independently of the controller. In such an embodiment, the driver 350 may maintain any page table, etc. as required.

[0048] As mentioned, VM 310 may have various devices directly assigned to or attached to the VM. For example, one device directly assigned or attached may be GPU 370. In some embodiments, GPU 370 may include an input-output memory management unit (IOMMU) 371 or be communicatively coupled to an external IOMMU. Although not illustrated, in other embodiments, IOMMU 371 may be part of physical processor 306. IOMMU 371 may have access to a corresponding address space 372 of GPU 370. In operation, IOMMU 371 may interface with attachment module 316 of manager partition 315. Attachment module 316 represents various functionalities of the manager that allow GPU 370 to be directly attached to VM 310. IOMMU 371 is then able to directly access the GPA space of VM memory 330 so that a mapping between the GPA space and the device address space can be made, which allows GPU 370 to directly access physical memory 305 via VM memory 330. GPU 370 may therefore have access to memory pages mapped to VM memory 330 .

[0049] Additionally, attachment module 316 may allow GPU 370 to directly access virtual processors 320 and 325 for needed processing resources. Said another way, GPU 370 considers at least one of virtual processors 320 and 325 as its assigned processor.

[0050] In a similar manner, another directly assigned or attached device may be an FPGA 380. As illustrated, the FPGA 380 may interface with the attachment module 316. As illustrated, in some embodiments, the FPGA 380 may include or otherwise have access to an IOMMU 381. Although not illustrated, in other embodiments the IOMMU 381 may be part of the physical processor 306. The IOMMU 381 may perform mapping between the address space 382 of the FPGA 380 and the GPA space of the VM memory 330 in the manner previously described for the IOMMU 371. In addition, the FPGA 380 may directly access the virtual processors 320 and 325 for the required processing resources.

[0051] The ellipsis 383 indicates that any number of additional devices can be directly assigned to or attached to the VM 310. Examples of additional devices 383 include, but are not limited to, a universal serial bus (USB) including a USB3 controller, a storage controller, a high-speed peripheral component interconnect (PCIe) device, and a high-speed non-volatile memory (NVMe) storage device. Additional devices 383 may also include various network cards, etc., which expose registers at locations in the physical memory space of the computer, which can be mapped to the GPA space of the VM memory 330. Thus, the embodiments disclosed herein are not limited by the number and type of devices directly assigned to or attached to the VM 310. It will be noted that for ease of explanation, the embodiments disclosed herein are described as having the GPU 370 or the FPGA 380 directly attached to the VM 310. Thus, any discussion related to the operation of the GPU 370 and the FPGA 380, etc. will also apply to any directly assigned device in the other directly assigned devices 383.

[0052] The host OS 322 may also include a management module 360. It will be noted that the management module 360 ​​is used for ease of explanation and may represent a kernel mode process such as a virtualization infrastructure driver (VID) and a user mode process such as a virtual machine management service (VMMS). Thus, the embodiments disclosed herein are not limited by the actual type of management module 360.

[0053] In operation, management module 360 ​​may include storage resources backed by portions of physical memory 305, such as portion 305E. In embodiments, the storage resources may be device extensions, etc., of management module 360. In embodiments, the management module may include partitions for each VM of host 300. However, even if partitions are removed, the memory resources (i.e., device extensions) may remain as long as the storage management module remains loaded in host 300.

[0054] In some embodiments, however, it may be possible to save storage resources in portions of physical memory that have been designated to be preserved even during shutdown of host OS 322. In such embodiments, management module 360 ​​may be able to be uninstalled while still preserving all information saved in the storage resources.

[0055] like Figure 3AAs shown, in an embodiment, VM worker process 340 may direct management module 360 ​​to store various information in a memory resource of management module 360 ​​for a partition corresponding to VM 310. For example, as shown at 362, VM worker process 340 may direct management module 360 ​​to store data block 361 corresponding to an array of memory pages mapped to portion 331 of VM memory 330 and to store a corresponding GPA address range 331A. Similarly, as shown at 364, VM ​​worker process 340 may direct management module 360 ​​to store data block 363 corresponding to an array of memory pages mapped to portion 332 of VM memory 330 and to store a corresponding GPA address range 332A.

[0056] The VM worker process 340 may also direct the management module 360 ​​to generate a state file 365 that records the current state of the VM worker process 340. The current state of the various virtual devices 345 and 346 may also be recorded in the state file 365. As will be explained in more detail below, this file may be used to persist the state of the worker process and virtual devices.

[0057] In an embodiment, driver 350 may also direct management module 360 ​​to record information. For example, driver 350 may direct management module 360 ​​to record data blocks 366 corresponding to an array of memory pages mapped to portion 333 of VM memory 330. The corresponding GPA range may also be recorded. It will be noted that any additional drivers in additional drivers 351 may also direct management module 360 ​​to record information, as needed. Thus, embodiments disclosed herein contemplate, for example, that both VM worker process 340 and various drivers direct management module 360 ​​to record information.

[0058] In embodiments, it may be desirable to service one or more of the components of the VM 310 and / or the host OS 322. The servicing operation may allow software updates, etc. to occur on the associated components. In embodiments disclosed herein, the servicing operation may occur without restarting the host OS 322. Additionally, during the servicing operation, some of the components will not have their underlying data structures removed from the computing system physical hardware (i.e., the physical memory 305 and the physical processor 306). Therefore, these components will generally not be subject to any updates during the servicing operation.

[0059] In an embodiment, VM worker process 340 may initiate VM service operations by directing management module 360 ​​to store various information in its storage resources (i.e., device extensions) in the manner previously described. For example, management module 360 ​​may save data blocks 361 and 363 and corresponding GPA ranges 362 and 364. Additionally, driver 350 may direct management module 360 ​​to store data block 366 and corresponding GPA ranges.

[0060] In response to the storage information, the management module 360 ​​may also generate a repository 390 for storing persistent identity pointers for components of the following VMs: components of these VMs will not have service operations executed thereon, but will have their underlying data structures remain loaded on the computing system physical hardware. For example, an identity pointer 391 for the manager partition 315 including the virtual processor may be stored in the repository 390. In addition, identity pointers 392-396 for the memory block 361, the GPA range 362, the memory block 363, the GPA range 364, and the data block 366 may each be stored in the repository 390. The repository 390 may then be written to the dedicated portion 305F of the physical memory 305. It will be noted that the identity pointers 391-396 may be viewed as artifacts pointing to the underlying data structures in the computing system physical hardware (i.e., the physical memory 305 and the physical processor 306) for the component corresponding to the identity pointer.

[0061] It will be noted that in at least some implementations, only the data blocks in the management module 360 ​​are retained. In these implementations, there is no need to access the physical memory 305 to determine the addresses of the data blocks to be retained. This can save time if there are a large number of data blocks to be retained, or if the data blocks are non-contiguous with each other. In other words, there is no need to traverse the memory stack to determine the data blocks to be retained.

[0062] The state of the VM worker process and virtual devices may also be stored in state file 365. The state may then be stored in a memory resource of management module 360 ​​or in portion 305E of physical memory 305.

[0063] Operation of VM 310 may then be suspended so that service operations may occur. Figure 3B 310 during service operation. For ease of illustration, Figure 3A Some of the elements shown are not included in Figure 3B middle.

[0064] like Figure 3BAs shown, VM worker process 340 and virtual devices 345 and 346 have been shut down and therefore do not appear in the figure. In other words, VM worker process 340 and virtual devices 345 and 346 have been removed so that any of their underlying data structures have been removed from the computing system physical hardware. As previously mentioned, however, the state of VM worker process 340 and virtual devices 345 and 346 before being shut down is saved in state file 365 and can be used to restore these components, as will be discussed in more detail below.

[0065] exist Figure 3B , the manager partition 315 and its components are shown as dashed lines, including virtual processors 320 and 325, and virtual memory 330 and its associated mappings with physical memory 305 (i.e., 331 and 332). The mapping 333 of driver 350 is also shown as a dashed line. The dashed lines indicate that although the operation of VM 310 has been suspended, the underlying data structures for these components have not been removed from the computing system physical hardware. In other words, even while the operation of VM 310 has been suspended and service operations are being performed, the manager partition 315 and the GPA mapping remain loaded or programmed in the computing system physical hardware. However, it should be noted that while the operation of VM 310 is suspended, the operation of the components of the manager partition is suspended.

[0066] It will be noted that during service operations the host OS 322 is not shut down, but remains loaded along with the management module 360, although the specific partition in the memory management module for the VM 310 has been removed. Therefore, those components that are not shut down cannot generally be serviced by a service operation, as this generally requires the component to be shut down so that any changes to the component during service operations can be implemented.

[0067] Figure 3B It is also shown that while the operation of VM 310 has been suspended, the devices directly attached to VM 310, including GPU 370 and FPGA 380, remain attached or remain active. That is, from the perspective of the directly attached devices that remain active, VM 310 is still in active operation, and these devices and VM 310 are able to function normally with respect to each other. Therefore, the attachment module 316 allows the previously described mapping between the GPA space of VM memory 330 and the IOMMU to remain intact. Because the GPA mapping has not been removed as previously described, the mapping between the device and VM 310 can be maintained.

[0068] Devices directly attached to VM 310, including GPU 370 and FPGA 380, also maintain access to the processing resources of virtual processors 320 and 325. As can be appreciated, because devices directly attached to VM 310, including GPU 370 and FPGA 380, can continue to operate while the operation of VM 310 is suspended, there may be instances in which a directly attached device initiates an interrupt to be handled by one of the virtual processors. For example, GPU 370 may initiate interrupt 318, and FPGA 380 may initiate interrupt 319. To handle such instances, an attachment module or some other component of VM 310 may include a queue file 317 that can queue interrupts while the virtual processor is suspended. For example, in an embodiment, where a directly attached device uses a message signal interrupt (MSI), the device has a maximum of 32 interrupts and the device writes to it to indicate the address of the pending interrupt. In the case where the address is mapped to the VM, the directly attached device is allowed to write to the address, even when the operation of the VM is suspended. This is also true for MSI-X, except that MSI-X has up to 2048 interrupts.

[0069] As will be explained in more detail, once the operation of the virtual processor is resumed, the virtual processor is able to handle the interrupts in the queue file 317. Therefore, from the perspective of the directly attached device, this is only seen as a small delay in processing time.

[0070] Figure 3C The process of restoring VM 310 to operate is shown. As shown, Figure 3C Including host OS 322 and storage library 390. After the service operation of VM 310, which may cause one or more components of the VM or host OS to be updated, etc., is completed, the VM worker process 340 and virtual devices 245 and 246 can be resumed by the host computing system. As previously described, the state of the VM worker process 340 and virtual devices 245 and 246 is saved before the operation of VM 310 is suspended. This state can then be used to reload or program the underlying data structure in the computing system hardware to thereby resume the VM worker process 340 and virtual devices 245 and 246.

[0071] Once the VM worker process 340 is restored, the VM worker process can direct the management module 360 ​​to rebuild the partitions for VM310 and build data objects for memory blocks and corresponding GPA ranges, and can also request the generation of the manager partition. In such a case, as shown at 302, the management module 360 ​​can access the identity pointer stored in the repository 390. The identity pointer can then allow the management module 360 ​​to access the underlying data structures for the various components stored in the repository 390. As shown at 303, the management module 360 ​​can then fill the data objects 361-364 and the data block 366 with the restored underlying data structures. This has the effect of reconnecting the mapping of the manager partition 315, virtual processors 320 and 325, and virtual memory 330 to the restored VM worker process 340. That is, the VM worker process 340 is now able to use these components without having the system actually rebuild these components in the computing system physical hardware. Stated another way, because hypervisor partition 315, virtual processors 320 and 325, and the mapping of virtual memory 330 to physical memory 305 are not removed during service operations, management module 360 ​​need only reconnect VM worker process 340 to these components.

[0072] The reconnection of the VM worker process to the manager partition 315, the virtual processors 320 and 325, and the mapping of the virtual memory 330 to the physical memory 305 may return the VM to the state it was in before the storage repository 390 was generated. Figure 3A That is, VM 310 can resume its normal operation.

[0073] Upon resumption of operation of VM 310, any interrupts, such as interrupts 318 and 319 stored in queue file 317, may be handled by virtual processors 320 and 325. Directly attached devices, such as GPU 370 and FPGA 380, may then continue to communicate and operate in connection with the resumed VM 310 normally.

[0074] The following discussion now refers to a number of methods and method actions that can be performed. Although method actions may be discussed in a certain order or illustrated in a flowchart as occurring in a specific order, no specific order is required unless explicitly stated or because one action depends on another action being completed before the action is performed.

[0075] Figure 4 4 is a flow chart of an example computerized method 400 for servicing a component of a VM while a second component remains loaded in the physical hardware of a computing system during a servicing operation. Figure 2-3C Method 400 is described with reference to one or more of the figures in FIG.

[0076] Method 400 includes suspending the operation of a VM running one or more first VM components and one or more second VM components so that service operations for the VM can be performed (410). In some embodiments, the VM may have one or more devices directly attached to it. For example, as previously described, VM 310 may run VM worker process 340 and virtual devices 345 and 346, or have VM worker process 340 and virtual devices 345 and 346 associated therewith, which may be examples of first VM components. In addition, VM 310 may run manager partition 315, virtual processors 320 and 325, and virtual memory 330 having a GPA space mapped to physical memory 305, or have these associated therewith. These may be considered examples of second VM components.

[0077] As previously described in some embodiments, VM 310 may have one or more devices directly attached to it. For example, GPU 370 and FPGA 380 may be directly attached to VM 310.

[0078] Method 400 includes saving the state of one or more first VM components (420). For example, as previously described, the state of VM worker process 340 and virtual devices 345 and 346 may be stored in state file 365.

[0079] Method 400 includes saving identification pointers for the one or more second VM components in a portion of physical memory of the computing system without removing any underlying data structures of the one or more second VM components from physical hardware of the computing system (430). For example, as previously described, identification pointers 391-396 for the manager partition, memory blocks 361 and 363, and GPA ranges 362 and 364, and data block 366 may be stored in storage repository 390, which may correspond to portion 305F of physical memory 305.

[0080] As previously described, while the VM is suspended, and while service operations are being performed, one or more directly attached devices remain attached to the VM and remain configured to communicate with the VM because the underlying data structures of the one or more second VM components are not removed. For example, while the operation of VM 310 is suspended, GPU 370 and FPGA 380 remain directly attached to VM 310 and remain configured to communicate with VM 310. This occurs because while the VM is suspended, the underlying data structures of the manager partition 315, virtual processors 320 and 325, and virtual memory 330 having GPA space mapped to physical memory 305 remain in the physical hardware of the computing system.

[0081] The method 400 includes shutting down one or more first VM components by removing any underlying data structures for the one or more first VM components from the computing system physical hardware (440). As previously described, the VM worker process 240 and the virtual devices 245 and 246 are shut down by having their underlying data structures removed from the computing system physical hardware.

[0082] Method 400 includes restoring one or more first VM components (450) when the service operation is completed. For example, as previously described, the underlying data structures of VM worker process 240 and virtual devices 245 and 246 in the computing system physical hardware are rebuilt using the state saved in state file 265.

[0083] Method 400 may include reconnecting the restored one or more first VM components to one or more second VM components using the identification pointers (460). For example, as previously described, identity pointers 391-396 may be used to access underlying data structures of manager partition 315, virtual processors 320 and 325, and virtual memory 330 having a GPA space mapped to physical memory 305. These components may then be reconnected to VM worker process 240 and virtual devices 245 and 246 in the manner previously described.

[0084] Method 400 includes resuming operation of the VM (470). For example, operation of VM 310 may be resumed in the manner previously described.

[0085] For the processes and methods disclosed herein, the operations performed in the processes and methods may be implemented in different orders. In addition, the operations outlined are provided only as examples, and some of these operations may be optional, combined into fewer steps and operations, supplemented with other operations, or expanded into additional operations without departing from the essence of the disclosed embodiments.

[0086] Without departing from the spirit or characteristics of the present invention, the present invention may be embodied in other specific forms. The described embodiments are considered to be illustrative and non-restrictive in all respects. Therefore, the scope of the present invention is indicated by the appended claims rather than the foregoing description. All changes falling within the equivalent meaning and scope of the claims should be included within their scope.

Claims

1. A method in a computing system, the computing system running a host operating system and a virtual machine VM, the host operating system executing one or more first virtual machine VM components, and the VM executing one or more second VM components, the one or more second VM components to be kept loaded in a computing system physical memory during a service operation of the computing system, the one or more first VM components being configured to manage the one or more second VM components via one or more identification pointers, the method for performing the service operation of the VM, the method comprising: suspending operation of the VM running the one or more second VM components, the VM having one or more devices directly attached to the VM; saving a state of the one or more first VM components of the host operating system; saving the one or more identification pointers for the one or more second VM components in a portion of the computing system physical memory without removing any underlying data structures of the one or more second VM components from the computing system physical memory, wherein while the VM is suspended and while the service operation is performed, the one or more directly attached devices remain configured to be attached to the VM and remain configured to communicate with the VM because the underlying data structures of the one or more second VM components are not removed; shutting down the one or more first VM components by removing any underlying data structures for the one or more first VM components from the computing system physical memory; restoring the one or more first VM components upon completion of the service operation; reconnecting the restored one or more first VM components to the one or more second VM components using the identification pointer; as well as The operation of the VM is resumed. 2 . The method of claim 1 , wherein the one or more first VM components include one of a virtual device and a virtual machine worker process.

3. The method of claim 1 , wherein the one or more second VM components include one or more of: a hypervisor partition and a corresponding virtual processor, a page mapping between the computing system physical memory and the VM's virtual memory, or a virtual device driver configured to interface with a directly attached device.

4. The method of claim 1 , wherein the one or more second VM components include a virtual processor, the computing system being further configured to perform the following: while the VM is suspended, queuing any interrupts generated by the one or more directly attached devices; and Once the operation of the VM is resumed, the virtual processor is caused to handle the interrupt.

5. The method of claim 1 , wherein the one or more second VM components include a page mapping between the computing system physical memory and the VM's virtual memory, wherein the one or more directly attached devices use the mapping in operation while the VM is suspended.

6. The method according to claim 1, wherein the one or more devices directly attached include one or more of the following: a graphics processing unit GPU, a field programmable gate array FPGA, a USB3 controller, a storage controller, an NVMe storage device, a PCIe device, or a network card.

7. A computing system, the computing system running a host operating system and a virtual machine VM, the host operating system executing one or more first virtual machine VM components and the virtual machine executing one or more second VM components, the one or more second VM components to be kept loaded in the computing system physical memory during service operation of the computing system, the one or more first virtual machine VM components being configured to manage the one or more second VM components via one or more identification pointers, the computing system comprising: at least one processor; as well as a computer-readable hardware storage device having computer-executable instructions stored thereon, the computer-executable instructions, when executed by the at least one processor, causing the computing system to: suspending operation of the VM running the one or more second VM components, the VM having one or more devices directly attached to the VM; saving a state of the one or more first VM components of the host operating system; saving the one or more identification pointers for the one or more second VM components in a portion of the computing system physical memory without removing any underlying data structures of the one or more second VM components from the computing system physical memory, wherein while the VM is suspended and while the service operation is performed, the one or more directly attached devices remain configured to be attached to the VM and remain configured to communicate with the VM because the underlying data structures of the one or more second VM components are not removed; shutting down the one or more first VM components by removing any underlying data structures for the one or more first VM components from the computing system physical memory; restoring the one or more first VM components upon completion of the service operation; reconnecting the restored one or more first VM components to the one or more second VM components using the identification pointer; as well as The operation of the VM is resumed. 8 . The computing system of claim 7 , wherein the one or more first VM components include one of a virtual device and a virtual machine worker process.

9. The computing system of claim 7, wherein the one or more second VM components include one or more of: a hypervisor partition and a corresponding virtual processor, a page mapping between the computing system physical memory and the VM's virtual memory, or a virtual device driver configured to interface with a directly attached device.

10. The computing system of claim 7, wherein the one or more second VM components include a virtual processor, the computing system being further configured to perform the following: while the VM is suspended, queuing any interrupts generated by the one or more directly attached devices; and Once the operation of the VM is resumed, the virtual processor is caused to handle the interrupt.

11. The computing system of claim 7, wherein the one or more second VM components include a page mapping between the computing system physical memory and the VM's virtual memory, wherein the one or more directly attached devices use the mapping while in operation while the VM is suspended.

12. The computing system of claim 7, wherein the one or more devices directly attached include one or more of the following: a graphics processing unit (GPU), a field programmable gate array (FPGA), a USB3 controller, a storage controller, an NVMe storage device, a PCIe device, or a network card.

13. The computing system of claim 7, wherein the second VM component is not subject to the service operation.

14. A computer program product comprising one or more hardware storage devices having computer executable instructions stored thereon, the computer executable instructions being structured such that when executed by one or more processors of a computing system, the computer executable instructions cause the computing system to: Running a host operating system and a virtual machine VM, the host operating system executing one or more first virtual machine VM components, and the virtual machine executing one or more second VM components, the one or more second VM components to be kept loaded in a computing system physical memory during a service operation of the computing system, the one or more first virtual machine VM components being configured to manage the one or more second VM components via one or more identification pointers; suspending operation of the VM running the one or more second VM components, the VM having one or more devices directly attached to the VM; saving a state of the one or more first VM components of the host operating system; saving, in a portion of the computing system physical memory, identifying pointers to the one or more second VM components without removing any underlying data structures of the one or more second VM components from the computing system physical memory, wherein while the VM is suspended and while the service operation is performed, the one or more directly attached devices remain configured to be attached to the VM and remain configured to communicate with the VM because the underlying data structures of the one or more second VM components are not removed; shutting down the one or more first VM components by removing any underlying data structures for the one or more first VM components from the computing system physical memory; restoring the one or more first VM components upon completion of the service operation; reconnecting the restored one or more first VM components to the one or more second VM components using the identification pointer; as well as The operation of the VM is resumed.

15. The computer program product of claim 14, wherein the one or more first VM components include one of a virtual device and a virtual machine worker process.

16. The computer program product of claim 14, wherein the one or more second VM components include a hypervisor partition and corresponding virtual processors.

17. The computer program product of claim 14, wherein the one or more second VM components include a page mapping between a physical memory of the computing system and a virtual memory of the VM.

18. The computer program product of claim 14, wherein the one or more second VM components include a list of blocks of the computing system physical memory and corresponding address ranges of the blocks of the computing system physical memory used in the computing system physical memory by the first VM component and the second VM component.

19. The computer program product of claim 14, wherein the second VM component is not subject to the service operation.

Citation Information

Patent Citations

  • Securely move virtual machines between host servers

    CN102163266A

  • Method for network interface sharing among multiple virtual machines

    CN102291428A