US-12625713-B2 - Non-disruptive hibernating and resuming guest environment using network virtual service client
Abstract
Examples of the present disclosure describe systems and methods for non-disruptively hibernating and resuming a guest environment using a network virtual service client. In examples, when a guest environment is hibernated, a network virtual service client provides an instruction to a virtual network interface card to set the device power state of the virtual network interface card to a low power state. The network virtual service client disables the communication channels used by the network virtual service client and saves the operating state of the virtual network interface card. When the guest environment is resumed, the network virtual service client provides an instruction to set the device power state of the virtual network interface card to a full power state. The network virtual service client reenables the communication channels used by the network virtual service client and restores the operating state of the virtual network interface card.
Inventors
- Jie Zhou
- Dmitry Malloy
- Khoa A. TO
- Omar Cardona
Assignees
- MICROSOFT TECHNOLOGY LICENSING, LLC
Dates
- Publication Date
- 20260512
- Application Date
- 20220912
Claims (20)
- 1 . A system comprising: a processing system; and memory coupled to the processing system, the memory comprising computer executable instructions that, when executed by the processing system, perform operations comprising: receiving, by a network virtual service client (NVSC) implemented in a virtual machine or a virtual container, an instruction to set a power state of a network interface card (NIC) of the virtual machine or the virtual container to a lower power state; setting, by the NVSC, the power state of the NIC to the lower power state based on the instruction, wherein the low power state prevents communication between the virtual machine or the virtual container and a management operating system (OS) that manages the virtual machine or the virtual container; disabling, by the NVSC, a communication channel between the NIC and the management OS; and saving, by the NVSC, an operating state of the NIC in a persistent memory location, wherein the operating state comprises receive side scaling (RSS) configuration data stored by the NIC and specifying an alignment between the management OS, the communication channel, and the virtual machine or the virtual container.
- 2 . The system of claim 1 , wherein the management OS is implemented in the virtual machine or the virtual container.
- 3 . The system of claim 1 , the operations further comprising: advertising, by the NVSC, a capability to provide power management for the NIC to a driver interface implemented by the virtual machine or the virtual container.
- 4 . The system of claim 3 , wherein advertising the capability to provide power management comprises at least one of: transmitting an advertisement message to the driver interface; or setting a configuration option of the NVSC that is accessible by the driver interface.
- 5 . The system of claim 1 , wherein the instruction is provided by the management OS in response to hibernation of the virtual machine or the virtual container.
- 6 . The system of claim 1 , wherein the management OS prevents additional instructions from being sent to the NIC while the power state of the NIC is set to the lower power state.
- 7 . The system of claim 1 , wherein the lower power state prevents the NIC from transmitting data.
- 8 . The system of claim 1 , wherein disabling the communication channel comprises at least one of: temporarily suppressing data transmissions over the communication channel; or temporarily deactivating an ability of the communication channel to receive data transmissions.
- 9 . The system of claim 1 , wherein the operating state of the NIC further comprises protocol functionality offloaded to the NIC from an upper layer protocol.
- 10 . The system of claim 1 , wherein the RSS configuration data further specifies particular transmission queues of the NIC are to receive particular types of data packets.
- 11 . A system comprising: a processing system; and memory coupled to the processing unit, the memory comprising computer executable instructions that, when executed by the processing system, perform operations comprising: receiving, by a network virtual service client (NVSC) implemented in a guest environment virtual machine or a virtual container, an instruction to set a power state of a network interface card (NIC) of the virtual machine or the virtual container to a higher power state; setting, by the NVSC, the power state of the NIC to the higher power state based on the instruction, wherein the high power state restores communication between the virtual machine or the virtual container and a management operating system (OS) that manages the virtual machine or the virtual container; enabling, by the NVSC, a communication channel between the NIC and the management OS; aligning, by the NVSC, the communication channel between the NIC and the management OS; and restoring, by the NVSC, an operating state of the NIC from a persistent memory location, wherein the operating state comprises receive side scaling (RSS) configuration data stored by the NIC and specifying the alignment between the management OS, the communication channel, and the virtual machine or the virtual container.
- 12 . The system of claim 11 , wherein the instruction is provided by the management OS in response to resuming the guest environment from hibernation.
- 13 . The system of claim 11 , wherein setting the power state of the NIC to the high power state causes the management OS to allow instructions intended for the NIC.
- 14 . The system of claim 11 , wherein the NIC is configured to be set to a plurality of power states including: a lower power state; an intermediate power state; and the higher power state.
- 15 . The system of claim 14 , wherein: in the lower power state, functionality of the NIC is unavailable; in the intermediate power state, a subset of the functionality of the NIC is available; and in the higher power state, full functionality of the NIC is available.
- 16 . The system of claim 11 , wherein enabling the communication channel comprises at least one of: ceasing suppression of data transmissions of the communication channel; or reactivating an ability of the communication channel to receive data transmissions.
- 17 . The system of claim 11 , wherein restoring the operating state of the NIC comprises further retrieving from the persistent memory location protocol functionality offloaded to the NIC.
- 18 . A method comprising: receiving, by a network virtual service client (NVSC) of a guest environment, an instruction to set a power state of a network interface card (NIC) to a lower power state, wherein the instruction is provided by a virtual management component that manages the guest environment and the guest environment is a virtual machine or a virtual container; setting, by the NVSC, the power state of the NIC to the lower power state based on the instruction, wherein the low power state prevents communication between the guest environment and the virtual management component; disabling, by the NVSC, a communication channel between the NIC and the virtual management component; and saving, by the NVSC, an operating state of the NIC in a persistent memory location, wherein the operating state comprises receive side scaling (RSS) configuration data stored by the NIC and specifying an alignment between the virtual management component, the communication channel, and the guest environment.
- 19 . The method of claim 18 , further comprising: advertising, by the NVSC, a capability to provide power management for the NIC.
- 20 . The method of claim 19 , wherein advertising the capability to provide power management comprises at least one of: transmitting an advertisement message to a driver interface of the guest environment; or setting a configuration option of the NVSC that is accessible by the driver interface.
Description
BACKGROUND A virtual machine executing in a host computing environment can be halted (e.g., hibernated or shut down) upon request. When a virtual machine is halted, the virtual network interface card for the virtual machine purges the operating state of the virtual network interface card. When the virtual machine is resumed, the virtual machine requests configuration settings and other information from various components associated with the virtual machine to allow the virtual network interface card to recreate the purged operating state. Such requests are disruptive operations. It is with respect to these and other general considerations that the aspects disclosed herein have been made. Also, although relatively specific problems may be discussed, it should be understood that the examples should not be limited to solving the specific problems identified in the background or elsewhere in this disclosure. SUMMARY Examples of the present disclosure describe systems and methods for non-disruptively hibernating and resuming a guest environment using a network virtual service client. In examples, when a guest environment is hibernated, a network virtual service client provides an instruction to a virtual network interface card to set the device power state of the virtual network interface card to a low power state. The network virtual service client disables the communication channels between the network virtual service client and a network virtual service provider. The network virtual service client also saves the operating state of the virtual network interface card in memory. When the guest environment is resumed, the network virtual service client provides an instruction to the virtual network interface card to set the device power state of the virtual network interface card to a full power state. The network virtual service client reenables the communication channels between the network virtual service client and the network virtual service provider. The network virtual service client restores the operating state of the virtual network interface card from the memory. This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Additional aspects, features, and/or advantages of examples will be set forth in part in the description which follows and, in part, will be apparent from the description, or may be learned by practice of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS Examples are described with reference to the following figures. FIG. 1 illustrates an example computing environment for non-disruptively hibernating and resuming a guest environment using a network virtual service client. FIG. 2 illustrates an example method for non-disruptively hibernating a guest environment using a network virtual service client. FIG. 3 illustrates an example method for non-disruptively resuming a guest environment using a network virtual service client. FIG. 4 is a block diagram illustrating example physical components of a computing device for practicing aspects of the disclosure. FIG. 5 is a simplified block diagram of an example distributed computing system for practicing aspects of the present disclosure. DETAILED DESCRIPTION A host operating system (OS) is capable of hosting and executing one or more guest environments, such as a virtual machine (VM) or a container. When a guest environment is executing, the guest environment consumes resources (e.g., processing, networking, storage) of the host OS. When the guest environment is hibernated (e.g., put into a hibernation mode or a similar reduced power mode), the guest environment ceases consuming resources of the host OS or consumes significantly fewer resources of the host OS. Upon hibernation of the guest environment, the virtual network interface card (VNIC) utilized by the guest environment purges the operating state of the VNIC. The operating state comprises receive side scaling (RSS) configuration data, Transmission Control Protocol/Internet Protocol (TCP/IP) and other network stack upper layer protocol offloads or configurations, and/or other configuration settings associated with the guest environment. RSS, as used herein, is a network driver technology that enables the efficient distribution of network receive processing across multiple central processing units (CPUs) in multiprocessor systems. In addition to purging the operating state of the VNIC, the communication channels (e.g., the VM bus channels) between the guest environment and a component managing the guest environment (e.g., a host OS, a hypervisor, a network virtual service provider) are removed. Previously, when the guest environment was resumed, the guest environment was required to request configuration settings and othe