User datagram protocol (UDP) packet migration in a virtual machine (VM) migration

Embodiments of the invention relate to receiving, by a first processor comprising a processing device, an indication that a migration of a virtual machine from the first processor to a second processor is to occur. The first processor transmits user datagram protocol (UDP) packets intended for the virtual machine to the second processor based on the indication. A signal is transmitted to the virtual machine to enter an offline state, wherein the offline states comprises a transfer of at least one of a central processing unit (CPU) state and a memory state, and wherein the virtual machine is configured to halt a processing of the UDP packets in response to receiving the signal. The virtual machine is reactivated once the migration of the virtual machine from the first processor to the second processor is complete. The virtual machine is instructed to resume the processing of the UDP packets.

BACKGROUND

The present invention relates to management of virtual machines (VMs), and more specifically, to a user datagram protocol (UDP) packet migration in a virtual machine (VM) migration.

Providers of cloud computing have the competing tasks of providing desired performance for consumers or end users while also efficiently allocating the resources used to provide services to consumers. The resources may be dynamically allocated by the provider to help achieve these goals. Accordingly, a hardware platform may host a plurality of virtual machines, wherein each virtual machine corresponds to a consumer. Efficient use of the hardware platform resources dictates that the provider place as many virtual machines on the platform as possible without compromising the consumer's use of the virtual machine and experience. It may be desirable to move or migrate a virtual machine from one hardware platform to another to ensure that the customer is not adversely affected by changes in resources for the virtual machines.

Environments based on the Transmission Control Protocol (TCP) are able to continue working through a migration because TCP windows are generally longer than the “offline” portion of a virtual machine migration process that suspends all input/output (I/O) and guest processing while a final processing state and other miscellaneous data are sent to a remote host where execution is subsequently resumed. Another network protocol is the user datagram protocol (UDP) which does not include guarantees regarding retry or ordering as compared to TCP.

SUMMARY

An embodiment is directed to a method comprising receiving, by a first processor comprising a processing device, an indication that a migration of a virtual machine from the first processor to a second processor is to occur. The method further comprises transmitting, by the first processor, user datagram protocol (UDP) packets intended for the virtual machine to the second processor based on the indication. The method further comprises transmitting a signal to the virtual machine to enter an offline state, wherein the offline states comprises a transfer of at least one of a central processing unit (CPU) state and a memory state, and wherein the virtual machine is configured to halt a processing of the UDP packets in response to receiving the signal. The method further comprises reactivating the virtual machine once the migration of the virtual machine from the first processor to the second processor is complete. The method further comprises instructing the virtual machine to resume the processing of the UDP packets.

An embodiment is directed to an apparatus comprising at least one processing device, and memory having instructions stored thereon. The instructions, when executed by the at least one processing device, cause the apparatus to receive an indication that a migration of a virtual machine from the apparatus to a processor is to occur. The instructions, when executed by the at least one processing device, cause the apparatus to transmit user datagram protocol (UDP) packets intended for the virtual machine to the processor based on the indication. The instructions, when executed by the at least one processing device, cause the apparatus to transmit a signal to the virtual machine to enter an offline state, wherein the offline states comprises a transfer of at least one of a central processing unit (CPU) state and a memory state associated with the virtual machine, and wherein the virtual machine is configured to halt a processing of the UDP packets in response to receiving the signal. The instructions, when executed by the at least one processing device, cause the apparatus to receive a second signal indicating that the migration of the virtual machine from the apparatus to the processor is complete. The instructions, when executed by the at least one processing device, cause the apparatus to instruct the virtual machine to resume the processing of the UDP packets based on the second signal.

An embodiment is directed to a computer program product comprising a computer readable storage medium having computer readable program code embodied therewith. The computer readable program code comprises computer readable program code configured for receiving, by a first hypervisor associated with a first processor, an indication that a migration of a virtual machine from the first processor to a second processor is to occur. The computer readable program code is configured for causing, by the first hypervisor, the first processor to transmit user datagram protocol (UDP) packets intended for the virtual machine to a second hypervisor associated with the second processor based on the indication. The computer readable program code is configured for causing, by the first hypervisor, the first processor to transmit a signal to the virtual machine to enter an offline state, wherein the offline states comprises a transfer of at least one of a central processing unit (CPU) state and a memory state, and wherein the virtual machine is configured to halt a processing of the UDP packets in response to receiving the signal. The computer readable program code is configured for reactivating the virtual machine once the migration of the virtual machine from the first processor to the second processor is complete. The computer readable program code is configured for instructing the virtual machine to resume the processing of the UDP packets.

DETAILED DESCRIPTION

Embodiments described herein are directed to virtual machine (VM) migration in computing environments that utilize the user datagram protocol (UDP) as a basis for transmitting or receiving data. In an embodiment, a hypervisor buffers UDP packets intended for a VM that has been placed in an offline state during a migration of the VM from a first processor to a second processor. When migration of the VM is complete, the hypervisor forwards the buffered UDP packets to a hypervisor executing on the second processor for processing by the migrated VM. In this manner, UDP packets are not lost during, or as a result of, the migration.

In an embodiment a signal is sent to a hypervisor indicating that a VM is about to be migrated. Based on receiving the signal, the hypervisor performs any migration that can be performed online where the VM remains responsive to the outside world. At the point in time when the hypervisor or VM determines that the VM must go into an offline phase of the migration (e.g., a phase where the VM is not performing computation and is having a critical execution state such as a central processing unit or “CPU” state and or a memory state being transferred), the hypervisor buffers inbound UDP packets intended for the migrating VM. In an embodiment, before entering the offline phase of migration, the hypervisor sends a signal (e.g., inband or out of band) to the VM under migration to halt processing of UDP packets. When the migration has completed, the hypervisor then retransmits the UDP packets intended for the VM to a new hypervisor executing the migrated VM. The VM is then reactivated on the remote side, where it resumes execution and the retransmitted UDP packets are delivered. In an embodiment where the VM had been instructed to buffer UDP packets and not process them, the hypervisor instructs the VM (e.g., using an inband or out of band signal) to normally operate on UDP packets after having optionally reordered its current buffer before processing. The UDP packets may be buffered in kernel or userspace memory in the guest or hypervisor.

Characteristics are as follows:

Service Models are as follows:

Deployment Models are as follows:

Workloads layer66provides examples of functionality for which the cloud computing environment may be utilized. Examples of workloads and functions which may be provided from this layer include: mapping and navigation; software development and lifecycle management; virtual classroom education delivery; data analytics processing; transaction processing; and a mobile desktop for mobile devices (e.g.,54A,54C, and54N, as well as mobile nodes10in cloud computing environment50) accessing the cloud computing services.

In one embodiment, one or both of the hardware and software layer60and the virtualization layer62may include edge components, such as a web server front end and image cache, as well as an image library store, e.g., in a high-performance RAID storage area network (SAN). In an exemplary embodiment, an application, such as a virtual machine monitoring application70in the virtualization layer62, may implement a process or method for migrating one or more virtual machines; however, it will be understood that the application70may be implemented in any layer. In some embodiments, the application70may buffer packets intended for a migrating virtual machine and may deliver the buffered packets once the migration is complete.

Turning now toFIG. 4, a computing system or environment400in accordance with an embodiment is shown. The system400may be indicative of a cluster or work group.

The system400includes three devices, device1402, device2404, and device3406. The devices402,404, and406may be configured to communicate with one another. For example, the devices402,404, and406may be configured to communicate with one another over wired or wireless connections. While the system400is shown as including three devices, in some embodiments more or fewer than three devices may be included. In some embodiments, one or more of the devices402,404, and406may include, or be associated with, one or more of the entities described above in connection withFIG. 1.

One or more of the devices402,404, and406may include one or more components. For example, the device402is shown inFIG. 4as including a processor408and memory410. The memory410may be configured to store data or information. The memory410may have instructions stored thereon that, when executed by the processor408, cause the device402to perform one or more methodological acts, such as those described herein. In some embodiments, the device402may include more than one processor408. The device402may include additional components not shown inFIG. 4. For example, the device402may include a transceiver to facilitate communications with the devices404and406.

The device402is shown inFIG. 4as being coupled to the device404via a link412. The device404is shown inFIG. 4as being coupled to the device406via a link414. The device406is shown as being coupled to the device402via a link416. In some embodiments, one or more of the links may be optional. For example, if link416is omitted, then the device402and the device406might not communicate with one another, or may communicate with one another via the device404serving as an intermediary or router of communications between the devices402and406.

One or more of the links412,414, and416may correspond to a transmission path for a packet (e.g., a UDP packet). The links412,414, and416may be used to share or transfer information or data from a first device to a second device. Such transfer may take place in response to, or based on, a machine migration (e.g., virtual machine migration).

In some embodiments, one or more of the devices or machines402,404, and406may include a hypervisor. For example, as shown inFIG. 4, the device404includes a hypervisor418, and the device406includes a hypervisor420.

Assuming a migration, such as a migration of data and/or processing state associated with a virtual machine (VM) or guest422, from the device404to the device406, the hypervisor418may receive a signal indicating that the VM422is about to be migrated. The hypervisor418may opt to perform any migration that may be considered to be “online” where the VM422remains responsive to the outside world.

At a time when the hypervisor418or VM422determines that the VM422must go into an offline phase of the migration, where the offline phase of the migration may correspond to the VM422not performing computations and/or having an execution state such as a CPU state or memory state transferred, the hypervisor418may buffer inbound packets (e.g., UDP packets) intended for the VM422. In some embodiments, the hypervisor418may send an in-band or out-of-band signal to the VM422under migration to halt processing of packets (e.g., UDP packets) before entry of the offline phase.

In some embodiments, an ordering of packets may be provided. For example, if packets are buffered on behalf of the migrating VM422, the packets may be buffered in order, such that when the VM422resumes operation or returns online following the migration, the packets are presented to the VM422in sequence. In this manner, efficiency may be enhanced by minimizing or eliminating the amount of packet re-ordering that needs to be undertaken by the VM422.

When migration has completed, the hypervisor418may retransmit the buffered packets intended for the VM422to the hypervisor420for delivery. Alternatively, the packets may be provided to the hypervisor420as the migration of the VM422from the device404to the device406is occurring.

The VM422may be reactivated on the remote machine (e.g., device406), whereby the VM422may resume execution and the packets that were buffered (if any) may be provided to the VM422for processing. If the VM422had been instructed to not process packets prior to entry of the offline phase, the hypervisor418may signal or instruct (in-band or out-of-band) the hypervisor420and/or the VM422to normally operate on such packets, potentially after having reordered such packets.

In some embodiments, packets may be buffered in a kernel or user-space memory in a VM/guest (e.g., VM/guest422) or a hypervisor (e.g., hypervisor418).

Turning now toFIG. 5, a flow chart of an exemplary method500is shown. The method500may be executed in connection with one or more systems, devices, or components, such as those described herein. In some embodiments, the method500may be executed in connection with the application70ofFIG. 3. The method500may be executed in order to migrate a VM or guest from a first location (e.g., a first device or machine) to a second location (e.g., a second device or machine).

In block502, a migration indication may be received. The migration indication may be received by, e.g., a hypervisor associated with the first location. The migration indication may be received for any number of reasons. For example, a determination may be made that the second location provides for more reliable or less expensive computing resources, for purposes of load balancing, etc.

In block504, the hypervisor associated with the first location may perform any migration considered online where the VM remains responsive to the outside world or one or more inputs, optionally based on the indication of block502.

In block506, the hypervisor associated with the first location may place the VM in an offline state. As part of block506, the hypervisor associated with the first location may buffer inbound packets intended for the VM. As part of block506, the hypervisor associated with the first location may instruct the VM to halt processing of packets. As part of block506, the migration of the VM may occur.

In block508, the hypervisor associated with the first location may forward or transmit any packets that it may have buffered as part of block506. The hypervisor associated with the first location may: (1) forward the packets to the VM at the second location, or (2) may forward the packets to a second hypervisor associated with the second location for forwarding to the VM.

In block510, the VM may be reactivated at the second location once the migration is complete. As part of block510, the hypervisor associated with the first location may instruct the hypervisor associated with the second location or the VM to process any packets that may have been subject of the “halt” of block506.

The method500is illustrative. In some embodiments, one or more of the blocks (or a portion thereof) may be optional. In some embodiments, the blocks may execute in an order or sequence that is different from what is shown inFIG. 5. In some embodiments, one or more additional blocks not shown may be included.

Technical effects and benefits include increasing or enhancing resiliency of one or more computing devices, such as UDP based servers when running on a virtualized platform. Such servers may be operative in connection with, e.g., the Network Time Protocol (NTP), the Dynamic Host Configuration Protocol (DHCP), the Voice over Internet Protocol (VoIP), etc.

Aspects of the disclosure may be implemented in connection with high performance networks, or in environments where performance trumps the need for strict ordering of data packets. Aspects of the disclosure may be exploited or implemented in environments where servers are subject to large loads (e.g., a large number of client computers and/or a large volume of data), or where servers are migrated frequently. For example, such migration may take place in cloud data centers during load balancing or other migration operations that may reduce cost by moving computation activities to where the computation is inexpensive.

Aspects of the disclosure may be implemented in connection with, e.g., point of sale (POS) systems, accounting systems, database systems, telephone and voice over internet protocol (VoIP) systems, etc.