WO2013040929A1 - Virtual machine running method and system - Google Patents

Virtual machine running method and system Download PDF

Info

Publication number
WO2013040929A1
WO2013040929A1 PCT/CN2012/077948 CN2012077948W WO2013040929A1 WO 2013040929 A1 WO2013040929 A1 WO 2013040929A1 CN 2012077948 W CN2012077948 W CN 2012077948W WO 2013040929 A1 WO2013040929 A1 WO 2013040929A1
Authority
WO
WIPO (PCT)
Prior art keywords
state
virtual machine
virtual
offline
virtual desktop
Prior art date
Application number
PCT/CN2012/077948
Other languages
French (fr)
Chinese (zh)
Inventor
刘海军
严正
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013040929A1 publication Critical patent/WO2013040929A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors

Definitions

  • the present invention relates to the field of communications, and in particular to a method and system for operating a virtual machine.
  • BACKGROUND Cloud computing is a new term born in 2007.
  • Information there are more and more information technologies (Information).
  • a virtual desktop is a type of cloud computing application. It is a Platform-as-a-Service (PaaS) type. It is usually referred to as an application: By arranging servers and running virtual machines of the desktop system, users are made. Desktop systems can be used without restrictions on physical space, including desktop operations. There are various existing implementation methods of virtual desktops, such as thin terminal mode, managed operating system mode, and image streaming mode.
  • the basic method is to run an application or operating system desktop in the cloud (server group), and the virtual desktop client is responsible for Output (desktop) input (keyboard, mouse, etc.).
  • Virtual desktops can be applied to call centers, operation and maintenance stations, office applications, and the like.
  • FIG. 1 is a schematic diagram of a virtual desktop system according to the related art. As shown in FIG. 1, various terminals can connect to a desktop cloud through a virtual desktop interface, and a virtual desktop client runs on the terminal; the virtual desktop cloud is composed of a plurality of physical machines. , running virtual machines that provide desktop functionality to clients connected to the desktop cloud, which are managed by the hypervisor.
  • each desktop client corresponds to a virtual machine in the virtual desktop cloud, and the virtual desktop client uses the same experience as the local operating system.
  • the virtual desktop client needs to connect to the virtual desktop cloud to use the connected desktop.
  • the virtual desktop cloud manages its running state for each virtual machine, as shown in Figure 2, the solid line connecting lines indicates the migration of each state, which is stopped, running, suspended, and offline. After the user goes offline, the virtual machine is offline. In this state, the virtual machine still occupies some resources, or some applications can no longer run offline.
  • the virtual desktop client after the virtual desktop client is offline, the virtual machine cannot be operated according to actual needs.
  • a virtual machine running method including: setting a state of a virtual machine after the virtual desktop client corresponding to the virtual machine is offline; after the virtual desktop client is offline, the virtual machine is set according to the setting The state is running.
  • the above states include one of the following: Stop state, Run state, Suspended state, and Offline state.
  • the virtual machine runs according to the set state: the virtual desktop system platform where the virtual machine is located migrates the state of the virtual machine to the set state.
  • the method further includes: the virtual machine is migrated from an offline state to a stopped state, a running state, or a suspended state.
  • the method further includes: setting the state transition mode of the virtual machine after the virtual desktop client is offline to migrate from the offline state to the stopped state and the running state. , or hang state.
  • the state or state transition mode of the virtual machine after the virtual desktop client corresponding to the virtual machine is offline includes: the virtual desktop client receives an instruction from the user; and the virtual desktop client determines the state of the setting according to the user's instruction. In the same state, the virtual desktop's virtual desktop and/or virtual application run the same.
  • a virtual machine running system including: a virtual desktop client and a virtual machine corresponding to the virtual desktop client, the system further comprising: a setting module, configured to set the virtual machine in The state after the virtual desktop client is offline; the virtual machine is set to run according to the set state after the virtual desktop client is offline.
  • the above states include one of the following: Stop state, Run state, Suspended state, and Offline state.
  • the system further includes: a virtual desktop system platform where the virtual machine is located, where the virtual desktop system platform includes: a migration module, configured to migrate the state of the virtual machine to a set state after the virtual desktop client is offline.
  • the state in which the virtual desktop client corresponding to the virtual machine of the virtual machine is offline is set, and after the virtual desktop client is offline, the virtual machine operates according to the set state, and the related technology is solved. After the virtual desktop client is offline, the virtual machine cannot be operated according to actual needs. In addition, the virtual machine can be operated in an appropriate state after the virtual desktop client is offline.
  • FIG. 1 is a schematic diagram of a virtual desktop system platform according to the related art
  • FIG. 2 is a schematic diagram of virtual machine state transition according to the related art
  • FIG. 3 is a flowchart of a virtual machine running method according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a state transition of a virtual machine according to an embodiment of the present invention
  • FIG. 5 is a flow chart of a message for setting a virtual machine state and an migrating state according to an embodiment of the present invention
  • FIG. 6 is a virtual machine according to an embodiment of the present invention
  • FIG. 7 is a block diagram showing the structure of a preferred virtual machine operating system in accordance with an embodiment of the present invention.
  • the method of the embodiments of the present invention may be executed by a computer, a device or a machine, and the method may be stored as machine readable instructions, which may be stored on a determined medium, for example, a computer storage device, including but not Limited to read-only memory (Read-Only Memory, ROM for short) (read-only memory, flash memory (FLASH) memory, transfer device, etc.), magnetic storage media (eg, magnetic tape, disk drive, etc.), optical storage media (eg , Compact Disc Read-Only Memory (CD-ROM), Digital Video Disc Read-Only Memory (DVD-ROM), paper cards, tapes, etc., and other well-known types of programs.
  • Read-Only Memory Read-Only Memory
  • ROM read-only memory
  • flash memory FLASH
  • magnetic storage media eg, magnetic tape, disk drive, etc.
  • optical storage media eg , Compact Disc Read-Only Memory (CD-ROM), Digital Video Disc Read-Only Memory (DVD-ROM), paper cards, tapes
  • FIG. 3 is a flowchart of a method for running a virtual machine according to an embodiment of the present invention. The method includes: Step S302: setting a state in which a virtual machine is offline after a virtual desktop client corresponding to the virtual machine; Step S304, offline in the virtual desktop client After that, the virtual machine runs according to the set state.
  • the status or state transition mode of the virtual machine after the corresponding virtual desktop client is offline is preset, so that the offline system can be suspended or stopped, thereby achieving energy saving and achieving environmental protection, or After the offline, the system can still operate normally like the connection, and the calculation of the application is completed. It can be seen that this embodiment enables the virtual machine to operate as needed after the virtual desktop client is offline.
  • the status of the above setting may include one of the following: a stop state, a running state, a suspended state, and an offline state. With this embodiment, after the virtual desktop client is offline, the virtual machine can run in the above state.
  • step S304 may include: the virtual desktop system platform migrating the state of the virtual machine to the set state.
  • the virtual desktop system platform that is, the virtual desktop cloud, also referred to as the virtual desktop server, can save the setting. status.
  • the virtual desktop system platform migrates the state of the virtual machine to the saved state.
  • the state of the settings is saved in the virtual desktop system platform, thereby conveniently migrating the state of the virtual machine to the saved state.
  • the virtual machine after the virtual desktop client is offline, the virtual machine may be migrated from an offline state to a stopped state, an operating state, or a suspended state.
  • the state transition mode of the virtual machine after the virtual desktop client is offline may be set to migrate from the offline state to the stopped state, the running state, or Suspended state.
  • Step S302 can include various implementations, and only one of them will be described below.
  • the virtual desktop client receives instructions from the user; then, the virtual desktop client determines the status of the settings based on the user's instructions.
  • Embodiment 2 provides a method for setting and managing a virtual machine running state in a virtual desktop system platform.
  • the method includes: setting a state of the virtual machine after being offline, and then, after the virtual desktop client is offline, the virtual machine runs according to the set state.
  • the state of the virtual machine after the virtual desktop client is offline may be set in the virtual desktop client, or may be set in other devices, for example, in the virtual desktop system platform.
  • the state of the virtual machine includes at least one of: stop, run, suspend, or offline. This way, after the virtual desktop client is offline, the virtual machine can run in a stopped, running, suspended, or offline state, that is, in a pre-set state.
  • the virtual machine can be migrated in a state such as stop, run, hang, and run, offline.
  • the virtual machine can be migrated from the offline state to the stop state, the running state, or the suspended state in addition to the state transition mode.
  • the virtual machine can be migrated from an offline state to a stopped state, a running state, or a suspended state in a preset manner.
  • the pre-set state of the virtual machine can be saved on the virtual desktop system platform, so that each time the virtual desktop client is offline, the hypervisor can migrate the virtual machine state according to the preset. Regardless of how the virtual machine migrates, the virtual desktop and/or virtual application behave the same under the same state.
  • the method of the embodiment can satisfy the user's control of the running state of the system after offline, and can achieve the effect of saving energy consumption and achieving green environmental protection, and can also achieve normal operation when the virtual machine is connected.
  • the effect of the application's operation is completed.
  • Embodiment 3 The basic idea of the embodiment is to provide a method for a virtual machine to run in a specified state after the client is offline.
  • the present process of the embodiment of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.
  • 1 is a schematic diagram of a virtual desktop system platform according to the related art. The figure shows a virtual desktop system.
  • FIG. 4 is a schematic diagram of state transition of a virtual machine according to an embodiment of the present invention.
  • the state of the virtual machine includes at least stop, run, suspend, offline, and the like.
  • the solid line connection diagram shows the migration of each state, these states are stopped, running, suspended, and offline. After the user goes offline, the virtual machine is offline.
  • the state diagram of the dotted line connection is a schematic diagram of the virtual machine running in the set state after the virtual machine is offline and the virtual desktop client is offline.
  • the virtual machine can be migrated from the offline state to the stopped state, the running state, or the suspended state in addition to the state transition.
  • the virtual machine can be migrated in a state such as stop, run, hang, and run, offline. It should be noted that the virtual machine and the virtual application operate in the same state regardless of how the virtual machine migrates. If the virtual machine can be moved from the offline state to the stopped state, or the running state, or the suspended state, it needs to be set in advance.
  • FIG. 5 is a schematic flowchart of a message for setting a virtual machine state and an migrating state according to an embodiment of the present invention. The figure includes a message flow that is preset and moved to a specified state after the user goes offline. This message flow occurs between the virtual desktop client and the desktop cloud, and the virtual desktop client is connected to the virtual desktop system platform.
  • Step S502 The virtual desktop client sends a request message to the virtual desktop system platform that includes a request to set an offline status.
  • the virtual desktop client can send the message to the virtual desktop system through the following interface: The user performs the corresponding operation on the interface provided by the virtual desktop client. After the user completes the interface setting, the virtual desktop client sends a message to the virtual desktop system through the interface.
  • the virtual desktop system platform receives the message of the virtual desktop client, and after processing the request, responds to the virtual desktop client.
  • the processing of the virtual desktop client request message by the virtual desktop system platform includes: checking whether the setting is allowed according to the specified state in the request, and saving the final state migration setting on the virtual desktop system platform.
  • Step S506 the desktop data is exchanged between the virtual desktop client and the virtual desktop system platform under normal conditions.
  • Step S508 the virtual desktop client is offline, and then the virtual desktop system platform sends a message indicating that the virtual desktop client is going offline, the virtual desktop system platform processes the offline request message, and migrates the virtual machine state according to the preset setting.
  • the operation of setting the state of the virtual machine after being offline may also be performed for each user directly on the virtual desktop system platform, and then the result of the setting is saved in the virtual desktop system platform.
  • Embodiment 4 The embodiment of the present invention discloses a virtual machine running system.
  • FIG. 6 is a structural block diagram of a virtual machine running system according to an embodiment of the present invention.
  • the system includes: a virtual desktop client 62 and a virtual desktop client 62.
  • the virtual machine 64 the system may further include: a setting module 66, configured to set a state of the virtual machine after the virtual desktop client is offline; the virtual machine 64, configured to run according to the set state after the virtual desktop client 62 is offline .
  • the setting module 66 may be located in the virtual desktop client 62 or in the virtual desktop system platform corresponding to the virtual machine 64.
  • the status or state transition mode of the virtual machine after the corresponding virtual desktop client is offline is preset, so that the offline system can be suspended or stopped, thereby achieving energy saving and achieving environmental protection, or After the offline, the system can still operate normally like the connection, and the calculation of the application is completed.
  • FIG. 7 is a structural block diagram of a preferred virtual machine running system according to an embodiment of the present invention.
  • the system may further include: a virtual desktop system platform 72 where the virtual machine is located, where the virtual desktop system platform 72 includes: a saving module 74, configured to After the virtual machine is set to the state after the virtual desktop client corresponding to the virtual machine is offline, the state is saved; the migration module 76 is configured to migrate the state of the virtual machine to the saved state after the virtual desktop client is offline.
  • the virtual desktop system platform 72 may also include the migration module 76 without including the save module 74. At this time, the migration module 76 is configured to migrate the state of the virtual machine to the set state after the virtual desktop client is offline.
  • the state of the settings is saved in the virtual desktop system platform, thereby conveniently migrating the state of the virtual machine to the saved state.
  • the virtual machine 64 can be migrated from an offline state to a stopped state, an operational state, or a suspended state.
  • the state transition mode of the virtual machine 64 after the virtual desktop client 62 is offline may be configured to migrate from the offline state to the stopped state and run. Status, or pending status.
  • the virtual desktop client 62 is further configured to receive an instruction from the user and determine a set state or state transition mode according to the user's instruction.
  • the virtual desktop and/or virtual application of virtual machine 64 operates the same.
  • a virtual machine running software is also provided, which is used to execute the technical solutions described in the foregoing embodiments and preferred embodiments.
  • a storage medium is provided, in which the virtual machine running software is stored.
  • the present invention adopts a state or state transition mode in which the virtual desktop client corresponding to the virtual machine of the virtual machine is offline after being set, and after the virtual desktop client is offline, the virtual machine is shipped according to the set state. The way of doing this is to achieve the effect that the virtual machine can operate in the appropriate state after the virtual desktop client is offline.
  • the foregoing process is a preferred process for implementing the embodiments of the present invention, and is not limited to the implementation of the embodiments, and is not used to limit the specific process execution.
  • the embodiment of the present invention may also be implemented in a similar manner, for example, the presentation module.
  • the above embodiments are network-related and can be applied to a Public Switched Telephone Network (PSTN), a 3rd Generation Partnership Project (3GPP) network, and a third generation partner.
  • PSTN Public Switched Telephone Network
  • 3GPP 3rd Generation Partnership Project
  • 3GPP2 3rd Generation Partnership Project 2
  • the server architecture can be applied to the grid computing system and the distributed computing system.
  • the server operating system can be applied to the UNIX-like operating system and the WINDOWS class.
  • the operating system, the consumer interface can be applied to the JAVA language interface.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

A virtual machine running method comprises: setting a state of a virtual machine after a virtual desktop client corresponding to the virtual machine is offline (S302); and after the virtual desktop client is offline, the virtual machine running according to the set state (S304). Also provided is a virtual machine running system. The solution achieves an effect that the virtual machine can perform operation in a suitable state as required after the virtual desktop client is offline.

Description

虚拟机运行方法及系统 技术领域 本发明涉及通信领域, 具体而言, 涉及一种虚拟机运行方法及系统。 背景技术 云计算是诞生于 2007年的新名词,目前,已经有越来越多的信息技术(Information TECHNICAL FIELD The present invention relates to the field of communications, and in particular to a method and system for operating a virtual machine. BACKGROUND Cloud computing is a new term born in 2007. At present, there are more and more information technologies (Information).
Technology, 简称为 IT)、 通讯技术 (Communication Technology, 简称为 CT) 设备商 和运营商加入到云产品的开发研究和云产品的推广与布置。 云产品在互联网应用、 信 息中心建设等领域已经得到相对成熟的应用。 虚拟桌面是云计算应用的一种,属平台即服务(Platform-as-a-Service,简称为 PaaS) 类型, 通常是指这样的应用: 通过集中布置服务器并运行桌面系统的虚拟机, 使得用 户可以通过网络不限于物理空间限制来使用桌面系统, 包括桌面操作。 虚拟桌面的现有实现方法有多种, 例如, 瘦终端方式、 托管操作系统方式、 映象 流方式等, 其基本方法是在云端 (服务器群) 运行应用或操作系统桌面, 虚拟桌面客 户端负责输出(桌面)输入(键盘、 鼠标等各种外设)。虚拟桌面可以应用于呼叫中心、 操作维护台、 办公应用等。 图 1是根据相关技术的虚拟桌面系统的示意图, 如图 1所示, 各种终端能够通过 虚拟桌面接口连接到桌面云, 终端上运行着虚拟桌面客户端; 虚拟桌面云由众多的物 理机组成, 运行着为连接到桌面云的客户端提供桌面功能的虚拟机, 这些虚拟机由虚 拟机管理程序管理。 在虚拟桌面云里, 在托管操作系统方式等实现方法中, 每个桌面客户端对应着虚 拟桌面云里面的虚拟机,虚拟桌面客户端上使用体验就如同使用本地的操作系统一样。 虚拟桌面客户端需要连接到虚拟桌面云才能使用连线的桌面。 因为虚拟桌面云对每个 虚拟机要管理其运行状态, 如图 2所示, 其中的实线连接线表示了各状态的迁移, 这 些状态有停止、 运行、 挂起、 和离线等。 在用户离线之后, 虚拟机处于离线状态, 这 一状态下, 虚拟机仍然占用一些资源, 或者有些应用程序在离线状态下不能再继续运 行。 综上所述, 在相关技术中, 虚拟机在虚拟桌面客户端离线后, 不能根据实际需要 进行操作。 发明内容 本发明提供了一种虚拟机运行方案, 以解决相关技术中存在的虚拟机在虚拟桌面 客户端离线后, 不能根据实际需要进行操作的问题。 根据本发明的一个方面, 提供了一种虚拟机运行方法, 包括: 设置虚拟机在该虚 拟机对应的虚拟桌面客户端离线后的状态; 在该虚拟桌面客户端离线后, 该虚拟机按 照设置的状态运行。 上述状态包括以下之一: 停止状态、 运行状态、 挂起状态、 和离线状态。 在虚拟桌面客户端离线后, 虚拟机按照设置的状态运行包括: 虚拟机所在的虚拟 桌面系统平台迁移虚拟机的状态至设置的状态。 在虚拟桌面客户端离线后, 上述方法还包括:虚拟机从离线状态迁移到停止状态、 运行状态、 或挂起状态。 在虚拟机从离线状态迁移到停止状态、 运行状态、 或挂起状态之前, 上述方法还 包括: 设置虚拟机在虚拟桌面客户端离线后的状态迁移方式为从离线状态迁移到停止 状态、 运行状态、 或挂起状态。 设置虚拟机在虚拟机对应的虚拟桌面客户端离线后的状态或状态迁移方式包括: 虚拟桌面客户端接收来自用户的指令; 虚拟桌面客户端根据用户的指令确定设置的状 态。 在相同状态下, 虚拟机的虚拟桌面和 /或虚拟应用的运行是相同的。 根据本发明的另一方面, 提供了一种虚拟机运行系统, 包括: 虚拟桌面客户端和 与所述虚拟桌面客户端对应的虚拟机, 该系统还包括: 设置模块, 设置为设置虚拟机 在虚拟桌面客户端离线后的状态; 虚拟机, 设置为在虚拟桌面客户端离线后, 按照设 置的状态运行。 上述状态包括以下之一: 停止状态、 运行状态、 挂起状态、 和离线状态。 优选地, 上述系统还包括: 虚拟机所在的虚拟桌面系统平台, 其中, 虚拟桌面系 统平台包括: 迁移模块, 设置为在虚拟桌面客户端离线后, 迁移虚拟机的状态至设置 的状态。 通过本发明, 采用预先设置虚拟机的该虚拟机对应的虚拟桌面客户端离线后的状 态, 并在该虚拟桌面客户端离线后, 该虚拟机按照设置的状态运行的方式, 解决了相 关技术中存在的虚拟机在虚拟桌面客户端离线后,不能根据实际需要进行操作的问题, 进而达到了虚拟机能够在虚拟桌面客户端离线后, 根据需要处于合适的状态进行操作 的效果。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据相关技术的虚拟桌面系统平台组成的示意图; 图 2是根据相关技术的虚拟机状态迁移的示意图; 图 3是根据本发明实施例的虚拟机运行方法的流程图; 图 4是根据本发明实施例的虚拟机状态迁移的示意图; 图 5是根据本发明实施例的设置虚拟机状态及迁入状态的消息流程示意图; 图 6是根据本发明实施例的虚拟机运行系统的结构框图; 图 7是根据本发明实施例的优选的虚拟机运行系统的结构框图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 为了清楚起见, 这里没有示出和描述设备的所有的常规特征。 当然, 应当理解, 在任何实际设备的研制中,必需做出特定实现方式的决定以便实现研制者的特定目标, 例如, 符合与应用及业务相关的约束, 这些特定的目标随着不同的实现方式而变化, 并且随着不同的研制者而变化。 而且, 应当理解, 这种研制工作是复杂和耗时的, 但 是尽管如此, 对于受到本发明公开内容启发的普通技术人员而言所进行的技术工作是 常规的。 根据这里描述的主题, 能够利用各种类型的操作系统、 计算平台、 计算机程序、 和 /或通用机器来制造、 操作和 /或执行各种部件、 系统、 装置、 处理步骤和 /或数据结 构。 此外, 本领域技术人员将会明白, 在不脱离本发明实施例公开的发明构思的范围 和精神实质的情况下, 也可以利用不太通用的装置。 其中, 本发明实施例所述的方法 可以由计算机、 装置或机器执行, 并且该方法可以被存储为机器可读的指令, 它们可 以存储在确定的介质上, 例如, 计算机存储装置, 包括但不限于只读内存(Read-Only Memory, 简称为 ROM) (只读存贮器、 闪存 (FLASH) 存储器、 转移装置等)、 磁存 储介质(例如, 磁带、磁盘驱动器等)、光学存储介质(例如, 只读光盘(Compact Disc Read-Only Memory, 简称为 CD-ROM )、 数字视盘 (Digital Video Disc Read-Only Memory, 简称为 DVD-ROM)、 纸卡、 纸带等) 以及其他熟知类型的程序存储器。 此 夕卜, 应当认识到, 该方法可以利用软件工具的选择由人类操作者执行, 而不需要人的 创造性的判断。 实施例一 本发明实施例提供了一种虚拟机运行方法。 图 3是根据本发明实施例的虚拟机运 行方法的流程图, 该方法包括: 步骤 S302, 设置虚拟机在虚拟机对应的虚拟桌面客户端离线后的状态; 步骤 S304, 在虚拟桌面客户端离线后, 虚拟机按照设置的状态运行。 本实施例中, 预先设置虚拟机在其对应的虚拟桌面客户端离线后的状态或状态迁 移方式, 从而使得离线后系统能够挂起或停止, 从而达到节约能耗和达到绿色环保的 目的, 或者使得离线后系统仍然能够像连线时那样正常运行, 把应用的运算完成。 由 此可见, 本实施例使得在虚拟桌面客户端离线后, 虚拟机能够根据需要运行。 其中, 上述设置的状态可以包括以下之一: 停止状态、 运行状态、 挂起状态、 和 离线状态。通过本实施例, 在虚拟桌面客户端离线后, 虚拟机能够在以上状态下运行。 优选地, 在设置虚拟机在虚拟机对应的虚拟桌面客户端离线后的状态之后, 步骤 S304 可以包括: 虚拟桌面系统平台迁移虚拟机的状态至设置的状态。 其中, 在步骤 S304之前, 在设置虚拟机在虚拟机对应的虚拟桌面客户端离线后的状态之后, 虚拟桌 面系统平台, 也即虚拟桌面云, 又称为虚拟桌面服务器端, 可以保存该设置的状态, 然后, 在步骤 S304中, 虚拟桌面系统平台迁移虚拟机的状态至保存的状态。通过该实 施例, 虚拟桌面系统平台中保存了设置的状态, 从而方便地将虚拟机的状态迁移至保 存的状态。 在本发明实施例的一个优选实现方式中, 在虚拟桌面客户端离线后, 虚拟机可以 从离线状态迁移到停止状态、 运行状态、 或挂起状态。 其中, 在虚拟机从离线状态迁 移到停止状态、 运行状态、 或挂起状态之前, 可以设置虚拟机在虚拟桌面客户端离线 后的状态迁移方式为从离线状态迁移到停止状态、 运行状态、 或挂起状态。 通过本实 施例, 实现了虚拟机在虚拟桌面客户端离线后状态的迁移。 步骤 S302可以包括多种实现方式,下面仅对其中的一种进行说明。虚拟桌面客户 端接收来自用户的指令; 然后, 虚拟桌面客户端根据用户的指令确定设置的状态。 优选地, 在相同状态下, 虚拟机的虚拟桌面和 /或虚拟应用的运行是相同的。 实施例二 本实施例提供了一种对虚拟桌面系统平台中的虚拟机运行状态进行设置和管理的 方法。 该方法包括: 设置虚拟机在离线后的状态, 然后, 虚拟桌面客户端离线后, 虚 拟机按设置的状态运行。 其中, 设置虚拟机在虚拟桌面客户端离线后的状态可以是在 虚拟桌面客户端设置, 也可以是在其他的设备中进行设置, 例如, 在虚拟桌面系统平 台中设置。 该虚拟机的状态至少包括: 停止、 运行、 挂起、 或离线中的一个。 这样, 在虚拟 桌面客户端离线后, 虚拟机能够在停止、 运行、 挂起、 或离线状态下运行, 即, 在预 先设置的状态下运行。 该虚拟机能够按停止、 运行、 挂起, 以及运行、 离线这样的状态迁移。 另外, 虚 拟机除了能按上述状态迁移方式进行迁移, 还能够从离线状态迁移到停止状态、 运行 状态、 或挂起状态。 虚拟机可以预先设置的方式, 从离线状态迁移到停止状态、 运行状态、 或挂起状 态。 对虚拟机预先设置的状态可以保存在虚拟桌面系统平台上, 这样, 每次虚拟桌面 客户端离线时, 虚拟机管理程序可以根据预先设置迁移虚拟机状态。 虚拟机不论如何迁移状态, 在相同状态下虚拟桌面和 /或虚拟应用的运行是相同 的。 综上所述, 采用本实施例的方法, 能够满足用户对离线后系统运行状态的控制, 可以到达节约能耗、达到绿色环保的效果, 也可以达到虚拟机像连线时那样正常运行, 把应用的运算完成的效果。 实施例三 本实施例的基本思想是提供一种虚拟机在客户端离线后按指定状态运行的方法。 下面将结合附图和实施例对本发明实施例的时下过程进行详细描述。 图 1是根据相关技术的虚拟桌面系统平台组成的示意图, 图中示出了虚拟桌面的 系统, 各种终端能够通过虚拟桌面接口连接到桌面云, 终端上运行着虚拟桌面的客户 端; 虚拟桌面系统平台由众多的物理机组成, 运行着为连接到桌面云的客户端提供桌 面功能的虚拟机, 这些虚拟机由虚拟机管理程序管理。 客户成功端连接到虚拟桌面系 统平台后, 至少有一个虚拟机为虚拟桌面客户端提供桌面和 /或应用服务。 图 4是根据本发明实施例的虚拟机状态迁移的示意图, 如图 4所示, 虚拟机的状 态至少包括停止、 运行、 挂起、 离线等。 其中, 实线连接的图表示了各状态的迁移, 这些状态有停止、 运行、 挂起、 离线。 在用户离线后, 虚拟机处于离线状态, 这一状 态下虚拟机仍然占用一些资源, 或者有些应用程序在离线状态下则不能再继续运行。 虚线连接的状态图, 是在设置了虚拟机在离线后的状态且虚拟桌面客户端离线后, 虚 拟机按设置的状态运行的示意图。 在该状态连接图中, 虚拟机除了能按所述的状态迁 移, 还能够从离线状态迁移到停止状态、 运行状态、 或挂起状态。 综上所述, 虚拟机能够按停止、 运行、 挂起, 以及运行、 离线这样的状态迁移。 需要说明的是, 虚拟机不论如何迁移状态, 相同状态下虚拟桌面和 /或虚拟应用的运行 是相同的。 虚拟机如果能够从离线状态迁移到停止状态, 或运行状态, 或挂起状态, 需要预先设置。 虚拟机预先设置的状态保存在虚拟桌面系统平台上,每次虚拟桌面客户端离线时, 虚拟机管理程序根据预先设置迁移虚拟机状态。 设置虚拟机在离线后的状态可以通过以下方式实现: 在虚拟桌面客户端上提供界 面, 在完成界面设置后, 由虚拟桌面客户端通过接口传送到虚拟桌面系统平台中, 保 存在虚拟桌面系统平台中。 图 5是根据本发明实施例的设置虚拟机状态及迁入状态的消息流程示意图。 图中 包括了预先设置、 用户离线后迁入指定状态的消息流程, 这个消息流程发生在虚拟桌 面客户端与桌面云之间,虚拟桌面客户端已经连接到虚拟桌面系统平台。如图 5所示, 该流程包括: 步骤 S502,虚拟桌面客户端向虚拟桌面系统平台发送包含有请求设置离线后状态 的请求消息。 虚拟桌面客户端发送该消息可以通过以下方式实现: 用户在虚拟桌面客户端上提 供的界面执行了对应的操作, 在用户完成界面设置后, 由虚拟桌面客户端通过接口发 送消息传送到虚拟桌面系统平台中。 步骤 S504, 虚拟桌面系统平台接收到虚拟桌面客户端的消息, 处理该请求后, 响 应虚拟桌面客户端。 虚拟桌面系统平台对虚拟桌面客户端请求消息的处理包括: 检查是否允许按请求 中的指定状态进行设置, 以及把最终的状态迁移设置保存在虚拟桌面系统平台上。 步骤 S506, 在正常情况下, 虚拟桌面客户端和虚拟桌面系统平台之间进行桌面数 据的交互。 步骤 S508, 虚拟桌面客户端离线, 这时向虚拟桌面系统平台发送指示虚拟桌面客 户端将要离线的消息, 虚拟桌面系统平台处理离线请求消息, 并根据预先的设置迁移 虚拟机状态。 在本实施例中, 设置虚拟机在离线后的状态的操作还可以直接在虚拟桌面系统平 台为每个用户进行, 然后把设置的结果保存在虚拟桌面系统平台中。 实施例四 本发明实施例公开了一种虚拟机运行系统, 图 6是根据本发明实施例的虚拟机运 行系统的结构框图, 该系统包括: 虚拟桌面客户端 62和与虚拟桌面客户端 62对应的 虚拟机 64, 该系统还可以包括: 设置模块 66, 设置为设置虚拟机在虚拟桌面客户端离 线后的状态; 虚拟机 64, 设置为在虚拟桌面客户端 62离线后, 按照设置的状态运行。 其中, 设置模块 66可以位于虚拟桌面客户端 62中, 也可以位于虚拟机 64对应的虚拟 桌面系统平台中。 本实施例中, 预先设置虚拟机在其对应的虚拟桌面客户端离线后的状态或状态迁 移方式, 从而使得离线后系统能够挂起或停止, 从而达到节约能耗和达到绿色环保的 目的, 或者使得离线后系统仍然能够像连线时那样正常运行, 把应用的运算完成。 由 此可见, 本实施例使得在虚拟桌面客户端离线后, 虚拟机能够根据需要运行。 优选地, 上述状态包括以下之一: 停止状态、 运行状态、 挂起状态、 和离线状态。 通过本实施例, 在虚拟桌面客户端离线后, 虚拟机能够在以上状态下运行。 图 7是根据本发明实施例的优选的虚拟机运行系统的结构框图, 上述系统还可以 包括: 虚拟机所在的虚拟桌面系统平台 72, 其中, 虚拟桌面系统平台 72包括: 保存 模块 74, 设置为在设置虚拟机在虚拟机对应的虚拟桌面客户端离线后的状态之后, 保 存状态; 迁移模块 76, 设置为在虚拟桌面客户端离线后, 迁移虚拟机的状态至保存的 状态。 其中, 虚拟桌面系统平台 72也可以包括迁移模块 76而不包括保存模块 74, 这 时, 迁移模块 76设置为在虚拟桌面客户端离线后, 迁移虚拟机的状态至设置的状态。 通过该实施例, 虚拟桌面系统平台中保存了设置的状态, 从而方便地将虚拟机的状态 迁移至保存的状态。 在本发明实施例的一个优选实现方式中,虚拟机 64可以从离线状态迁移到停止状 态、 运行状态、 或挂起状态。 其中, 在虚拟机 64从离线状态迁移到停止状态、 运行状 态、 或挂起状态之前, 可以设置虚拟机 64在虚拟桌面客户端 62离线后的状态迁移方 式为从离线状态迁移到停止状态、 运行状态、 或挂起状态。 通过本实施例, 实现了虚 拟机在虚拟桌面客户端离线后状态的迁移。 其中,虚拟桌面客户端 62还设置为接收来自用户的指令, 并根据用户的指令确定 设置的状态或状态迁移方式。 优选地, 在相同状态下, 虚拟机 64的虚拟桌面和 /或虚拟应用的运行是相同的。 在另外一个实施例中, 还提供了一种虚拟机运行软件, 该软件用于执行上述实施 例及优选实施例中描述的技术方案。 在另外一个实施例中, 还提供了一种存储介质, 该存储介质中存储有上述虚拟机 运行软件。 综上所述, 本发明采用预先设置虚拟机的该虚拟机对应的虚拟桌面客户端离线后 的状态或状态迁移方式, 并在该虚拟桌面客户端离线后, 该虚拟机按照设置的状态运 行的方式, 达到了虚拟机能够在虚拟桌面客户端离线后, 根据需要处于合适的状态进 行操作的效果。 上述流程是实现本发明实施例的优选流程, 并不用于限定只能用实施例来实现, 也不用于限定具体流程执行的方法,本发明实施例还可以采用类似的方式实现,例如, 表示模块的名字、 各种升级的类型等, 那不过是具体的报文内容有所不同。 上述实施例, 网络相关的, 可适用于基于公共交换电话网络 (Public Switched Telephone Network, 简称为 PSTN)、 第三代合作伙伴计划 (3rd Generation Partnership Project,简称为 3GPP)网络、第三代合作伙伴计划 2(3rd Generation Partnership Project2, 简称为 3GPP2)网络等通讯网络所支持的 IP网络,服务器架构方面可适用于网格计算 系统、 分布计算系统, 服务器操作系统可适用于 UNIX类操作系统、 WINDOWS类操 作系统, 对消费者接口可适用于 JAVA语言接口等。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。 Technology, referred to as IT), Communication Technology (CT) Equipment vendors and operators join the development of cloud products and the promotion and deployment of cloud products. Cloud products have been relatively mature applications in the fields of Internet applications and information center construction. A virtual desktop is a type of cloud computing application. It is a Platform-as-a-Service (PaaS) type. It is usually referred to as an application: By arranging servers and running virtual machines of the desktop system, users are made. Desktop systems can be used without restrictions on physical space, including desktop operations. There are various existing implementation methods of virtual desktops, such as thin terminal mode, managed operating system mode, and image streaming mode. The basic method is to run an application or operating system desktop in the cloud (server group), and the virtual desktop client is responsible for Output (desktop) input (keyboard, mouse, etc.). Virtual desktops can be applied to call centers, operation and maintenance stations, office applications, and the like. 1 is a schematic diagram of a virtual desktop system according to the related art. As shown in FIG. 1, various terminals can connect to a desktop cloud through a virtual desktop interface, and a virtual desktop client runs on the terminal; the virtual desktop cloud is composed of a plurality of physical machines. , running virtual machines that provide desktop functionality to clients connected to the desktop cloud, which are managed by the hypervisor. In the virtual desktop cloud, in the implementation method of the managed operating system mode, each desktop client corresponds to a virtual machine in the virtual desktop cloud, and the virtual desktop client uses the same experience as the local operating system. The virtual desktop client needs to connect to the virtual desktop cloud to use the connected desktop. Because the virtual desktop cloud manages its running state for each virtual machine, as shown in Figure 2, the solid line connecting lines indicates the migration of each state, which is stopped, running, suspended, and offline. After the user goes offline, the virtual machine is offline. In this state, the virtual machine still occupies some resources, or some applications can no longer run offline. In summary, in the related art, after the virtual desktop client is offline, the virtual machine cannot be operated according to actual needs. SUMMARY OF THE INVENTION The present invention provides a virtual machine running solution to solve the problem that a virtual machine existing in the related art cannot be operated according to actual needs after the virtual desktop client is offline. According to an aspect of the present invention, a virtual machine running method is provided, including: setting a state of a virtual machine after the virtual desktop client corresponding to the virtual machine is offline; after the virtual desktop client is offline, the virtual machine is set according to the setting The state is running. The above states include one of the following: Stop state, Run state, Suspended state, and Offline state. After the virtual desktop client is offline, the virtual machine runs according to the set state: the virtual desktop system platform where the virtual machine is located migrates the state of the virtual machine to the set state. After the virtual desktop client is offline, the method further includes: the virtual machine is migrated from an offline state to a stopped state, a running state, or a suspended state. Before the virtual machine is migrated from the offline state to the stopped state, the running state, or the suspended state, the method further includes: setting the state transition mode of the virtual machine after the virtual desktop client is offline to migrate from the offline state to the stopped state and the running state. , or hang state. The state or state transition mode of the virtual machine after the virtual desktop client corresponding to the virtual machine is offline includes: the virtual desktop client receives an instruction from the user; and the virtual desktop client determines the state of the setting according to the user's instruction. In the same state, the virtual desktop's virtual desktop and/or virtual application run the same. According to another aspect of the present invention, a virtual machine running system is provided, including: a virtual desktop client and a virtual machine corresponding to the virtual desktop client, the system further comprising: a setting module, configured to set the virtual machine in The state after the virtual desktop client is offline; the virtual machine is set to run according to the set state after the virtual desktop client is offline. The above states include one of the following: Stop state, Run state, Suspended state, and Offline state. Preferably, the system further includes: a virtual desktop system platform where the virtual machine is located, where the virtual desktop system platform includes: a migration module, configured to migrate the state of the virtual machine to a set state after the virtual desktop client is offline. According to the present invention, the state in which the virtual desktop client corresponding to the virtual machine of the virtual machine is offline is set, and after the virtual desktop client is offline, the virtual machine operates according to the set state, and the related technology is solved. After the virtual desktop client is offline, the virtual machine cannot be operated according to actual needs. In addition, the virtual machine can be operated in an appropriate state after the virtual desktop client is offline. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 1 is a schematic diagram of a virtual desktop system platform according to the related art; FIG. 2 is a schematic diagram of virtual machine state transition according to the related art; FIG. 3 is a flowchart of a virtual machine running method according to an embodiment of the present invention; FIG. 4 is a schematic diagram of a state transition of a virtual machine according to an embodiment of the present invention; FIG. 5 is a flow chart of a message for setting a virtual machine state and an migrating state according to an embodiment of the present invention; FIG. 6 is a virtual machine according to an embodiment of the present invention; A block diagram of a running system; FIG. 7 is a block diagram showing the structure of a preferred virtual machine operating system in accordance with an embodiment of the present invention. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. For the sake of clarity, not all of the conventional features of the device are shown and described herein. Of course, it should be understood that in the development of any actual device, it is necessary to make a decision on a particular implementation in order to achieve the developer's specific goals, for example, to comply with application and business related constraints, which are implemented in different ways. And change, and change with different developers. Moreover, it should be understood that this development work is complicated and time consuming, but Nevertheless, the technical work performed by one of ordinary skill in the art in light of the present disclosure is conventional. In accordance with the subject matter described herein, various components, systems, devices, processing steps and/or data structures can be manufactured, manipulated, and/or executed using various types of operating systems, computing platforms, computer programs, and/or general purpose machines. In addition, those skilled in the art will appreciate that less versatile devices may be utilized without departing from the scope and spirit of the inventive concepts disclosed herein. The method of the embodiments of the present invention may be executed by a computer, a device or a machine, and the method may be stored as machine readable instructions, which may be stored on a determined medium, for example, a computer storage device, including but not Limited to read-only memory (Read-Only Memory, ROM for short) (read-only memory, flash memory (FLASH) memory, transfer device, etc.), magnetic storage media (eg, magnetic tape, disk drive, etc.), optical storage media (eg , Compact Disc Read-Only Memory (CD-ROM), Digital Video Disc Read-Only Memory (DVD-ROM), paper cards, tapes, etc., and other well-known types of programs. Memory. Furthermore, it should be appreciated that the method can be performed by a human operator using the selection of software tools without the need for human creative judgment. Embodiment 1 An embodiment of the present invention provides a method for operating a virtual machine. FIG. 3 is a flowchart of a method for running a virtual machine according to an embodiment of the present invention. The method includes: Step S302: setting a state in which a virtual machine is offline after a virtual desktop client corresponding to the virtual machine; Step S304, offline in the virtual desktop client After that, the virtual machine runs according to the set state. In this embodiment, the status or state transition mode of the virtual machine after the corresponding virtual desktop client is offline is preset, so that the offline system can be suspended or stopped, thereby achieving energy saving and achieving environmental protection, or After the offline, the system can still operate normally like the connection, and the calculation of the application is completed. It can be seen that this embodiment enables the virtual machine to operate as needed after the virtual desktop client is offline. The status of the above setting may include one of the following: a stop state, a running state, a suspended state, and an offline state. With this embodiment, after the virtual desktop client is offline, the virtual machine can run in the above state. Preferably, after setting the state of the virtual machine after the virtual desktop client corresponding to the virtual machine is offline, step S304 may include: the virtual desktop system platform migrating the state of the virtual machine to the set state. Before the step S304, after setting the state that the virtual machine is offline after the virtual desktop client corresponding to the virtual machine, the virtual desktop system platform, that is, the virtual desktop cloud, also referred to as the virtual desktop server, can save the setting. status, Then, in step S304, the virtual desktop system platform migrates the state of the virtual machine to the saved state. With this embodiment, the state of the settings is saved in the virtual desktop system platform, thereby conveniently migrating the state of the virtual machine to the saved state. In a preferred implementation manner of the embodiment of the present invention, after the virtual desktop client is offline, the virtual machine may be migrated from an offline state to a stopped state, an operating state, or a suspended state. Before the virtual machine is migrated from the offline state to the stopped state, the running state, or the suspended state, the state transition mode of the virtual machine after the virtual desktop client is offline may be set to migrate from the offline state to the stopped state, the running state, or Suspended state. With this embodiment, the migration of the virtual machine after the virtual desktop client is offline is implemented. Step S302 can include various implementations, and only one of them will be described below. The virtual desktop client receives instructions from the user; then, the virtual desktop client determines the status of the settings based on the user's instructions. Preferably, in the same state, the virtual desktop and/or virtual application of the virtual machine operate the same. Embodiment 2 This embodiment provides a method for setting and managing a virtual machine running state in a virtual desktop system platform. The method includes: setting a state of the virtual machine after being offline, and then, after the virtual desktop client is offline, the virtual machine runs according to the set state. The state of the virtual machine after the virtual desktop client is offline may be set in the virtual desktop client, or may be set in other devices, for example, in the virtual desktop system platform. The state of the virtual machine includes at least one of: stop, run, suspend, or offline. This way, after the virtual desktop client is offline, the virtual machine can run in a stopped, running, suspended, or offline state, that is, in a pre-set state. The virtual machine can be migrated in a state such as stop, run, hang, and run, offline. In addition, the virtual machine can be migrated from the offline state to the stop state, the running state, or the suspended state in addition to the state transition mode. The virtual machine can be migrated from an offline state to a stopped state, a running state, or a suspended state in a preset manner. The pre-set state of the virtual machine can be saved on the virtual desktop system platform, so that each time the virtual desktop client is offline, the hypervisor can migrate the virtual machine state according to the preset. Regardless of how the virtual machine migrates, the virtual desktop and/or virtual application behave the same under the same state. In summary, the method of the embodiment can satisfy the user's control of the running state of the system after offline, and can achieve the effect of saving energy consumption and achieving green environmental protection, and can also achieve normal operation when the virtual machine is connected. The effect of the application's operation is completed. Embodiment 3 The basic idea of the embodiment is to provide a method for a virtual machine to run in a specified state after the client is offline. The present process of the embodiment of the present invention will be described in detail below with reference to the accompanying drawings and embodiments. 1 is a schematic diagram of a virtual desktop system platform according to the related art. The figure shows a virtual desktop system. Various terminals can connect to the desktop cloud through a virtual desktop interface, and the client running the virtual desktop on the terminal; the virtual desktop The system platform consists of a number of physical machines running virtual machines that provide desktop functionality to clients connected to the desktop cloud, which are managed by the hypervisor. After the client successfully connects to the virtual desktop system platform, at least one virtual machine provides desktop and/or application services for the virtual desktop client. FIG. 4 is a schematic diagram of state transition of a virtual machine according to an embodiment of the present invention. As shown in FIG. 4, the state of the virtual machine includes at least stop, run, suspend, offline, and the like. Among them, the solid line connection diagram shows the migration of each state, these states are stopped, running, suspended, and offline. After the user goes offline, the virtual machine is offline. In this state, the virtual machine still occupies some resources, or some applications can no longer run offline. The state diagram of the dotted line connection is a schematic diagram of the virtual machine running in the set state after the virtual machine is offline and the virtual desktop client is offline. In the state connection diagram, the virtual machine can be migrated from the offline state to the stopped state, the running state, or the suspended state in addition to the state transition. In summary, the virtual machine can be migrated in a state such as stop, run, hang, and run, offline. It should be noted that the virtual machine and the virtual application operate in the same state regardless of how the virtual machine migrates. If the virtual machine can be moved from the offline state to the stopped state, or the running state, or the suspended state, it needs to be set in advance. The pre-set state of the virtual machine is saved on the virtual desktop system platform, and each time the virtual desktop client is offline, the hypervisor migrates the virtual machine state according to the preset. After the virtual machine is offline, the status is as follows: The interface is provided on the virtual desktop client. After the interface is set, the virtual desktop client is transmitted to the virtual desktop system platform through the interface, and is saved on the virtual desktop system platform. in. FIG. 5 is a schematic flowchart of a message for setting a virtual machine state and an migrating state according to an embodiment of the present invention. The figure includes a message flow that is preset and moved to a specified state after the user goes offline. This message flow occurs between the virtual desktop client and the desktop cloud, and the virtual desktop client is connected to the virtual desktop system platform. As shown in FIG. 5, the process includes: Step S502: The virtual desktop client sends a request message to the virtual desktop system platform that includes a request to set an offline status. The virtual desktop client can send the message to the virtual desktop system through the following interface: The user performs the corresponding operation on the interface provided by the virtual desktop client. After the user completes the interface setting, the virtual desktop client sends a message to the virtual desktop system through the interface. In the platform. Step S504, the virtual desktop system platform receives the message of the virtual desktop client, and after processing the request, responds to the virtual desktop client. The processing of the virtual desktop client request message by the virtual desktop system platform includes: checking whether the setting is allowed according to the specified state in the request, and saving the final state migration setting on the virtual desktop system platform. Step S506, the desktop data is exchanged between the virtual desktop client and the virtual desktop system platform under normal conditions. Step S508, the virtual desktop client is offline, and then the virtual desktop system platform sends a message indicating that the virtual desktop client is going offline, the virtual desktop system platform processes the offline request message, and migrates the virtual machine state according to the preset setting. In this embodiment, the operation of setting the state of the virtual machine after being offline may also be performed for each user directly on the virtual desktop system platform, and then the result of the setting is saved in the virtual desktop system platform. Embodiment 4 The embodiment of the present invention discloses a virtual machine running system. FIG. 6 is a structural block diagram of a virtual machine running system according to an embodiment of the present invention. The system includes: a virtual desktop client 62 and a virtual desktop client 62. The virtual machine 64, the system may further include: a setting module 66, configured to set a state of the virtual machine after the virtual desktop client is offline; the virtual machine 64, configured to run according to the set state after the virtual desktop client 62 is offline . The setting module 66 may be located in the virtual desktop client 62 or in the virtual desktop system platform corresponding to the virtual machine 64. In this embodiment, the status or state transition mode of the virtual machine after the corresponding virtual desktop client is offline is preset, so that the offline system can be suspended or stopped, thereby achieving energy saving and achieving environmental protection, or After the offline, the system can still operate normally like the connection, and the calculation of the application is completed. It can be seen that this embodiment enables the virtual machine to operate as needed after the virtual desktop client is offline. Preferably, the above state includes one of the following: a stop state, an operation state, a suspended state, and an offline state. With this embodiment, after the virtual desktop client is offline, the virtual machine can run in the above state. FIG. 7 is a structural block diagram of a preferred virtual machine running system according to an embodiment of the present invention. The system may further include: a virtual desktop system platform 72 where the virtual machine is located, where the virtual desktop system platform 72 includes: a saving module 74, configured to After the virtual machine is set to the state after the virtual desktop client corresponding to the virtual machine is offline, the state is saved; the migration module 76 is configured to migrate the state of the virtual machine to the saved state after the virtual desktop client is offline. The virtual desktop system platform 72 may also include the migration module 76 without including the save module 74. At this time, the migration module 76 is configured to migrate the state of the virtual machine to the set state after the virtual desktop client is offline. With this embodiment, the state of the settings is saved in the virtual desktop system platform, thereby conveniently migrating the state of the virtual machine to the saved state. In a preferred implementation of the embodiment of the present invention, the virtual machine 64 can be migrated from an offline state to a stopped state, an operational state, or a suspended state. Before the virtual machine 64 is migrated from the offline state to the stopped state, the running state, or the suspended state, the state transition mode of the virtual machine 64 after the virtual desktop client 62 is offline may be configured to migrate from the offline state to the stopped state and run. Status, or pending status. With this embodiment, the migration of the virtual machine after the virtual desktop client is offline is implemented. The virtual desktop client 62 is further configured to receive an instruction from the user and determine a set state or state transition mode according to the user's instruction. Preferably, in the same state, the virtual desktop and/or virtual application of virtual machine 64 operates the same. In another embodiment, a virtual machine running software is also provided, which is used to execute the technical solutions described in the foregoing embodiments and preferred embodiments. In another embodiment, a storage medium is provided, in which the virtual machine running software is stored. In summary, the present invention adopts a state or state transition mode in which the virtual desktop client corresponding to the virtual machine of the virtual machine is offline after being set, and after the virtual desktop client is offline, the virtual machine is shipped according to the set state. The way of doing this is to achieve the effect that the virtual machine can operate in the appropriate state after the virtual desktop client is offline. The foregoing process is a preferred process for implementing the embodiments of the present invention, and is not limited to the implementation of the embodiments, and is not used to limit the specific process execution. The embodiment of the present invention may also be implemented in a similar manner, for example, the presentation module. The name, the type of upgrade, etc., but the specific message content is different. The above embodiments are network-related and can be applied to a Public Switched Telephone Network (PSTN), a 3rd Generation Partnership Project (3GPP) network, and a third generation partner. The IP network supported by the communication network such as the 3rd Generation Partnership Project 2 (3GPP2) network, the server architecture can be applied to the grid computing system and the distributed computing system. The server operating system can be applied to the UNIX-like operating system and the WINDOWS class. The operating system, the consumer interface can be applied to the JAVA language interface. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 书 Claim
1. 一种虚拟机运行方法, 包括: 1. A virtual machine running method, comprising:
设置虚拟机在所述虚拟机对应的虚拟桌面客户端离线后的状态; 在所述虚拟桌面客户端离线后, 所述虚拟机按照设置的所述状态运行。  Setting a state of the virtual machine after the virtual desktop client corresponding to the virtual machine is offline; after the virtual desktop client is offline, the virtual machine runs according to the set state.
2. 根据权利要求 1所述的方法, 其中, 所述状态包括以下之一: 2. The method of claim 1, wherein the state comprises one of:
停止状态、 运行状态、 挂起状态、 和离线状态。  Stop state, run state, pending state, and offline state.
3. 根据权利要求 1所述的方法, 其中, 3. The method according to claim 1, wherein
在所述虚拟桌面客户端离线后,所述虚拟机按照设置的所述状态运行包括: 所述虚拟机所在的虚拟桌面系统平台迁移所述虚拟机的状态至设置的所述状 态。  After the virtual desktop client is offline, running the virtual machine according to the set state includes: the virtual desktop system platform where the virtual machine is located migrates the state of the virtual machine to the set state.
4. 根据权利要求 1所述的方法, 其中, 在所述虚拟桌面客户端离线后, 所述方法 还包括: The method of claim 1, wherein after the virtual desktop client is offline, the method further includes:
所述虚拟机从离线状态迁移到停止状态、 运行状态、 或挂起状态。  The virtual machine migrates from an offline state to a stopped state, an operational state, or a suspended state.
5. 根据权利要求 4所述的方法,其中,在所述虚拟机从离线状态迁移到停止状态、 运行状态、 或挂起状态之前, 所述方法还包括: 5. The method of claim 4, wherein the method further comprises: before the virtual machine transitions from an offline state to a stopped state, an operational state, or a suspended state.
设置所述虚拟机在所述虚拟桌面客户端离线后的状态迁移方式为从离线状 态迁移到停止状态、 运行状态、 或挂起状态。  The state transition mode of the virtual machine after the virtual desktop client is offline is to migrate from an offline state to a stopped state, a running state, or a suspended state.
6. 根据权利要求 1至 5中任一项所述的方法, 其中, 设置所述虚拟机在所述虚拟 机对应的虚拟桌面客户端离线后的状态或状态迁移方式包括: The method according to any one of claims 1 to 5, wherein the mode or state transition mode of the virtual machine after the virtual desktop client corresponding to the virtual machine is offline is set as follows:
所述虚拟桌面客户端接收来自用户的指令;  The virtual desktop client receives an instruction from a user;
所述虚拟桌面客户端根据用户的指令确定设置的所述状态。  The virtual desktop client determines the state of the setting according to a user's instruction.
7. 根据权利要求 1至 5中任一项所述的方法, 其中, 在相同状态下, 所述虚拟机的虚拟桌面和 /或虚拟应用的运行是相同的。 The method according to any one of claims 1 to 5, wherein, in the same state, the operation of the virtual desktop and/or the virtual application of the virtual machine is the same.
8. 一种虚拟机运行系统, 包括: 虚拟桌面客户端和与所述虚拟桌面客户端对应的 虚拟机, 所述系统还包括: 设置模块, 设置为设置所述虚拟机在所述虚拟桌面客户 端离线后的状态; 8. A virtual machine running system, comprising: a virtual desktop client and a virtual machine corresponding to the virtual desktop client, The system further includes: a setting module, configured to set a state of the virtual machine after the virtual desktop client is offline;
所述虚拟机, 设置为在所述虚拟桌面客户端离线后, 按照设置的所述状态 运行。  The virtual machine is configured to run according to the set state after the virtual desktop client is offline.
9. 根据权利要求 8所述的系统, 其中, 所述状态包括以下之一: 9. The system of claim 8, wherein the status comprises one of:
停止状态、 运行状态、 挂起状态、 和离线状态。  Stop state, run state, pending state, and offline state.
10. 根据权利要求 8所述的系统, 其中, 所述系统还包括: 所述虚拟机所在的虚拟 桌面系统平台, 其中, The system of claim 8, wherein the system further comprises: a virtual desktop system platform where the virtual machine is located, where
所述虚拟桌面系统平台包括:  The virtual desktop system platform includes:
迁移模块, 设置为在所述虚拟桌面客户端离线后, 迁移所述虚拟机的状态 至设置的所述状态。  The migration module is configured to migrate the state of the virtual machine to the state of the setting after the virtual desktop client is offline.
PCT/CN2012/077948 2011-09-19 2012-06-29 Virtual machine running method and system WO2013040929A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110278190.X 2011-09-19
CN201110278190XA CN102999372A (en) 2011-09-19 2011-09-19 Virtual machine operation method and system

Publications (1)

Publication Number Publication Date
WO2013040929A1 true WO2013040929A1 (en) 2013-03-28

Family

ID=47913847

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/077948 WO2013040929A1 (en) 2011-09-19 2012-06-29 Virtual machine running method and system

Country Status (2)

Country Link
CN (1) CN102999372A (en)
WO (1) WO2013040929A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022659B (en) * 2014-04-30 2018-05-11 中国电信股份有限公司 virtual machine state control method and system
CN107025084A (en) * 2016-01-29 2017-08-08 深圳市深信服电子科技有限公司 virtual desktop sharing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100218014A1 (en) * 2009-02-26 2010-08-26 Bozek James J Power Management To Maximize Reduced Power State For Virtual Machine Platforms
CN101916207A (en) * 2010-08-28 2010-12-15 华为技术有限公司 Energy saving method, device and system under desktop virtual environment
US20110055372A1 (en) * 2009-08-26 2011-03-03 Vitaly Elyashev Auto Suspense Of Virtual Machine On Client Disconnection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100218014A1 (en) * 2009-02-26 2010-08-26 Bozek James J Power Management To Maximize Reduced Power State For Virtual Machine Platforms
US20110055372A1 (en) * 2009-08-26 2011-03-03 Vitaly Elyashev Auto Suspense Of Virtual Machine On Client Disconnection
CN101916207A (en) * 2010-08-28 2010-12-15 华为技术有限公司 Energy saving method, device and system under desktop virtual environment

Also Published As

Publication number Publication date
CN102999372A (en) 2013-03-27

Similar Documents

Publication Publication Date Title
KR102059251B1 (en) Node system, server device, scaling control method and program
US9661071B2 (en) Apparatus, systems and methods for deployment and management of distributed computing systems and applications
CN102427481B (en) System for managing cloud computing service and cloud computing management method
KR102391806B1 (en) Integrated apis and uis for consuming services across different distributed networks
US9244676B2 (en) Virtual machine based controller and upgrade mechanism
US9405579B2 (en) Seamless extension of local computing power
US20110093850A1 (en) Dynamic and automatic colocation and combining of service providers and service clients in a grid of resources
US20140188977A1 (en) Appratus, method for deploying applications in a virtual desktop interface system
US8903960B2 (en) Activate attribute for service profiles in unified computing system
US8909912B2 (en) Apparatus and method for configuring a target machine with captured operational state comprising a static machine profile and a dynamic machine state to continue operations of a source machine
WO2017041649A1 (en) Application deployment method and device
JP2014501977A (en) Asynchronous virtual machine replication
CN102882908A (en) Cloud computing management system and cloud computing management method
WO2017049997A1 (en) Virtual machine monitoring method, apparatus and system based on cloud computing service
WO2023093016A1 (en) Cloud code development system, method, and apparatus, device, and storage medium
WO2016154785A1 (en) Cloud platform, application operation method and access network unit
CN107122229A (en) A kind of virtual machine restoration methods and device
KR20230024416A (en) Virtual Machine Migration Methods, Devices, Storage Media and Electronic Devices Between Cloud Platforms
WO2016183832A1 (en) Network service instantiation method and device
TWI668634B (en) Software container based systems and methods for providing cloud services
WO2013037234A1 (en) Parameter receiving method and system
EP3387816A1 (en) Connecting and retrieving security tokens based on context
WO2013040929A1 (en) Virtual machine running method and system
CN115878136A (en) Deployment method, device and system based on bare metal server
CN115827148A (en) Resource management method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12833861

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12833861

Country of ref document: EP

Kind code of ref document: A1