A method and device for implementing cloud desktop virtual machine migration

By establishing a new connection and transmitting synchronized data during the cloud desktop virtual machine migration process, the problem of connection interruption during cloud desktop virtual machine migration is solved, ensuring a smooth switch for users without them noticing.

CN116233121BActive Publication Date: 2026-07-07NEW H3C TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2022-12-12
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

During the migration of cloud desktop virtual machines, the user's logged-in cloud desktop connection is easily interrupted, causing usage interruption issues.

Method used

New web socket connections and new TCP connections are established through the gateway, the corresponding relationships are recorded, and synchronization configuration information and business channel initialization parameters are transmitted to ensure that the client maintains a connection with the migrated cloud desktop server.

Benefits of technology

It enables seamless switching for clients during cloud desktop virtual machine migration, allowing users to continue using the virtual desktop normally.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233121B_ABST
    Figure CN116233121B_ABST
Patent Text Reader

Abstract

The application provides a method and device for realizing cloud desktop virtual machine migration. The method comprises the following steps: a gateway establishes a new web Socket connection between a client of a cloud desktop to which a migrated cloud desktop virtual machine is logged in; the gateway establishes a new TCP connection between the migrated cloud desktop virtual machine and a new server; the gateway records a corresponding relationship between the new web Socket connection and the new TCP connection; the gateway receives migration data through the new web Socket connection and sends the migration data through the new TCP connection; wherein the migration data at least comprises synchronization configuration information of the client and initialization parameters of each service channel; and the gateway transmits data of the migrated cloud desktop virtual machine through an old web Socket connection between the gateway and the client and an old TCP connection between the gateway and an old server of the migrated cloud desktop virtual machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to communication technology, specifically a method and device for migrating cloud desktop virtual machines. Background Technology

[0002] As the demand for remote work increases, more and more companies are starting to use VDI (Virtual Desktop Infrastructure) technology to build remote work infrastructure.

[0003] Due to the need for operation and maintenance and load balancing among cloud desktop servers, it is necessary to change the runtime environment of the cloud desktop virtual machines on the server to which user clients connect. This includes modifying the computing and storage resources of the virtual machines running on them, such as changing the cloud storage pool where the virtual machine's disk resides. When a user is already logged into the cloud desktop of a virtual machine, the running virtual machine needs to be present. Therefore, it is crucial to prevent the connection between the client and the virtual desktop from being lost due to the change in the server hosting the virtual desktop during the migration process, thus avoiding user interruption. Summary of the Invention

[0004] The purpose of this application is to provide a method and device for migrating cloud desktop virtual machines, without disconnecting the cloud desktop that the client is already logged into during the cloud desktop virtual machine migration process.

[0005] To achieve the above objectives, this application provides a method for migrating a cloud desktop virtual machine. The method includes: a gateway establishing a new WebSocket connection with a client logged into the cloud desktop virtual machine to be migrated; the gateway establishing a new TCP connection with a new server of the cloud desktop virtual machine to be migrated; the gateway recording the correspondence between the new WebSocket connection and the new TCP connection; receiving migration data through the new WebSocket connection and sending migration data through the new TCP connection; wherein the migration data includes at least the client's synchronization configuration information and initialization parameters for each service channel; and the gateway transmitting the data of the cloud desktop virtual machine to be migrated through the old WebSocket connection with the client and the old TCP connection between the old server of the cloud desktop virtual machine to be migrated.

[0006] To achieve the above objectives, this application also provides an apparatus for migrating cloud desktop virtual machines. The apparatus includes a processor and a memory; the memory stores machine-executable instructions; wherein the processor executes the machine-executable instructions in the memory to perform the following operations: establishing a new web socket connection between a client logged into the cloud desktop virtual machine being migrated; establishing a new TCP connection between the client and the new server of the cloud desktop virtual machine being migrated; recording the correspondence between the new web socket connection and the new TCP connection; receiving migration data through the new web socket connection and sending migration data through the new TCP connection; wherein the migration data includes at least the client's synchronization configuration information and initialization parameters for each service channel; and transmitting the data of the cloud desktop virtual machine being migrated through the old web socket connection with the client and the old TCP connection between the old server of the cloud desktop virtual machine being migrated.

[0007] The beneficial effect of this application is that by switching the web socket connection of the client in the wide area network through the gateway and switching the TCP connection of the server after the cloud desktop virtual machine is migrated in the local area network, the client's configuration, the initialization parameters of each business channel and other synchronization data are transmitted synchronously; so that the virtual desktop of the cloud desktop virtual machine that the client has logged into will not be disconnected, and the user can use the virtual desktop normally without being aware of it. Attached Figure Description

[0008] Figure 1 A flowchart illustrating an embodiment of the method for migrating cloud desktop virtual machines provided in this application;

[0009] Figure 2A-2B This is a schematic diagram illustrating the implementation of cloud desktop virtual machine migration provided in this application;

[0010] Figure 3 This is a schematic diagram of an embodiment of a device for migrating cloud desktop virtual machines provided in this application. Detailed Implementation

[0011] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.

[0012] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.

[0013] Figure 1A flowchart illustrating an embodiment of a method for migrating cloud desktop virtual machines provided in this application; the method includes:

[0014] Step 101: The gateway establishes a new WebSocket connection with the client that has logged into the cloud desktop virtual machine that has been migrated;

[0015] Step 102: The gateway establishes a new TCP connection with the new server of the migrated cloud desktop virtual machine;

[0016] Step 103: The gateway records the mapping between new web socket connections and new TCP connections;

[0017] Step 104: Receive migration data through a new web socket connection and send migration data through a new TCP connection; wherein, the migration data includes at least the client's synchronization configuration information and the initialization parameters of each business channel;

[0018] Step 105: The gateway transmits the data of the migrated cloud desktop virtual machine through the old web socket connection with the client and the old TCP connection between the old server of the migrated cloud desktop virtual machine.

[0019] Figure 1 The beneficial effect of this embodiment is that by switching the web socket connection of the client within the wide area network and switching the TCP connection of the server after the cloud desktop virtual machine is migrated within the local area network through the gateway, the configuration of the client and the initialization parameters of each service channel are transmitted synchronously. This ensures that the virtual desktop of the cloud desktop virtual machine that the client has logged into will not be disconnected, and the user can use the virtual desktop normally without being aware of it.

[0020] Figure 2A-2B This is a schematic diagram illustrating the implementation of cloud desktop virtual machine migration provided in this application. Figure 2A In the process, the cloud desktop control platform controller migrates the cloud desktop virtual machine from cloud desktop server 1 to cloud desktop server 2; the cloud desktop control platform controller encrypts the IP address of cloud desktop server 1 and the VDP (Virtual Desktop Protocol) protocol port of the cloud desktop virtual machine on cloud desktop server 2 into a new token.

[0021] The cloud desktop control platform controller sends the encrypted new token to the gateway via TCP connection 210, and sends the encrypted new token to the physical cloud desktop server 1 via TCP connection 211.

[0022] The gateway receives a new token, decrypts and parses the token to obtain the IP address of cloud desktop server 2 and the VDP protocol port of the cloud desktop virtual machine on cloud desktop server 2. The gateway records the new token received to correspond to the parsed IP address of desktop server 2 and the cloud desktop virtual machine on the cloud desktop server.

[0023] Cloud desktop server 1 will notify the client of the new token received from the cloud desktop control platform controller via VDP protocol messages.

[0024] The client sends a WebSocket connection request message, for example, an HTTP GET message, where the update field carries the WebSocket protocol type and the Sec-WebSocket-Version field carries information indicating the WebSocket version.

[0025] The gateway receives the WebSocket connection request message and sends an HTTP response message. A WebSocket connection with a new associated token is established between the client and the gateway.

[0026] The gateway finds the IP address of desktop server 2 and the VDP protocol port of the cloud desktop virtual machine on desktop server 2 based on the new token carried in the web socket connection request message; the gateway establishes a TCP connection 232 with desktop server 2 and records the correspondence between web socket connection 231 and TCP connection 232.

[0027] Figure 2A In this configuration, gateway 1 retains web socket connections 221 for clients connected within the wide area network and TCP connections 222 between the local area network and desktop server 1.

[0028] The client sends migration data to the gateway via web socket connection 231, and then the gateway sends the migration data to desktop server 2 via TCP connection 232; wherein, the migration data includes at least the client's synchronization configuration information and the initialization parameters of each business channel.

[0029] The client transmits the data of the migrated cloud desktop virtual machine via web socket 221 and TCP connection 222 between the client and desktop server 1.

[0030] Figure 2A During the process, the virtual desktops of the cloud desktop virtual machines already logged into by the client will not be disconnected, and users will not be aware of the migration of the cloud desktop virtual machines and will continue to use the virtual desktops normally. Desktop server 2 synchronizes the migration progress of the cloud desktop virtual machines to desktop server 1.

[0031] Figure 2B In the process, Desktop Server 1 confirms that the migrated cloud desktop virtual machine has been migrated to Desktop Server 2 based on the migration progress of the synchronized cloud desktop virtual machine; Desktop Server 1 notifies the gateway of the migration completion via TCP connection 222. The gateway sends a switch web socket connection notification via web socket connection 221 with the client. The client disconnects web socket connection 221 (not shown in the figure). The gateway detects that web socket 221 is disconnected, and then disconnects the corresponding TCP connection 222 (not shown in the figure).

[0032] The client transmits the data of the migrated cloud desktop virtual machine via WebSocket 231 and TCP connection 232 with desktop server 2.

[0033] Figure 3 This is a schematic diagram of an embodiment of a device for migrating cloud desktop virtual machines provided in this application. The device 30 includes a processor and a memory. The memory stores machine-executable instructions that the processor can execute. The processor executes the machine-executable instructions in the memory to perform the following operations: establishing a new web socket connection between a client that has logged into the cloud desktop virtual machine being migrated; establishing a new TCP connection between the client and the new server of the cloud desktop virtual machine being migrated; recording the correspondence between the new web socket connection and the new TCP connection; receiving migration data through the new web socket connection and sending migration data through the new TCP connection; wherein the migration data includes at least the client's synchronization configuration information and the initialization parameters of each service channel; and transmitting the data of the cloud desktop virtual machine being migrated through the old web socket connection of the client and the old TCP connection between the old server of the cloud desktop virtual machine being migrated.

[0034] The processor also performs the following operations by running machine-executable instructions in memory: obtaining information that the migrated cloud desktop virtual machine has completed its migration to the new server; and sending a switch web socket connection notification via the old web socket connection with the client to cause the client to close the old web socket connection.

[0035] Data from the migrated cloud desktop virtual machine is transmitted through a new web socket connection to the client and a new TCP connection to the new server; the old TCP connection is closed based on the mapping between the old web socket and the old TCP connection.

[0036] The process of establishing a new web socket connection between the processor and a client that has logged into the migrated cloud desktop virtual machine by executing machine-executable instructions in memory includes: receiving a new token from the client sent by the cloud desktop control platform; decrypting the new token into the IP address and UDP port of the new server, and recording the IP address and UDP port corresponding to the new token; receiving a connection request with the new token sent by the client; and sending a successful request response to the client.

[0037] The process of establishing a new TCP connection between the processor and the new server of the migrated cloud desktop virtual machine by executing machine-executable instructions in memory includes: finding the IP address and UDP port of the new server based on the new token in the connection request; and establishing a new TCP connection based on the found IP address and UDP port of the new server.

[0038] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for migrating cloud desktop virtual machines, characterized in that, The method includes: The gateway establishes a new WebSocket connection with the client that is logged into the migrated cloud desktop virtual machine; The gateway establishes a new TCP connection with the new server of the migrated cloud desktop virtual machine; The gateway records the correspondence between the new web socket connection and the new TCP connection; The migration data is received through the new web socket connection and sent through the new TCP connection; wherein, the migration data includes at least the client's synchronization configuration information and the initialization parameters for each service channel; The gateway transmits the data of the migrated cloud desktop virtual machine through the old web socket connection with the client and the old TCP connection between the old server of the migrated cloud desktop virtual machine; The gateway obtains that the migrated cloud desktop virtual machine has completed its migration to the new server; A notification to switch web socket connections is sent through the old web socket connection between the gateway and the client, so that the client closes the old web socket connection.

2. The method according to claim 1, characterized in that, The method further includes: The gateway transmits the data of the migrated cloud desktop virtual machine through the new web socket connection with the client and the new TCP connection with the new server; The gateway closes the old TCP connection based on the recorded correspondence between the old web socket and the old TCP connection.

3. The method according to claim 1, characterized in that, Establish a new web socket connection between the gateway and the client that has logged into the migrated cloud desktop virtual machine; The gateway receives a new token from the client sent by the cloud desktop control platform; The gateway decrypts the new token into the IP address and UDP port of the new server, and records the IP address and UDP port of the new server corresponding to the new token; The gateway receives a connection request with the new token sent by the client; The gateway sends a successful response to the client.

4. The method according to claim 3, characterized in that, The gateway establishes a new TCP connection with the new server of the migrated cloud desktop virtual machine; The gateway finds the IP address and UDP port of the new server based on the new token carried in the connection request. The gateway establishes the new TCP connection based on the IP address and UDP port of the new server found.

5. A device for migrating cloud desktop virtual machines, characterized in that, The device includes a processor and a memory; the memory stores machine-executable instructions that the processor executes; wherein the processor performs the following operations by executing the machine-executable instructions in the memory: Establish a new webSocket connection between the client and the cloud desktop that has been logged into the migrated cloud desktop virtual machine; Establish a new TCP connection between the new server and the migrated cloud desktop virtual machine; Record the correspondence between the new web socket connection and the new TCP connection; The migration data is received through the new web socket connection and sent through the new TCP connection; wherein, the migration data includes at least the client's synchronization configuration information and the initialization parameters for each service channel; The data of the migrated cloud desktop virtual machine is transmitted through the old web socket connection with the client and the old TCP connection between the old server of the migrated cloud desktop virtual machine. The migrated cloud desktop virtual machine has been successfully migrated to the new server; Send a notification to switch web socket connections via the old web socket connection between the client and the client, so that the client closes the old web socket connection.

6. The device according to claim 5, characterized in that, The processor also performs the following operations by executing machine-executable instructions in the memory: The data of the migrated cloud desktop virtual machine is transmitted through the new web socket connection with the client and the new TCP connection with the new server; The old TCP connection is closed based on the recorded correspondence between the old web socket and the old TCP connection.

7. The device according to claim 5, characterized in that, The operation by which the processor establishes a new webSocket connection between a client that has logged into the migrated cloud desktop virtual machine and the client, by executing machine-executable instructions in the memory, includes: Receive the new token sent by the cloud desktop control platform to the client; The new token is decrypted into the IP address and UDP port of the new server, and the IP address and UDP port of the new server corresponding to the new token are recorded. Receive a connection request with the new token sent by the client; A successful response was sent to the client.

8. The device according to claim 7, characterized in that, The operation by which the processor establishes a new TCP connection with the new server of the migrated cloud desktop virtual machine by executing machine-executable instructions in the memory includes: The IP address and UDP port of the new server are found based on the new token carried in the connection request; A new TCP connection is established based on the IP address and UDP port of the new server found.