WO2023236744A1 - 虚拟机创建方法、远端设备、服务器设备及存储介质 - Google Patents

虚拟机创建方法、远端设备、服务器设备及存储介质 Download PDF

Info

Publication number
WO2023236744A1
WO2023236744A1 PCT/CN2023/094823 CN2023094823W WO2023236744A1 WO 2023236744 A1 WO2023236744 A1 WO 2023236744A1 CN 2023094823 W CN2023094823 W CN 2023094823W WO 2023236744 A1 WO2023236744 A1 WO 2023236744A1
Authority
WO
WIPO (PCT)
Prior art keywords
template
virtual machine
server host
sub
cloud desktop
Prior art date
Application number
PCT/CN2023/094823
Other languages
English (en)
French (fr)
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 WO2023236744A1 publication Critical patent/WO2023236744A1/zh

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

Definitions

  • This application relates to the field of computer technology, and in particular to a virtual machine creation method, remote device, server device and storage medium.
  • the template disk file is stored in a shared repository of the cloud desktop.
  • the template disk file will have one more disk leaf node.
  • the repository where the template disk files are located is under heavy read and write pressure, resulting in a long start-up time for the virtual machines and thus affecting the user experience.
  • This application provides a virtual machine creation method, remote device, server device and storage medium.
  • embodiments of the present application provide a method for creating a virtual machine, which is applied to a cloud desktop.
  • the shared repository of the cloud desktop stores a virtual machine template.
  • the method includes: sending a template copy instruction to the server host to enable The server host copies the entire disk file of the virtual machine template from the shared repository of the cloud desktop to the memory of the server host according to the template copy instruction; receives a virtual machine creation request; and according to the virtual machine
  • the creation request sends a virtual machine creation requirement to the server host, so that the server host creates the virtual machine based on the virtual machine template stored in the server host.
  • embodiments of the present application provide a method for creating a virtual machine, which is applied to a server host.
  • the method includes: receiving a template copy instruction from the cloud desktop, and copying the disk file of the virtual machine template from the cloud desktop according to the template copy instruction. Copy the entire shared repository of the cloud desktop to the memory of the server host; receive a virtual machine creation request from the cloud desktop, and create the virtual machine based on the stored virtual machine template according to the virtual machine creation request. .
  • embodiments of the present application provide a remote device, including at least one control processor and a memory for communicative connection with the at least one control processor; the memory stores information that can be processed by the at least one control processor.
  • the instructions are executed by the at least one control processor, so that the at least one control processor can execute the virtual machine creation method as described in the embodiment of the first aspect of this application.
  • embodiments of the present application provide a server device, including at least one control processor and a memory used for communicative connection with the at least one control processor; the memory stores information that can be used by the at least one control processor. Execution instructions, the instructions are executed by the at least one control processor, so that the at least one control processor can execute the virtual machine creation method as described in the embodiment of the second aspect of this application.
  • embodiments of the present application provide a computer-readable storage medium, which stores There are computer-executable instructions, which are used to cause the computer to execute the photographing processing method provided by the embodiment of the first aspect of the present application.
  • Figure 1 is a step flow chart of a virtual machine creation method provided by an embodiment of the present application
  • Figure 2 is a partial step flow chart of another virtual machine creation method provided by an embodiment of the present application.
  • FIG. 3 is a detailed step flow chart of step S100 in Figure 1;
  • Figure 4 is a partial step flow chart of another virtual machine creation method provided by an embodiment of the present application.
  • Figure 5 is a partial step flow chart of another virtual machine creation method provided by an embodiment of the present application.
  • Figure 6 is a step flow chart of another virtual machine creation method provided by an embodiment of the present application.
  • Figure 7 is a partial step flow chart of another virtual machine creation method provided by an embodiment of the present application.
  • Figure 8 is a flow chart of the refinement steps of step T100 in Figure 6;
  • Figure 9 is a partial step flow chart of another virtual machine creation method provided by an embodiment of the present application.
  • Figure 10 is a partial step flow chart of another virtual machine creation method provided by an embodiment of the present application.
  • Figure 11 is a complete flow chart of another virtual machine creation method provided by an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of a remote device provided by an embodiment of the present application.
  • embodiments of this application provide a virtual machine creation method, remote device, server device and storage medium, which can reduce the disk read and write pressure of the cloud desktop to a certain extent, thereby speeding up the startup speed of the virtual machine and improving the user experience. , and can no longer limit the number of virtual machines supported by a single virtual machine template, supporting the deployment of large-scale cloud desktop environments.
  • Step S100 Send a template copy instruction to the server host, so that the server host copies the entire disk file of the virtual machine template from the shared storage repository of the cloud desktop to the memory of the server host according to the template copy instruction;
  • Step S200 receive a virtual machine creation request
  • Step S300 Send a virtual machine creation request to the server host according to the virtual machine creation request, so that the server host creates a virtual machine based on the virtual machine template stored in the server host.
  • the cloud desktop is provided with a virtual machine template, and the virtual machine template is stored in the shared repository of the cloud desktop.
  • the server host can access the shared repository of the cloud desktop and copy files therefrom.
  • the cloud desktop sends a template copy instruction to the server host, the server host receives the template copy instruction from the cloud desktop, and copies the entire virtual machine template from the cloud desktop's shared repository to the memory of the server host according to the template copy instruction, and the cloud desktop Receive a virtual machine creation request, and send a virtual machine creation request to the server host according to the virtual machine creation request.
  • the server host receives the virtual machine creation request, creates a virtual machine based on the virtual machine template stored in the memory of the server host, and creates the disk leaves of the virtual machine.
  • the template directory used to store the disk file of the virtual machine template in the memory of the server host can be a Linux-based tmpfs directory.
  • tmpfs is a memory-based file. system, tmpfs can dynamically adjust the space size of the file system according to storage needs, and tmpfs has fast read and write speeds. Storing the disk files of the virtual machine template in the tmpfs directory can speed up the reading speed of the disk files, thereby speeding up the virtual machine. Startup speed.
  • Step S110 Send a template copy instruction to the server host, so that the server host copies all the disk files of the virtual machine template from the shared repository of the cloud desktop to the template directory according to the template copy instruction.
  • the cloud desktop sends a directory creation instruction to the server host, and the server host receives the directory creation instruction. Create command, reserve storage space in the memory of the server host according to the directory creation command and create a template directory. The reserved storage space is the storage space under the template directory.
  • the cloud desktop sends a template copy command to the server host, and the server The host receives the template copy instruction and copies the entire disk file of the virtual machine template from the shared repository of the cloud desktop to the template directory according to the template copy instruction, so that when the subsequent server host creates a virtual machine, it can directly read the virtual machine template in the template directory. disk files, thereby speeding up the startup speed of the virtual machine and improving user experience.
  • FIG 4 is a partial step flow chart of another virtual machine creation method provided by an embodiment of this application. As shown in Figure 4, this embodiment of this application provides another virtual machine creation method. This method can be applied to cloud desktops. Including step S1001 and step S1002.
  • the master template can be directly created, or a certain virtual machine can be converted into a master template, which are all within the protection scope of the embodiments of this application.
  • Figure 5 is a partial step flow chart of another virtual machine creation method provided by an embodiment of the present application.
  • an embodiment of the present application provides another virtual machine creation method, which is applied to cloud desktops, where the cloud The desktop is genetically created with multiple sub-templates based on the mother template.
  • the sub-templates include a first sub-template and a second sub-template.
  • the first sub-template corresponds to the first template information
  • the second sub-template corresponds to the second template information.
  • the method may also include step S1003.
  • Step S1003 When the disk file of the first sub-template is stored in the memory of the server host, receive a template switching instruction including the second template information, set the second sub-template as a virtual machine template according to the template switching instruction, and send the The server host sends a template update instruction, so that the server host replaces the stored disk file of the first sub-template with the disk file of the second sub-template.
  • the cloud desktop sets the first sub-template as a virtual machine template according to the template setting instruction including the first template information, and sends a template copy instruction to the server host.
  • the server host receives the template copy instruction and performs the task according to the template.
  • the copy instruction copies the entire disk file of the first sub-template from the shared storage repository of the cloud desktop to the memory of the server host.
  • the cloud desktop receives the template switching instruction, where the template switching includes the second template information.
  • the cloud desktop transfers the disk file according to the template switching instruction.
  • the second sub-template is set as a virtual machine template, and a template update instruction is sent to the server host.
  • the server host receives the template update instruction and replaces the stored disk file of the first sub-template with the disk file of the second sub-template according to the template update instruction.
  • the system administrator can select one of these sub-templates as a virtual machine template through the cloud desktop management interface. That is, the cloud desktop sets the sub-template as the virtual machine template used to create virtual machines.
  • System administrators can also switch virtual machine templates according to user needs. This method improves the selectivity of virtual machine templates, and virtual machine templates are easy to switch, which improves the adaptability of the cloud desktop environment and can meet the needs of different scenarios or different user groups. need.
  • some data files of the disk files of the first sub-template and the second sub-template are the same.
  • the server host updates the virtual machine template
  • Figure 6 is a step flow chart of another virtual machine creation method provided by the embodiment of the present application.
  • the embodiment of the present application also provides another virtual machine creation method.
  • the method is applied to the server host.
  • the method includes steps T100 and step T200.
  • Step T100 Receive the template copy instruction from the cloud desktop, and copy the entire disk file of the virtual machine template from the shared repository of the cloud desktop to the memory of the server host according to the template copy instruction;
  • Step T200 Receive a virtual machine creation request from the cloud desktop, and create a virtual machine based on the stored virtual machine template according to the virtual machine creation request.
  • the disk file of the virtual machine template is stored in the shared repository of the cloud desktop.
  • the server host receives a template copy instruction from the cloud desktop, and according to the template copy instruction, the disk file of the virtual machine template is copied from the cloud desktop.
  • the shared repository is fully copied to the memory of the server host.
  • the server host receives the virtual machine creation request from the cloud desktop, creates a virtual machine based on the virtual machine template stored in the memory according to the virtual machine creation request, and creates the disk leaf file of the virtual machine. Points to the disk file of the virtual machine template in the memory of the server host.
  • the disk file of the virtual machine template in the memory of the server host is directly read.
  • Figure 7 is a partial step flow chart of another virtual machine creation method provided by an embodiment of the present application. As shown in Figure 7, an embodiment of the present application also provides another virtual machine creation method, which is applied to a server host. Before receiving the template copy instruction from the cloud desktop, the method may also include step T1010.
  • Step T1010 Receive a directory creation instruction from the cloud desktop, reserve storage space in the memory and create a template directory according to the directory creation instruction.
  • the storage space under the template directory is used to store the disk file of the virtual machine template.
  • some data files of the disk files of the first sub-template and the second sub-template are the same.
  • the server host updates the virtual machine template
  • the number of sub-templates is not specifically limited.
  • the number of sub-templates may be two, three or four, that is, the sub-template may also include a third sub-template and a fourth sub-template, as long as the sub-template Templates can be used to create virtual machines, and there is an inheritance relationship between templates of different versions. For example, you can create a first child template based on the parent template, and then create a child template based on the parent template. The first sub-template creates a second sub-template, no matter how many sub-templates are created, it is within the protection scope of the embodiment of the present application.
  • FIG 10 is a partial step flow chart of another virtual machine creation method provided by an embodiment of the present application. As shown in Figure 10, an embodiment of the present application provides another virtual machine creation method. This method is applied to a server host. This method Steps T1020 and T1030 may also be included.
  • Step T1020 After receiving the virtual machine creation request from the cloud desktop, search the disk file of the virtual machine template in the memory;
  • Step T1030 If the disk file of the virtual machine template is not found, an error report is generated.
  • the server host creates virtual machines in an incremental manner, and the disk leaf files of all virtual machines created by the server host point to the disk files of the virtual machine templates in the memory of the server host.
  • FIG 11 is a complete flow chart of another virtual machine creation method provided by the embodiment of the present application.
  • the embodiment of the present application also provides another virtual machine creation method, which method is applied to a cloud desktop and a server host.
  • the system administrator selects a resource pool to start image acceleration through the cloud desktop management interface.
  • the cloud desktop sends directory creation instructions to all server hosts under the resource pool, and the server hosts receive the directory creation instructions.
  • the server hosts receive the directory creation instructions.
  • the reserved storage space is the storage space under the template directory.
  • the template directory can be a Linux-based tmpfs directory, and the system administrator can Set the maximum capacity of the template directory through the cloud desktop management interface.
  • the template directory is used to store the disk files of the virtual machine template.
  • the cloud desktop creates a master template and genetically creates multiple sub-templates based on the master template.
  • the sub-templates include corresponding
  • the first sub-template of the first template information and the second sub-template including the second template information may also include a third sub-template or a fourth sub-template.
  • This embodiment does not specifically limit the number of sub-templates, but different versions of There is an inheritance relationship between templates.
  • the first sub-template can be created based on the parent template
  • the second sub-template can be created based on the first sub-template.
  • the system administrator can set the first sub-template as a virtual machine template through the management interface of the cloud desktop, that is, send a template setting instruction including the first template information to the cloud desktop, and the cloud desktop sets the first sub-template as a virtual machine template according to the template setting instruction.
  • machine template and sends a template copy instruction to the server host.
  • the server host copies all the disk files of the virtual machine template, that is, the first sub-template, from the shared repository of the cloud desktop to the template directory according to the received template copy instruction.
  • the cloud The desktop receives a virtual machine creation request from the user and sends a virtual machine creation request to the server host according to the virtual machine creation request.
  • the server host receives the virtual machine creation request and searches for the disk file of the virtual machine template in the template directory.
  • all server hosts under the resource pool of the startup image acceleration of the cloud desktop environment can copy the disk files of the virtual machine template. The entire amount is copied to the memory, and the server host is based on Creating virtual machines from the disk files of virtual machine templates stored in their respective memories enables the virtual machine template to support an unlimited number of virtual machines in the cloud desktop environment, and can support the deployment of large-scale cloud desktop environments.
  • the system administrator can switch the virtual machine template through the management interface of the cloud desktop, for example, switch the second sub-template to the virtual machine template through the management interface of the cloud desktop, that is, send a template switching instruction including the second template information to the cloud desktop.
  • the desktop sets the second sub-template as the virtual machine template according to the template switching instruction, and sends a template update instruction to the server host.
  • the server host replaces the disk file of the first sub-template in the template directory with the second sub-template in the template directory according to the received template update instruction.
  • the disk files of the second sub-template due to the inheritance relationship between sub-templates of different versions, some of the data files in the disk files of the first sub-template and the second sub-template are the same.
  • the server host updates the virtual machine template
  • Copy from the shared repository of the cloud desktop to the server memory thereby speeding up the update of virtual machine templates and making it easier for system administrators to switch virtual machine templates according to user needs. Therefore, the method provided in this embodiment can also increase the selection of virtual machine templates. It improves the adaptability of the cloud desktop environment and can meet the needs of different scenarios or user groups.
  • FIG 12 is a schematic structural diagram of a remote device 1200 provided by an embodiment of the present application.
  • an embodiment of the present application further provides a remote device 1200.
  • the remote device 1200 includes at least one control processor 1210 and a user interface.
  • the memory 1220 is communicatively connected to the at least one control processor 1210; the memory 1220 stores instructions that can be executed by the at least one control processor 1210, and the instructions are executed by the at least one control processor 1210, so that the at least one control processor 1210 can execute
  • the embodiments of this application provide a virtual machine creation method applied to cloud desktops.
  • the cloud desktop sends a template copy instruction to the server host, so that the server host fully copies the disk file of the virtual machine template from the shared storage repository of the cloud desktop according to the template copy instruction.
  • the cloud desktop receives the virtual machine creation request, and sends the virtual machine creation request to the server host according to the virtual machine creation request, so that the server host creates a virtual machine based on the virtual machine template stored in the memory of the server host.
  • the disk file of the virtual machine template can be read directly from the memory of the server host.
  • the disk file of the virtual machine template in the shared repository of the cloud desktop is no longer read, which reduces the workload of the cloud desktop to a certain extent. Reduce disk read and write pressure, speed up virtual machine startup, and improve user experience.
  • FIG 13 is a schematic structural diagram of a server device 1300 provided by an embodiment of the present application.
  • an embodiment of the present application further provides a server device 1300.
  • the server device 1300 includes at least one control processor 1310 and is configured to communicate with at least A memory 1320 communicatively connected to the control processor 1310; the memory 1320 stores instructions that can be executed by at least one control processor 1310, and the instructions are executed by at least one control processor 1310, so that at least one control processor 1310 can execute the implementation of the present application.
  • the example provides a virtual machine creation method that applies to the server host.
  • the server host copies the entire disk file of the virtual machine template from the shared repository of the cloud desktop to the memory of the server host according to the template copy instruction from the cloud desktop. And according to the virtual machine creation requirements from the cloud desktop, a virtual machine is created based on the virtual machine template stored in the memory of the server host.
  • the disk file of the virtual machine template can be read directly from the memory of the server host, and there is no need to worry about the cloud. Read the disk file of the virtual machine template in the shared repository of the desktop, which can reduce the disk read and write pressure of the cloud desktop to a certain extent, speed up the startup of the virtual machine, and improve the user experience.
  • Embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium stores computer-executable instructions.
  • the computer-executable instructions are used to cause the computer to execute the virtual machine creation for cloud desktop provided by the embodiments of the present application. method or the virtual machine creation method provided by the embodiments of this application and applied to the server host.
  • the embodiments provided by this application include: a virtual machine creation method applied to cloud desktop, a virtual machine creation method applied to server host, remote device, server device and computer-readable storage medium.
  • cloud desktop Send a template copy instruction to the server host.
  • the server host copies the entire disk file of the virtual machine template from the cloud desktop's shared repository to the memory of the server host according to the template copy instruction.
  • the cloud desktop receives the virtual machine creation request and creates the virtual machine according to the virtual machine creation request.
  • the request sends a virtual machine creation request to the server host.
  • the server host receives the virtual machine creation request and creates a virtual machine based on the virtual machine template stored in the memory of the server host.
  • the virtual machine When starting the virtual machine, the virtual machine can be read directly from the memory of the server host.
  • the disk file of the template no longer reads the disk file of the virtual machine template in the shared repository of the cloud desktop, which reduces the disk read and write pressure of the cloud desktop to a certain extent, speeds up the startup of the virtual machine, and improves the user experience.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disk, DVD or other optical disk storage, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices, or may be used Any other medium that stores the desired information and can be accessed by a computer. Additionally, it is known to those of ordinary skill in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Landscapes

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

Abstract

本申请公开了一种虚拟机创建方法、远端设备、服务器设备及存储介质,云桌面的共享存储库存储有虚拟机模板,应用于云桌面的虚拟机创建方法包括:向服务器主机发送模板拷贝指令,以使服务器主机根据模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至服务器主机的内存中(S100);接收虚拟机创建请求(S200);根据虚拟机创建请求向服务器主机发送虚拟机创建要求,以使服务器主机基于服务器主机内存中的虚拟机模板创建虚拟机(S300)。

Description

虚拟机创建方法、远端设备、服务器设备及存储介质
相关申请的交叉引用
本申请基于申请号为202210640794.2、申请日为2022年06月08日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及计算机技术领域,尤其涉及一种虚拟机创建方法、远端设备、服务器设备及存储介质。
背景技术
目前,在云桌面环境下,模板磁盘文件存储在云桌面的某一个共享存储库中,使用池化桌面批量创建虚拟机时,每创建一个虚拟机,模板磁盘文件就多出一个磁盘叶子节点,在虚拟机进行批量启动操作的情况下,模板磁盘文件所在的存储库的读写压力较大,导致虚拟机启动时间长,从而影响用户体验。
发明内容
本申请提供一种虚拟机创建方法、远端设备、服务器设备及存储介质。
第一方面,本申请实施例提供一种虚拟机创建方法,应用于云桌面,所述云桌面的共享存储库存储有虚拟机模板,所述方法包括:向服务器主机发送模板拷贝指令,以使所述服务器主机根据所述模板拷贝指令将所述虚拟机模板的磁盘文件从所述云桌面的共享存储库全量拷贝至所述服务器主机的内存中;接收虚拟机创建请求;根据所述虚拟机创建请求向所述服务器主机发送虚拟机创建要求,以使所述服务器主机基于所述服务器主机中存储的虚拟机模板创建所述虚拟机。
第二方面,本申请实施例提供一种虚拟机创建方法,应用于服务器主机,所述方法包括:接收来自云桌面的模板拷贝指令,根据所述模板拷贝指令将虚拟机模板的磁盘文件从所述云桌面的共享存储库全量拷贝至所述服务器主机的内存中;接收来自所述云桌面的虚拟机创建要求,根据所述虚拟机创建要求基于存储的所述虚拟机模板创建所述虚拟机。
第三方面,本申请实施例提供一种远端设备,包括至少一个控制处理器和用于与所述至少一个控制处理器通信连接的存储器;所述存储器存储有可被所述至少一个控制处理器执行的指令,所述指令被所述至少一个控制处理器执行,以使所述至少一个控制处理器能够执行如本申请第一方面实施例所述的虚拟机创建方法。
第四方面,本申请实施例提供一种服务器设备,包括至少一个控制处理器和用于与所述至少一个控制处理器通信连接的存储器;所述存储器存储有可被所述至少一个控制处理器执行的指令,所述指令被所述至少一个控制处理器执行,以使所述至少一个控制处理器能够执行如本申请第二方面实施例所述的虚拟机创建方法。
第五方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储 有计算机可执行指令,所述计算机可执行指令用于使计算机执行本申请第一方面实施例提供的拍摄处理方法。
附图说明
图1是本申请实施例提供的一种虚拟机创建方法的步骤流程图;
图2是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图;
图3是图1中步骤S100的细化步骤流程图;
图4是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图;
图5是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图;
图6是本申请实施例提供的另一种虚拟机创建方法的步骤流程图;
图7是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图;
图8是图6中步骤T100的细化步骤流程图;
图9是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图;
图10是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图;
图11是本申请实施例提供的另一种虚拟机创建方法的完整流程图;
图12是本申请实施例提供的一种远端设备的结构示意图;
图13是本申请实施例提供的一种服务器设备的结构示意图。
具体实施方式
本部分将详细描述本申请的具体实施例,本申请之若干实施例在附图中示出,附图的作用在于用图形补充说明书文字部分的描述,使人能够直观地、形象地理解本申请的每个技术特征和整体技术方案,但其不能理解为对本申请保护范围的限制。
在本申请的描述中,若干的含义是一个或者多个,多个的含义是两个以上,大于、小于、超过等理解为不包括本数,以上、以下、以内等理解为包括本数。如果有描述到第一、第二只是用于区分技术特征为目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量或者隐含指明所指示的技术特征的先后关系。
本申请的描述中,除非另有明确的限定,设置、安装、连接等词语应做广义理解,所属技术领域技术人员可以结合技术方案的具体内容合理确定上述词语在本申请中的具体含义。
目前,在云桌面环境下,模板磁盘文件存储在云桌面的某一个共享存储库中,使用池化桌面批量创建虚拟机时,每创建一个虚拟机,模板磁盘文件就多出一个磁盘叶子节点,在虚拟机进行批量启动操作的情况下,模板磁盘文件所在的存储库的读写压力较大,导致虚拟机启动时间长,从而影响用户体验,同时,由于云桌面的磁盘读写能力有限,目前单个虚拟机模板支持的虚拟机数量存在限制,不利于云桌面大规模环境的部署。
基于此,本申请实施例提供一种虚拟机创建方法、远端设备、服务器设备及存储介质,能够在一定程度上降低云桌面的磁盘读写压力,从而加快虚拟机的启动速度,提升用户体验,并且能够使得单个虚拟机模板支持的虚拟机数量不再受限制,支持云桌面大规模环境的部署。
下面结合附图,对本申请实施例作进一步阐述。
图1是本申请实施例提供的一种虚拟机创建方法的步骤流程图,参照图1,本申请的实施例提供一种虚拟机创建方法,应用于云桌面,云桌面的共享存储库存储有虚拟机模板,该 方法可以包括步骤S100、步骤S200和步骤S300。
步骤S100,向服务器主机发送模板拷贝指令,以使服务器主机根据模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至服务器主机的内存中;
步骤S200,接收虚拟机创建请求;
步骤S300,根据虚拟机创建请求向服务器主机发送虚拟机创建要求,以使服务器主机基于服务器主机中存储的虚拟机模板创建虚拟机。
在一示例性实施例中,云桌面设置有虚拟机模板,且虚拟机模板存储在云桌面的共享存储库中,服务器主机能够访问云桌面的共享存储库并从中拷贝文件,在本实施例中,云桌面向服务器主机发送模板拷贝指令,服务器主机接收来自云桌面的模板拷贝指令,并根据该模板拷贝指令将虚拟机模板从云桌面的共享存储库全量拷贝至服务器主机的内存中,云桌面接收虚拟机创建请求,根据虚拟机创建请求向服务器主机发送虚拟机创建要求,服务器主机接收该虚拟机创建要求,基于服务器主机内存中存储的虚拟机模板创建虚拟机,创建的虚拟机的磁盘叶子文件指向服务器主机内存中存储的虚拟机模板的磁盘文件,启动虚拟机时,直接从服务器主机内存中读取虚拟机模板的磁盘文件,不再对云桌面的共享存储库中的文件进行读取,在一定程度上降低了云桌面的磁盘读写压力,加快虚拟机的启动速度,提升用户体验,且云桌面环境的资源池下的所有服务器主机都将虚拟机模板的磁盘文件全量拷贝至内存中,服务器主机基于各自内存中存储的虚拟机模板的磁盘文件创建虚拟机,能够使得虚拟机模板在云桌面环境中所支持的虚拟机数量不受限制,能够支持云桌面大规模环境的部署。
图2是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图,如图2所示,本申请实施例提供另一种虚拟机创建方法,该方法应用于云桌面,还可以包括步骤S1010。
步骤S1010,向服务器主机发送目录创建指令,以使服务器主机根据目录创建指令在内存中预留出存储空间并创建模板目录,模板目录下的存储空间用于存放虚拟机模板的磁盘文件。
在一示例性实施例中,云桌面向服务器主机发送目录创建指令,服务器主机接收目录创建指令,根据目录创建指令在服务器主机的内存中预留出存储空间并创建模板目录,预留出的存储空间即是模板目录下的存储空间,模板目录下的存储空间用于存放虚拟机模板的磁盘文件,虚拟机模板的磁盘文件存放在服务器主机内存的模板目录中,能够加快读取虚拟机模板的磁盘文件的速度,从而加快虚拟机启动速度,提升用户体验。
在本申请的一实施例中,可以设置预留的存储空间的大小。
在一可行的实施例中,服务器主机的内存中用于存放虚拟机模板的磁盘文件的模板目录可以是基于Linux的tmpfs目录,本领域技术人员可以理解的是,tmpfs是一种基于内存的文件系统,tmpfs能够根据存储需要动态调整文件系统的空间大小,且tmpfs的读写速度快,将虚拟机模板的磁盘文件存放在tmpfs目录中,能够加快磁盘文件的读取速度,从而加快虚拟机的启动速度。
图3是图1中步骤S100的细化步骤流程图,如图3所示,本申请实施例提供另一种虚拟机创建方法,该方法应用于云桌面,其中步骤S100可以包括步骤S110。
步骤S110,向服务器主机发送模板拷贝指令,以使服务器主机根据模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至模板目录中。
在一示例性实施例中,云桌面向服务器主机发送目录创建指令,服务器主机接收目录创 建指令,根据目录创建指令在服务器主机的内存中预留出存储空间并创建模板目录,预留出的存储空间即是模板目录下的存储空间,后续云桌面向服务器主机发送模板拷贝指令,服务器主机接收模板拷贝指令并根据模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至模板目录中,以便后续服务器主机创建虚拟机时直接读取该模板目录中的虚拟机模板的磁盘文件,从而加快虚拟机的启动速度,提升用户体验。
图4是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图,如图4所示,本申请实施例提供另一种虚拟机创建方法,该方法应用于云桌面,还可以包括步骤S1001和步骤S1002。
步骤S1001,创建母模板,并基于母模板以遗传的方式创建子模板,子模板包括对应第一模板信息的第一子模板;
步骤S1002,接收包括第一模板信息的模板设置指令,根据模板设置指令将第一子模板设置为虚拟机模板。
在一示例性实施例中,云桌面创建母模板,并基于母模板以遗传的方式创建子模板,即子模板与母模板之间存在继承关系,其中子模板可以包括对应第一模板信息的第一子模板,云桌面接收模板设置指令,其中模板设置指令包括第一模板信息,云桌面根据该模板设置指令将第一子模板设置为虚拟机模板,以便后续服务器主机拷贝虚拟机模板的磁盘文件。
在本申请的实施例中,可以直接创建母模板,也可以将某个虚拟机转化为母模板,都在本申请实施例的保护范围内。
图5是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图,如图5所示,本申请实施例提供另一种虚拟机创建方法,该方法应用于云桌面,其中云桌面基于母模板以遗传的方式创建有多个子模板,子模板包括第一子模板和第二子模板,第一子模板对应有第一模板信息,第二子模板对应有第二模板信息,该方法还可以包括步骤S1003。
步骤S1003,在服务器主机的内存中存储有第一子模板的磁盘文件的情况下,接收包括第二模板信息的模板切换指令,根据模板切换指令将第二子模板设置为虚拟机模板,并向服务器主机发送模板更新指令,以使服务器主机将存储的第一子模板的磁盘文件替换为第二子模板的磁盘文件。
在一示例性实施例中,云桌面根据包括第一模板信息的模板设置指令,将第一子模板设置为虚拟机模板,并向服务器主机发送模板拷贝指令,服务器主机接收模板拷贝指令并根据模板拷贝指令将第一子模板的磁盘文件从云桌面的共享存储库全量拷贝至服务器主机的内存中,随后云桌面接收模板切换指令,其中模板切换包括第二模板信息,云桌面根据模板切换指令将第二子模板设置为虚拟机模板,并向服务器主机发送模板更新指令,服务器主机接收模板更新指令并根据模板更新指令将存储的第一子模板的磁盘文件替换为第二子模板的磁盘文件。子模板创建有多个,系统管理员可以通过云桌面的管理界面从这些子模板中选取一个子模板作为虚拟机模板,即云桌面将该子模板设置为用于创建虚拟机的虚拟机模板,系统管理员还可以根据用户需求切换虚拟机模板,该方法提高了虚拟机模板的可选择性,且虚拟机模板便于切换,提高了云桌面环境的适应性,能够满足不同场景或者不同用户群体的需求。
在一可行的实施例中,由于不同版本的子模板之间存在继承关系,因此第一子模板和第二子模板的磁盘文件有部分数据文件相同,服务器主机在更新虚拟机模板的情况下,可以保留内存中第一子模板与第二子模板数据文件相同的部分,只删除第一子模板与第二子模板数 据文件不同的部分并将第二子模板与第一子模板数据文件不同的部分从云桌面的共享存储库拷贝至服务器内存中,从而加快虚拟机模板更新的速度。
在本申请的实施例中,不对子模板的数量作具体限定,子模板的数量可以是两个、三个或者四个,即子模板还可以包括第三子模板、第四子模板,只要子模板能够用于创建虚拟机,且多个不同版本的模板之间存在继承关系,例如,可以根据母模板创建第一子模板,再根据第一子模板创建第二子模板,无论子模板创建有几个,都在本申请实施例的保护范围内。
图6是本申请实施例提供的另一种虚拟机创建方法的步骤流程图,参照图6,本申请实施例还提供另一种虚拟机创建方法,该方法应用于服务器主机,该方法包括步骤T100和步骤T200。
步骤T100,接收来自云桌面的模板拷贝指令,根据模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至服务器主机的内存中;
步骤T200,接收来自云桌面的虚拟机创建要求,根据虚拟机创建要求基于存储的虚拟机模板创建虚拟机。
在一示例性实施例中,云桌面的共享存储库中存储有虚拟机模板的磁盘文件,服务器主机接收来自云桌面的模板拷贝指令,根据模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至服务器主机的内存中,后续服务器主机接收来自云桌面的虚拟机创建要求,根据虚拟机创建要求基于内存中存储的虚拟机模板创建虚拟机,创建的虚拟机的磁盘叶子文件指向服务器主机内存中的虚拟机模板的磁盘文件,启动虚拟机时,直接读取服务器主机的内存中的虚拟机模板的磁盘文件,不再对云桌面的共享存储库中的虚拟机模板的磁盘文件进行读取,在一定程度上降低了云桌面的磁盘读写压力,能够加快虚拟机的启动速度,提升用户体验,且云桌面环境的资源池下的所有服务器主机都将虚拟机模板的磁盘文件全量拷贝至各自内存中,服务器主机基于各自内存中存储的虚拟机模板的磁盘文件创建虚拟机,能够使得虚拟机模板在云桌面环境中所支持的虚拟机数量不受限制,从而能够支持云桌面大规模环境的部署。
图7是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图,如图7所示,本申请实施例还提供另一种虚拟机创建方法,该方法应用于服务器主机,在接收来自云桌面的模板拷贝指令之前,该方法还可以包括步骤T1010。
步骤T1010,接收来自云桌面的目录创建指令,根据目录创建指令在内存中预留出存储空间并创建模板目录,模板目录下的存储空间用于存放虚拟机模板的磁盘文件。
在一示例性实施例中,服务器主机接收来自云桌面的目录创建指令,根据目录创建指令在服务器主机的内存中预留出存储空间并创建模板目录,模板目录下的存储空间用于存放虚拟机模板的磁盘文件,预留出的存储空间即是模板目录下的存储空间,后续服务器主机将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至模板目录中,即虚拟机模板的磁盘文件存放在服务器主机内存的模板目录中,能够加快读取虚拟机模板的磁盘文件的速度,从而加快虚拟机启动速度,提升用户体验。
在本申请的一实施例中,系统管理员可以通过云桌面的管理界面设置服务器主机内存中预留的存储空间的大小,即可以设置模板目录的存储容量上限。
在一可行的实施例中,服务器主机的内存中用于存放虚拟机模板的磁盘文件的模板目录可以是基于Linux的tmpfs目录,本领域技术人员可以理解的是,tmpfs是一种基于内存的文 件系统,tmpfs能够根据存储需要动态调整文件系统的空间大小,且tmpfs的读写速度快,将虚拟机模板的磁盘文件存放在tmpfs目录中,能够加快磁盘文件的读取速度,从而加快虚拟机的启动速度。
图8是图6中步骤T100的细化步骤流程图,如图8所示,本申请实施例提供另一种虚拟机创建方法,该方法应用于服务器主机,其中步骤T100可以包括步骤T110。
步骤T110,根据模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至模板目录中。
在一示例性实施例中,服务器主机接收来自云桌面的目录创建指令,根据目录创建指令在服务器主机的内存中预留出存储空间并创建模板目录,预留出的存储空间即是模板目录下的存储空间,后续服务器主机接收来自云桌面的模板拷贝指令并根据模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至模板目录中,以便后续服务器主机创建虚拟机时直接读取该模板目录中的虚拟机模板的磁盘文件,从而加快虚拟机的启动速度,提升用户体验。
图9是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图,如图9所示,本申请实施例提供另一种虚拟机创建方法,该方法应用于服务器主机,云桌面创建有母模板并基于母模板以遗传的方式创建有多个子模板,子模板包括第一子模板和第二子模板,第一子模板对应有第一模板信息,第二子模板对应有第二模板信息,在服务器主机的内存中存储有第一子模板的磁盘文件的情况下,云桌面将第二子模板设置为虚拟机模板,并向服务器主机发送模板更新指令,该方法还可以包括步骤T1001和步骤T1002。
步骤T1001,接收来自云桌面的模板更新指令;
步骤T1002,根据模板更新指令,将内存中的第一子模板的磁盘文件替换为第二子模板的磁盘文件。
在一示例性实施例中,云桌面将第一子模板设置为虚拟机模板,并向服务器主机发送模板拷贝指令,服务器主机接收模板拷贝指令并根据模板拷贝指令将第一子模板的磁盘文件从云桌面的共享存储库全量拷贝至服务器主机的内存中,随后云桌面将第二子模板设置为虚拟机模板,并向服务器主机发送模板更新指令,服务器主机接收来自云桌面的模板更新指令并根据模板更新指令将存储在内存中的第一子模板的磁盘文件替换为第二子模板的磁盘文件。子模板创建有多个,系统管理员可以通过云桌面的管理界面从这些子模板中选取一个子模板作为虚拟机模板,即云桌面将该子模板设置为用于创建虚拟机的虚拟机模板,系统管理员还可以根据用户需求切换虚拟机模板,该方法提高了虚拟机模板的可选择性,且虚拟机模板便于切换,提高了云桌面环境的适应性,能够满足不同场景或者不同用户群体的需求。
在一可行的实施例中,由于不同版本的子模板之间存在继承关系,因此第一子模板和第二子模板的磁盘文件有部分数据文件相同,服务器主机在更新虚拟机模板的情况下,可以保留内存中第一子模板与第二子模板数据文件相同的部分,只删除第一子模板与第二子模板数据文件不同的部分并将第二子模板与第一子模板数据文件不同的部分从云桌面的共享存储库拷贝至服务器内存中,从而加快虚拟机模板更新的速度。
在本申请的实施例中,不对子模板的数量作具体限定,子模板的数量可以是两个、三个或者四个,即子模板还可以包括第三子模板、第四子模板,只要子模板能够用于创建虚拟机,且多个不同版本的模板之间存在继承关系,例如,可以根据母模板创建第一子模板,再根据 第一子模板创建第二子模板,无论子模板创建有几个,都在本申请实施例的保护范围内。
图10是本申请实施例提供的另一种虚拟机创建方法的部分步骤流程图,如图10所示,本申请实施例提供另一种虚拟机创建方法,该方法应用于服务器主机,该方法还可以包括步骤T1020和步骤T1030。
步骤T1020,在接收来自云桌面的虚拟机创建要求之后,在内存中查找虚拟机模板的磁盘文件;
步骤T1030,在未查找到虚拟机模板的磁盘文件的情况下,生成错误报告。
在一示例性实施例中,在接收来自云桌面的虚拟机创建要求之后,服务器主机在内存中查找虚拟机模板的磁盘文件,即判断内存中是否存在虚拟机模板的磁盘文件,在未查找到虚拟机模板的磁盘文件,即内存中不存在虚拟机模板的磁盘文件的情况下,生成错误报告;在查找到虚拟机模板的磁盘文件,即内存中存在虚拟机模板的磁盘文件的情况下,服务器主机基于查找到的虚拟机模板创建虚拟机,创建的虚拟机的磁盘叶子文件指向服务器内存中的虚拟机模板的磁盘文件,启动虚拟机时直接读取服务器主机内存中的虚拟机模板的磁盘文件,能够加快虚拟机启动速度,提升用户体验。
在另一示例性实施例中,服务器主机采用增量的方式创建虚拟机,服务器主机创建的所有虚拟机的磁盘叶子文件都指向该服务器主机内存中的虚拟机模板的磁盘文件。
图11是本申请实施例提供的另一种虚拟机创建方法的完整流程图,参照图11,本申请实施例还提供另一种虚拟机创建方法,该方法应用于云桌面和服务器主机组成的系统,系统管理员通过云桌面的管理界面选定某个资源池启动镜像加速,在启动镜像加速的情况下,云桌面向该资源池下的所有服务器主机发送目录创建指令,服务器主机接收目录创建指令,并根据目录创建指令在内存中预留出存储空间并创建模板目录,预留出的存储空间即为模板目录下的存储空间,该模板目录可以是基于Linux的tmpfs目录,且系统管理员可以通过云桌面的管理界面设置该模板目录的最大容量,该模板目录用于存放虚拟机模板的磁盘文件,云桌面创建母模板,并基于母模板以遗传的方式创建多个子模板,子模板包括对应第一模板信息的第一子模板和包括第二模板信息的第二子模板,还可以包括第三子模板或者第四子模板,本实施例不对子模板的数量作具体限定,但不同版本的模板之间存在继承关系,例如第一子模板可以是根据母模板创建的,第二子模板可以是根据第一子模板创建的。系统管理员可以通过云桌面的管理界面将第一子模板设置为虚拟机模板,即向云桌面发送包括第一模板信息的模板设置指令,云桌面根据模板设置指令将第一子模板设置为虚拟机模板,并向服务器主机发送模板拷贝指令,服务器主机根据接收到的模板拷贝指令将虚拟机模板,即第一子模板,的磁盘文件从云桌面的共享存储库全量拷贝至模板目录中,云桌面接收来自用户的虚拟机创建请求,根据虚拟机创建请求向服务器主机发送虚拟机创建要求,服务器主机接收虚拟机创建要求,在模板目录下查找虚拟机模板的磁盘文件,在未查找到虚拟机模板的磁盘文件的情况下,生成错误报告;在查找到虚拟机模板的磁盘文件的情况下,服务器主机基于模板目录中的虚拟机模板以增量的方式创建虚拟机,创建的虚拟机的磁盘叶子文件指向模板目录中的虚拟机模板的磁盘文件,启动虚拟机时直接读取服务器主机内存中的虚拟机模板的磁盘文件,不再对云桌面共享存储库中的虚拟机模板的磁盘文件进行读取,能够在一定程度上降低云桌面的读写压力,加快虚拟机启动速度,提升用户体验,且云桌面环境的启动镜像加速的资源池下的所有服务器主机都能够将虚拟机模板的磁盘文件全量拷贝至内存中,服务器主机基于 各自内存中存储的虚拟机模板的磁盘文件创建虚拟机,能够使得虚拟机模板在云桌面环境中所支持的虚拟机数量不受限制,能够支持云桌面大规模环境的部署。而且系统管理员可以通过云桌面的管理界面切换虚拟机模板,例如通过云桌面的管理界面将第二子模板切换为虚拟机模板,即向云桌面发送包括第二模板信息的模板切换指令,云桌面根据该模板切换指令将第二子模板设置为虚拟机模板,并向服务器主机发送模板更新指令,服务器主机根据接收到的模板更新指令将模板目录中的第一子模板的磁盘文件替换为第二子模板的磁盘文件,由于不同版本的子模板之间存在继承关系,因此第一子模板和第二子模板的磁盘文件有部分数据文件相同,服务器主机在更新虚拟机模板的情况下,可以保留内存中第一子模板与第二子模板数据文件相同的部分,只删除第一子模板与第二子模板数据文件不同的部分并将第二子模板与第一子模板数据文件不同的部分从云桌面的共享存储库拷贝至服务器内存中,从而加快虚拟机模板更新的速度,便于系统管理员根据用户需求切换虚拟机模板,因此本实施例提供的方法还能够提高虚拟机模板的可选择性,提高云桌面环境的适应性,能够满足不同场景或者不同用户群体的需求。
图12是本申请实施例提供的一种远端设备1200的结构示意图,参照图12,本申请实施例还提供一种远端设备1200,该远端设备1200包括至少一个控制处理器1210和用于与至少一个控制处理器1210通信连接的存储器1220;存储器1220存储有可被至少一个控制处理器1210执行的指令,指令被至少一个控制处理器1210执行,以使至少一个控制处理器1210能够执行本申请实施例提供的应用于云桌面的虚拟机创建方法。根据本申请实施例提供的应用于云桌面的虚拟机创建方法,云桌面向服务器主机发送模板拷贝指令,以使服务器主机根据模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至服务器主机的内存中,云桌面接收虚拟机创建请求,并根据虚拟机创建请求向服务器主机发送虚拟机创建要求,以使服务器主机基于存储在服务器主机内存中的虚拟机模板创建虚拟机,启动虚拟机时可以直接从服务器主机的内存中读取虚拟机模板的磁盘文件,不再对云桌面的共享存储库中的虚拟机模板的磁盘文件进行读取,在一定程度上降低云桌面的磁盘读写压力,加快虚拟机启动速度,提升用户体验。
图13是本申请实施例提供的一种服务器设备1300的结构示意图,参照图13,本申请实施例还提供一种服务器设备1300,该服务器设备1300包括至少一个控制处理器1310和用于与至少一个控制处理器1310通信连接的存储器1320;存储器1320存储有可被至少一个控制处理器1310执行的指令,指令被至少一个控制处理器1310执行,以使至少一个控制处理器1310能够执行本申请实施例提供的应用于服务器主机的虚拟机创建方法。根据本申请实施例提供的应用于服务器主机的虚拟机创建方法,服务器主机根据来自云桌面的模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至服务器主机的内存中,并根据来自云桌面的虚拟机创建要求基于存储在服务器主机内存中的虚拟机模板创建虚拟机,启动虚拟机时可以直接从服务器主机的内存中读取虚拟机模板的磁盘文件,不再对云桌面的共享存储库中的虚拟机模板的磁盘文件进行读取,在一定程度上降低云桌面的磁盘读写压力,加快虚拟机启动速度,提升用户体验。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,计算机可执行指令用于使计算机执行本申请实施例提供的应用于云桌面的虚拟机创建方法或者本申请实施例提供的应用于服务器主机的虚拟机创建方法。
本申请提供的实施例包括:应用于云桌面的虚拟机创建方法、应用于服务器主机的虚拟机创建方法、远端设备、服务器设备和计算机可读存储介质,根据本申请提供的方案,云桌面向服务器主机发送模板拷贝指令,服务器主机根据模板拷贝指令将虚拟机模板的磁盘文件从云桌面的共享存储库全量拷贝至服务器主机的内存中,云桌面接收虚拟机创建请求,并根据虚拟机创建请求向服务器主机发送虚拟机创建要求,服务器主机接收虚拟机创建要求,并基于存储在服务器主机内存中的虚拟机模板创建虚拟机,启动虚拟机时可以直接从服务器主机的内存中读取虚拟机模板的磁盘文件,不再对云桌面的共享存储库中的虚拟机模板的磁盘文件进行读取,在一定程度上降低云桌面的磁盘读写压力,加快虚拟机启动速度,提升用户体验。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质或非暂时性介质和通信介质或暂时性介质。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息诸如计算机可读指令、数据结构、程序模块或其他数据的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘DVD或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。

Claims (14)

  1. 一种虚拟机创建方法,应用于云桌面,所述云桌面的共享存储库存储有虚拟机模板,所述方法包括:
    向服务器主机发送模板拷贝指令,以使所述服务器主机根据所述模板拷贝指令将所述虚拟机模板的磁盘文件从所述云桌面的共享存储库全量拷贝至所述服务器主机的内存中;
    接收虚拟机创建请求;
    根据所述虚拟机创建请求向所述服务器主机发送虚拟机创建要求,以使所述服务器主机基于所述服务器主机中存储的虚拟机模板创建所述虚拟机。
  2. 根据权利要求1所述的虚拟机创建方法,其中,在向服务器主机发送模板拷贝指令之前,所述方法还包括:
    向所述服务器主机发送目录创建指令,以使所述服务器主机根据所述目录创建指令在内存中预留出存储空间并创建模板目录,所述模板目录下的存储空间用于存放虚拟机模板的磁盘文件。
  3. 根据权利要求2所述的虚拟机创建方法,其中,所述向服务器主机发送模板拷贝指令,以使所述服务器主机根据所述模板拷贝指令将虚拟机模板的磁盘文件从所述云桌面的共享存储库全量拷贝至所述服务器主机的内存中,包括:
    向所述服务器主机发送模板拷贝指令,以使所述服务器主机根据所述模板拷贝指令将所述虚拟机模板的磁盘文件从所述云桌面的共享存储库全量拷贝至所述模板目录中。
  4. 根据权利要求1所述的虚拟机创建方法,其中,在向服务器主机发送模板拷贝指令之前,所述方法还包括:
    创建母模板,并基于所述母模板以遗传的方式创建子模板,所述子模板包括对应第一模板信息的第一子模板;
    接收包括所述第一模板信息的模板设置指令,根据所述模板设置指令将所述第一子模板设置为所述虚拟机模板。
  5. 根据权利要求4所述的虚拟机创建方法,其中,所述云桌面创建有多个所述子模板,所述子模板还包括对应第二模板信息的第二子模板;所述方法还包括:
    在所述服务器主机的内存中存储有所述第一子模板的磁盘文件的情况下,接收包括所述第二模板信息的模板切换指令,根据所述模板切换指令将所述第二子模板设置为虚拟机模板,并向所述服务器主机发送模板更新指令,以使所述服务器主机将存储的所述第一子模板的磁盘文件替换为所述第二子模板的磁盘文件。
  6. 一种虚拟机创建方法,应用于服务器主机,所述方法包括:
    接收来自云桌面的模板拷贝指令,根据所述模板拷贝指令将虚拟机模板的磁盘文件从所述云桌面的共享存储库全量拷贝至所述服务器主机的内存中;
    接收来自所述云桌面的虚拟机创建要求,根据所述虚拟机创建要求基于存储的所述虚拟机模板创建所述虚拟机。
  7. 根据权利要求6所述的虚拟机创建方法,其中,在接收来自云桌面的模板拷贝指令之前,所述方法还包括:
    接收来自所述云桌面的目录创建指令,根据所述目录创建指令在内存中预留出存储空间 并创建模板目录,所述模板目录下的存储空间用于存放虚拟机模板的磁盘文件。
  8. 根据权利要求7所述的虚拟机创建方法,其中,所述根据所述模板拷贝指令将虚拟机模板的磁盘文件从所述云桌面的共享存储库全量拷贝至所述服务器主机的内存中,包括:
    根据所述模板拷贝指令将所述虚拟机模板的磁盘文件从所述云桌面的共享存储库全量拷贝至所述模板目录中。
  9. 根据权利要求6所述的虚拟机创建方法,其中,所述云桌面创建有母模板并基于所述母模板以遗传的方式创建有多个子模板,所述子模板包括第一子模板和第二子模板,在所述服务器主机的内存中存储有所述第一子模板的磁盘文件的情况下,所述云桌面将所述第二子模板设置为所述虚拟机模板,并向所述服务器主机发送模板更新指令;所述方法还包括:
    接收来自所述云桌面的模板更新指令;
    根据所述模板更新指令,将内存中的所述第一子模板的磁盘文件替换为所述第二子模板的磁盘文件。
  10. 根据权利要求6所述的虚拟机创建方法,还包括:
    在接收来自所述云桌面的虚拟机创建要求之后,在内存中查找所述虚拟机模板;
    在未查找到所述虚拟机模板的情况下,生成错误报告。
  11. 根据权利要求6所述的虚拟机创建方法,其中,采用增量的方式创建所述虚拟机。
  12. 一种远端设备,包括至少一个控制处理器和用于与所述至少一个控制处理器通信连接的存储器;所述存储器存储有可被所述至少一个控制处理器执行的指令,所述指令被所述至少一个控制处理器执行,以使所述至少一个控制处理器能够执行如权利要求1至5任一项所述的虚拟机创建方法。
  13. 一种服务器设备,包括至少一个控制处理器和用于与所述至少一个控制处理器通信连接的存储器;所述存储器存储有可被所述至少一个控制处理器执行的指令,所述指令被所述至少一个控制处理器执行,以使所述至少一个控制处理器能够执行如权利要求6至11任一项所述的虚拟机创建方法。
  14. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行如权利要求1至5任一项所述的虚拟机创建方法或者如权利要求6至11任一项所述的虚拟机创建方法。
PCT/CN2023/094823 2022-06-08 2023-05-17 虚拟机创建方法、远端设备、服务器设备及存储介质 WO2023236744A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210640794.2A CN117234658A (zh) 2022-06-08 2022-06-08 虚拟机创建方法、远端设备、服务器设备及存储介质
CN202210640794.2 2022-06-08

Publications (1)

Publication Number Publication Date
WO2023236744A1 true WO2023236744A1 (zh) 2023-12-14

Family

ID=89084922

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/094823 WO2023236744A1 (zh) 2022-06-08 2023-05-17 虚拟机创建方法、远端设备、服务器设备及存储介质

Country Status (2)

Country Link
CN (1) CN117234658A (zh)
WO (1) WO2023236744A1 (zh)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360892A (zh) * 2014-10-21 2015-02-18 普华基础软件股份有限公司 创建虚拟机的系统及方法
CN105045663A (zh) * 2015-08-24 2015-11-11 湖南昇云科技有限公司 快速部署虚拟机的方法与系统
CN105550018A (zh) * 2015-12-10 2016-05-04 黑龙江科技大学 一种在云计算系统创建虚拟机的方法
CN105808323A (zh) * 2016-04-05 2016-07-27 浪潮电子信息产业股份有限公司 一种虚拟机创建方法及系统
CN108509432A (zh) * 2017-02-23 2018-09-07 株式会社理光 管理产品信息的方法、装置及电子设备
US20180260433A1 (en) * 2017-03-13 2018-09-13 Fujitsu Limited Information processing apparatus and control method for information processing apparatus
KR20180135645A (ko) * 2017-06-13 2018-12-21 한국전자통신연구원 가상 데스크탑 통합 운영 장치 및 방법
CN110704161A (zh) * 2019-09-27 2020-01-17 联想(北京)有限公司 虚拟机创建方法、装置及计算机设备
CN113986473A (zh) * 2021-11-11 2022-01-28 北京天融信网络安全技术有限公司 一种虚拟机批量启动方法及计算主机
CN114064193A (zh) * 2020-07-31 2022-02-18 中移(苏州)软件技术有限公司 云管平台中虚拟机的创建方法及装置、云管平台及存储介质

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360892A (zh) * 2014-10-21 2015-02-18 普华基础软件股份有限公司 创建虚拟机的系统及方法
CN105045663A (zh) * 2015-08-24 2015-11-11 湖南昇云科技有限公司 快速部署虚拟机的方法与系统
CN105550018A (zh) * 2015-12-10 2016-05-04 黑龙江科技大学 一种在云计算系统创建虚拟机的方法
CN105808323A (zh) * 2016-04-05 2016-07-27 浪潮电子信息产业股份有限公司 一种虚拟机创建方法及系统
CN108509432A (zh) * 2017-02-23 2018-09-07 株式会社理光 管理产品信息的方法、装置及电子设备
US20180260433A1 (en) * 2017-03-13 2018-09-13 Fujitsu Limited Information processing apparatus and control method for information processing apparatus
KR20180135645A (ko) * 2017-06-13 2018-12-21 한국전자통신연구원 가상 데스크탑 통합 운영 장치 및 방법
CN110704161A (zh) * 2019-09-27 2020-01-17 联想(北京)有限公司 虚拟机创建方法、装置及计算机设备
CN114064193A (zh) * 2020-07-31 2022-02-18 中移(苏州)软件技术有限公司 云管平台中虚拟机的创建方法及装置、云管平台及存储介质
CN113986473A (zh) * 2021-11-11 2022-01-28 北京天融信网络安全技术有限公司 一种虚拟机批量启动方法及计算主机

Also Published As

Publication number Publication date
CN117234658A (zh) 2023-12-15

Similar Documents

Publication Publication Date Title
CN109906433B (zh) 针对容器的存储隔离
CN108701048B (zh) 数据加载方法及装置
CN102402446B (zh) 应用软件的安装方法和应用软件的安装装置
CN102799464B (zh) 虚拟机创建方法及系统、虚拟机重装方法及系统
US20150032690A1 (en) Virtual synchronization with on-demand data delivery
WO2013135105A1 (zh) 数据存储方法和数据存储装置
US11150816B2 (en) Immutable storage for cloud service providers
JP2008033483A (ja) 計算機システム、計算機および計算機動作環境の移動方法
US11232066B2 (en) Method for data migration and terminal
WO2024183559A1 (zh) 数据共享方法、设备、系统及存储介质
CN104182257A (zh) 应用软件的安装方法和应用软件的安装装置
CN113568566A (zh) 利用索引物件来进行简易存储服务无缝迁移的方法、主装置以及存储服务器
JP4755244B2 (ja) 情報生成方法、情報生成プログラム及び情報生成装置
CN101996109A (zh) 计算机系统及其控制方法和存储计算机程序的记录介质
CN112804375B (zh) 一种单网卡多ip的配置方法
CN107832097B (zh) 数据加载方法及装置
WO2023236744A1 (zh) 虚拟机创建方法、远端设备、服务器设备及存储介质
CN112262378B (zh) 脱水文件的层级的水合
WO2017214369A1 (en) Systems and methods for implementing dynamic file systems
CN115576705B (zh) 一种冗余固件的数据同步方法、装置及介质
CN112433669A (zh) 一种分布式存储卷在线迁移的方法、系统、设备及介质
KR20150128714A (ko) 최적화된 파일 조작을 위한 파일 그룹화 기법
WO2018028321A1 (zh) 一种虚拟外置存储设备的管理方法、装置及终端
CN113806295B (zh) 一种文件迁移方法、系统、设备及计算机可读存储介质
CN115774701A (zh) 数据共享方法、装置、电子设备及存储介质

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: 23818909

Country of ref document: EP

Kind code of ref document: A1