WO2020103904A1 - 云桌面升级方法、装置、云端服务器及存储介质 - Google Patents

云桌面升级方法、装置、云端服务器及存储介质

Info

Publication number
WO2020103904A1
WO2020103904A1 PCT/CN2019/119962 CN2019119962W WO2020103904A1 WO 2020103904 A1 WO2020103904 A1 WO 2020103904A1 CN 2019119962 W CN2019119962 W CN 2019119962W WO 2020103904 A1 WO2020103904 A1 WO 2020103904A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
disk
virtual machine
cloud desktop
placeholder
Prior art date
Application number
PCT/CN2019/119962
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 中兴通讯股份有限公司
Priority to EP19886325.0A priority Critical patent/EP3885903A4/en
Publication of WO2020103904A1 publication Critical patent/WO2020103904A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Definitions

  • the embodiments of the present invention relate to the field of software technology, and in particular to cloud desktop upgrade technology.
  • VDI VirtualDesktopInfrastructure, virtual desktop infrastructure
  • VDI can quickly deploy a universal virtual desktop by running an operating system on a server in the data center. Users connect to the virtual desktop and access the virtual desktop through the client computing protocol from the client device, just like accessing a traditional locally installed desktop.
  • One server can support many virtual desktops at the same time for users to use independently.
  • the purpose of the embodiments of the present invention is to provide a cloud desktop upgrade method, device, cloud server, and storage medium, to achieve unified upgrade and maintenance of the cloud desktop, reduce system resource consumption, and improve user experience.
  • a cloud desktop upgrade method which includes the following steps: pre-make a basic image of the operating system, where the virtual machine corresponding to the cloud desktop is independently assigned an independent disk.
  • the image is used to start the operating system of the virtual machine; the independent disk is used to store the user's private data and the user's changes to the system disk, so that the virtual machine can obtain the user's private data and the system disk by mounting the independent disk at runtime.
  • Change records upgrade the base image, and update the independent disk synchronously according to the upgraded base image.
  • the updated independent disk includes the upgraded base image.
  • Embodiments of the present invention also provide a cloud desktop upgrade device, including: an allocation unit for individually allocating an independent disk for a virtual machine corresponding to the cloud desktop; wherein, the independent disk is used to store user private data and user-to-system The change record of the disk, for the virtual machine to obtain the user's private data and the change record of the system disk by mounting the independent disk at runtime; the basic image making module is used to make a basic image of the operating system, and the basic image is used to The startup of the operating system of the virtual machine; the upgrade module is used to upgrade the base image, and synchronously update the independent disk according to the upgraded base image, and the updated independent disk includes the upgraded base image.
  • An embodiment of the present invention further provides a cloud server, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are at least One processor executes, so that at least one processor can execute the above cloud desktop upgrade method.
  • a cloud server including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are at least One processor executes, so that at least one processor can execute the above cloud desktop upgrade method.
  • Embodiments of the present invention also provide a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the cloud desktop upgrade method described above is implemented.
  • FIG. 1 is a flowchart of a cloud desktop upgrade method according to the first embodiment of the present invention
  • FIG. 2 is a schematic diagram of a VDI system framework according to the prior art
  • FIG. 3 is a schematic diagram of a VDI system framework according to the first embodiment of the present invention.
  • FIG. 4 is a flowchart of a cloud desktop upgrade method according to a second embodiment of the present invention.
  • FIG. 5 is a schematic diagram of file filtering according to the third embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a cloud desktop upgrade device according to a fourth embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a cloud server according to a fifth embodiment of the present invention.
  • the first embodiment of the present invention relates to a cloud desktop upgrade method, and the specific process is shown in FIG. 1.
  • Cloud desktop technology makes the operating system desktop no longer limited to running on specific hardware. All data is stored in the cloud and displayed to users through a visual desktop. Users can log in to the operating system desktop through the network to achieve anytime Office.
  • a basic image of the operating system is prepared in advance, wherein the virtual machine corresponding to the cloud desktop is allocated an independent disk separately to retain the data of each virtual machine; upgrade the basic image, and upgrade the basic image , Synchronously update the independent disks.
  • Step 101 Create a basic image of the operating system in advance.
  • the base image is used to start the operating system of the virtual machine corresponding to the cloud desktop.
  • the administrator uses the iso file to install the virtual machine operating system. After installing the operating system, install the components according to requirements.
  • the components here refer to application programs and operating system patch packages.
  • installing the minifilter driver can provide component upgrades. Service software; after installing the software that can provide component upgrade service, the component upgrade service is idle. Then restart the operating system. After the restart takes effect, the basic image is completed.
  • an independent disk is allocated for each virtual machine through the management center.
  • the independent disk is used to store user private data and user changes to the system disk, so that the virtual machine can obtain the user by mounting the independent disk during operation Private data and record of changes to the system disk.
  • a disk can be assigned to each virtual machine individually, or multiple virtual machines can be grouped to assign a disk to each group of virtual machines.
  • the independent disk is only used to store the user's private data of the virtual machine and the user's record of changes to the system disk;
  • each group of virtual machines is assigned a disk, the one disk is divided There are multiple storage blocks, and each storage block corresponds to a virtual machine in the group of virtual machines. It is used to store the private data of the user of the virtual machine and the user's record of changes to the system disk, which does not actually affect the
  • the storage of each user's private data and change records is only an optimized solution to save system resources. In this way, taking into account the large scale of users, multiple virtual machines in the same group share a disk, effectively saving system resources.
  • Step 102 Synchronize the virtual machine for the first time and control the virtual machine to enter the component filtering mode.
  • the registry of the virtual machine is changed to the private data of the user of the independent disk, such as "My Documents", “Downloads”, “Pictures” and other directory documents.
  • the other part is the generated virtual disk file.
  • the virtual disk file includes the virtual machine's registry And a guest file (guestfile), used to store all user changes to the system disk (such as C drive).
  • the placeholder file is used to record the operation record of the system disk storage file, each placeholder file corresponds to the storage file in the system disk one by one; the virtual machine's registry is used to record the user's registry on the system disk The operation record of the virtual machine corresponds to the registry in the system disk.
  • the virtual machine can use the file filtering driver of the operating system to filter the operation of the system disk.
  • This embodiment modifies the original VDI system (the original VDI system framework is shown in FIG. 2), which involves the filter driver of the minifilter file system, and the modified version is shown in FIG. 3.
  • FIG. 2 the original VDI system framework is shown in FIG. 2
  • FIG. 3 Use the operating system's minifilter file system filter driver to achieve file redirection and virtual machine registry redirection, complete the recording and storage of changes.
  • the changes in this embodiment do not involve changes to the underlying mechanism, so in this way, the compatibility and adaptation of the original underlying mechanism are ensured, and the The file content attributes are distributed on multiple disk clusters, and each disk cluster contains information of multiple files, effectively improving the granularity requirements.
  • Step 103 Upgrade the base image.
  • Upgrading the basic image includes installing the application, uninstalling the application, updating the application, etc. to change the system disk; the installation of the application is determined by the administrator, where the installation path of the application belongs to the system disk.
  • the log file of the NTFS system is used to automatically record the file change, and the operating system's file system filter driver is used to filter the operation of the system disk, and the filtering result is redirected to the corresponding storage file of the operation
  • the registry of placeholder files and virtual machines is used to automatically record the file change.
  • step 104 the independent disk is updated synchronously according to the upgraded base image.
  • the updated independent disk includes the upgraded base image.
  • the upgraded base image specifically includes the file change records during the upgrade of the base image; according to the file change records, the virtual disk file includes the placeholder files and the virtual machine.
  • To update the registry After the administrator completes the upgrade of the base image, a "start synchronization" message is triggered to clone the upgraded base image to generate two upgraded differential images, one of which is used for the operating system of the virtual machine. At startup, another differential image is used to create the placeholder file.
  • each independent disk may correspond to an upgraded base image, or multiple independent disks may be grouped, so that each group of independent disks corresponds to an upgraded base image.
  • the storage file A is modified, and the modified file is A1.
  • the virtual machine mounts the virtual disk file and obtains the user's modification record of the storage file A (such as the modification of the 10th bit to the 20th bit of file A) , And according to the file A1 obtained during the upgrade of the base image and the user's modification records, the file A1 'with the user's modification record is finally obtained.
  • the file A1' includes the file modification record of the upgraded base image and the user's system disk Change records, which means that the updated independent disk after the synchronization is updated.
  • the administrator pre-creates a basic image of the operating system, in which the virtual machine corresponding to the cloud desktop is assigned a separate disk for storing user private data and the user's changes to the system disk , So that the virtual machine can obtain the user's private data and the record of changes to the system disk by mounting the independent disk when it is running.
  • the user's changes to the system disk are stored in the independent disk through the virtual machine's registry and placeholder files; the basic image is upgraded, and the independent disk is updated synchronously according to the upgraded basic image.
  • the updated independent disk includes the upgraded
  • the file change records during the upgrade of the basic image are merged into the independent disk by this method, so that the virtual machine can obtain the upgraded basic image when mounting the independent disk, and the user's private data and
  • the change record of the system disk realizes the unified maintenance of the cloud desktop, reduces the consumption of system resources, and improves the user experience.
  • the second embodiment of the present invention relates to a cloud desktop upgrade method, and the specific process is shown in FIG. 4.
  • the second embodiment is substantially the same as the first embodiment, and the main difference is that in the second embodiment of the present invention, the first synchronization of the virtual machine is further detailed.
  • the process of Figure 4 is described in detail below:
  • Step 401 Create a basic image of the operating system in advance. This step is the same as step 101 and will not be repeated here.
  • Step 402 Generate two differential images for the virtual machine according to the base image.
  • Step 403 Start the operating system of the virtual machine, and scan another differential image in full disk; according to the scan result, generate a virtual disk file.
  • the operating system of the virtual machine is started through the above-mentioned differential mirroring, and it is determined whether the disk mounted by the virtual machine is a disk for storing user's private data when running, and if so, whether the mounted disk is formatted, if No, format the mounted disk. Then, the virtual machine mounts the independent disk for the first synchronization, which is specifically: full disk scanning, which is used to establish a differential image of the placeholder file, and a virtual disk file is generated according to the scan result, and the file name can be cmap.vhd.
  • the machine's registry and placeholder files where the virtual machine's registry is used to record changes to the user's relevant directory documents made to the system disk registry, such as "My Documents", “Downloads”, and “Pictures” ", Etc.
  • the placeholder file is used to record the operation record of the system disk storage file, and each placeholder file corresponds to the storage file in the system disk.
  • an optional data stream ADS can be established for each placeholder file.
  • the name of the ADS includes the file identifier (fileid) of the storage file (ie, hostfile) in the corresponding system disk, thus establishing the correspondence between the placeholder file and the C disk file.
  • each storage file on the system disk contains a unique file identifier, so the correspondence between the placeholder file and the storage file in the system disk can be obtained through the file identifier, which is convenient for synchronous update of the independent disk .
  • placeholder files can be constructed in the manner of sparse files, that is, they do not contain the actual file content, but only include file attributes, such as creation time, file size, and so on. Because the placeholder file is a sparse file, only real, non-empty data blocks are written to the disk, and the short information indicates the empty data block instead of occupying the actual space to store the empty data block, so that the file content is mostly empty. Save disk space, improve the utilization of disk space, and reduce the time consumption of writing files for the first time.
  • Step 404 Control the virtual machine to enter the component filtering mode. Specifically, after the synchronization is completed, a system restart is performed to enter the component filtering mode.
  • minifilter that is, the file system filter driver (minifilter layered framework) provided by the windows driver toolkit is used to realize the user's system disk Interception and redirection of all operations. Including file Create (create), Open (open), Read (read), Write (write), Control (control) and so on. As long as there is a change, it is redirected to the placeholder file guestfile through incremental redirection.
  • Step 405 Upgrade the base image. This step is the same as step 103, and will not be repeated here.
  • Step 406 Synchronously update the independent disk according to the upgraded base image. This step is the same as step 104 and will not be repeated here.
  • the file modification record during the upgrade process of the base image is obtained, and the placeholder file and the registry of the virtual machine are updated according to the file modification record.
  • the placeholder file is deleted; the corresponding storage file recorded in the file modification record is regenerated Corresponding placeholder file, and create ADS for the regenerated placeholder file. If the user modifies a storage file, and the administrator modifies the same storage file during the upgrade of the base image, it will cause conflicts in the operation records.
  • the file modification record during the upgrade of the basic image is the standard.
  • the file changes recorded by the administrator during the upgrade of the basic image are still the standard.
  • this embodiment provides a method for synchronizing virtual machines for the first time. After allocating an independent disk to the virtual machine separately, two differential images are generated for the virtual machine according to the basic image, one differential image is used to start the operating system of the virtual machine, and the other differential image is used to establish the account Bit file, reasonable and clear division of differential mirroring is conducive to improving the efficiency of the system; after starting the operating system of the virtual machine, a full scan of another differential mirror, according to the scan results, generate a virtual disk file, virtual disk file includes and The registry of the virtual machine corresponding to the registry of the system disk and the placeholder files corresponding to the storage files in the system disk, and an optional data stream ADS is established for each placeholder file.
  • the name of the ADS includes the corresponding system
  • the file identifier of the storage file in the disk makes it possible to obtain the correspondence between the placeholder file and the storage file in the system disk through ADS, which is convenient for synchronously updating the independent disk.
  • the placeholder files are sparse files, which effectively saves disk space, improves the utilization of disk space, and reduces the time consumption of writing files for the first time.
  • step 404 in the second embodiment is further refined.
  • the minifilter file system filter driver is used to filter the operation of the system disk, so that all file operations of the user on the system disk (such as the C disk) are redirected to the independent disk.
  • the standard solution specification of the operating system's file system filter driver can easily monitor and interfere with the operation of the system disk without destroying the integrity of the original operation execution and change records In the case of, the user's changes to the system disk are written to the independent disk.
  • filtered operations are create request (IRP_MJ_CREATE), file open operation, read request, write request, file close request (Close), file clear request (Cleanup), fast read / write operation (FastI / O), file Rename operation (rename) as an example, to explain separately:
  • the interface IRP_MJ_CREATE is used to open and create files.
  • the callback function pre operation can be pre-processed through the interface, and the post-processing callback function pose operation after the lower layer driver is executed.
  • the input parameters include the structure FLT_FILE_NAME_INFORMATION, which is used to indicate the full path of the stored file on the C drive; when the process is processed to postcallback, the full path of the C drive can be obtained (for example, C: ⁇ dir1);
  • modify the path corresponding to the full path of the C drive to the path of the placeholder file for example, C: ⁇ dir1 corresponds to / volume1 / dir1. In this way, in subsequent operations, the corresponding storage file is redirected to the placeholder file.
  • the filtering operation Take the filtering operation as a write request to the storage file as an example.
  • the filtered operation is a write request to the storage file
  • the incrementally modified data is written to the corresponding placeholder file, and the location of the written data is recorded.
  • the positions of the multiple consecutively written data are merged into one record and recorded in the bitmap area. In this way, only the occupancy of the data that needs to be written to the file is recorded, and the file size of the placeholder file is effectively controlled, so that the user can modify the data according to the incrementally modified data stored in the placeholder file and the location of the written data recording.
  • the operation obtained by filtering is a read request for a storage file as an example.
  • the operation obtained by filtering is a read request for a storage file, first determine whether the position of the read data falls into the linked list, and if the position of the read data falls into the linked list, directly pass the read request to proceed Read operation; if the read data spans segments, multiple read operations are performed in this way.
  • the operation obtained by filtering is a file close request (Close) for the stored file as an example.
  • a task request "write the start and end sector positions in the bitmap area" is generated during the pre operation, and then the task request is added to the system I / O operation Queue, use a separate thread to take the task request from the queue and perform the write action in the bitmap area.
  • the operation obtained by filtering is a file cleanup request (Cleanup) for a stored file as an example.
  • the operation obtained by the filtering is a file cleanup request (Cleanup) for the stored file, the corresponding placeholder file and the original file object are closed, and the handle is recovered.
  • the filtered operation Take the filtered operation as a fast read / write operation (FastI / O) on the stored file as an example.
  • IRP input and output request packet
  • the operation obtained by filtering is a file rename operation (rename) of the stored file as an example.
  • the operation obtained by the filtering is a file rename operation (rename) of the storage file
  • a rename operation is simultaneously performed on the placeholder file and the ADS of the placeholder file corresponding to the storage file.
  • the storage file is renamed and the base image is updated, it is difficult to locate the placeholder file corresponding to the storage file in subsequent operations, and the correspondence between the placeholder file and the storage file is obtained according to ADS, so the corresponding storage file
  • the placeholder file and the ADS of the placeholder file are also renamed to facilitate accurate acquisition of the placeholder file.
  • the file system filtering minifilter layered framework provided by windos WDK is used to implement the entry registration function is FltRegisterFilter.
  • the calling functions that can be processed include: IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_READ , IRP_MJ_WRITE, IRP_MJ_CLEANUP, IRP_MJ_QUERY_VOLUME_INFORMATION, IRP_MJ_SET_INFORMATION, etc.
  • the API function of the operating system is called.
  • the filter driver intercepts the calling function and starts to perform filtering.
  • the current open process is obtained, and the blacklist and whitelist of the process in the pre-stored configuration file are matched, and the intercepted content is processed according to the matching result.
  • the blacklist represents the case of directly returning to the operating system without processing
  • white The list indicates the case where filtering processing is required; if the currently open process cannot be matched in the blacklist and whitelist, the currently open process exists in the whitelist by default. Due to the large number of system calls, the following only describes file opening and directory query.
  • the entry registration function is CmRegisterCallback.
  • the calling functions that can be processed include: RegNtPreDeleteKey, RegNtPreSetValueKey, RegNtPreDeleteValueKey , RegNtPreRenameKey, RegNtPreEnumerateKey, RegNtPreEnumerateValueKey, RegNtPreQueryKey, RegNtQueryValueKey, RegNtPreCreateKeyEx, RegNtPreOpenKeyEx, RegNtPreLoadKey, etc.
  • the filtered operation on the system disk is redirected to the placeholder file corresponding to the operation storage file.
  • this step provides various situations in which the filtered operation on the system disk is redirected to the placeholder file corresponding to the operation storage file and the registry of the virtual machine,
  • this embodiment uses the file system filter driver of the operating system to filter the operation of the system disk, ensuring the compatibility and adaptation of the original underlying mechanism, and effectively improving the granularity requirements; Examples of different operations are further illustrated, that is, through file redirection and registry redirection, the user's changes to the system disk are recorded and saved.
  • the fourth embodiment of the present invention relates to a cloud desktop upgrade device. As shown in FIG. 6, it includes: a distribution unit 601, a basic image production module 602, and an upgrade module 603.
  • Allocation unit 601 is used to allocate an independent disk to the virtual machine corresponding to the cloud desktop; the independent disk is used to store user private data and user changes to the system disk for the virtual machine to mount the independent disk by running , To obtain the user's private data and changes to the system disk.
  • the basic image making module 602 is used to make a basic image of the operating system, and the basic image is used to start the operating system of the virtual machine.
  • the administrator uses the iso file to install the virtual machine operating system and a series of components through the basic image creation module 602; when all installation operations are completed, the operating system is restarted. After the restart takes effect, the basic image creation module 602 is completed Production of basic images.
  • the upgrade module 603 is used to upgrade the base image, and synchronously update the independent disk according to the upgraded base image, and the updated independent disk includes the upgraded base image.
  • this embodiment is a system example corresponding to the first embodiment, and this embodiment can be implemented in cooperation with the first embodiment.
  • the relevant technical details mentioned in the first embodiment are still valid in this embodiment, and in order to reduce repetition, they will not be repeated here.
  • the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.
  • modules involved in this embodiment are all logical modules.
  • a logical unit may be a physical unit or a part of a physical unit, or multiple physical The combination of units is realized.
  • units that are not closely related to solving the technical problems proposed by the present invention are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.
  • a fifth embodiment of the present invention relates to a cloud server, as shown in FIG. 7, including: at least one processor 702; and a memory 701 communicatively connected to the at least one processor 702; wherein the memory 701 stores Instructions executed by the at least one processor 702, the instructions are executed by the at least one processor 702, so that the at least one processor 702 can execute the above cloud desktop upgrade method.
  • the memory 701 and the processor 702 are connected by a bus.
  • the bus may include any number of interconnected buses and bridges.
  • the bus connects one or more processors and various circuits of the memory 701 together.
  • the bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, etc., which are well known in the art, and therefore, they will not be described further herein.
  • the bus interface provides an interface between the bus and the transceiver.
  • the transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on the transmission medium.
  • the data processed by the processor 702 is transmitted on the wireless medium through the antenna.
  • the antenna also receives the data and transmits the data to the processor 702.
  • the processor 702 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions.
  • the memory 701 can be used to store data used by the processor when performing operations.
  • modules involved in this embodiment are all logical modules.
  • a logical unit may be a physical unit or a part of a physical unit, or multiple physical The combination of units is realized.
  • units that are not closely related to solving the technical problems proposed by the present invention are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.
  • the sixth embodiment of the present invention relates to a computer-readable storage medium that stores a computer program.
  • the computer program is executed by the processor, the above method embodiments are implemented.
  • a program which is stored in a storage medium and includes several instructions to make a device ( It may be a single chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code .
  • a basic image of the operating system is prepared in advance, wherein the virtual machine corresponding to the cloud desktop is independently assigned an independent disk, and the basic image is used to start the operating system of the virtual machine; the independent disk is used to store private user data
  • the virtual machine can obtain the user's private data and the system disk's change records by mounting the independent disk at runtime to realize the retention of each virtual machine's own data.
  • the updated independent disk includes the upgraded base image.
  • the upgrade of the base image and the user's change records are merged into independent disks, which realizes the unified upgrade and maintenance of the cloud desktop, simplifies the update operation of the virtual machine, reduces the system resource consumption, and improves the user experience .
  • each virtual machine can retain its own user data and merge the update of the base template , Just restart the machine once, no need to update each virtual machine individually.

Abstract

本发明实施例涉及软件技术领域,公开了一种云桌面升级方法、装置、云端服务器及存储介质。本发明实施例中,一种云桌面升级方法,包括:预先制作操作系统的基础镜像,其中,与云桌面对应的虚拟机单独分配有一独立磁盘,基础镜像用于虚拟机的操作系统的启动;独立磁盘用于存储用户私有数据和用户对系统盘的更改记录,供虚拟机在运行时通过挂载独立磁盘,获取到用户私有数据和对系统盘的更改记录;升级基础镜像,并根据升级后的基础镜像,同步更新独立磁盘,更新后的独立磁盘包括升级后的基础镜像。

Description

云桌面升级方法、装置、云端服务器及存储介质
相关申请的交叉引用
本申请基于申请号为201811409392.1、申请日为2018年11月23日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本发明实施例涉及软件技术领域,特别涉及云桌面升级技术。
背景技术
目前,VDI(Virtual Desktop Infrastructure,虚拟桌面基础架构)已得到广泛的应用。VDI通过在数据中心的服务器运行操作系统,可迅速部署通用的虚拟桌面,用户通过来自客户端设备的客户计算协议与虚拟桌面进行连接并访问虚拟桌面,如同访问传统的本地安装桌面。一台服务器可同时支持许多虚拟桌面,供用户独立使用。
然而发明人发现现有技术中至少存在如下问题:由于虚拟桌面的基础镜像与每个用户的运行操作是强关联的,因此基础镜像一旦生成并分发给每个虚拟机后,无法对基础镜像内部的软件进行升级,只能由每个用户自行对虚拟机维护升级,系统消耗巨大,难以实现同步管理。
发明内容
本发明实施方式的目的在于提供一种云桌面升级方法、装置、云端服务器及存储介质,实现了对云桌面的统一升级维护,降低了系统资源消耗,提升了用户体验。
为至少部分解决上述技术问题,本发明的实施方式提供了一种云桌面升级方法,包括以下步骤:预先制作操作系统的基础镜像,其中,与云桌面对应的虚拟机单独分配有一独立磁盘,基础镜像用于虚拟机的操作系统的启动;独立磁盘用于存储用户私有数据和用户对系统盘的更改记录,供虚拟机在运行时通过挂载独立磁盘,获取到用户私有数据和对系统盘的更改记录;升级基础镜像,并根据升级后的基础镜像,同步更新独立磁盘,更新后的独立磁盘包括升级后的基础镜像。
本发明的实施方式还提供了一种云桌面升级装置,包括:分配单元,用于为与云桌面对应的虚拟机单独分配一独立磁盘;其中,独立磁盘用于存储用户私有数据和用户对系统盘的更改记录,供虚拟机在运行时通过挂载独立磁盘,获取到用户私有数据和对系统盘的更改记录;基础镜像制作模块,用于制作操作系统的基础镜像,所述基础镜像用于虚拟机的操作系统的启动;升级模块,用于升级基础镜像,并根据升级后的基础镜像,同步更新 独立磁盘,更新后的所述独立磁盘包括所述升级后的基础镜像。
本发明的实施方式还提供了一种云端服务器,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述的云桌面升级方法。
本发明的实施方式还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现上述的云桌面升级方法。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定。
图1是根据本发明第一实施方式的一种云桌面升级方法的流程图;
图2是根据现有技术中的VDI系统框架的示意图;
图3是根据本发明第一实施方式中的VDI系统框架的示意图;
图4是根据本发明第二实施方式的一种云桌面升级方法的流程图;
图5是根据本发明第三实施方式中的文件过滤示意图;
图6是根据本发明第四实施方式的一种云桌面升级装置的结构示意图;
图7是根据本发明第五实施方式的一种云端服务器的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本发明各实施方式中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请所要求保护的技术方案。
本发明的第一实施方式涉及一种云桌面升级方法,具体流程如图1所示。云桌面技术让操作系统的桌面不再局限于特定的硬件上运行,所有的数据都被存储在云端,通过可视化桌面的方式显示给用户,用户通过网络即可登陆至操作系统的桌面,实现随时办公。本实施方式中,预先制作操作系统的基础镜像,其中,与云桌面对应的虚拟机单独分配有一独立磁盘,以对每个虚拟机自身数据进行保留;升级基础镜像,并根据升级后的基础镜像,同步更新独立磁盘,通过这种方式将对基础镜像的升级和用户的更改记录合并于独立磁盘中,实现了对云桌面的统一升级维护,简化了对虚拟机的更新操作,降低了系统资源消耗,提升了用户体验。下面对图1的流程做具体说明:
步骤101,预先制作操作系统的基础镜像。
具体地说,基础镜像用于与云桌面对应的虚拟机的操作系统的启动。管理员使用iso文件安装虚拟机操作系统,安装完操作系统后根据需求安装组件,此处的组件指代的是应 用程序和操作系统补丁包等;安装完组件后安装minifilter驱动等可提供组件升级服务的软件;安装完可提供组件升级服务的软件后,组件升级服务处于空闲态。随后进行操作系统重启,重启生效后,基础镜像制作完成。
具体地说,通过管理中心为每个虚拟机单独分配一独立磁盘,独立磁盘用于存储用户私有数据和用户对系统盘的更改记录,供虚拟机在运行时通过挂载独立磁盘,获取到用户私有数据和对系统盘的更改记录。
更具体的说,当通过管理中心为虚拟机分配独立磁盘时,可以是为每个虚拟机单独分配一磁盘,也可是对多个虚拟机进行分组,为每组虚拟机分配一磁盘。当每个虚拟机单独分配有一独立磁盘时,该独立磁盘仅用于存储该虚拟机的用户私有数据和用户对系统盘的更改记录;当每组虚拟机分配一个磁盘时,该一个磁盘中划分有多个存储区块,每个存储区块都对应于该组虚拟机中的一个虚拟机,用于存储该一个虚拟机的用户私有数据和用户对系统盘的更改记录,实际并不影响对每个用户的私有数据和更改记录的存储,仅为节省系统资源的优化方案。通过这种方式,考虑到了用户规模较大的情况,令同一组的多个虚拟机共享一个磁盘,有效节省了系统资源。
步骤102,对虚拟机进行首次同步,控制虚拟机进入组件过滤模式。
具体地说,首先根据基础镜像启动虚拟机的操作系统,挂载分配的独立磁盘,对虚拟机进行首次同步并控制虚拟机进入组件过滤模式,使得独立磁盘具有了以下两部分内容,一部分是通过虚拟机的注册表更改至独立磁盘的用户私有数据,如“我的文档”、“下载”、“图片”等目录文档,另一部分是生成的虚拟磁盘文件,虚拟磁盘文件包括虚拟机的注册表和占位文件(guestfile),用于存储所有用户对于系统盘(如C盘)的更改记录。其中,占位文件用于记录对系统盘存储文件的操作记录,每个占位文件都与系统盘中的存储文件一一对应;虚拟机的注册表用于记录用户对系统盘中的注册表的操作记录,虚拟机的注册表与系统盘中的注册表对应。
虚拟机在组件过滤模式下,可利用操作系统的文件过滤驱动程序,实现对系统盘操作的进行过滤。本实施方式对原有VDI系统(原有VDI系统框架如图2所示)进行了改动,涉及了minifilter文件系统过滤驱动,改动后如图3所示。利用操作系统的minifilter文件系统过滤驱动实现文件重定向和虚拟机的注册表重定向,完成更改的记录和存放。
由于文件系统过滤驱动属于操作系统自带的功能,因此本实施方式的改动不涉及对底层机制的改动,所以通过这种方式,保证了原有底层机制的兼容适配,并使得操作系统中的文件内容属性分布于多个磁盘簇上,且每个磁盘簇包含多个文件的信息,有效提升了粒度要求。
步骤103,升级基础镜像。
具体地说,通过某台虚拟机启动基础镜像,管理员发出“开始同步”的消息,此时组 件升级服务从空闲态切换到同步态。升级基础镜像包括安装应用程序、卸载应用程序、更新应用程序等对系统盘进行更改的操作;应用程序的安装由管理员决定,其中,应用程序的安装路径属于系统盘下。当对系统盘进行更改时,利用NTFS系统的日志文件自动记录对文件的更改,利用操作系统的文件系统过滤驱动对系统盘的操作进行过滤,将过滤结果重定向至与操作的存储文件对应的占位文件和虚拟机的注册表。
步骤104,根据升级后的基础镜像,同步更新独立磁盘。
具体地说,更新后的独立磁盘包括升级后的基础镜像,升级后的基础镜像具体包括基础镜像升级过程中的文件改动记录;根据文件改动记录,对虚拟磁盘文件包括的占位文件和虚拟机的注册表进行更新。当管理员完成对基础镜像的升级后,触发“开始同步”的消息,对升级后的基础镜像进行克隆,以生成两个升级后的差分镜像,其中一个差分镜像用于虚拟机的操作系统的启动,另一个差分镜像用于建立占位文件。在本实施方式中,可以是令每一个独立磁盘都对应一个升级后的基础镜像,也可是对多个独立磁盘进行分组,令每组独立磁盘对应一个升级后的基础镜像,通过这种方式,考虑到了用户规模较大的情况,令同一组的多个独立磁盘共享一个基础镜像,有效节省了系统资源。当启动虚拟机的操作系统后,且虚拟机处于同步态时,挂载虚拟磁盘文件和另一个用于建立占位文件的差分镜像,同时遍历日志文件,获取基础镜像升级过程中的文件改动记录,根据文件改动记录,对占位文件和虚拟机的注册表进行更新。通过这种方式,将基础镜像升级过程中的文件改动记录合并到独立磁盘上,使得虚拟机在挂载独立磁盘时,能够获取到升级后的基础镜像,与用户私有数据和对系统盘的更改记录,实现了对云桌面的统一维护,降低了系统资源消耗。
下面以一实例为具体说明:当管理员对基础镜像进行升级时,对存储文件A进行了修改,修改后的文件为A1。当根据升级后的基础镜像,同步更新独立磁盘后,虚拟机挂载虚拟磁盘文件,获取到用户对存储文件A的修改记录(如对文件A的第10个bit至第20个bit的修改),并根据基础镜像升级过程中得到的文件A1,以及用户的修改记录,最终得到具有用户修改记录的文件A1’,文件A1’包括了升级后的基础镜像的文件改动记录和用户对系统盘的更改记录,也就是说同步更新后的独立磁盘完成了升级。
本实施方式相对于现有技术而言,管理员预先制作操作系统的基础镜像,其中,与云桌面对应的虚拟机单独分配有一独立磁盘,用于存储用户私有数据和用户对系统盘的更改记录,以供虚拟机在运行时通过挂载独立磁盘,获取到用户私有数据和对系统盘的更改记录。其中,用户对系统盘的更改记录,通过虚拟机的注册表和占位文件存储在独立磁盘中;升级基础镜像,并根据升级后的基础镜像同步更新独立磁盘,更新后的独立磁盘包括升级后的基础镜像,通过这种方法,将基础镜像升级过程中的文件改动记录合并到独立磁盘上,使得虚拟机在挂载独立磁盘时,能够获取到升级后的基础镜像,与用户私有数据和对系统 盘的更改记录,实现了对云桌面的统一维护,降低了系统资源消耗,提升了用户体验。
本发明的第二实施方式涉及一种云桌面升级方法,具体流程如图4所示。第二实施方式与第一实施方式大致相同,主要区别之处在于:在本发明第二实施方式中,对如何对虚拟机进行首次同步,做了进一步细化。下面对图4的流程做具体说明:
步骤401,预先制作操作系统的基础镜像。本步骤与步骤101相同,此处不再赘述。
步骤402,根据基础镜像为虚拟机生成两个差分镜像。
具体地说,通过对基础镜像的克隆,生成两个差分镜像,一个用于虚拟机的操作系统的启动,另一个用于建立占位文件。通过这种方式,合理明确的进行了差分镜像的分工,有利于提高系统工作效率。
步骤403,启动虚拟机的操作系统,全盘扫描另一个差分镜像;根据扫描结果,生成虚拟磁盘文件。
具体地说,通过上述差分镜像启动虚拟机的操作系统,判断虚拟机在运行时挂载的磁盘是否是用于存储用户私有数据的磁盘,若是,判断该挂载的磁盘是否已格式化,若否,该挂载的磁盘进行格式化。随后虚拟机挂载独立磁盘,进行首次同步,具体为:全盘扫描该用于建立占位文件的差分镜像,根据扫描结果,生成虚拟磁盘文件,文件名可为cmap.vhd,虚拟磁盘文件包括虚拟机的注册表和占位文件,其中,虚拟机的注册表用于记录对系统盘注册表进行的用户的相关目录文档的更改,相关目录文档如“我的文档”、“下载”、“图片”等,占位文件用于记录对系统盘存储文件的操作记录,每个占位文件都与系统盘中的存储文件一一对应。具体地,可以为每个占位文件建立可选数据流ADS。ADS的名称中包括对应的系统盘中的存储文件(即hostfile)的文件标识符(fileid),这样就建立了占位文件和C盘文件的对应关系。根据NTFS文件系统的特点,系统盘上的每个存储文件都包含唯一的文件标识符,所以通过文件标识符可获取到占位文件与系统盘中的存储文件的对应关系,便于同步更新独立磁盘。
而且,在实际应用中,占位文件可按照sparse稀疏文件的方式构造,即并不包含真实的文件内容,只是包含了文件属性,比如创建时间,文件大小等等。由于占位文件为稀疏文件,只将真实的、非空的数据块写入磁盘,以简短的信息表示空数据块而不是占用实际空间来存储空数据块,使得文件内容大多为空时有效地节省磁盘空间,提升对磁盘空间的利用率,减少首次写入文件的时间消耗。
步骤404,控制虚拟机进入组件过滤模式。具体地说,同步完成后,进行一次系统重启,进入组件过滤模式。在组件过滤模式下,用户所有对系统盘(如C盘)的文件操作都被minifilter过滤,即使用windows驱动程序工具包提供的文件系统过滤驱动(minifilter分层框架),实现用户对系统盘的所有操作的拦截及重定向。包括文件Create(创建),Open(打开),Read(读取),Write(写入),Control(控制)等等。只要有改 动,都通过增量方式重定向写入到占位文件guestfile中。
步骤405,升级基础镜像。本步骤与步骤103相同,此处不再赘述。
步骤406,根据升级后的基础镜像,同步更新独立磁盘。本步骤与步骤104相同,此处不再赘述。
具体地说,在本实施方式中,获取基础镜像升级过程中的文件改动记录,根据文件改动记录,对占位文件和所述虚拟机的注册表进行更新。当占位文件记录的对应的存储文件的操作记录,与文件改动记录中记录的对应的存储文件的操作记录冲突时,删除占位文件;以文件改动记录中记录的对应的存储文件,重新生成对应的占位文件,并为重新生成的占位文件建立ADS。若用户修改了某存储文件,管理员在升级基础镜像的过程中也修改了同样的存储文件,则会造成操作记录的冲突,因此通过这种方式,抛弃用户对存储文件进行的操作记录,解决了用户修改与管理员修改的冲突问题,以升级基础镜像过程中的文件改动记录为标准。另外,当更新注册表时,若遇到同样类型的上述冲突,则依旧以管理员在升级基础镜像过程中的文件改动记录为标准。
本实施方式相对于现有技术而言,提供了一种首次同步虚拟机的方式。在为虚拟机单独分配一独立磁盘后,根据基础镜像为虚拟机生成两个差分镜像,其中,一个差分镜像用于所述虚拟机的操作系统的启动,另一个差分镜像用于建立所述占位文件,合理明确的进行了差分镜像的分工,有利于提高系统工作效率;在启动虚拟机的操作系统后,全盘扫描另一个差分镜像,根据扫描结果,生成虚拟磁盘文件,虚拟磁盘文件包括与系统盘的注册表对应的虚拟机的注册表和与系统盘中的存储文件一一对应的占位文件,并为每个占位文件建立可选数据流ADS,ADS的名称中包括对应的系统盘中的存储文件的文件标识符,使得通过ADS可获取到占位文件与系统盘中的存储文件的对应关系,便于同步更新独立磁盘。而且,占位文件为稀疏文件,有效的节省磁盘空间,提升对磁盘空间的利用率,减少首次写入文件的时间消耗。
本发明的第三实施方式涉及一种云桌面升级方法,在本实施方式中,对第二实施方式中的步骤404进行了进一步的细化。在步骤404中,利用minifilter文件系统过滤驱动程序,对系统盘的操作进行过滤,实现用户所有对系统盘(如C盘)的文件操作,被重定向至独立磁盘中。通过这种方式,利用操作系统的文件系统过滤驱动程序这一标准的解决方案规范,能够十分方便的监控和干涉对系统盘的操作,且在不破坏原有操作的执行和更改记录的完整性的情况下,将用户对系统盘的更改记录写入独立磁盘中。
下面以过滤到的操作为创建请求(IRP_MJ_CREATE)、文件打开操作、读取请求、写入请求、文件关闭请求(Close)、文件清除请求(Cleanup)、快速读写操作(FastI/O)、文件重命名操作(rename)为例,分别进行说明:
以过滤得到的操作为对存储文件的创建请求为举例说明。IRP_MJ_CREATE这一接口用 于打开和创建文件,通过接口可以预先处理回调函数pre操作,和下层驱动执行后的后置处理回调函数pose操作。在pre操作中,输入的参数包含结构体FLT_FILE_NAME_INFORMATION,用于指出该存储文件在C盘的全路径;当流程处理到postcallback时,可以获得该C盘的全路径(例如C:\dir1);在pre操作中,修改C盘的全路径对应的路径为占位文件的路径,例如C:\dir1对应/volume1/dir1。通过这种方式,使得后续操作中,对应的存储文件都被重定向到了占位文件。
以过滤得到的操作为对存储文件的写入请求时为举例说明。当过滤得到的操作为对存储文件的写入请求时,将增量修改的数据写入到所述对应的占位文件,并记录写入的数据的位置。首先在占位文件的ADS中创建一bitmap区,记录对存储文件的写入的数据的占用情况。在precallback中判断存储文件是否存在于系统盘中,如果是,则直接通过该写入请求,进行写入操作;当写入操作成功后,将增量修改的数据写入到所述对应的占位文件;同时在bitmap区中记录写入的数据的位置,包括对存储文件的写入的数据的位置偏移和长度。若过滤得到的操作为对存储文件的多个连续写入请求,则将多个连续写入的数据的位置合并为一条记录,记录于bitmap区中。通过这种方式,仅记录对文件需要写入的数据占用情况,有效控制了占位文件的文件大小,便于根据占位文件中存储的增量修改的数据和写入数据的位置得到用户的修改记录。
以过滤得到的操作为对存储文件的读取请求为举例说明。当过滤得到的操作为对存储文件的读取请求时,首先判断读取的数据的位置是否落入链表中,若读取的数据的位置落入链表中,则直接通过该读取请求,进行读取操作;若读取的数据跨段,则以此进行多次读取操作。
以过滤得到的操作为对存储文件的文件关闭请求(Close)为举例说明。当过滤得到的操作为对存储文件的文件关闭请求(Close)时,在pre操作时生成任务请求“在bitmap区中写入起止扇区位置”,随后将该任务请求加入系统的I/O操作队列,使用单独线程从队列中取出该任务请求,执行在bitmap区中的写入动作。通过这种同步串行处理的方式,有效避免了因互相冲突而导致写入错误的情况。
以过滤得到的操作为对存储文件的文件清除请求(Cleanup)为举例说明。当过滤得到的操作为对存储文件的文件清除请求(Cleanup)时,关闭对应的占位文件和原位置的文件对象,回收句柄。
以过滤得到的操作为对存储文件的快速读写操作(FastI/O)为举例说明。当过滤得到操作时,可在pre操作中,通过系统函数FLT_IS_FASTIO_OPERATION函数判断该操作是否为快速读写操作(FastI/O)。若过滤得到的操作为对存储文件的快速读写操作,则直接返回FLT_PREOP_DISALLOW_FASTIO函数。由于快速读写操作是由操作系统生成的输入输出请求包(IRP),所以快速读写操作是直接在系统缓存中传输处理数据,而不是通过文件系 统来传输数据。
以过滤得到的操作为对存储文件的文件重命名操作(rename)为举例说明。当过滤得到的操作为对存储文件的文件重命名操作(rename)时,同时对对应存储文件的占位文件和占位文件的ADS进行重命名操作。由于存储文件被重命名且基础镜像被更新后,在后续操作中难以定位到对应存储文件的占位文件,而占位文件与存储文件的对应关系是根据ADS获取的,因此对对应存储文件的占位文件和占位文件的ADS也进行重命名操作,以便于准确获取占位文件。
如图5所示,当涉及到对操作系统调用文件处理流程时,使用windos WDK提供的文件系统过滤minifilter分层框架实现,入口注册函数为FltRegisterFilter,可以处理的调用函数包括:IRP_MJ_CREATE、IRP_MJ_CLOSE、IRP_MJ_READ、IRP_MJ_WRITE、IRP_MJ_CLEANUP、IRP_MJ_QUERY_VOLUME_INFORMATION、IRP_MJ_SET_INFORMATION等。
当应用程序运行时,调用操作系统的api函数,当文件系统过滤驱动拦截到调用函数时,过滤驱动截获到调用函数开始执行过滤。同时获取当前打开的进程,与预存的配置文件中进程的黑名单和白名单进行匹配,根据匹配结果对拦截到的内容进行处理,其中,黑名单表示无需处理并直接返回操作系统的情况,白名单表示需要进行过滤处理的情况;若未能在黑名单和白名单中匹配到当前打开的进程,则默认当前打开的进程存在于白名单中。由于系统调用较多,以下仅说明文件打开和目录查询。
以拦截到文件打开调用函数为举例说明。首先判断当前文件打开调用函数是否为对系统盘的访问请求,若是,将文件打开调用函数重定向至挂载虚拟磁盘文件文件的独立磁盘中去;根据ADS获取到系统盘中的请求打开的文件的文件标识符,根据该文件标识符打开对应的系统盘中的存储文件。同时,在占位文件中设置StramContext函数和StreamHandleContext函数。通过这种方式,使得后续的文件读取请求和文件写入请求可以通过判断是否存在Context函数而进行处理。当完成上述操作后,返回操作系统。
如图5所示,当涉及到对操作系统调用注册表处理流程,使用windos WDK提供的文件系统过滤minifilter分层框架实现,入口注册函数为CmRegisterCallback,可以处理的调用函数包括:RegNtPreDeleteKey、RegNtPreSetValueKey、RegNtPreDeleteValueKey、RegNtPreRenameKey、RegNtPreEnumerateKey、RegNtPreEnumerateValueKey、RegNtPreQueryKey、RegNtQueryValueKey、RegNtPreCreateKeyEx、RegNtPreOpenKeyEx、RegNtPreLoadKey等。
以拦截到RegNtPreQueryKey为举例说明。首先将文件系统过滤驱动加载至操作系统后,在操作系统处于同步态下时将所有对注册表的改动都记录在内存中;当操作系统结束同步态时,将所有对注册表的改动以hive格式分别保存为单个文件,保存于reg目录中。当操作系统进行过滤时,挂载独立磁盘,连接上述保存于reg目录的文件;当接收到调用 函数时,优先查询独立磁盘的注册表中的同路径,若存在查询结果,则以此查询结果返回。
其次,将过滤得到的对系统盘的操作,重定向至与操作的存储文件对应的占位文件。
具体地说,本步骤提供了多种将过滤得到的对系统盘的操作,重定向至与操作的存储文件对应的占位文件和虚拟机的注册表的情况,
本实施方式相对于现有技术而言,利用操作系统的文件系统过滤驱动程序,对系统盘的操作进行过滤,保证了原有底层机制的兼容适配,有效提升了粒度要求;同时对过滤得到不同操作的情况进行了进一步举例说明,即通过文件重定向和注册表重定向,实现了将用户对系统盘的更改的记录和保存。
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。
本发明第四实施方式涉及一种云桌面升级装置,如图6所示,包括:分配单元601,基础镜像制作模块602和升级模块603。
分配单元601,用于为与云桌面对应的虚拟机单独分配一独立磁盘;其中,独立磁盘用于存储用户私有数据和用户对系统盘的更改记录,供虚拟机在运行时通过挂载独立磁盘,获取到用户私有数据和对系统盘的更改记录。
基础镜像制作模块602,用于制作操作系统的基础镜像,基础镜像用于虚拟机的操作系统的启动。
具体地说,管理员使用iso文件,通过基础镜像制作模块602安装虚拟机操作系统和一系列组件的安装;当全部安装操作完成后,进行操作系统重启,重启生效后,基础镜像制作模块602完成基础镜像的制作。
升级模块603,用于升级基础镜像,并根据升级后的基础镜像,同步更新独立磁盘,更新后的所述独立磁盘包括所述升级后的基础镜像。
不难发现,本实施方式为与第一实施方式相对应的系统实施例,本实施方式可与第一实施方式互相配合实施。第一实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第一实施方式中。
值得一提的是,本实施方式中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本发明的创新部分,本实施方式中并没有将与解决本发明所提出的技术问题关系不太密切的单元引入,但这并不表明本实施方式中不存在其它的单元。
本发明第五实施方式涉及一种云端服务器,如图7所示,包括:至少一个处理器702;以及,与至少一个处理器702通信连接的存储器701;其中,所述存储器701存储有可被至少一个处理器702执行的指令,指令被至少一个处理器702执行,以使至少一个处理器702能够执行上述云桌面升级方法。
其中,存储器701和处理器702采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器和存储器701的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器702处理的数据通过天线在无线介质上进行传输,在一些实施方式中,天线还接收数据并将数据传送给处理器702。
处理器702负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器701可以被用于存储处理器在执行操作时所使用的数据。
值得一提的是,本实施方式中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本发明的创新部分,本实施方式中并没有将与解决本发明所提出的技术问题关系不太密切的单元引入,但这并不表明本实施方式中不存在其它的单元。
本发明第六实施方式涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
通过本发明的实施例,预先制作操作系统的基础镜像,其中,与云桌面对应的虚拟机单独分配有一独立磁盘,基础镜像用于虚拟机的操作系统的启动;独立磁盘用于存储用户私有数据和用户对系统盘的更改记录,通过这种方式,供虚拟机在运行时通过挂载独立磁盘,获取到用户私有数据和对系统盘的更改记录,实现对每个虚拟机自身数据的保留。升级基础镜像,并根据升级后的基础镜像,同步更新独立磁盘,更新后的独立磁盘包括升级后的基础镜像。通过这种方式将对基础镜像的升级和用户的更改记录合并于独立磁盘中,实现了对云桌面的统一升级维护,简化了对虚拟机的更新操作,降低了系统资源消耗,提 升了用户体验。也就是说,每次管理员统一升级基础镜像,包括软件安装,卸载,更新,系统补丁包等等,统一触发更新事件后,每个虚拟机可以保留自己的用户数据,并且合并基础模板的更新,重启一次机器即可,无需逐个虚拟机单独更新。
本领域的普通技术人员可以理解,上述各实施方式是实现本发明的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。

Claims (12)

  1. 一种云桌面升级方法,包括:
    预先制作操作系统的基础镜像;其中,
    与云桌面对应的虚拟机单独分配有一独立磁盘,所述基础镜像用于所述虚拟机的操作系统的启动;
    所述独立磁盘用于存储用户私有数据和用户对系统盘的更改记录,供所述虚拟机在运行时通过挂载所述独立磁盘,获取到所述用户私有数据和所述对系统盘的更改记录;
    升级所述基础镜像,并根据升级后的基础镜像,同步更新所述独立磁盘,更新后的所述独立磁盘包括所述升级后的基础镜像。
  2. 根据权利要求1所述的云桌面升级方法,其中,
    所述用户对系统盘的更改记录,通过所述虚拟机的注册表和占位文件存储在所述独立磁盘中;
    所述占位文件与系统盘中的存储文件一一对应,所述占位文件用于记录对应的存储文件的操作记录;所述虚拟机的注册表与系统盘中的注册表对应,所述虚拟机的注册表用于记录用户对系统盘中的注册表的操作记录。
  3. 根据权利要求2所述的云桌面升级方法,其中所述占位文件为稀疏文件。
  4. 根据权利要求2所述的云桌面升级方法,其中,在所述预先制作操作系统的基础镜像,并为与云桌面对应的虚拟机单独分配一独立磁盘后,还包括:
    根据所述基础镜像为所述虚拟机生成两个差分镜像;其中,一个差分镜像用于所述虚拟机的操作系统的启动,另一个差分镜像用于建立所述占位文件。
  5. 根据权利要求4所述的云桌面升级方法,其中,所述占位文件通过以下方式建立:
    在启动所述虚拟机的操作系统后,全盘扫描所述另一个差分镜像;
    根据扫描结果,生成虚拟磁盘文件,所述虚拟磁盘文件包括所述虚拟机的注册表和与所述系统盘中的存储文件一一对应的所述占位文件;
    为每个所述占位文件建立可选数据流ADS;所述ADS的名称中包括对应的所述系统盘中的存储文件的文件标识符。
  6. 根据权利要求2所述的云桌面升级方法,其中,所述用户对系统盘的更改记录,通过以下方式存储在所述独立磁盘中:
    利用操作系统的文件系统过滤驱动程序,对所述系统盘的操作进行过滤,并将过滤得到的对所述系统盘的操作,重定向至与操作的存储文件对应的所述占位文件和所述虚拟机 的注册表。
  7. 根据权利要求6所述的云桌面升级方法,其中,所述将过滤得到的对所述系统盘的操作,重定向至与操作的存储文件对应的所述占位文件,具体包括:
    当过滤得到的操作为对存储文件的写入请求时,将增量修改的数据写入到所述对应的所述占位文件,并记录写入的数据的位置。
  8. 根据权利要求2至7中任一项所述的云桌面升级方法,其中,所述根据升级后的基础镜像,同步更新所述独立磁盘,具体包括:
    获取所述基础镜像升级过程中的文件改动记录;
    根据所述文件改动记录,对所述占位文件和所述虚拟机的注册表进行更新。
  9. 根据权利要求8所述的云桌面升级方法,其中,所述根据所述文件改动记录,对所述占位文件进行的更新,具体包括:
    当所述占位文件记录的所述对应的存储文件的操作记录,与所述文件改动记录中记录的所述对应的存储文件的操作记录冲突时,删除所述占位文件;
    以所述文件改动记录中记录的所述对应的存储文件,重新生成对应的占位文件。
  10. 一种云桌面升级装置,包括:
    分配单元,用于为与云桌面对应的虚拟机单独分配一独立磁盘;其中,所述独立磁盘用于存储用户私有数据和用户对系统盘的更改记录,供所述虚拟机在运行时通过挂载所述独立磁盘,获取到所述用户私有数据和所述对系统盘的更改记录;
    基础镜像制作模块,用于制作操作系统的基础镜像,所述基础镜像用于所述虚拟机的操作系统的启动;
    升级模块,用于升级所述基础镜像,并根据升级后的基础镜像,同步更新所述独立磁盘,更新后的所述独立磁盘包括所述升级后的基础镜像。
  11. 一种云端服务器,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至9中任一项所述的云桌面升级方法。
  12. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1至9中任一项所述的云桌面升级方法。
PCT/CN2019/119962 2018-11-23 2019-11-21 云桌面升级方法、装置、云端服务器及存储介质 WO2020103904A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP19886325.0A EP3885903A4 (en) 2018-11-23 2019-11-21 METHOD OF UPGRADING A CLOUD DESKTOP, DEVICE, CLOUD SERVER AND STORAGE MEDIA

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811409392.1A CN111221537A (zh) 2018-11-23 2018-11-23 云桌面升级方法、装置、云端服务器及存储介质
CN201811409392.1 2018-11-23

Publications (1)

Publication Number Publication Date
WO2020103904A1 true WO2020103904A1 (zh) 2020-05-28

Family

ID=70773261

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119962 WO2020103904A1 (zh) 2018-11-23 2019-11-21 云桌面升级方法、装置、云端服务器及存储介质

Country Status (3)

Country Link
EP (1) EP3885903A4 (zh)
CN (1) CN111221537A (zh)
WO (1) WO2020103904A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113900716A (zh) * 2021-09-29 2022-01-07 武汉噢易云计算股份有限公司 桌面启动的管理方法及装置
CN114679442A (zh) * 2022-02-28 2022-06-28 阿里巴巴(中国)有限公司 基于云桌面的用户数据同步方法、装置、设备及存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782318A (zh) * 2020-06-16 2020-10-16 贵州省广播电视信息网络股份有限公司 远程挂载本地磁盘到云桌面虚拟机中共享访问系统及方法
CN111782339B (zh) * 2020-06-28 2024-04-12 京东科技控股股份有限公司 一种容器创建方法、装置、电子设备及存储介质
CN112596748B (zh) * 2020-12-28 2023-05-16 武汉噢易云计算股份有限公司 一种桌面融合使用方法、装置、设备及可读存储介质
CN113238784A (zh) * 2021-06-16 2021-08-10 中国农业银行股份有限公司 交易程序的更新方法及设备
CN113407220B (zh) * 2021-07-12 2022-04-19 浙江华网俊业科技有限公司 镜像推送本地终端的更新方法、装置
CN114282214B (zh) * 2021-12-17 2022-10-21 北京天融信网络安全技术有限公司 一种病毒查杀方法、装置及电子设备
CN114510278A (zh) * 2022-01-21 2022-05-17 武汉噢易云计算股份有限公司 数据静态恢复方法、装置、设备及可读存储介质
CN116954681A (zh) * 2022-04-13 2023-10-27 广州视源电子科技股份有限公司 镜像管理方法、装置、服务器、终端及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102037444A (zh) * 2008-05-20 2011-04-27 思杰系统有限公司 用于修补从通用基础磁盘映像获取的多个磁盘映像的方法和系统
CN103019802A (zh) * 2012-11-20 2013-04-03 中标软件有限公司 一种虚拟机管理方法及平台
US20150089172A1 (en) * 2012-05-08 2015-03-26 Vmware, Inc. Composing a virtual disk using application delta disk images
CN107273146A (zh) * 2016-04-08 2017-10-20 中兴通讯股份有限公司 虚拟机升级方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8209680B1 (en) * 2003-04-11 2012-06-26 Vmware, Inc. System and method for disk imaging on diverse computers
CN102197374B (zh) * 2008-10-24 2014-04-02 思杰系统有限公司 用于在组合的计算环境中给可修改的机器基本映像提供个性化桌面环境的方法和系统
CN102193807B (zh) * 2010-03-19 2015-04-29 联想(北京)有限公司 一种镜像文件升级的方法、服务器及计算机网络系统
US9176744B2 (en) * 2011-05-20 2015-11-03 Citrix Systems, Inc. Quickly provisioning a virtual machine by identifying a path to a differential file during pre-boot

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102037444A (zh) * 2008-05-20 2011-04-27 思杰系统有限公司 用于修补从通用基础磁盘映像获取的多个磁盘映像的方法和系统
US20150089172A1 (en) * 2012-05-08 2015-03-26 Vmware, Inc. Composing a virtual disk using application delta disk images
CN103019802A (zh) * 2012-11-20 2013-04-03 中标软件有限公司 一种虚拟机管理方法及平台
CN107273146A (zh) * 2016-04-08 2017-10-20 中兴通讯股份有限公司 虚拟机升级方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113900716A (zh) * 2021-09-29 2022-01-07 武汉噢易云计算股份有限公司 桌面启动的管理方法及装置
CN113900716B (zh) * 2021-09-29 2023-05-30 武汉噢易云计算股份有限公司 桌面启动的管理方法及装置
CN114679442A (zh) * 2022-02-28 2022-06-28 阿里巴巴(中国)有限公司 基于云桌面的用户数据同步方法、装置、设备及存储介质

Also Published As

Publication number Publication date
EP3885903A4 (en) 2022-01-26
EP3885903A1 (en) 2021-09-29
CN111221537A (zh) 2020-06-02

Similar Documents

Publication Publication Date Title
WO2020103904A1 (zh) 云桌面升级方法、装置、云端服务器及存储介质
AU2007248886B2 (en) Converting machines to virtual machines
US20200310915A1 (en) Orchestration of Heterogeneous Multi-Role Applications
US20080028402A1 (en) Method of setting operation environment and computer system
US20120144391A1 (en) Provisioning a virtual machine
WO2019119850A1 (zh) 一种部署应用软件的方法、装置及虚拟机
CN106775946B (zh) 一种虚拟机快速创建方法
JP2012078893A (ja) 計算機システム、及び管理計算機
CN110806911B (zh) 一种云桌面管控方法、装置及系统
US11029932B2 (en) Hydration of applications
WO2022095366A1 (zh) 基于Redis的数据读取方法、装置、设备及可读存储介质
CN112363820A (zh) 基于异构硬件的统一资源池化容器调度引擎及其调度方法
CN111367472A (zh) 虚拟化方法和装置
CN107861761B (zh) 一种物理主机的启动方法及系统
WO2016070641A1 (zh) 数据的保存方法、装置及读取方法、装置
AU2012200600B2 (en) "Converting machines to virtual machines"
WO2021254280A1 (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: 19886325

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019886325

Country of ref document: EP

Effective date: 20210621