CN117234658A - Virtual machine creation method, remote device, server device and storage medium - Google Patents

Virtual machine creation method, remote device, server device and storage medium Download PDF

Info

Publication number
CN117234658A
CN117234658A CN202210640794.2A CN202210640794A CN117234658A CN 117234658 A CN117234658 A CN 117234658A CN 202210640794 A CN202210640794 A CN 202210640794A CN 117234658 A CN117234658 A CN 117234658A
Authority
CN
China
Prior art keywords
template
virtual machine
server host
cloud desktop
instruction
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.)
Pending
Application number
CN202210640794.2A
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 CN202210640794.2A priority Critical patent/CN117234658A/en
Priority to PCT/CN2023/094823 priority patent/WO2023236744A1/en
Publication of CN117234658A publication Critical patent/CN117234658A/en
Pending legal-status Critical Current

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

Abstract

The application discloses a virtual machine creation method, remote equipment, server equipment and storage media, wherein a virtual machine template is stored in a shared storage library of a cloud desktop, and the virtual machine creation method applied to the cloud desktop comprises the following steps: sending a template copying instruction to a server host, so that the server host copies disk files of the virtual machine template from a shared storage library of a cloud desktop to a memory of the server host in a full-scale mode according to the template copying instruction; receiving a virtual machine creation request; sending a virtual machine creation request to a server host according to the virtual machine creation request so that the server host creates a virtual machine based on a virtual machine template in the memory of the server host; when the virtual machine is started, the disk file of the virtual machine template can be directly read from the memory of the server host, the disk file of the virtual machine template in the shared memory bank of the cloud desktop is not read any more, the disk read-write pressure of the cloud desktop is reduced to a certain extent, the starting speed of the virtual machine is accelerated, and the user experience is improved.

Description

Virtual machine creation method, remote device, server device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a virtual machine creation method, a remote device, a server device, and a storage medium.
Background
At present, under a cloud desktop environment, a template disk file is stored in a certain shared storage library of a cloud desktop, when a pooled desktop is used for creating virtual machines in batches, each time a virtual machine is created, the template disk file is added with one disk leaf node, and under the condition that the virtual machines are started in batches, the read-write pressure of the storage library where the template disk file is located is high, so that the starting time of the virtual machines is long, and the user experience is influenced.
Disclosure of Invention
The application aims to at least solve one of the technical problems in the prior art, and provides a virtual machine creation method, remote equipment, server equipment and storage medium, which can reduce the disk read-write pressure of a cloud desktop to a certain extent, thereby accelerating the starting speed of the virtual machine and improving the user experience.
In a first aspect, an embodiment of the present application provides a virtual machine creation method applied to a cloud desktop, where a virtual machine template is stored in a shared repository of the cloud desktop, the method includes: sending a template copying instruction to a server host, so that the server host copies disk files of the virtual machine template from a shared storage library of the cloud desktop to a memory of the server host in a full-scale mode according to the template copying instruction; receiving a virtual machine creation request; and sending a virtual machine creation requirement to the server host according to the virtual machine creation request so that the server host creates the virtual machine based on a virtual machine template stored in the server host.
In a second aspect, an embodiment of the present application provides a virtual machine creation method, applied to a server host, where the method includes: receiving a template copying instruction from a cloud desktop, and copying disk files of a virtual machine template from a shared storage library of the cloud desktop to a memory of a server host in full according to the template copying instruction; receiving a virtual machine creation requirement from the cloud desktop, and creating the virtual machine based on the stored virtual machine template according to the virtual machine creation requirement.
In a third aspect, embodiments of the present application provide a remote device comprising at least one control processor and a memory for communicatively coupling with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform a virtual machine creation method according to an embodiment of the first aspect of the present application.
In a fourth aspect, embodiments of the present application provide a server device comprising at least one control processor and a memory for communicatively coupling with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform a virtual machine creation method according to an embodiment of the second aspect of the present application.
In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the photographing processing method provided by the embodiment of the first aspect of the present application.
The embodiment provided by the application comprises the following steps: according to the scheme provided by the application, the cloud desktop sends a template copying instruction to the server host, the server host copies the disk files of the virtual machine template from the shared storage library of the cloud desktop to the memory of the server host in a full quantity according to the template copying instruction, the cloud desktop receives a virtual machine creating request, sends a virtual machine creating request to the server host according to the virtual machine creating request, and the server host receives the virtual machine creating request, creates a virtual machine based on the virtual machine template stored in the memory of the server host, can directly read the disk files of the virtual machine template from the memory of the server host when starting the virtual machine, does not read the disk files of the virtual machine template in the shared storage library of the cloud desktop, reduces the disk reading and writing pressure of the cloud desktop to a certain extent, accelerates the starting speed of the virtual machine, and improves the user experience.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for creating a virtual machine according to an embodiment of the present application;
FIG. 2 is a partial step flow diagram of another virtual machine creation method provided by an embodiment of the present application;
fig. 3 is a flowchart of a refinement step of step S100 in fig. 1;
FIG. 4 is a partial step flow diagram of another virtual machine creation method provided by an embodiment of the present application;
FIG. 5 is a partial step flow diagram of another virtual machine creation method provided by an embodiment of the present application;
FIG. 6 is a flowchart illustrating steps of another virtual machine creation method according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating some steps of another virtual machine creation method according to an embodiment of the present application;
FIG. 8 is a flowchart of a refinement step of step T100 in FIG. 6;
FIG. 9 is a flowchart of some steps of another virtual machine creation method according to an embodiment of the present application;
FIG. 10 is a flowchart illustrating some steps of another virtual machine creation method according to an embodiment of the present application;
FIG. 11 is a complete flow chart of another virtual machine creation method provided by an embodiment of the present application;
FIG. 12 is a schematic diagram of a remote device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a server device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the present embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein the accompanying drawings are used to supplement the description of the written description so that one can intuitively and intuitively understand each technical feature and overall technical scheme of the present application, but not to limit the scope of the present application.
In the description of the present application, a number means one or more, a number means two or more, and greater than, less than, exceeding, etc. are understood to not include the present number, and above, below, within, etc. are understood to include the present number. The description of the first and second is for the purpose of distinguishing between technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present application, unless explicitly defined otherwise, terms such as arrangement, installation, connection, etc. should be construed broadly and the specific meaning of the terms in the present application can be reasonably determined by a person skilled in the art in combination with the specific contents of the technical scheme.
At present, under a cloud desktop environment, a template disk file is stored in a certain shared storage library of the cloud desktop, when a pooled desktop is used for creating virtual machines in batches, each virtual machine is created, the template disk file is provided with one more disk leaf node, under the condition that the virtual machines are started in batches, the storage library where the template disk file is located has high read-write pressure, so that the virtual machine starting time is long, the user experience is influenced, and meanwhile, due to the limited disk read-write capability of the cloud desktop, the quantity of virtual machines supported by a single virtual machine template is limited, and the deployment of the cloud desktop large-scale environment is not facilitated.
Based on the above, the embodiment of the application provides a virtual machine creation method, a remote device, a server device and a storage medium, which can reduce the disk read-write pressure of a cloud desktop to a certain extent, thereby accelerating the starting speed of the virtual machine, improving the user experience, and enabling the number of virtual machines supported by a single virtual machine template to be no longer limited, and supporting the deployment of a cloud desktop large-scale environment.
Embodiments of the present application will be further described below with reference to the accompanying drawings.
Fig. 1 is a step flowchart of a virtual machine creation method provided by an embodiment of the present application, and referring to fig. 1, the embodiment of the present application provides a virtual machine creation method applied to a cloud desktop, where a shared repository of the cloud desktop stores virtual machine templates, and the method may include step S100, step S200, and step S300.
Step S100, a template copying instruction is sent to a server host, so that the server host copies disk files of a virtual machine template from a shared storage library of a cloud desktop to a memory of the server host in a full-scale mode according to the template copying instruction;
step S200, receiving a virtual machine creation request;
step S300, sending 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.
In an exemplary embodiment, a cloud desktop is provided with a virtual machine template, the virtual machine template is stored in a shared memory bank of the cloud desktop, a server host can access the shared memory bank of the cloud desktop and copy files therefrom, in the embodiment, 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 virtual machine template from the shared memory bank of the cloud desktop to a memory of the server host according to the template copy instruction, the cloud desktop receives a virtual machine creation request, 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, creates a virtual machine based on a disk file of the virtual machine template stored in the memory of the server host, and when the virtual machine is started, directly reads the disk file of the virtual machine template from the memory of the server host, so that the read-write pressure of the cloud desktop is reduced to a certain extent, the starting speed of the virtual machine is accelerated, the cloud desktop can be supported by the cloud desktop, and the number of the virtual machine can be deployed in the memory environment of the cloud desktop can be supported by the cloud desktop under the condition that the memory of the cloud desktop is not limited by the memory of the cloud desktop.
Fig. 2 is a partial step flowchart of another virtual machine creating method provided by the embodiment of the present application, and as shown in fig. 2, the embodiment of the present application provides another virtual machine creating method, where the method is applied to a cloud desktop, and may further include step S1010.
Step S1010, a catalog creation instruction is sent to the server host, so that the server host reserves a storage space in a memory according to the catalog creation instruction and creates a template catalog, and the storage space under the template catalog is used for storing disk files of the virtual machine template.
In an exemplary embodiment, the cloud desktop sends a catalog creation instruction to the server host, the server host receives the catalog creation instruction, reserves a storage space in a memory of the server host according to the catalog creation instruction and creates a template catalog, wherein the reserved storage space is a storage space under the template catalog, the storage space under the template catalog is used for storing disk files of a virtual machine template, and the disk files of the virtual machine template are stored in the template catalog in the memory of the server host, so that the speed of reading the disk files of the virtual machine template can be increased, the starting speed of the virtual machine is increased, and the user experience is improved.
In an embodiment of the present application, the reserved storage space may be set in size.
In a possible embodiment, the template directory in the memory of the server host for storing the disk file of the virtual machine template may be a tmpfs directory based on Linux, and it can be understood by those skilled in the art that tmpfs is a file system based on memory, where tmpfs can dynamically adjust the space size of the file system according to the storage requirement, and the reading and writing speed of tmpfs is fast, and the disk file of the virtual machine template is stored in the tmpfs directory, so that the reading speed of the disk file can be accelerated, thereby accelerating the starting speed of the virtual machine.
Fig. 3 is a flowchart of a refinement step of step S100 in fig. 1, and as shown in fig. 3, an embodiment of the present application provides another virtual machine creation method, which is applied to a cloud desktop, where step S100 may include step S110.
Step S110, a template copying instruction is sent to the server host, so that the server host copies the disk files of the virtual machine template from the shared storage library of the cloud desktop to the template catalog in full quantity according to the template copying instruction.
In an exemplary embodiment, a cloud desktop sends a catalog creation instruction to a server host, the server host receives the catalog creation instruction, a storage space is reserved in a memory of the server host according to the catalog creation instruction, and a template catalog is created, wherein the reserved storage space is a storage space under the template catalog, a subsequent cloud desktop sends a template copying instruction to the server host, and the server host receives the template copying instruction and copies disk files of a virtual machine template from a shared storage library of the cloud desktop to the template catalog in full quantity according to the template copying instruction, so that the disk files of the virtual machine template in the template catalog are directly read when the subsequent server host creates the virtual machine, the starting speed of the virtual machine is accelerated, and the user experience is improved.
Fig. 4 is a partial step flowchart of another virtual machine creating method provided by the embodiment of the present application, and as shown in fig. 4, the embodiment of the present application provides another virtual machine creating method, where the method is applied to a cloud desktop, and may further include step S1001 and step S1002.
Step S1001, a mother template is created, and a child template is created in a genetic mode based on the mother template, wherein the child template comprises a first child template corresponding to first template information;
step S1002, a template setting instruction including first template information is received, and the first sub-template is set as a virtual machine template according to the template setting instruction.
In an exemplary embodiment, the cloud desktop creates a mother template and creates a child template in a genetic manner based on the mother template, that is, an inheritance relationship exists between the child template and the mother template, wherein the child template may include a first child template corresponding to first template information, the cloud desktop receives a template setting instruction, wherein the template setting instruction includes the first template information, and the cloud desktop sets the first child template as a virtual machine template according to the template setting instruction, so that a subsequent server host copies a disk file of the virtual machine template.
In the embodiment of the application, the mother template can be directly created, or a certain virtual machine can be converted into the mother template, which is within the protection scope of the embodiment of the application.
Fig. 5 is a partial step flowchart of another virtual machine creating method provided by the embodiment of the present application, and as shown in fig. 5, the embodiment of the present application provides another virtual machine creating method, where the cloud desktop is applied to a cloud desktop, and the cloud desktop creates a plurality of sub-templates in a genetic manner based on a mother template, the sub-templates include a first sub-template and a second sub-template, the first sub-template corresponds to first template information, the second sub-template corresponds to second template information, and the method may further include step S1003.
In step S1003, when the disk file of the first sub-template is stored in the memory of the server host, a template switching instruction including the second template information is received, the second sub-template is set as a virtual machine template according to the template switching instruction, and a template update instruction is sent to the server host, so that the server host replaces the stored disk file of the first sub-template with the disk file of the second sub-template.
In an exemplary embodiment, the cloud desktop sets the first sub-template as a virtual machine template according to a template setting instruction including first template information, and sends a template copying instruction to the server host, the server host receives the template copying instruction and copies disk files of the first sub-template from a shared storage library of the cloud desktop to a memory of the server host in full according to the template copying instruction, then the cloud desktop receives a template switching instruction, wherein the template switching includes second template information, the cloud desktop sets the second sub-template as a virtual machine template according to the template switching instruction, and sends a template updating instruction to the server host, and the server host receives the template updating instruction and replaces the stored disk files of the first sub-template with the disk files of the second sub-template according to the template updating instruction. A plurality of sub-templates are created, a system administrator can select one sub-template from the sub-templates as a virtual machine template through a management interface of a cloud desktop, namely the cloud desktop sets the sub-template as the virtual machine template for creating a virtual machine, and the system administrator can switch the virtual machine template according to user requirements.
In a possible embodiment, because inheritance relationship exists between the sub-templates of different versions, the disk files of the first sub-template and the second sub-template have partial data files which are the same, and the server host can keep the same parts of the first sub-template and the second sub-template data files in the memory under the condition of updating the virtual machine template, delete only the different parts of the first sub-template and the second sub-template data files and copy the different parts of the second sub-template and the first sub-template data files from the shared storage library of the cloud desktop to the server memory, thereby accelerating the updating speed of the virtual machine template.
In the embodiment of the present application, the number of the sub-templates is not specifically limited, and the number of the sub-templates may be two, three or four, that is, the sub-templates may further include a third sub-template and a fourth sub-template, so long as the sub-templates can be used to create a virtual machine, and inheritance relationships exist between templates of multiple different versions, for example, a first sub-template may be created according to a master template, and then a second sub-template may be created according to the first sub-template, and whether the sub-templates are created in several numbers, it is within the protection scope of the embodiment of the present application.
Fig. 6 is a step flowchart of another virtual machine creation method provided in the embodiment of the present application, and referring to fig. 6, another virtual machine creation method is provided in the embodiment of the present application, and the method is applied to a server host, and includes a step T100 and a step T200.
Step T100, receiving a template copying instruction from a cloud desktop, and copying disk files of a virtual machine template from a shared storage library of the cloud desktop to a memory of a server host in full according to the template copying instruction;
and step T200, receiving a virtual machine creation requirement from the cloud desktop, and creating a virtual machine based on the stored virtual machine template according to the virtual machine creation requirement.
In an exemplary embodiment, a disk file of a virtual machine template is stored in a shared storage library of a cloud desktop, a server host receives a template copying instruction from the cloud desktop, copies the disk file of the virtual machine template from the shared storage library of the cloud desktop to a memory of the server host in a full amount according to the template copying instruction, a subsequent server host receives a virtual machine creation requirement from the cloud desktop, creates a virtual machine based on the virtual machine template stored in a memory according to the virtual machine creation requirement, and when the virtual machine is started, directly reads the disk file of the virtual machine template in the memory of the server host, does not read the disk file of the virtual machine template in the shared storage library of the cloud desktop, reduces the disk read-write pressure of the cloud desktop to a certain extent, can accelerate the starting speed of the virtual machine, and all server hosts under a resource pool of the cloud desktop environment copy the virtual machine template to respective memories in a full amount, and the server host creates the disk file of the virtual machine template based on the virtual machine template stored in the respective memory, so that the cloud desktop can not support the large-scale cloud desktop environment, and the cloud desktop can be deployed in a limited scale environment.
Fig. 7 is a partial step flowchart of another virtual machine creation method provided by the embodiment of the present application, and as shown in fig. 7, the embodiment of the present application further provides another virtual machine creation method, where the method is applied to a server host, and the method may further include step T1010 before receiving a template copy instruction from a cloud desktop.
And step T1010, receiving a catalog creation instruction from the cloud desktop, reserving a storage space in a memory according to the catalog creation instruction, and creating a template catalog, wherein the storage space under the template catalog is used for storing disk files of the virtual machine template.
In an exemplary embodiment, a server host receives a catalog creation instruction from a cloud desktop, reserves a storage space in a memory of the server host according to the catalog creation instruction, and creates a template catalog, wherein the storage space under the template catalog is used for storing disk files of a virtual machine template, the reserved storage space is the storage space under the template catalog, and a subsequent server host copies the disk files of the virtual machine template from a shared storage library of the cloud desktop to the template catalog in full quantity, namely, the disk files of the virtual machine template are stored in the template catalog in a memory of the server host, so that the speed of reading the disk files of the virtual machine template can be increased, the starting speed of the virtual machine is increased, and the user experience is improved.
In an embodiment of the present application, a system administrator may set the size of the reserved storage space in the host memory of the server through the management interface of the cloud desktop, that is, may set the upper limit of the storage capacity of the template directory.
In a possible embodiment, the template directory in the memory of the server host for storing the disk file of the virtual machine template may be a tmpfs directory based on Linux, and it can be understood by those skilled in the art that tmpfs is a file system based on memory, where tmpfs can dynamically adjust the space size of the file system according to the storage requirement, and the reading and writing speed of tmpfs is fast, and the disk file of the virtual machine template is stored in the tmpfs directory, so that the reading speed of the disk file can be accelerated, thereby accelerating the starting speed of the virtual machine.
Fig. 8 is a flowchart of a refinement step of step T100 in fig. 6, and as shown in fig. 8, an embodiment of the present application provides another virtual machine creation method, which is applied to a server host, where step T100 may include step T110.
And step T110, copying the disk files of the virtual machine template from the shared storage library of the cloud desktop to the template catalog in full quantity according to the template copying instruction.
In an exemplary embodiment, a server host receives a catalog creation instruction from a cloud desktop, reserves a storage space in a memory of the server host according to the catalog creation instruction, and creates a template catalog, wherein the reserved storage space is a storage space under the template catalog, and a subsequent server host receives a template copying instruction from the cloud desktop and copies disk files of a virtual machine template from a shared storage library of the cloud desktop to the template catalog in full quantity according to the template copying instruction, so that the disk files of the virtual machine template in the template catalog are directly read when the subsequent server host creates the virtual machine, thereby accelerating the starting speed of the virtual machine and improving user experience.
Fig. 9 is a partial step flowchart of another virtual machine creating method provided in the embodiment of the present application, as shown in fig. 9, where the method is applied to a server host, a cloud desktop creates a mother template and creates a plurality of child templates based on the mother template in a genetic manner, the child template includes a first child template and a second child template, the first child template corresponds to first template information, the second child template corresponds to second template information, and in a case where a disk file of the first child template is stored in a memory of the server host, the cloud desktop sets the second child template as a virtual machine template, and sends a template update instruction to the server host, and the method may further include steps T1001 and T1002.
Step T1001, receiving a template updating instruction from a cloud desktop;
and step T1002, replacing the disk file of the first sub-template in the memory with the disk file of the second sub-template according to the template updating instruction.
In an exemplary embodiment, the cloud desktop sets the first sub-template as a virtual machine template and sends a template copy instruction to the server host, the server host receives the template copy instruction and copies the disk file of the first sub-template from the shared storage of the cloud desktop to the memory of the server host in full according to the template copy instruction, then the cloud desktop sets the second sub-template as a virtual machine template and sends a template update instruction to the server host, and the server host receives the template update instruction from the cloud desktop and replaces the disk file of the first sub-template stored in the memory with the disk file of the second sub-template according to the template update instruction. A plurality of sub-templates are created, a system administrator can select one sub-template from the sub-templates as a virtual machine template through a management interface of a cloud desktop, namely the cloud desktop sets the sub-template as the virtual machine template for creating a virtual machine, and the system administrator can switch the virtual machine template according to user requirements.
In a possible embodiment, because inheritance relationship exists between the sub-templates of different versions, the disk files of the first sub-template and the second sub-template have partial data files which are the same, and the server host can keep the same parts of the first sub-template and the second sub-template data files in the memory under the condition of updating the virtual machine template, delete only the different parts of the first sub-template and the second sub-template data files and copy the different parts of the second sub-template and the first sub-template data files from the shared storage library of the cloud desktop to the server memory, thereby accelerating the updating speed of the virtual machine template.
In the embodiment of the present application, the number of the sub-templates is not specifically limited, and the number of the sub-templates may be two, three or four, that is, the sub-templates may further include a third sub-template and a fourth sub-template, so long as the sub-templates can be used to create a virtual machine, and inheritance relationships exist between templates of multiple different versions, for example, a first sub-template may be created according to a master template, and then a second sub-template may be created according to the first sub-template, and whether the sub-templates are created in several numbers, it is within the protection scope of the embodiment of the present application.
Fig. 10 is a partial step flowchart of another virtual machine creation method provided by the embodiment of the present application, and as shown in fig. 10, the embodiment of the present application provides another virtual machine creation method, where the method is applied to a server host, and the method may further include step T1020 and step T1030.
Step T1020, after receiving a virtual machine creation request from the cloud desktop, searching a disk file of a virtual machine template in a memory;
in step T1030, an error report is generated if the disk file of the virtual machine template is not found.
In an exemplary embodiment, after receiving a virtual machine creation request from a cloud desktop, the server host searches a disk file of a virtual machine template in the memory, that is, determines whether the disk file of the virtual machine template exists in the memory, and generates an error report when the disk file of the virtual machine template is not found, that is, when the disk file of the virtual machine template does not exist in the memory; under the condition that the disk file of the virtual machine template is found, namely the disk file of the virtual machine template exists in the memory, the server host creates the virtual machine based on the found virtual machine template, the disk leaf file of the created virtual machine points to the disk file of the virtual machine template in the memory of the server, and the disk file of the virtual machine template in the memory of the server host is directly read when the virtual machine is started, so that the starting speed of the virtual machine can be accelerated, and the user experience is improved.
In another exemplary embodiment, the server host creates virtual machines in an incremental manner, with disk leaf files of all virtual machines created by the server host pointing to disk files of the virtual machine templates in the server host memory.
Fig. 11 is a complete flowchart of another virtual machine creating method provided by the embodiment of the present application, referring to fig. 11, the embodiment of the present application further provides another virtual machine creating method, which is applied to a system formed by a cloud desktop and a server host, where a system administrator selects a certain resource pool to start mirror acceleration through a management interface of the cloud desktop, under the condition of starting mirror acceleration, the cloud desktop sends a catalog creating instruction to all server hosts under the resource pool, the server host receives the catalog creating instruction, reserves a storage space in a memory according to the catalog creating instruction and creates a template catalog, the reserved storage space is a storage space under a template catalog, the template catalog may be a tmpfs catalog based on Linux, and a system administrator may set a maximum capacity of the template catalog through a management interface of the cloud desktop, the template catalog is used to store a disk file of a virtual machine template, and create a mother template based on the mother template, and create a plurality of child templates in a genetic manner, where the cloud template includes a first child template corresponding to a first template information and a second child template including second template information, and may further include a third child template or a child template, or may be a child template having a different number of child template creation relationship with the first child template and a child template. A system administrator can set a first sub-template as a virtual machine template through a management interface of a cloud desktop, namely, a template setting instruction comprising first template information is sent to the cloud desktop, the cloud desktop sets the first sub-template as the virtual machine template according to the template setting instruction, and sends a template copying instruction to a server host, the server host copies the disk files of the virtual machine template, namely, the first sub-template, from a shared storage library of the cloud desktop to a template catalog in full quantity according to the received template copying instruction, the cloud desktop receives a virtual machine creation request from a user, 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, searches the disk files of the virtual machine template under the template catalog, and generates an error report under the condition that the disk files of the virtual machine template are not searched; under the condition that the disk files of the virtual machine templates are found, the server host creates the virtual machines in an incremental mode based on the virtual machine templates in the template catalogues, the disk leaf files of the created virtual machines point to the disk files of the virtual machine templates in the template catalogues, when the virtual machines are started, the disk files of the virtual machine templates in the memory of the server host are directly read, the disk files of the virtual machine templates in the cloud desktop shared storage library are not read any more, the read-write pressure of the cloud desktop can be reduced to a certain extent, the starting speed of the virtual machines is accelerated, the user experience is improved, all server hosts under a resource pool for starting mirror image acceleration of the cloud desktop environment can copy the disk files of the virtual machine templates into the memory in a full quantity, and the server host creates the virtual machines based on the disk files of the virtual machine templates stored in the respective memory, so that the quantity of the virtual machines supported by the virtual machine templates in the cloud desktop environment is not limited, and the deployment of the cloud desktop large-scale environment can be supported. And a system administrator can switch the virtual machine template through a management interface of the cloud desktop, for example, the second sub-template is switched to the virtual machine template through the management interface of the cloud desktop, that is, a template switching instruction including second template information is sent to the cloud desktop, the cloud desktop sets the second sub-template as the virtual machine template according to the template switching instruction, and sends a template updating instruction to a server host, the server host replaces a disk file of a first sub-template in a template catalog with a disk file of the second sub-template according to the received template updating instruction, and because inheritance relation exists between the sub-templates of different versions, the disk files of the first sub-template and the second sub-template have the same part of data files, and under the condition of updating the virtual machine template, the server host can only delete the part of the first sub-template which is different from the second sub-template data file and copy the part of the second sub-template which is different from a shared memory library of the cloud desktop to a server memory, so that the virtual machine template updating speed is accelerated, the system administrator can conveniently meet the requirements of the cloud desktop, the system administrator can provide different user environments, and the cloud machine can meet different requirements of the cloud machine templates.
Fig. 12 is a schematic structural diagram of a remote device 1200 according to an embodiment of the present application, and referring to fig. 12, the embodiment of the present application further provides a remote device 1200, where the remote device 1200 includes at least one control processor 1210 and a memory 1220 for communicatively connecting with the at least one control processor 1210; the memory 1220 stores instructions executable by the at least one control processor 1210, the instructions being executable by the at least one control processor 1210 to enable the at least one control processor 1210 to perform the virtual machine creation method for a cloud desktop according to the embodiment of the present application. According to the virtual machine creation method applied to the cloud desktop, the cloud desktop sends the template copying instruction to the server host, so that the server host copies the disk files of the virtual machine template from the shared storage library of the cloud desktop to the memory of the server host in a full quantity according to the template copying 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 the virtual machine based on the virtual machine template stored in the memory of the server host, when the virtual machine is started, the disk files of the virtual machine template can be directly read from the memory of the server host, the disk files of the virtual machine template in the shared storage library of the cloud desktop are not read, the disk read-write pressure of the cloud desktop is reduced to a certain extent, the starting speed of the virtual machine is accelerated, and the user experience is improved.
Fig. 13 is a schematic structural diagram of a server apparatus 1300 according to an embodiment of the present application, and referring to fig. 13, the embodiment of the present application further provides a server apparatus 1300, where the server apparatus 1300 includes at least one control processor 1310 and a memory 1320 for communicatively connecting with the at least one control processor 1310; the memory 1320 stores instructions executable by the at least one control processor 1310, the instructions being executable by the at least one control processor 1310 to enable the at least one control processor 1310 to perform a virtual machine creation method for a server host provided by an embodiment of the present application. According to the virtual machine creation method applied to the server host, the server host copies the disk files of the virtual machine templates from the shared storage library of the cloud desktop to the memory of the server host in a full amount according to the template copy instruction from the cloud desktop, creates the virtual machine based on the virtual machine templates stored in the memory of the server host according to the virtual machine creation requirement from the cloud desktop, can directly read the disk files of the virtual machine templates from the memory of the server host when the virtual machine is started, does not read the disk files of the virtual machine templates in the shared storage library of the cloud desktop, reduces the disk read-write pressure of the cloud desktop to a certain extent, accelerates the starting speed of the virtual machine, and improves user experience.
The embodiment of the application also provides a computer readable storage medium, which stores computer executable instructions for causing a computer to execute the virtual machine creation method applied to the cloud desktop provided by the embodiment of the application or the virtual machine creation method applied to the server host provided by the embodiment of the application.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media or non-transitory media and communication media or transitory media. The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. 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, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, 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 includes any information delivery media.

Claims (14)

1. A virtual machine creation method applied to a cloud desktop, wherein a shared repository of the cloud desktop stores virtual machine templates, the method comprising:
sending a template copying instruction to a server host, so that the server host copies disk files of the virtual machine template from a shared storage library of the cloud desktop to a memory of the server host in a full-scale mode according to the template copying instruction;
receiving a virtual machine creation request;
and sending a virtual machine creation requirement to the server host according to the virtual machine creation request so that the server host creates the virtual machine based on a virtual machine template stored in the server host.
2. The virtual machine creation method of claim 1, wherein prior to sending the template copy instruction to the server host, the method further comprises:
and sending a catalog creation instruction to the server host, so that the server host reserves a storage space in a memory according to the catalog creation instruction and creates a template catalog, wherein the storage space under the template catalog is used for storing a disk file of a virtual machine template.
3. The method of creating a virtual machine according to claim 2, wherein the sending a template copy instruction to a server host to cause the server host to copy a disk file of a virtual machine template from a shared storage library of the cloud desktop to a memory of the server host in full according to the template copy instruction includes:
and sending a template copying instruction to the server host, so that the server host copies the disk files of the virtual machine template from the shared storage library of the cloud desktop to the template catalog in full quantity according to the template copying instruction.
4. The virtual machine creation method of claim 1, wherein prior to sending the template copy instruction to the server host, the method further comprises:
creating a mother template and creating a child template in a genetic manner based on the mother template, wherein the child template comprises a first child template corresponding to first template information;
and receiving a template setting instruction comprising the first template information, and setting the first sub-template as the virtual machine template according to the template setting instruction.
5. The virtual machine creation method of claim 4, wherein the cloud desktop is created with a plurality of the sub-templates, the sub-templates further comprising second sub-templates corresponding to second template information; the method further comprises the steps of:
and under the condition that the disk file of the first sub-template is stored in the memory of the server host, receiving a template switching instruction comprising the second template information, setting the second sub-template as a virtual machine template according to the template switching instruction, and sending a template updating instruction to the server host so that the server host replaces the stored disk file of the first sub-template with the disk file of the second sub-template.
6. A virtual machine creation method applied to a server host, the method comprising:
receiving a template copying instruction from a cloud desktop, and copying disk files of a virtual machine template from a shared storage library of the cloud desktop to a memory of a server host in full according to the template copying instruction;
receiving a virtual machine creation requirement from the cloud desktop, and creating the virtual machine based on the stored virtual machine template according to the virtual machine creation requirement.
7. The virtual machine creation method of claim 6, wherein prior to receiving the template copy instruction from the cloud desktop, the method further comprises:
and receiving a catalog creation instruction from the cloud desktop, reserving a storage space in a memory according to the catalog creation instruction, and creating a template catalog, wherein the storage space under the template catalog is used for storing disk files of a virtual machine template.
8. The method for creating a virtual machine according to claim 7, wherein the copying the disk file of the virtual machine template from the shared storage library of the cloud desktop to the memory of the server host in full according to the template copy instruction includes:
and copying the disk file of the virtual machine template from the shared storage library of the cloud desktop to the template catalog in full quantity according to the template copying instruction.
9. The virtual machine creation method according to claim 6, wherein the cloud desktop creates a master template and creates a plurality of child templates based on the master template in a genetic manner, the child templates include a first child template and a second child template, and in a case where a disk file of the first child template is stored in a memory of the server host, the cloud desktop sets the second child template as the virtual machine template and sends a template update instruction to the server host; the method further comprises the steps of:
receiving a template updating instruction from the cloud desktop;
and replacing the disk file of the first sub-template in the memory with the disk file of the second sub-template according to the template updating instruction.
10. The virtual machine creation method of claim 6, further comprising:
after receiving a virtual machine creation request from the cloud desktop, searching the virtual machine template in a memory;
and generating an error report under the condition that the virtual machine template is not found.
11. The virtual machine creation method of claim 6, wherein the virtual machine is created in an incremental manner.
12. A remote device comprising at least one control processor and a memory for communication with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the virtual machine creation method of any of claims 1-5.
13. A server device comprising at least one control processor and a memory for communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the virtual machine creation method of any of claims 6 to 11.
14. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the virtual machine creation method of any of claims 1 to 5 or the virtual machine creation method of any of claims 6 to 11.
CN202210640794.2A 2022-06-08 2022-06-08 Virtual machine creation method, remote device, server device and storage medium Pending CN117234658A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210640794.2A CN117234658A (en) 2022-06-08 2022-06-08 Virtual machine creation method, remote device, server device and storage medium
PCT/CN2023/094823 WO2023236744A1 (en) 2022-06-08 2023-05-17 Virtual machine creation method, and remote device, server device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210640794.2A CN117234658A (en) 2022-06-08 2022-06-08 Virtual machine creation method, remote device, server device and storage medium

Publications (1)

Publication Number Publication Date
CN117234658A true CN117234658A (en) 2023-12-15

Family

ID=89084922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210640794.2A Pending CN117234658A (en) 2022-06-08 2022-06-08 Virtual machine creation method, remote device, server device and storage medium

Country Status (2)

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

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360892B (en) * 2014-10-21 2019-04-09 普华基础软件股份有限公司 Create the system and method for virtual machine
CN105045663B (en) * 2015-08-24 2018-12-04 马金栋 The method and system of rapid deployment virtual machine
CN105550018A (en) * 2015-12-10 2016-05-04 黑龙江科技大学 Method for creating virtual machine in cloud computing system
CN105808323A (en) * 2016-04-05 2016-07-27 浪潮电子信息产业股份有限公司 Virtual machine creation method and system
CN108509432A (en) * 2017-02-23 2018-09-07 株式会社理光 The method, apparatus and electronic equipment of management product information
JP2018151806A (en) * 2017-03-13 2018-09-27 富士通株式会社 Information processing apparatus, method for controlling information processing apparatus, and program
KR20180135645A (en) * 2017-06-13 2018-12-21 한국전자통신연구원 Apparatus and method for integrated operation of virtual desktop
CN110704161B (en) * 2019-09-27 2022-05-31 联想(北京)有限公司 Virtual machine creation method and device and computer equipment
CN114064193A (en) * 2020-07-31 2022-02-18 中移(苏州)软件技术有限公司 Method and device for creating virtual machine in cloud management platform, cloud management platform and storage medium
CN113986473A (en) * 2021-11-11 2022-01-28 北京天融信网络安全技术有限公司 Batch starting method of virtual machines and computing host

Also Published As

Publication number Publication date
WO2023236744A1 (en) 2023-12-14

Similar Documents

Publication Publication Date Title
US20150032690A1 (en) Virtual synchronization with on-demand data delivery
US20230393840A1 (en) File update method and apparatus, device and storage medium
CN102799464A (en) Virtual machine creation method, virtual machine creation system, virtual machine resetting method and virtual machine resetting system
KR101555210B1 (en) Apparatus and method for downloadin contents using movinand in portable terminal
EP4170500A1 (en) Method and apparatus for restoring running state of application program, and storage medium
US20200034340A1 (en) Flash file system and data management method therof
EP3739450A1 (en) Data processing method and apparatus, and computing device
WO2019072147A1 (en) Service configuration method and apparatus for sdn
CN111078359B (en) Method and system for realizing instant recovery of virtual machine through directory mapping
CN117234658A (en) Virtual machine creation method, remote device, server device and storage medium
CN112148220B (en) Method, device, computer storage medium and terminal for realizing data processing
CN115562590A (en) Method, system, equipment and storage medium for using cloud hard disk by cloud host
CN112347046B (en) Method for acquiring creation time of file in distributed system
WO2018028321A1 (en) Method and apparatus for managing virtual external storage device, and terminal
CN110928639B (en) Windows virtualization mirror image hierarchical management method and device
CN111399753B (en) Method and device for writing pictures
CN114490540A (en) Data storage method, medium, device and computing equipment
CN113297316A (en) Method, device and system for realizing data synchronization
CN114443598A (en) Data writing method and device, computer equipment and storage medium
US20030237021A1 (en) Automatic restoration of software applications in a mobile computing device
CN115622997B (en) Method, device and storage medium for sharing host font library
CN117033085B (en) kvm virtual machine backup method and device, computer equipment and storage medium
EP4216070A1 (en) File processing apparatus, file processing method, storage medium, and computer program
CN114356614B (en) Shear plate data isolation method and device
WO2021254280A1 (en) Disk mounting method and device, storage medium, and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication