[go: up one dir, main page]

CN105740003A - Method and device for recovering virtual machine, as well as method and device for upgrading virtual machine - Google Patents

Method and device for recovering virtual machine, as well as method and device for upgrading virtual machine Download PDF

Info

Publication number
CN105740003A
CN105740003A CN201410763813.6A CN201410763813A CN105740003A CN 105740003 A CN105740003 A CN 105740003A CN 201410763813 A CN201410763813 A CN 201410763813A CN 105740003 A CN105740003 A CN 105740003A
Authority
CN
China
Prior art keywords
virtual machine
new
template
node
vhd
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
CN201410763813.6A
Other languages
Chinese (zh)
Inventor
陈荣雷
胡丹
方建明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201410763813.6A priority Critical patent/CN105740003A/en
Priority to PCT/CN2015/081881 priority patent/WO2016090890A1/en
Publication of CN105740003A publication Critical patent/CN105740003A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

本发明提供一种恢复、升级虚拟机的方法及装置,其中恢复虚拟机的方法包括:删除所选定的虚拟机,保留虚拟机的磁盘信息和注册表信息;通过虚拟机模板创建VHD虚拟机;并将虚拟机的磁盘信息和注册表信息导入到VHD虚拟机中。升级虚拟机的方法包括:将虚拟机模板转换成新虚拟机,在新虚拟机内安装新应用或补丁;将安装新应用或补丁后的新虚拟机转换为新虚拟机模板;将新虚拟机模板的子节点和父节点进行整合得到一个新的父节点来替换新虚拟机模板的原父节点。本发明提供了恢复虚拟机和对虚拟机升级的优化方法,使得虚拟机崩溃时得到快速、智能的恢复,利用虚拟机升级的优化方法对虚拟机进行便捷批量化升级。

The present invention provides a method and device for restoring and upgrading a virtual machine, wherein the method for restoring a virtual machine includes: deleting the selected virtual machine, retaining the disk information and registry information of the virtual machine; creating a VHD virtual machine through a virtual machine template ; and import the disk information and registry information of the virtual machine into the VHD virtual machine. The method of upgrading the virtual machine includes: converting the virtual machine template into a new virtual machine, installing a new application or patch in the new virtual machine; converting the new virtual machine after installing the new application or patch into a new virtual machine template; converting the new virtual machine The template's child nodes and parent nodes are integrated to obtain a new parent node to replace the original parent node of the new virtual machine template. The invention provides an optimization method for restoring and upgrading a virtual machine, so that the virtual machine can be quickly and intelligently restored when it crashes, and the virtual machine can be conveniently upgraded in batches by using the optimization method for upgrading the virtual machine.

Description

一种恢复、升级虚拟机的方法及装置A method and device for restoring and upgrading a virtual machine

技术领域technical field

本发明涉及云桌面领域,尤其涉及一种恢复、升级虚拟机的方法及装置。The invention relates to the field of cloud desktops, in particular to a method and device for restoring and upgrading a virtual machine.

背景技术Background technique

云桌面,是基于对计算机硬件资源实施虚拟化技术,使其被虚拟成多个虚拟计算机,并在虚拟计算机上可以直接运行未经任何改动的桌面操作系统。同时还提供支持类虚拟化技术的操作系统,应用可直接运行于该桌面操作系统之上。云桌面系统包括管理中心、主机服务端、存储模块和客户端。管理中心负责资源的创建、维护和分配;主机服务端提供了网络、块设备I/O支持;存储模块负责用户数据的保存和访问;客户端负责云资源的连接和显示。Cloud desktop is based on the virtualization technology of computer hardware resources, so that it can be virtualized into multiple virtual computers, and the desktop operating system without any modification can be directly run on the virtual computers. At the same time, it also provides an operating system that supports quasi-virtualization technology, and applications can run directly on the desktop operating system. The cloud desktop system includes a management center, a host server, a storage module and a client. The management center is responsible for the creation, maintenance and allocation of resources; the host server provides network and block device I/O support; the storage module is responsible for the storage and access of user data; the client is responsible for the connection and display of cloud resources.

虚拟计算机一般分为桌面虚拟机和普通虚拟机。桌面虚拟机一般是提供给用户直接使用的,用户登录虚拟机后,可以将该虚拟机当成普通的PC直接使用,该类型虚拟机主要考虑各类应用的使用支持,常见的桌面操作系统有xp、win7、win8等。普通虚拟机一般是当成服务器来使用的,不用分配给用户直接使用,支持常用的服务器操作系统有windows2003、windows2008、windows2010以及各类linux系统。Virtual computers are generally divided into desktop virtual machines and ordinary virtual machines. Desktop virtual machines are generally provided for direct use by users. After users log in to the virtual machine, they can directly use the virtual machine as an ordinary PC. This type of virtual machine mainly considers the use support of various applications. Common desktop operating systems include xp , win7, win8, etc. Ordinary virtual machines are generally used as servers, without being assigned to users for direct use. Commonly used server operating systems are supported by windows2003, windows2008, windows2010 and various linux systems.

虚拟桌面登录认证方式常见的有本地认证和AD(ActiveDirectory)域控认证两种方式。本地认证方式将用户的用户名和密码存在本地数据库。AD域控将信息存在专门的AD服务器上,安全集中管理,统一安全策略。AD域控制器的作用相当一个门卫,它包含了由这个域的账户密码、管理策略等信息构成的数据库。当一台计算机登录域时,域控制器首先要鉴别这台电脑是否是属于这个域的,用户使用的登录账号和密码是否正确。如果正确则允许计算机登入这个域,使用该域内其有权限访问的任何资源,像文件服务器,打印服务器(也就是说域控制器仅起到一个验证作用,访问其他资源并不需要再跟域控制器扯上关系);如果不正确则不允许计算机登入,这时计算机将无法访问域内任何资源,这在一定程度上保护了企业网络资源。Common login authentication methods for virtual desktops include local authentication and AD (Active Directory) domain controller authentication. The local authentication method stores the user name and password of the user in the local database. The AD domain controller stores information on a dedicated AD server for secure centralized management and unified security policies. The role of the AD domain controller is quite a gatekeeper, which contains a database composed of account passwords, management policies and other information in this domain. When a computer logs into a domain, the domain controller must first identify whether the computer belongs to the domain, and whether the login account and password used by the user are correct. If it is correct, the computer is allowed to log in to this domain and use any resources that it has permission to access in this domain, such as file servers and print servers (that is to say, the domain controller only plays a verification role, and access to other resources does not need to follow the domain controller. If it is not correct, the computer will not be allowed to log in, and the computer will not be able to access any resources in the domain, which protects the enterprise network resources to a certain extent.

现在惯用的虚拟机恢复策略是对虚拟机做备份,虚拟机异常时,使用备份进行恢复。这种恢复的一大缺陷是不能对备份后的虚拟机操作进行恢复。The usual virtual machine recovery strategy is to make a backup of the virtual machine. When the virtual machine is abnormal, use the backup to restore. A major drawback of this recovery is that it cannot restore the virtual machine operation after backup.

现有技术中通过域控下发的方式进行软件的批量升级,域控只能将软件批量下发到各个虚拟机,通知用户自己去安装或管理员进入桌面虚拟机去一台台安装。In the prior art, software is upgraded in batches through domain controller distribution. The domain controller can only distribute the software to each virtual machine in batches, and notify the user to install it by himself or the administrator to enter the desktop virtual machine to install it one by one.

发明内容Contents of the invention

本发明的目的在于提供一种恢复、升级虚拟机的方法及装置,使得虚拟机得到快速、智能、完全地恢复,同时可以完成在线状态下虚拟机的便捷批量化升级。The object of the present invention is to provide a method and device for recovering and upgrading a virtual machine, so that the virtual machine can be quickly, intelligently and completely restored, and at the same time, the convenient batch upgrade of the virtual machine in the online state can be completed.

为了达到上述目的,本发明提供一种恢复虚拟机的方法,包括:In order to achieve the above object, the present invention provides a method for restoring a virtual machine, including:

删除所选定的虚拟机,并保留虚拟机的磁盘信息和注册表信息,其中磁盘信息至少包括:系统盘信息;Delete the selected virtual machine, and retain the disk information and registry information of the virtual machine, wherein the disk information includes at least: system disk information;

通过虚拟机模板创建VHD虚拟机;以及Create a VHD virtual machine from a virtual machine template; and

将虚拟机的磁盘信息和注册表信息导入到VHD虚拟机中。Import the disk information and registry information of the virtual machine into the VHD virtual machine.

其中,删除所选定的虚拟机,并保留虚拟机的磁盘信息和注册表信息,具体为:Among them, delete the selected virtual machine, and keep the disk information and registry information of the virtual machine, specifically:

在磁盘节点树形结构中删除所选定的虚拟机的第一子节点,将虚拟机的注册表信息存储到虚拟机的磁盘信息里,并保留虚拟机的磁盘信息。In the disk node tree structure, the first child node of the selected virtual machine is deleted, the registry information of the virtual machine is stored in the disk information of the virtual machine, and the disk information of the virtual machine is retained.

其中,通过虚拟机模板创建VHD虚拟机,具体为:Among them, create a VHD virtual machine through a virtual machine template, specifically:

在磁盘节点树形结构中选取与虚拟机的第一子节点具有相同的父节点的虚拟机模板的第二子节点,并通过虚拟机模板的第二子节点创建VHD虚拟机的第三子节点,通过父节点、虚拟机模板的第二子节点和VHD虚拟机的第三子节点形成VHD虚拟机。Select the second child node of the virtual machine template that has the same parent node as the first child node of the virtual machine in the disk node tree structure, and create the third child node of the VHD virtual machine through the second child node of the virtual machine template , the VHD virtual machine is formed by the parent node, the second child node of the virtual machine template, and the third child node of the VHD virtual machine.

其中,该方法还包括:Wherein, the method also includes:

对虚拟机模板的第二子节点进行判空操作,当虚拟机模板的第二子节点为空节点时,删除虚拟机模板的第二子节点。A null judgment operation is performed on the second child node of the virtual machine template, and when the second child node of the virtual machine template is an empty node, the second child node of the virtual machine template is deleted.

其中,将虚拟机的磁盘信息和注册表信息导入到VHD虚拟机中,具体包括:Wherein, the disk information and registry information of the virtual machine are imported into the VHD virtual machine, specifically including:

将虚拟机的系统盘信息导入VHD虚拟机,作为VHD虚拟机的数据盘信息;Import the system disk information of the virtual machine into the VHD virtual machine as the data disk information of the VHD virtual machine;

将虚拟机的注册表信息导入VHD虚拟机的注册表中,根据VHD虚拟机中的数据盘信息更新VHD虚拟机的注册表信息。Import the registry information of the virtual machine into the registry of the VHD virtual machine, and update the registry information of the VHD virtual machine according to the data disk information in the VHD virtual machine.

本发明实施例还提供一种升级虚拟机的方法,包括:The embodiment of the present invention also provides a method for upgrading a virtual machine, including:

将虚拟机模板转换成新虚拟机,并在新虚拟机内安装新应用或补丁;Convert a virtual machine template into a new virtual machine, and install new applications or patches in the new virtual machine;

将安装新应用或补丁后的新虚拟机转换为新虚拟机模板;Convert a new virtual machine after installing a new application or patch into a new virtual machine template;

将新虚拟机模板的子节点和新虚拟机模板的父节点进行整合得到一个新的父节点来替换新虚拟机模板的原父节点。The child node of the new virtual machine template and the parent node of the new virtual machine template are integrated to obtain a new parent node to replace the original parent node of the new virtual machine template.

其中,在新虚拟机内安装新应用或补丁,具体为:Among them, installing a new application or patch in the new virtual machine is specifically:

在磁盘节点树形结构中选定新虚拟机的子节点,在新虚拟机的子节点上安装新应用或补丁。Select a sub-node of the new virtual machine in the disk node tree structure, and install a new application or patch on the sub-node of the new virtual machine.

其中,将新虚拟机模板的子节点和新虚拟机模板的父节点进行整合得到一个新的父节点来替换新虚拟机模板的原父节点,具体包括:Wherein, the child node of the new virtual machine template and the parent node of the new virtual machine template are integrated to obtain a new parent node to replace the original parent node of the new virtual machine template, specifically including:

在磁盘节点树形结构中选定新虚拟机模板的子节点和新虚拟机模板的父节点作为新虚拟机模板的新父节点来代替新虚拟机模板的原父节点;In the disk node tree structure, select the child node of the new virtual machine template and the parent node of the new virtual machine template as the new parent node of the new virtual machine template to replace the original parent node of the new virtual machine template;

将新虚拟机模板的子节点和新虚拟机模板的父节点进行整合,得到新虚拟机模板的新父节点。The child node of the new virtual machine template is integrated with the parent node of the new virtual machine template to obtain a new parent node of the new virtual machine template.

本发明实施例还提供了一种恢复虚拟机的装置,包括:The embodiment of the present invention also provides a device for restoring a virtual machine, including:

处理模块,用于删除所选定的虚拟机,并保留虚拟机的磁盘信息和注册表信息,其中磁盘信息至少包括:系统盘信息;A processing module, configured to delete the selected virtual machine, and retain disk information and registry information of the virtual machine, wherein the disk information at least includes: system disk information;

创建模块,用于通过虚拟机模板创建VHD虚拟机;Create a module for creating a VHD virtual machine through a virtual machine template;

导入模块,用于将虚拟机的磁盘信息和注册表信息导入到VHD虚拟机中。The import module is used to import the disk information and registry information of the virtual machine into the VHD virtual machine.

其中,处理模块进一步用于:Wherein, the processing module is further used for:

在磁盘节点树形结构中删除所选定的虚拟机的第一子节点,将虚拟机的注册表信息存储到虚拟机的磁盘信息里,并保留虚拟机的磁盘信息。In the disk node tree structure, the first child node of the selected virtual machine is deleted, the registry information of the virtual machine is stored in the disk information of the virtual machine, and the disk information of the virtual machine is retained.

其中,创建模块进一步用于:Among them, the creation module is further used to:

在磁盘节点树形结构中选取与虚拟机的第一子节点具有相同的父节点的虚拟机模板的第二子节点,并通过虚拟机模板的第二子节点创建VHD虚拟机的第三子节点,通过父节点、虚拟机模板的第二子节点和VHD虚拟机的第三子节点形成VHD虚拟机。Select the second child node of the virtual machine template that has the same parent node as the first child node of the virtual machine in the disk node tree structure, and create the third child node of the VHD virtual machine through the second child node of the virtual machine template , the VHD virtual machine is formed by the parent node, the second child node of the virtual machine template, and the third child node of the VHD virtual machine.

其中,该装置还包括:Among them, the device also includes:

判定模块,用于对虚拟机模板的第二子节点进行判空操作,当虚拟机模板的第二子节点为空节点时,删除虚拟机模板的第二子节点。The judging module is configured to perform an empty judging operation on the second child node of the virtual machine template, and delete the second child node of the virtual machine template when the second child node of the virtual machine template is an empty node.

其中,导入模块包括:Among them, the imported modules include:

第一导入单元,用于将虚拟机的系统盘信息导入VHD虚拟机,作为VHD虚拟机的数据盘信息;The first import unit is used to import the system disk information of the virtual machine into the VHD virtual machine as the data disk information of the VHD virtual machine;

第二导入单元,用于将虚拟机的注册表信息导入VHD虚拟机的注册表中,根据VHD虚拟机中的数据盘信息更新VHD虚拟机的注册表信息。The second importing unit is configured to import the registry information of the virtual machine into the registry of the VHD virtual machine, and update the registry information of the VHD virtual machine according to the data disk information in the VHD virtual machine.

本发明实施例还提供一种升级虚拟机的装置,包括:The embodiment of the present invention also provides a device for upgrading a virtual machine, including:

第一转换模块,用于将虚拟机模板转换成新虚拟机,并在新虚拟机内安装新应用或补丁;A first conversion module, configured to convert the virtual machine template into a new virtual machine, and install a new application or patch in the new virtual machine;

第二转换模块,用于将安装新应用或补丁后的新虚拟机转换为新虚拟机模板;The second conversion module is used to convert the new virtual machine installed with the new application or the patch into a new virtual machine template;

整合模块,用于将新虚拟机模板的子节点和新虚拟机模板的父节点进行整合得到一个新的父节点来替换新虚拟机模板的原父节点。The integration module is configured to integrate the child node of the new virtual machine template and the parent node of the new virtual machine template to obtain a new parent node to replace the original parent node of the new virtual machine template.

其中,第一转换模块进一步用于:Wherein, the first conversion module is further used for:

在磁盘节点树形结构中选定新虚拟机的子节点,在新虚拟机的子节点上安装新应用或补丁。Select a sub-node of the new virtual machine in the disk node tree structure, and install a new application or patch on the sub-node of the new virtual machine.

其中,整合模块具体包括:Among them, the integration module specifically includes:

代替单元,用于在磁盘节点树形结构中选定新虚拟机模板的子节点和新虚拟机模板的父节点作为新虚拟机模板的新父节点来代替新虚拟机模板的原父节点;The replacement unit is used to select the child node of the new virtual machine template and the parent node of the new virtual machine template in the disk node tree structure as the new parent node of the new virtual machine template to replace the original parent node of the new virtual machine template;

整合单元,用于将新虚拟机模板的子节点和新虚拟机模板的父节点进行整合,得到新虚拟机模板的新父节点。The integration unit is configured to integrate the child node of the new virtual machine template with the parent node of the new virtual machine template to obtain a new parent node of the new virtual machine template.

本发明的有益效果是:通过将虚拟机系统盘转换成数据盘,同时修改注册表信息,恢复虚拟机的应用程序和数据,快速、智能、完全地恢复虚拟机。通过使用安装新应用或补丁的父节点替换原先的父节点,使所有的虚拟机都可以使用这个新应用或补丁,对虚拟机进行便捷批量化升级。The beneficial effects of the invention are: by converting the system disk of the virtual machine into a data disk, modifying the registry information at the same time, restoring the application program and data of the virtual machine, and recovering the virtual machine quickly, intelligently and completely. By replacing the original parent node with the parent node installed with the new application or patch, all virtual machines can use the new application or patch, and conveniently upgrade the virtual machines in batches.

附图说明Description of drawings

图1表示利用虚拟机模板创建虚拟机1的示意图;FIG. 1 shows a schematic diagram of creating a virtual machine 1 by using a virtual machine template;

图2表示利用虚拟机模板创建虚拟机2的示意图;FIG. 2 shows a schematic diagram of creating a virtual machine 2 using a virtual machine template;

图3表示删除空父节点的示意图;Figure 3 shows a schematic diagram of deleting an empty parent node;

图4表示虚拟机模板创建虚拟机的磁盘节点树形图;Fig. 4 shows the disk node tree diagram of virtual machine template creation virtual machine;

图5表示本发明实施例恢复虚拟机的方法步骤流程图;FIG. 5 shows a flow chart of method steps for restoring a virtual machine according to an embodiment of the present invention;

图6表示本发明实施例恢复虚拟机的方法中删除虚拟机1的磁盘节点树形变化图;FIG. 6 shows a tree change diagram of a disk node in which virtual machine 1 is deleted in the method for restoring a virtual machine according to an embodiment of the present invention;

图7表示本发明实施例恢复虚拟机的方法中创建虚拟机3后的磁盘节点树形变化图;FIG. 7 shows a tree change diagram of disk nodes after virtual machine 3 is created in the method for restoring a virtual machine according to an embodiment of the present invention;

图8表示本发明实施例恢复虚拟机的方法中节点判空的磁盘节点树形变化图;FIG. 8 shows a tree change diagram of a disk node when a node is judged to be empty in the method for restoring a virtual machine according to an embodiment of the present invention;

图9表示本发明实施例恢复虚拟机的方法中将虚拟机的磁盘信息和注册表信息导入到VHD虚拟机的步骤流程图;Fig. 9 shows the flow chart of the steps of importing the disk information and registry information of the virtual machine into the VHD virtual machine in the method for restoring the virtual machine according to the embodiment of the present invention;

图10表示本发明实施例恢复虚拟机的方法中导入数据盘后的磁盘节点树形变化图;FIG. 10 shows a tree change diagram of a disk node after importing a data disk in the method for restoring a virtual machine according to an embodiment of the present invention;

图11表示本发明实施例升级虚拟机的方法步骤流程图;FIG. 11 shows a flow chart of method steps for upgrading a virtual machine according to an embodiment of the present invention;

图12表示本发明实施例升级虚拟机的方法中虚拟机模板转成虚拟机4的磁盘节点树形变化图;FIG. 12 shows a tree change diagram of disk nodes converted from a virtual machine template to a virtual machine 4 in the method for upgrading a virtual machine according to an embodiment of the present invention;

图13表示本发明实施例升级虚拟机的方法中虚拟机4转成新虚拟机模板的磁盘节点树形变化图;Fig. 13 shows the disk node tree change diagram of the virtual machine 4 converted into a new virtual machine template in the method for upgrading the virtual machine in the embodiment of the present invention;

图14表示本发明实施例升级虚拟机的方法中替换父节点的步骤流程图;FIG. 14 shows a flow chart of steps for replacing a parent node in a method for upgrading a virtual machine according to an embodiment of the present invention;

图15表示本发明实施例升级虚拟机的方法中替换父节点后的磁盘节点树形变化图;FIG. 15 shows a tree change diagram of a disk node after replacing a parent node in a method for upgrading a virtual machine according to an embodiment of the present invention;

图16表示本发明实施例升级虚拟机的方法中整合父节点磁盘节点树形变化图;FIG. 16 shows a tree change graph of integrating parent node disk nodes in the method for upgrading a virtual machine according to an embodiment of the present invention;

图17表示本发明实施例恢复虚拟机的装置框图;FIG. 17 shows a block diagram of an apparatus for restoring a virtual machine according to an embodiment of the present invention;

图18表示本发明实施例恢复虚拟机的装置中导入模块框图;Fig. 18 shows a block diagram of importing modules in the device for restoring a virtual machine according to an embodiment of the present invention;

图19表示本发明实施例升级虚拟机的装置框图;FIG. 19 shows a block diagram of a device for upgrading a virtual machine according to an embodiment of the present invention;

图20表示本发明实施例升级虚拟机的装置中整合模块框图。FIG. 20 shows a block diagram of an integrated module in a device for upgrading a virtual machine according to an embodiment of the present invention.

具体实施方式detailed description

为使本发明要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will describe in detail with reference to the drawings and specific embodiments.

现有技术中,利用虚拟机模板创建虚拟机的详细过程如下:In the prior art, the detailed process of creating a virtual machine using a virtual machine template is as follows:

如图1所示,通知虚拟机模板创建虚拟机1,在虚拟机模板的磁盘节点A下拉2个子节点B、M出来,分别成为虚拟机1和虚拟机模板的子节点。此时节点A成为虚拟机模板和虚拟机1的共同父节点,B、M因为是新建的节点(没有在节点上进行操作),这2个磁盘节点实际占用的空间很小甚至没有数据。因此创建的过程非常快(10S左右)。As shown in Figure 1, the virtual machine template is notified to create virtual machine 1, and two child nodes B and M are pulled down from the disk node A of the virtual machine template to become the child nodes of virtual machine 1 and the virtual machine template respectively. At this time, node A becomes the common parent node of the virtual machine template and virtual machine 1. Since B and M are newly created nodes (no operations are performed on the nodes), the actual space occupied by these two disk nodes is very small or even has no data. Therefore, the creation process is very fast (about 10S).

如图2所示,通知虚拟机模板创建虚拟机2,在虚拟机模板的子节点M下拉2个子节点C、D出来,分别成为虚拟机2和虚拟机模板的子节点。同理,C、D是新建的节点,这2个磁盘节点实际占用的空间很小甚至没有数据。因此创建虚拟机2的过程也非常快(10S左右)。As shown in Figure 2, the virtual machine template is notified to create virtual machine 2, and two child nodes C and D are pulled down from the child node M of the virtual machine template, which become the child nodes of virtual machine 2 and the virtual machine template respectively. Similarly, C and D are newly created nodes, and the actual space occupied by these two disk nodes is very small or even has no data. Therefore, the process of creating virtual machine 2 is also very fast (about 10S).

如图3所示,对虚拟机和虚拟机模板的父节点进行判空,如果为空,删除该空的父节点。虚拟机2和虚拟机模板的父节点M是空节点,删除该节点。最后形成如图4所示的虚拟机模板创建虚拟机的磁盘节点树形图。As shown in FIG. 3 , the parent node of the virtual machine and the virtual machine template is judged to be empty, and if it is empty, the empty parent node is deleted. The parent node M of VM 2 and the VM template is an empty node. Delete this node. Finally, a virtual machine template as shown in FIG. 4 is formed to create a disk node tree diagram of the virtual machine.

本发明基于上述现有技术提供了一种恢复虚拟机的方法,如图5所示,包括:The present invention provides a method for restoring a virtual machine based on the above-mentioned prior art, as shown in Figure 5, including:

步骤S100、删除所选定的虚拟机,并保留虚拟机的磁盘信息和注册表信息,其中磁盘信息至少包括:系统盘信息;Step S100, delete the selected virtual machine, and retain the disk information and registry information of the virtual machine, wherein the disk information at least includes: system disk information;

步骤S200、通过虚拟机模板创建VHD虚拟机;Step S200, creating a VHD virtual machine through a virtual machine template;

步骤S300、将虚拟机的磁盘信息和注册表信息导入到VHD虚拟机中。Step S300, importing the disk information and registry information of the virtual machine into the VHD virtual machine.

具体地,保留选定虚拟机的磁盘信息和注册表信息,依据虚拟机模板创建VHD虚拟机,将保存的虚拟机的磁盘信息和注册表信息导入到新创建的VHD虚拟机中,恢复虚拟机的应用程序和数据,快速、智能、完全地恢复虚拟机。Specifically, retain the disk information and registry information of the selected virtual machine, create a VHD virtual machine according to the virtual machine template, import the saved disk information and registry information of the virtual machine into the newly created VHD virtual machine, and restore the virtual machine Quickly, intelligently, and completely restore virtual machines without losing applications and data.

在本发明上述实施例中,删除所选定的虚拟机,并保留虚拟机的磁盘信息和注册表信息,具体为:In the foregoing embodiments of the present invention, the selected virtual machine is deleted, and the disk information and registry information of the virtual machine are retained, specifically:

在磁盘节点树形结构中删除所选定的虚拟机的第一子节点,将虚拟机的注册表信息存储到虚拟机的磁盘信息里,并保留虚拟机的磁盘信息。In the disk node tree structure, the first child node of the selected virtual machine is deleted, the registry information of the virtual machine is stored in the disk information of the virtual machine, and the disk information of the virtual machine is retained.

如图6所示,删除选定的虚拟机1的子节点B,保留虚拟机1所有磁盘(包括系统盘C)信息,并自动保留虚拟机1的注册表信息,将注册表信息存储到虚拟机的磁盘信息里,将虚拟机1的磁盘节点A+B整合成独立磁盘a。As shown in Figure 6, the child node B of the selected virtual machine 1 is deleted, information on all disks (including system disk C) of the virtual machine 1 is reserved, and the registry information of the virtual machine 1 is automatically reserved, and the registry information is stored in the virtual machine. In the disk information of the virtual machine, integrate the disk node A+B of the virtual machine 1 into an independent disk a.

在本发明上述实施例中,通过虚拟机模板创建VHD虚拟机,具体为:In the foregoing embodiments of the present invention, a VHD virtual machine is created through a virtual machine template, specifically:

在磁盘节点树形结构中选取与虚拟机的第一子节点具有相同的父节点的虚拟机模板的第二子节点,并通过虚拟机模板的第二子节点创建VHD虚拟机的第三子节点,通过父节点、虚拟机模板的第二子节点和VHD虚拟机的第三子节点形成VHD虚拟机。Select the second child node of the virtual machine template that has the same parent node as the first child node of the virtual machine in the disk node tree structure, and create the third child node of the VHD virtual machine through the second child node of the virtual machine template , the VHD virtual machine is formed by the parent node, the second child node of the virtual machine template, and the third child node of the VHD virtual machine.

如图7所示,使用虚拟机模板快速创建VHD虚拟机即虚拟机3(10S左右),创建过程:在虚拟机模板的子节点D下拉2个子节点E、F出来,分别成为虚拟机3和虚拟机模板的子节点。创建虚拟机3后的磁盘节点树形变化图为:从虚拟机模板的子节点D下拉了2个子节点E、F,形成了虚拟机3,这样虚拟机3的节点为A+D+E,虚拟机模板的节点为A+D+F。As shown in Figure 7, use the virtual machine template to quickly create a VHD virtual machine, that is, virtual machine 3 (about 10S). The creation process: pull down two subnodes E and F from the subnode D of the virtual machine template to become virtual machine 3 and F respectively. Child node of the virtual machine template. The change diagram of the disk node tree after virtual machine 3 is created: two child nodes E and F are pulled down from child node D of the virtual machine template to form virtual machine 3, so the node of virtual machine 3 is A+D+E, The nodes of the virtual machine template are A+D+F.

在本发明上述实施例中,该方法还包括:In the above-mentioned embodiment of the present invention, the method also includes:

对虚拟机模板的第二子节点进行判空操作,当虚拟机模板的第二子节点为空节点时,删除虚拟机模板的第二子节点。A null judgment operation is performed on the second child node of the virtual machine template, and when the second child node of the virtual machine template is an empty node, the second child node of the virtual machine template is deleted.

为了防止虚拟机节点无节制的增多,子节点会判定父节点是否为空,如果为空则删除空节点。如图8所示,D节点是空节点(里面没有内容),判空后删除。In order to prevent the uncontrolled increase of virtual machine nodes, the child node will determine whether the parent node is empty, and if it is empty, delete the empty node. As shown in Figure 8, the D node is an empty node (there is no content in it), and it will be deleted after being judged to be empty.

在本发明上述实施例中,将虚拟机的磁盘信息和注册表信息导入到VHD虚拟机中,如图9所示,具体包括:In the foregoing embodiments of the present invention, the disk information and registry information of the virtual machine are imported into the VHD virtual machine, as shown in FIG. 9 , specifically including:

步骤S301、将虚拟机的系统盘信息导入VHD虚拟机,作为VHD虚拟机的数据盘信息;Step S301, importing the system disk information of the virtual machine into the VHD virtual machine as the data disk information of the VHD virtual machine;

步骤S302、将虚拟机的注册表信息导入VHD虚拟机的注册表中,根据VHD虚拟机中的数据盘信息更新VHD虚拟机的注册表信息。Step S302, import the registry information of the virtual machine into the registry of the VHD virtual machine, and update the registry information of the VHD virtual machine according to the data disk information in the VHD virtual machine.

如图10所示,在新虚拟机(虚机3)上挂载虚拟机1保留的磁盘信息(即独立磁盘a),作为新虚拟机的数据盘。其中将虚拟机1的系统盘C作为新虚拟机的数据盘E,修改保存的虚拟机1的注册表信息中C盘为E盘。将保存虚拟机1的注册表信息导入新虚拟机中。这样可以尽可能的恢复虚拟机1的各种应用和数据,不用重新安装。As shown in FIG. 10 , the disk information reserved by virtual machine 1 (that is, independent disk a) is mounted on the new virtual machine (virtual machine 3) as a data disk of the new virtual machine. The system disk C of the virtual machine 1 is used as the data disk E of the new virtual machine, and disk C in the registry information of the saved virtual machine 1 is modified to disk E. Import the registry information of saved virtual machine 1 to the new virtual machine. In this way, various applications and data of the virtual machine 1 can be recovered as much as possible without reinstallation.

本发明实施例还提供一种升级虚拟机的方法,如图11所示,包括:The embodiment of the present invention also provides a method for upgrading a virtual machine, as shown in FIG. 11 , including:

步骤S400、将虚拟机模板转换成新虚拟机,并在新虚拟机内安装新应用或补丁;Step S400, converting the virtual machine template into a new virtual machine, and installing a new application or patch in the new virtual machine;

步骤S500、将安装新应用或补丁后的新虚拟机转换为新虚拟机模板;Step S500, converting the new virtual machine installed with the new application or patch into a new virtual machine template;

步骤S600、将新虚拟机模板的子节点和新虚拟机模板的父节点进行整合得到一个新的父节点来替换新虚拟机模板的原父节点。Step S600, integrate the child node of the new virtual machine template and the parent node of the new virtual machine template to obtain a new parent node to replace the original parent node of the new virtual machine template.

具体的,如图12和13所示,通过在新虚拟机内安装新应用或补丁,将安装新应用或补丁后的新虚拟机转换为新虚拟机模板,此时新虚拟机模板中包含了新的应用或补丁,通过父节点替换的方式,可以实现虚拟机内部新应用安装和补丁升级,完全做到批量、自动的安装或升级,效率得到明显提升。Specifically, as shown in Figures 12 and 13, by installing a new application or patch in the new virtual machine, the new virtual machine after installing the new application or patch is converted into a new virtual machine template. At this time, the new virtual machine template contains For new applications or patches, new application installations and patch upgrades inside the virtual machine can be implemented by replacing the parent node. Batch and automatic installation or upgrade can be achieved, and the efficiency has been significantly improved.

在本发明上述实施例中,步骤S400中在新虚拟机内安装新应用或补丁,具体为:In the above embodiments of the present invention, in step S400, a new application or patch is installed in the new virtual machine, specifically:

在磁盘节点树形结构中选定新虚拟机的子节点,在新虚拟机的子节点上安装新应用或补丁。Select a sub-node of the new virtual machine in the disk node tree structure, and install a new application or patch on the sub-node of the new virtual machine.

如图12所示,在虚拟机4内安装新的应用或补丁,应用或补丁的安装是在虚拟机4的子节点D上进行操作的,不影响其他虚拟机的在线使用。As shown in FIG. 12 , a new application or patch is installed in the virtual machine 4, and the installation of the application or patch is performed on the child node D of the virtual machine 4 without affecting the online use of other virtual machines.

在本发明上述实施例中,如图14所示,步骤S600具体包括:In the above-mentioned embodiment of the present invention, as shown in FIG. 14, step S600 specifically includes:

步骤S601、在磁盘节点树形结构中选定新虚拟机模板的子节点和新虚拟机模板的父节点作为新虚拟机模板的新父节点来代替新虚拟机模板的原父节点;Step S601, selecting the child node of the new virtual machine template and the parent node of the new virtual machine template in the disk node tree structure as the new parent node of the new virtual machine template to replace the original parent node of the new virtual machine template;

步骤S602、将新虚拟机模板的子节点和新虚拟机模板的父节点进行整合,得到新虚拟机模板的新父节点。Step S602, integrating the child nodes of the new virtual machine template and the parent nodes of the new virtual machine template to obtain a new parent node of the new virtual machine template.

如图15所示,将新虚拟机模板的父节点和子节点整合替换原来的父节点。替换后的虚拟机1、虚拟机2和新虚拟机模板的父节点是A+D,虚拟机1、虚拟机2及新虚拟机模板的差异子节点分别为B、C、E。将父节点A+D整合成一个节点F,参考图16整合父节点磁盘节点树形变化图为:虚拟机1、虚拟机2和新虚拟机模板整合后的父节点是F,虚拟机1、虚拟机2和新虚拟机模板的差异子节点分别为B、C、E。As shown in FIG. 15 , the parent node and child nodes of the new virtual machine template are integrated to replace the original parent node. The parent node of the replaced virtual machine 1, virtual machine 2, and new virtual machine template is A+D, and the difference child nodes of virtual machine 1, virtual machine 2, and the new virtual machine template are B, C, and E, respectively. Integrate the parent node A+D into a node F. Refer to Figure 16 to integrate the parent node disk node tree change diagram: the parent node after the integration of virtual machine 1, virtual machine 2 and the new virtual machine template is F, virtual machine 1, The difference child nodes of virtual machine 2 and the new virtual machine template are B, C, and E respectively.

本发明实施例还提供了一种恢复虚拟机的装置,如图17所示,包括:The embodiment of the present invention also provides an apparatus for restoring a virtual machine, as shown in FIG. 17 , including:

处理模块10,用于删除所选定的虚拟机,并保留虚拟机的磁盘信息和注册表信息,其中磁盘信息至少包括:系统盘信息;The processing module 10 is configured to delete the selected virtual machine, and retain the disk information and registry information of the virtual machine, wherein the disk information at least includes: system disk information;

创建模块20,用于通过虚拟机模板创建VHD虚拟机;Creating module 20, for creating a VHD virtual machine through a virtual machine template;

导入模块30,用于将虚拟机的磁盘信息和注册表信息导入到VHD虚拟机中。The import module 30 is configured to import the disk information and registry information of the virtual machine into the VHD virtual machine.

在本发明上述实施例中,处理模块10进一步用于:In the above embodiments of the present invention, the processing module 10 is further used for:

在磁盘节点树形结构中删除所选定的虚拟机的第一子节点,将虚拟机的注册表信息存储到虚拟机的磁盘信息里,并保留虚拟机的磁盘信息。In the disk node tree structure, the first child node of the selected virtual machine is deleted, the registry information of the virtual machine is stored in the disk information of the virtual machine, and the disk information of the virtual machine is retained.

在本发明上述实施例中,创建模块20进一步用于:In the above embodiments of the present invention, the creation module 20 is further used for:

在磁盘节点树形结构中选取与虚拟机的第一子节点具有相同的父节点的虚拟机模板的第二子节点,并通过虚拟机模板的第二子节点创建VHD虚拟机的第三子节点,通过父节点、虚拟机模板的第二子节点和VHD虚拟机的第三子节点形成VHD虚拟机。Select the second child node of the virtual machine template that has the same parent node as the first child node of the virtual machine in the disk node tree structure, and create the third child node of the VHD virtual machine through the second child node of the virtual machine template , the VHD virtual machine is formed by the parent node, the second child node of the virtual machine template, and the third child node of the VHD virtual machine.

在本发明上述实施例中,该装置还包括:In the above-mentioned embodiment of the present invention, the device also includes:

判定模块40,用于对虚拟机模板的第二子节点进行判空操作,当虚拟机模板的第二子节点为空节点时,删除虚拟机模板的第二子节点。The judging module 40 is configured to perform an empty judging operation on the second child node of the virtual machine template, and delete the second child node of the virtual machine template when the second child node of the virtual machine template is an empty node.

在本发明上述实施例中,如图18所示,导入模块30包括:In the above-mentioned embodiment of the present invention, as shown in FIG. 18, the import module 30 includes:

第一导入单元31,用于将虚拟机的系统盘信息导入VHD虚拟机,作为VHD虚拟机的数据盘信息;The first import unit 31 is used to import the system disk information of the virtual machine into the VHD virtual machine as the data disk information of the VHD virtual machine;

第二导入单元32,用于将虚拟机的注册表信息导入VHD虚拟机的注册表中,根据VHD虚拟机中的数据盘信息更新VHD虚拟机的注册表信息。The second importing unit 32 is configured to import the registry information of the virtual machine into the registry of the VHD virtual machine, and update the registry information of the VHD virtual machine according to the data disk information in the VHD virtual machine.

本发明实施例还提供一种升级虚拟机的装置,如图19所示,包括:The embodiment of the present invention also provides an apparatus for upgrading a virtual machine, as shown in FIG. 19 , including:

第一转换模块50,用于将虚拟机模板转换成新虚拟机,并在新虚拟机内安装新应用或补丁;The first conversion module 50 is configured to convert the virtual machine template into a new virtual machine, and install a new application or patch in the new virtual machine;

第二转换模块60,用于将安装新应用或补丁后的新虚拟机转换为新虚拟机模板;The second converting module 60 is configured to convert the new virtual machine installed with the new application or the patch into a new virtual machine template;

整合模块70,用于将新虚拟机模板的子节点和新虚拟机模板的父节点进行整合得到一个新的父节点来替换新虚拟机模板的原父节点。The integration module 70 is configured to integrate the child node of the new virtual machine template and the parent node of the new virtual machine template to obtain a new parent node to replace the original parent node of the new virtual machine template.

在本发明上述实施例中,第一转换模块50进一步用于:In the above embodiments of the present invention, the first conversion module 50 is further used for:

在磁盘节点树形结构中选定新虚拟机的子节点,在新虚拟机的子节点上安装新应用或补丁。Select a sub-node of the new virtual machine in the disk node tree structure, and install a new application or patch on the sub-node of the new virtual machine.

在本发明上述实施例中,如图20所示,整合模块70具体包括:In the above embodiments of the present invention, as shown in FIG. 20 , the integration module 70 specifically includes:

代替单元71,用于在磁盘节点树形结构中选定新虚拟机模板的子节点和新虚拟机模板的父节点作为新虚拟机模板的新父节点来代替新虚拟机模板的原父节点;The replacement unit 71 is used to select the child node of the new virtual machine template and the parent node of the new virtual machine template in the disk node tree structure as the new parent node of the new virtual machine template to replace the original parent node of the new virtual machine template;

整合单元72,用于将新虚拟机模板的子节点和新虚拟机模板的父节点进行整合,得到新虚拟机模板的新父节点。The integration unit 72 is configured to integrate the child nodes of the new virtual machine template with the parent nodes of the new virtual machine template to obtain a new parent node of the new virtual machine template.

本发明实施例恢复、升级虚拟机的方法中,通过将虚拟机系统盘转换成数据盘,同时修改注册表信息,恢复虚拟机的应用程序和数据,快速、智能、完全地恢复虚拟机。通过使用安装新应用或补丁的父节点替换原先的父节点,使所有的虚拟机都可以使用这个新应用或补丁,对虚拟机进行便捷批量化升级。In the method for restoring and upgrading a virtual machine in the embodiment of the present invention, the virtual machine system disk is converted into a data disk, and the registry information is modified at the same time, and the application program and data of the virtual machine are restored, so that the virtual machine can be quickly, intelligently and completely restored. By replacing the original parent node with the parent node installed with the new application or patch, all virtual machines can use the new application or patch, and conveniently upgrade the virtual machines in batches.

需要说明的是,本发明提供恢复、升级虚拟机的装置是应用上述方法的装置,则上述方法的所有实施例均适用于该装置,且均能达到相同或相似的有益效果。It should be noted that the device for recovering and upgrading a virtual machine provided by the present invention is a device for applying the above-mentioned method, and all embodiments of the above-mentioned method are applicable to the device, and can achieve the same or similar beneficial effects.

以上所述是本发明的优选实施方式,应当指出对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is a preferred embodiment of the present invention, it should be pointed out that for those of ordinary skill in the art, some improvements and modifications can also be made without departing from the principles of the present invention, and these improvements and modifications should also be It is regarded as the protection scope of the present invention.

Claims (16)

1.一种恢复虚拟机的方法,其特征在于,所述方法包括:1. A method for restoring a virtual machine, characterized in that the method comprises: 删除所选定的虚拟机,并保留所述虚拟机的磁盘信息和注册表信息,其中所述磁盘信息至少包括:系统盘信息;deleting the selected virtual machine, and retaining the disk information and registry information of the virtual machine, wherein the disk information at least includes: system disk information; 通过虚拟机模板创建VHD虚拟机;以及Create a VHD virtual machine from a virtual machine template; and 将所述虚拟机的磁盘信息和注册表信息导入到所述VHD虚拟机中。Import the disk information and registry information of the virtual machine into the VHD virtual machine. 2.如权利要求1所述的方法,其特征在于,所述删除所选定的虚拟机,并保留所述虚拟机的磁盘信息和注册表信息,具体为:2. The method according to claim 1, wherein the deleting the selected virtual machine and retaining the disk information and registry information of the virtual machine is specifically: 在磁盘节点树形结构中删除所选定的虚拟机的第一子节点,将所述虚拟机的注册表信息存储到所述虚拟机的磁盘信息里,并保留所述虚拟机的磁盘信息。Deleting the first child node of the selected virtual machine in the disk node tree structure, storing the registry information of the virtual machine in the disk information of the virtual machine, and retaining the disk information of the virtual machine. 3.如权利要求2所述的方法,其特征在于,所述通过虚拟机模板创建VHD虚拟机,具体为:3. The method according to claim 2, wherein said creating a VHD virtual machine through a virtual machine template is specifically: 在所述磁盘节点树形结构中选取与所述虚拟机的第一子节点具有相同的父节点的虚拟机模板的第二子节点,并通过所述虚拟机模板的第二子节点创建VHD虚拟机的第三子节点,通过所述父节点、所述虚拟机模板的第二子节点和所述VHD虚拟机的第三子节点形成所述VHD虚拟机。In the disk node tree structure, select the second child node of the virtual machine template that has the same parent node as the first child node of the virtual machine, and create a VHD virtual disk through the second child node of the virtual machine template. The third child node of the machine, the VHD virtual machine is formed by the parent node, the second child node of the virtual machine template, and the third child node of the VHD virtual machine. 4.如权利要求3所述的方法,其特征在于,所述方法还包括:4. The method of claim 3, further comprising: 对所述虚拟机模板的第二子节点进行判空操作,当所述虚拟机模板的第二子节点为空节点时,删除所述虚拟机模板的第二子节点。An empty judgment operation is performed on the second child node of the virtual machine template, and when the second child node of the virtual machine template is an empty node, the second child node of the virtual machine template is deleted. 5.如权利要求1所述的方法,其特征在于,所述将所述虚拟机的磁盘信息和注册表信息导入到所述VHD虚拟机中,具体包括:5. The method according to claim 1, wherein the disk information and registry information of the virtual machine are imported into the VHD virtual machine, specifically comprising: 将所述虚拟机的系统盘信息导入所述VHD虚拟机,作为所述VHD虚拟机的数据盘信息;Importing the system disk information of the virtual machine into the VHD virtual machine as the data disk information of the VHD virtual machine; 将所述虚拟机的注册表信息导入所述VHD虚拟机的注册表中,根据所述VHD虚拟机中的数据盘信息更新所述VHD虚拟机的注册表信息。Import the registry information of the virtual machine into the registry of the VHD virtual machine, and update the registry information of the VHD virtual machine according to the data disk information in the VHD virtual machine. 6.一种升级虚拟机的方法,其特征在于,所述方法包括:6. A method for upgrading a virtual machine, characterized in that the method comprises: 将虚拟机模板转换成新虚拟机,并在所述新虚拟机内安装新应用或补丁;converting the virtual machine template into a new virtual machine, and installing a new application or patch in said new virtual machine; 将安装新应用或补丁后的所述新虚拟机转换为新虚拟机模板;converting said new virtual machine after installing a new application or patch into a new virtual machine template; 将所述新虚拟机模板的子节点和所述新虚拟机模板的父节点进行整合得到一个新的父节点来替换所述新虚拟机模板的原父节点。The child node of the new virtual machine template and the parent node of the new virtual machine template are integrated to obtain a new parent node to replace the original parent node of the new virtual machine template. 7.如权利要求6所述的方法,其特征在于,所述在所述新虚拟机内安装新应用或补丁,具体为:7. The method according to claim 6, wherein the installing a new application or patch in the new virtual machine is specifically: 在磁盘节点树形结构中选定所述新虚拟机的子节点,在所述新虚拟机的子节点上安装新应用或补丁。Selecting a child node of the new virtual machine in the disk node tree structure, and installing a new application or patch on the child node of the new virtual machine. 8.如权利要求7所述的方法,其特征在于,所述将所述新虚拟机模板的子节点和所述新虚拟机模板的父节点进行整合得到一个新的父节点来替换所述新虚拟机模板的原父节点,具体包括:8. The method according to claim 7, wherein the child node of the new virtual machine template is integrated with the parent node of the new virtual machine template to obtain a new parent node to replace the new The original parent node of the virtual machine template, including: 在所述磁盘节点树形结构中选定所述新虚拟机模板的子节点和所述新虚拟机模板的父节点作为所述新虚拟机模板的新父节点来代替所述新虚拟机模板的原父节点;In the disk node tree structure, select the child node of the new virtual machine template and the parent node of the new virtual machine template as the new parent node of the new virtual machine template to replace the new virtual machine template original parent node; 将所述新虚拟机模板的子节点和所述新虚拟机模板的父节点进行整合,得到所述新虚拟机模板的新父节点。The child node of the new virtual machine template is integrated with the parent node of the new virtual machine template to obtain a new parent node of the new virtual machine template. 9.一种恢复虚拟机的装置,其特征在于,所述装置包括:9. A device for restoring a virtual machine, characterized in that the device comprises: 处理模块,用于删除所选定的虚拟机,并保留所述虚拟机的磁盘信息和注册表信息,其中所述磁盘信息至少包括:系统盘信息;A processing module, configured to delete the selected virtual machine, and retain disk information and registry information of the virtual machine, wherein the disk information at least includes: system disk information; 创建模块,用于通过虚拟机模板创建VHD虚拟机;Create a module for creating a VHD virtual machine through a virtual machine template; 导入模块,用于将所述虚拟机的磁盘信息和注册表信息导入到所述VHD虚拟机中。An import module, configured to import the disk information and registry information of the virtual machine into the VHD virtual machine. 10.如权利要求9所述的装置,其特征在于,所述处理模块进一步用于:10. The device according to claim 9, wherein the processing module is further used for: 在磁盘节点树形结构中删除所选定的虚拟机的第一子节点,将所述虚拟机的注册表信息存储到所述虚拟机的磁盘信息里,并保留所述虚拟机的磁盘信息。Deleting the first child node of the selected virtual machine in the disk node tree structure, storing the registry information of the virtual machine in the disk information of the virtual machine, and retaining the disk information of the virtual machine. 11.如权利要求10所述的装置,其特征在于,所述创建模块进一步用于:11. The device according to claim 10, wherein the creation module is further used for: 在所述磁盘节点树形结构中选取与所述虚拟机的第一子节点具有相同的父节点的虚拟机模板的第二子节点,并通过所述虚拟机模板的第二子节点创建VHD虚拟机的第三子节点,通过所述父节点、所述虚拟机模板的第二子节点和所述VHD虚拟机的第三子节点形成所述VHD虚拟机。In the disk node tree structure, select the second child node of the virtual machine template that has the same parent node as the first child node of the virtual machine, and create a VHD virtual disk through the second child node of the virtual machine template. The third child node of the machine, the VHD virtual machine is formed by the parent node, the second child node of the virtual machine template, and the third child node of the VHD virtual machine. 12.如权利要求11所述的装置,其特征在于,所述装置还包括:12. The device of claim 11, further comprising: 判定模块,用于对所述虚拟机模板的第二子节点进行判空操作,当所述虚拟机模板的第二子节点为空节点时,删除所述虚拟机模板的第二子节点。The judging module is configured to perform an empty judging operation on the second child node of the virtual machine template, and delete the second child node of the virtual machine template when the second child node of the virtual machine template is an empty node. 13.如权利要求9所述的装置,其特征在于,所述导入模块包括:13. The device according to claim 9, wherein the import module comprises: 第一导入单元,用于将所述虚拟机的系统盘信息导入所述VHD虚拟机,作为所述VHD虚拟机的数据盘信息;A first importing unit, configured to import the system disk information of the virtual machine into the VHD virtual machine as the data disk information of the VHD virtual machine; 第二导入单元,用于将所述虚拟机的注册表信息导入所述VHD虚拟机的注册表中,根据所述VHD虚拟机中的数据盘信息更新所述VHD虚拟机的注册表信息。The second importing unit is configured to import the registry information of the virtual machine into the registry of the VHD virtual machine, and update the registry information of the VHD virtual machine according to the data disk information in the VHD virtual machine. 14.一种升级虚拟机的装置,其特征在于,所述装置包括:14. A device for upgrading a virtual machine, characterized in that the device comprises: 第一转换模块,用于将虚拟机模板转换成新虚拟机,并在所述新虚拟机内安装新应用或补丁;A first conversion module, configured to convert the virtual machine template into a new virtual machine, and install a new application or patch in the new virtual machine; 第二转换模块,用于将安装新应用或补丁后的所述新虚拟机转换为新虚拟机模板;A second converting module, configured to convert the new virtual machine installed with a new application or patch into a new virtual machine template; 整合模块,用于将所述新虚拟机模板的子节点和所述新虚拟机模板的父节点进行整合得到一个新的父节点来替换所述新虚拟机模板的原父节点。The integration module is configured to integrate the child node of the new virtual machine template with the parent node of the new virtual machine template to obtain a new parent node to replace the original parent node of the new virtual machine template. 15.如权利要求14所述的装置,其特征在于,所述第一转换模块进一步用于:15. The device according to claim 14, wherein the first conversion module is further used for: 在磁盘节点树形结构中选定所述新虚拟机的子节点,在所述新虚拟机的子节点上安装新应用或补丁。Selecting a child node of the new virtual machine in the disk node tree structure, and installing a new application or patch on the child node of the new virtual machine. 16.如权利要求15所述的装置,其特征在于,所述整合模块具体包括:16. The device according to claim 15, wherein the integration module specifically comprises: 代替单元,用于在所述磁盘节点树形结构中选定所述新虚拟机模板的子节点和所述新虚拟机模板的父节点作为所述新虚拟机模板的新父节点来代替所述新虚拟机模板的原父节点;a replacement unit, configured to select the child node of the new virtual machine template and the parent node of the new virtual machine template in the disk node tree structure as the new parent node of the new virtual machine template to replace the The original parent node of the new virtual machine template; 整合单元,用于将所述新虚拟机模板的子节点和所述新虚拟机模板的父节点进行整合,得到所述新虚拟机模板的新父节点。An integrating unit, configured to integrate the child nodes of the new virtual machine template and the parent nodes of the new virtual machine template to obtain a new parent node of the new virtual machine template.
CN201410763813.6A 2014-12-11 2014-12-11 Method and device for recovering virtual machine, as well as method and device for upgrading virtual machine Withdrawn CN105740003A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410763813.6A CN105740003A (en) 2014-12-11 2014-12-11 Method and device for recovering virtual machine, as well as method and device for upgrading virtual machine
PCT/CN2015/081881 WO2016090890A1 (en) 2014-12-11 2015-06-18 Method and device for recovering and updating virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410763813.6A CN105740003A (en) 2014-12-11 2014-12-11 Method and device for recovering virtual machine, as well as method and device for upgrading virtual machine

Publications (1)

Publication Number Publication Date
CN105740003A true CN105740003A (en) 2016-07-06

Family

ID=56106579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410763813.6A Withdrawn CN105740003A (en) 2014-12-11 2014-12-11 Method and device for recovering virtual machine, as well as method and device for upgrading virtual machine

Country Status (2)

Country Link
CN (1) CN105740003A (en)
WO (1) WO2016090890A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291507A (en) * 2017-06-28 2017-10-24 联想(北京)有限公司 The upgrade method and electronic equipment of a kind of virtual machine virtual hard disk
CN107395429A (en) * 2017-08-15 2017-11-24 郑州云海信息技术有限公司 The method and apparatus that virtual machine is managed in cloud data center
WO2018032770A1 (en) * 2016-08-19 2018-02-22 华为技术有限公司 Application component deployment method and deployment node
CN108021408A (en) * 2016-11-01 2018-05-11 阿里巴巴集团控股有限公司 Upgrade method and device
CN109324867A (en) * 2017-07-31 2019-02-12 郑州云海信息技术有限公司 A virtual machine temporary storage method, recovery method and device
CN110147529A (en) * 2018-02-13 2019-08-20 珠海金山办公软件有限公司 Method and device for recovering PDF comments
CN110808943A (en) * 2018-08-06 2020-02-18 中兴通讯股份有限公司 Client connection emergency management method, client and computer-readable storage medium
CN114595028A (en) * 2022-01-28 2022-06-07 新华三云计算技术有限公司 Cloud desktop system disk updating method and device and storage medium
WO2025195171A1 (en) * 2024-03-18 2025-09-25 中兴通讯股份有限公司 Virtual machine upgrading method and apparatus, terminal device, and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11221865B2 (en) 2018-07-31 2022-01-11 Nutanix, Inc. Batch management of operations over virtualized entities

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799464B (en) * 2012-06-25 2015-11-11 北京奇虎科技有限公司 Virtual machine creation method and system, virtual machine reloading method and system
CN102981888B (en) * 2012-10-16 2016-02-03 北京华胜天成科技股份有限公司 For the virtualization implementation method of Power server
CN103440157B (en) * 2013-06-25 2016-12-28 百度在线网络技术(北京)有限公司 A kind of method and apparatus of the template for obtaining virtual machine

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10684850B2 (en) 2016-08-19 2020-06-16 Huawei Technologies Co., Ltd. Application component deployment method and deployment node
CN107769949B (en) * 2016-08-19 2021-02-12 华为技术有限公司 Application component deployment method and deployment node
WO2018032770A1 (en) * 2016-08-19 2018-02-22 华为技术有限公司 Application component deployment method and deployment node
CN107769949A (en) * 2016-08-19 2018-03-06 华为技术有限公司 A kind of application component dispositions method and deployment node
CN108021408A (en) * 2016-11-01 2018-05-11 阿里巴巴集团控股有限公司 Upgrade method and device
CN107291507B (en) * 2017-06-28 2020-10-27 联想(北京)有限公司 Upgrading method for virtual hard disk of virtual machine and electronic equipment
CN107291507A (en) * 2017-06-28 2017-10-24 联想(北京)有限公司 The upgrade method and electronic equipment of a kind of virtual machine virtual hard disk
CN109324867A (en) * 2017-07-31 2019-02-12 郑州云海信息技术有限公司 A virtual machine temporary storage method, recovery method and device
CN107395429A (en) * 2017-08-15 2017-11-24 郑州云海信息技术有限公司 The method and apparatus that virtual machine is managed in cloud data center
CN110147529A (en) * 2018-02-13 2019-08-20 珠海金山办公软件有限公司 Method and device for recovering PDF comments
CN110147529B (en) * 2018-02-13 2023-06-30 珠海金山办公软件有限公司 Method and device for recovering PDF comments
CN110808943A (en) * 2018-08-06 2020-02-18 中兴通讯股份有限公司 Client connection emergency management method, client and computer-readable storage medium
CN114595028A (en) * 2022-01-28 2022-06-07 新华三云计算技术有限公司 Cloud desktop system disk updating method and device and storage medium
WO2025195171A1 (en) * 2024-03-18 2025-09-25 中兴通讯股份有限公司 Virtual machine upgrading method and apparatus, terminal device, and storage medium

Also Published As

Publication number Publication date
WO2016090890A1 (en) 2016-06-16

Similar Documents

Publication Publication Date Title
CN105740003A (en) Method and device for recovering virtual machine, as well as method and device for upgrading virtual machine
US10732960B2 (en) Systems and methods for implementing gold image as a service (GIaaS)
US9323820B1 (en) Virtual datacenter redundancy
US10380369B1 (en) Multi-tenant authorization framework in a data management and storage cluster
US9336292B2 (en) Provisioning and managing replicated data instances
CN107577475B (en) Software package management method and system of data center cluster system
US8943496B2 (en) Providing a hosted appliance and migrating the appliance to an on-premise environment
US20130124807A1 (en) Enhanced Software Application Platform
US9417870B2 (en) Managing user access to alternative versions of a particular function of a software product from within a current version of the software product
CN102638566B (en) BLOG system running method based on cloud storage
US10061665B2 (en) Preserving management services with self-contained metadata through the disaster recovery life cycle
US10264058B1 (en) Defining virtual application templates
CN104281484B (en) A kind of virtual machine migration method and device
Lowe Mastering vmware vsphere 5
US10042657B1 (en) Provisioning virtual applciations from virtual application templates
US20210294594A1 (en) Upgrade implementation of a virtualization management system
CN117908904A (en) K8S cluster deployment and operation and maintenance management method and system
CN118369659A (en) Technology for building and validating database software in a shared management environment
CN120104145A (en) A modular Kubernetes cluster automated deployment system
Anderson et al. Large Scale Linux Configuration with {LCFG}
CN103051668B (en) A kind of server resource management system and management method
US20240126531A1 (en) Single node rolling online patching of a database server
US9569205B1 (en) Systems and methods for remotely configuring applications
CN107480547A (en) A kind of initial method and system of management platform rule base and default policy
WO2022150932A1 (en) Methods and systems for secure and reliable integration of healthcare practice operations, management, administrative and financial software systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20160706