WO2019119850A1 - Application software deployment method and device, and virtual machine - Google Patents

Application software deployment method and device, and virtual machine Download PDF

Info

Publication number
WO2019119850A1
WO2019119850A1 PCT/CN2018/102285 CN2018102285W WO2019119850A1 WO 2019119850 A1 WO2019119850 A1 WO 2019119850A1 CN 2018102285 W CN2018102285 W CN 2018102285W WO 2019119850 A1 WO2019119850 A1 WO 2019119850A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
application
registry
path
target disk
Prior art date
Application number
PCT/CN2018/102285
Other languages
French (fr)
Chinese (zh)
Inventor
于涛
秦延涛
侯春华
陆剑峰
吴小明
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2019119850A1 publication Critical patent/WO2019119850A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • 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/45562Creating, deleting, cloning virtual machine instances

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a virtual machine for deploying application software.
  • VDI Virtual Desktop Infrastructure
  • a single server can support many virtual desktops and deliver the desktop operating system to end users through various protocols.
  • APP Application
  • an administrator embeds necessary software in the template when creating an operating system template.
  • the virtual machine user installs the necessary software while installing the operating system template.
  • this method binds the application to the operating system, and after the operating system template is distributed to each virtual machine, it is very inconvenient for each user to maintain the upgrade application by himself.
  • the invention provides a method, a device and a virtual machine for deploying application software, which are used for streamlining an application deployment process and improving deployment efficiency.
  • the embodiment of the invention provides a method for deploying application software, including:
  • the target disk hosting the application installation file and the registry operation record is mounted in a read-only mode, and the access operation of the application is intercepted and redirected by the file system filtering driver.
  • the embodiment of the invention further provides an apparatus for deploying application software, including:
  • the disk package template creation module is configured to mount the target disk in a read-write manner, and the file system filter driver intercepts the file operation and the registry operation, and redirects the actual installation path of the application to the partition of the target disk, and Saving the registry operation record of the application by using a registry file created on the target disk;
  • the disk package template uses a module that is configured to mount a target disk that hosts the application installation files and registry operation records in a read-only manner, and intercepts and redirects access operations to the application through the file system filter driver.
  • the embodiment of the invention further provides a virtual machine, including:
  • a memory a processor
  • a program for deploying application software stored on the processor and operable on the processor, the step of implementing the method of deploying the application software when the program deploying the application software is executed by the processor .
  • the embodiment of the present invention further provides a computer readable storage medium, wherein the computer readable storage medium stores a program for deploying application software, where the program for deploying the application software is executed by the processor to implement the deployment application software.
  • the steps of the method are not limited to:
  • the embodiment of the present invention provides a method, an apparatus, and a virtual machine for deploying application software, and a disk package template is generated by uniformly installing (updating) all applications on an independent disk, and the virtual machine is read-only.
  • Mount the target disk (the independent disk where the disk package template is located) that carries the application installation file and the registry operation record.
  • the file system filter driver intercepts the access operation of the application and performs redirection processing.
  • the application does not actually need to be one by one. Installed on a virtual machine, it only shows through redirection that it has been installed, so it can achieve a second-level deployment installation, which can streamline the application deployment process and improve deployment efficiency.
  • FIG. 1 is a flowchart of a method for deploying application software according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic diagram of an apparatus for deploying application software according to Embodiment 2 of the present invention.
  • Example 3 is a schematic diagram of a virtual desktop infrastructure in Example 1 of the present invention.
  • an embodiment of the present invention provides a method for deploying application software, including:
  • Step S110 mounting the target disk in a read-write manner, and intercepting the file operation and the registry operation by the file system filtering driver, redirecting the actual installation path of the application to the partition of the target disk, and passing the target disk
  • the registry file created on the saves the registry operation record of the application
  • step S120 the target disk carrying the application installation file and the registry operation record is mounted in a read-only mode, and the access operation of the application is intercepted and redirected by the file system filtering driver.
  • the method also includes the following features:
  • the target disk when the target disk is mounted in a read-write manner, the target disk is allocated to the virtual machine for use alone; when the target disk carrying the application installation file and the registry operation record is mounted in a read-only manner, The target disk is allocated to one or more virtual machines for common use;
  • the target disk is a mobile hard disk
  • the method further includes:
  • the auxiliary tool sends a notification message to the file system filter driver, triggering the file system filter driver to exit the disk package template creation mode and enter the idle mode;
  • the method further includes:
  • the application installation information is collected by the auxiliary tool, and the application installation information is saved in the configuration file created on the target disk;
  • the method further includes:
  • the file system filtering driver intercepts an access operation to the application and performs a redirection process, including:
  • the file system filter driver intercepts the registry operation, the operation is redirected to the registry record in the registry backup file created in the system cache;
  • the file system filtering driver intercepts an access operation to the application and performs a redirection process, including:
  • the file system filtering driver intercepts an access operation to the application and performs a redirection process, including:
  • the file system filter driver intercepts the read operation of the file generated by the application during the installation process, if a corresponding file exists in the system cache, the corresponding file in the system cache is read, if the system caches If the corresponding file does not exist, the corresponding file on the target disk is read;
  • an embodiment of the present invention provides an apparatus for deploying application software, including:
  • the disk package template creation module 201 is configured to mount the target disk in a read-write manner, and the file system filtering driver intercepts the file operation and the registry operation, and redirects the actual installation path of the application to the partition of the target disk. And saving the registry operation record of the application by using a registry file created on the target disk;
  • the disk package template uses module 202, which is configured to mount the target disk carrying the application installation file and the registry operation record in a read-only manner, and intercept the access operation to the application through the file system filtering driver and perform redirection processing.
  • the disk package template uses a module that is configured to intercept and redirect access to the application through the file system filtering driver in the following manner:
  • the file system filter driver intercepts the registry operation, the operation is redirected to the registry record in the registry backup file created in the system cache.
  • the disk package template uses a module that is configured to intercept and redirect access to the application through the file system filtering driver in the following manner:
  • the disk package template uses a module that is configured to intercept and redirect access to the application through the file system filtering driver in the following manner:
  • the file system filter driver intercepts the read operation of the file generated by the application during the installation process, if a corresponding file exists in the system cache, the corresponding file in the system cache is read, if the system caches If the corresponding file does not exist, a read operation is performed on the corresponding file on the target disk.
  • the target disk when the target disk is mounted in a read-write manner, the target disk is allocated to the virtual machine for use alone; when the target disk carrying the application installation file and the registry operation record is mounted in a read-only manner, The target disk is allocated for use by one or more virtual machines.
  • the embodiment of the invention provides a virtual machine, including:
  • An embodiment of the present invention provides a computer readable storage medium, where the program for deploying application software is stored on a computer readable storage medium, and the program for deploying the application software is executed by the processor to implement the method described in Embodiment 1 above. Steps to deploy the application's approach.
  • the example provides a virtual desktop infrastructure VDI system, which includes at least a virtual machine resource pool and a virtual desktop management platform.
  • the virtual machine resource pool is a logical entity composed of multiple physical machines in the data center.
  • the virtual machine operating system template is an operating system that can be directly started and run on virtual hardware (no need to install), such as windowsXP, windows7, and so on.
  • virtual hardware no need to install
  • One of the advantages of VDI is the rapid allocation of new virtual machines based on operating system templates.
  • the operating system template here is based on the operating system installed by the virtual hardware and is saved in the file on the physical machine.
  • the new virtual machine gets a template-based copy of the operating system that can be started directly.
  • the file system filter driver is pre-installed in the operating system template.
  • the file system filter driver runs in the background of the operating system after being installed in the operating system (windows operating system) template, and executes different processing logic through three modes (idle mode, production mode, and operation mode). In idle mode, the file filter driver neither intercepts file system calls nor modifies the received path. In production mode, the template machine's file filter driver is used to make disk package templates. For example, intercept messages and registry messages sent to the file system layer. During the installation of the application, the files with the original path in the first path (the default installation path of the application) are automatically redirected to the second path (the application installation path of the partition where the disk package template is located).
  • the record in the original path in the third path (the default registry save path) is automatically redirected to the fourth path (the registry save path of the partition where the disk package template is located).
  • the user machine mounts the disk package template in read-only mode.
  • the priority of the file read/write or registry record read/write path is as follows: the path of the system cache is higher than the path of the partition where the disk package template is located. Priority, the path of the partition where the disk package template is located has a higher priority than the application's default installation path (or default registry save path).
  • the disk package template is used to store new files, modify files, new registry records, and registry record modification information involved in the application installation process (installed by the administrator on the production machine). After the disk package template is created, the assignment is assigned to the virtual machine. Unlike the operating system template, no copy is generated, but multiple virtual machines are mounted in a read-only manner.
  • System cache when the user machine mounts the disk package template in read-only mode, when the data in the disk package template needs to be modified, the file system filter driver copies a copy of the data into the system cache, and then Then perform read and write operations.
  • the virtual desktop management platform includes a virtual desktop management center and a virtual desktop background control entity.
  • the virtual desktop management center provides a human-computer interaction management page, including viewing, creating, assigning, modifying, and updating operations.
  • the virtual desktop management center controls the virtual desktop background control entity to create a new independent disk, and then assigns the independent disk to a virtual machine.
  • the virtual machine role is changed to the production machine and then enters the operating system.
  • Package production is
  • This example provides a method for creating a disk package template. Assume that APP1 and APP2 are installed on a disk package template. The template machine performs the following processing:
  • Step S101 Install a virtual machine operating system template on a virtual machine that creates a disk package template and start it.
  • the operating system template includes a file system filtering driver.
  • the operating system template further includes an auxiliary tool, wherein the auxiliary tool is configured to communicate with the file system filter driver, and set a mode of the file filter driver (idle mode, production mode, and operation mode)
  • Step S102 performing partition formatting on the mounted disk.
  • NTFS New Technology File System
  • step S103 the auxiliary tool runs to create a root directory FILE (F: ⁇ FILE) on the mounted disk partition (for example, F:), and the root directory is used to redirect the application's default installation directory (for example, C: ⁇ ).
  • F: ⁇ FILE root directory
  • the root directory is used to redirect the application's default installation directory (for example, C: ⁇ ).
  • Create a registry file for example, reg
  • create a configuration file for example, vpack.ini).
  • the configuration file vpack.ini may contain information describing each application in the disk package template, such as a version number, a GUID (Globally Unique Identifier).
  • the auxiliary tool sends a control message to the file system filter driver, triggering the file system filter driver to enter a production mode, in which the file system filter driver intercepts all the default installation directory (C: ⁇ ) in the application. File system call.
  • step S104 two applications APP1 and APP2 are installed.
  • the functions, file operations, and registry operations executed by the installer are intercepted by the file system filter driver. After interception, the query merges the directory operation and the target path is modified to be redirected.
  • the installer (app1_install) initiates a read-only query to the underlying path, path c: ⁇ program files ⁇ app1;
  • the file system filter driver performs 2 query actions.
  • the first path is c: ⁇ program files ⁇ app1
  • the second path is F: ⁇ FILE ⁇ program files ⁇ app1. At this point, neither path exists and immediately returns a failure.
  • the installer (app1_install) initiates the create directory operation of the write mode, and the creation path is c: ⁇ program files ⁇ app1.
  • the file system filter driver still performs 2 queries after receiving it.
  • the first path is c: ⁇ program files ⁇ app1
  • the second path is F: ⁇ FILE ⁇ program files ⁇ app1.
  • it is a write mode operation.
  • the file system filter driver first creates the directory F: ⁇ FILE ⁇ program files, and then changes the execution path to the second path F: ⁇ FILE ⁇ program files ⁇ app1.
  • the actual creation work is handed to the lower layer of the file system. After the lower layer is created, the handle is returned, and the redirection is completed. After returning, app1_install receives the redirected second path handle.
  • the installer app1_install initiates the create file operation, and the file to be created is c: ⁇ program files ⁇ app1 ⁇ file1.
  • the installer app1_install queries the path c: ⁇ program files ⁇ app1.
  • the file system filter driver receives 2 queries after receiving it.
  • the first path is c: ⁇ program files ⁇ app1
  • the second path is F: ⁇ FILE ⁇ program files ⁇ app1.
  • F: ⁇ FILE ⁇ program files ⁇ app1 exists, and the second path F: ⁇ FILE ⁇ program files ⁇ app1 is preferred.
  • the file system filter driver then executes the path modification F: ⁇ FILE ⁇ program files ⁇ app1 ⁇ file1, and the actual work is given to the lower layer of the file system for execution. After the lower layer execution returns, app1_install receives the redirected second path handle. The redirection creation file is completed.
  • the installer app1_install initiates enumeration of the specified directory file operation, and the specified directory is c: ⁇ program files.
  • the installer app1_install opens the directory c: ⁇ program files.
  • the file system filter driver sequentially queries the first path c: ⁇ program files, and the second path F: ⁇ FILE ⁇ program files. Since the second path already exists, according to the priority principle, the path is modified to the second path F: ⁇ FILE ⁇ program files, and the lower layer of the file system returns the second path handle, and the redirection is completed.
  • Next app1_install initiates the enumeration directory file.
  • the file system filter driver receives the path to the handle path F: ⁇ FILE ⁇ program files that was just opened. At this point, the enumeration directory operation is performed twice.
  • the app1_install program gets a list of merged files.
  • the registry file (F: ⁇ reg) on the partition where the disk package template is located is mounted by the file system filter driver to the system registry path HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK.
  • HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK corresponds to the default root path of the registry (C: ⁇ ).
  • the installer (for example, app1_install) initiates a read-only query with the path HCU ⁇ Software.
  • the file system filter driver performs 2 query actions.
  • the first path is HCU ⁇ Software
  • the second path is HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK ⁇ HCU ⁇ Software. At this point, neither path exists and immediately returns a failure.
  • the installer (for example, app1_install) initiates the creation of the write mode. Create a path of HCU ⁇ Software ⁇ app1.
  • the file system filter driver still performs 2 queries after receiving it.
  • the second path is HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK ⁇ HCU ⁇ Software ⁇ app1;
  • the installer app1_install initiates the creation of a key value and operates on HCU ⁇ Software ⁇ app1 ⁇ key1.
  • HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK ⁇ HCU ⁇ Software ⁇ app1 exists.
  • the path HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK ⁇ HCU ⁇ Software ⁇ app1 is preferred.
  • app1_install receives the redirected path handle. The redirection is created.
  • the installer app1_install initiates the enumeration of the specified path sub-record operation.
  • the second path is HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK ⁇ HCU ⁇ Software ⁇ ;
  • the path is modified to the second path HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK ⁇ HCU ⁇ Software, and the lower layer of the file system returns the second path handle, and the redirection is completed.
  • Next app1_install initiates an enumeration child record.
  • the file system filter driver receives the path to the handle path that was just opened.
  • the installer app1_install got the merged list.
  • step S105 after all the applications are installed, the auxiliary tool runs, and the auxiliary operations after the installation is completed are performed.
  • the auxiliary tool sends a message to the file system filter driver to notify the application that the installation is completed, the file system filter driver detaches the node previously mounted on the registry branch, and the registry modification content is written to the disk partition where the disk package template is located. In the table file (F: ⁇ reg), then the file system filter driver enters the idle state.
  • the auxiliary tool can also clean up unnecessary files (such as temporary files) in the disk partition where the disk package template is located, scan the registry file (F: ⁇ reg) to get the path of the installed application, extract the icon of the application, version number, Vendor information, etc., is reported to the virtual desktop management platform for storage. At this point, the disk package template is created. The template machine can unmount the disk where the disk package template is located.
  • unnecessary files such as temporary files
  • This example provides a method for using a disk package template. Assume that the application package APP1 and APP2 are installed on the disk package template. The user machine uses an application (for example, APP1) by mounting the disk where the disk package template is located. The user machine performs the following processing:
  • Step S101 identifying a disk package template
  • the disk package template mount message is intercepted by the file system filter driver, scans the partition volume, and looks for configuration files (for example, vpack.ini), FILE folder, and registry files (for example, reg). By analyzing the contents of the configuration file, the contents of the registry file determine whether it is a disk package template. If it is a disk package template, the file system filter driver triggers into run mode.
  • configuration files for example, vpack.ini
  • FILE folder for example, FILE folder
  • registry files for example, reg
  • Step S102 the file content of the registry file (F: ⁇ reg) is merged into the system cache registry file (for example, G: ⁇ REG) in a read-only manner, and an empty file is created if there is no such file in the system cache. . If the system cache registry file has been merged according to a version number and GUID match, then this step is ignored.
  • the merge record is also recorded in the system cache registry file (G: ⁇ REG). Then mount the system cache registry file (G: ⁇ REG) to the system registry HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK ⁇ path. Then start intercepting file system messages and registry messages.
  • the windows desktop program explorer.exe initiates an enumeration directory query.
  • Directory path C ⁇ ProgramData ⁇ Microsoft ⁇ Windows ⁇ Start Menu ⁇ Programs.
  • the file system filter driver performs 3 query actions.
  • G: ⁇ FILE ⁇ ProgramData ⁇ Microsoft ⁇ Windows ⁇ Start Menu ⁇ Programs returns null;
  • G: ⁇ FILE ⁇ is the system cache path;
  • the explorer.exe program gets a list of merged files. Users can find out more app1 and app2 program menus.
  • the windows desktop program explorer.exe initiates a read-only mode to open the app1.exe file flow.
  • the file system filter driver performs 3 query actions.
  • the first path is C: ⁇ Program files ⁇ app1.
  • the second path is F: ⁇ FILE ⁇ Program files ⁇ app1.
  • the third path G: ⁇ FILE ⁇ Program files ⁇ app1;
  • the second path already exists, and the path is used preferentially.
  • the file system filter driver modifies the path to this path.
  • the actual work is performed by the lower layer of the file system, and the path handle is returned after the lower layer is executed.
  • Explorer.exe gets the redirected handle and starts the subsequent operations.
  • the file system filter driver performs 3 query actions.
  • the first path is C: ⁇ Program files ⁇ app1 ⁇ file1. The return failure does not exist.
  • the second path is F: ⁇ FILE ⁇ Program files ⁇ app1 ⁇ file1. The return succeeds.
  • the third path is G: ⁇ FILE ⁇ Program files ⁇ app1 ⁇ file1. The return failure does not exist.
  • the second path already exists, but since it is a modification action, it cannot be directly modified.
  • Modify the path to this path the actual work is performed by the lower layer of the file system, and the path handle is returned after the lower layer is executed.
  • App1.exe gets the redirected handle and starts the subsequent write operation.
  • the file system filter driver performs 3 query actions.
  • the first path is C: ⁇ Program files ⁇ app1 ⁇ file1. The return failure does not exist.
  • the second path is F: ⁇ FILE ⁇ Program files ⁇ app1 ⁇ file1. The return succeeds.
  • the third path is G: ⁇ FILE ⁇ Program files ⁇ app1 ⁇ file1. The return succeeds.
  • Delete one that belongs to the modification operation Since the third path exists, the modified path is the third path, but since it is a delete operation. And the second path disk package path exists. Special handling is required. Mark this file with a delete. For example, modify the creation time of the third path file to a certain second of a specific date. Return immediately to the success without letting the underlying file system actually delete. After the file is encountered after this special date, it takes over the operation of the lower layer system and judges that it has been deleted and returns a failure.
  • the application (for example, app1) initiates a read-only query with the path HCU ⁇ Software.
  • the file system filter driver performs 2 query actions.
  • the second path exists, and is a read-only mode.
  • the modified path is the second path.
  • the actual work is completed by the lower layer system, and the second path handle is obtained after the return, and the redirection is completed. App1 gets the second path handle.
  • the file system filter driver performs 2 query actions.
  • the first path HCU ⁇ Software ⁇ app1 ⁇ key1 return failure does not exist
  • the second path exists, although it is a write operation, but since the system used caches the registry file, it can be modified directly.
  • the modified path is the second path, and the actual work is completed by the lower layer system. After returning, the second path handle is obtained, and the redirection is completed. App1 gets the second path handle.
  • app1 initiates the creation of a key value and operates on HCU ⁇ Software ⁇ app1 ⁇ key1.
  • the file system filter driver will perform 2 query actions.
  • the second path exists, the second path is preferentially selected, and the path is modified to be HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK ⁇ HCU ⁇ Software ⁇ app1 ⁇ key1 in the second path, and the actual creation work is performed to the lower layer of the system for execution. After the lower layer performs the return, what app1 receives is the redirected path handle. The redirection is created.
  • App1 opens the registry key HCU ⁇ Software ⁇ .
  • the path is modified to the second path according to the priority principle.
  • the lower layer of the system returns the second path handle, and the redirection is completed.
  • the file system filter driver receives the path to the second path that was just opened. At this point, the enumeration operation is performed twice.
  • the app1 program gets a merged list.
  • app1 deletes the specified path sub-record operation.
  • App1 opens the registry key HCU ⁇ Software ⁇ .
  • the path is modified to the second path according to the priority principle.
  • the lower layer of the system returns the second path handle, and the redirection is completed.
  • the system then performs subsequent delete operations.
  • the system cache registry file you can delete it directly.
  • This example provides an update method for a disk package template.
  • the administrator wants to update the disk package template including APP1 and APP2 on the template machine.
  • the update involves: upgrading APP1, deleting APP2, and adding APP3.
  • Step S101 assigning a disk package template to a virtual machine. This disk is automatically mounted by the operating system after the virtual machine is powered on. Suppose this drive letter is F:.
  • Step S102 installing a file system filter driver on the virtual machine that creates the disk package template. Install the accessibility tools. At this point, the file system filter driver works in idle mode, neither intercepting file system calls nor modifying the received path. If the file system filter driver has been installed on this machine, it will automatically trigger into the usage mode.
  • step S103 the auxiliary tool runs.
  • the directory FILE, the registry file reg, and the configuration file vpack.ini already exist. Accessibility tools are no longer created.
  • the auxiliary tool sends a control message to the file system filter driver, triggering the entry into production mode. At this point, all file system calls on C: are intercepted.
  • step S104 the installer starts to update app1, deletes app2, and installs app3.
  • the functions, file operations, and registry operations executed by the installer during the installation process are intercepted by the file system filter driver, query the merge directory operation, and modify the target path to reach the redirect.
  • App1's installer app1_install initiates a modification file (c: ⁇ program files ⁇ app1 ⁇ file1) operation.
  • App1_install queries the path c: ⁇ program files ⁇ app1 ⁇ file1.
  • the file system filter driver receives 2 queries after receiving it.
  • the first path is c: ⁇ program files ⁇ app1
  • the second path is F: ⁇ FILE ⁇ program files ⁇ app1.
  • F: ⁇ FILE ⁇ program files ⁇ app1 exists, and the second path F: ⁇ FILE ⁇ program files ⁇ app1 is preferred.
  • the file system filter driver then executes the path modification F: ⁇ FILE ⁇ program files ⁇ app1 ⁇ file1, and the actual work is given to the lower layer of the file system for execution.
  • app1_install receives the redirected second path handle. The redirect file is complete. Subsequent modification writes are also done on this path file.
  • App2's installer app2_install initiates the delete file (c: ⁇ program files ⁇ app2 ⁇ file1) operation.
  • App2_install queries the path c: ⁇ program files ⁇ app2 ⁇ file1.
  • the file system filter driver receives 2 queries after receiving it.
  • the first path is c: ⁇ program files ⁇ app2, and the second path is F: ⁇ FILE ⁇ program files ⁇ app2. At this time, it is a write mode operation. And the second path exists, and the second path is preferentially selected.
  • the file system filter driver then changes the execution path to F: ⁇ FILE ⁇ program files ⁇ app2 ⁇ file1, and the actual work is given to the lower layer of the file system for execution.
  • app2_install receives the redirected second path handle. The redirect file is complete. Subsequent deletions are also done on this path file.
  • App3's installer app3_install initiates the create file (c: ⁇ program files ⁇ app3 ⁇ file1) operation.
  • App3_install queries the path c: ⁇ program files ⁇ app3.
  • the file system filter driver receives 2 queries after receiving it.
  • the first path is c: ⁇ program files ⁇ app3, and the second path is F: ⁇ FILE ⁇ program files ⁇ app3. At this time, it is a write mode operation. And the second path exists, and the second path is preferentially selected.
  • the file system filter driver then changes the execution path to F: ⁇ FILE ⁇ program files ⁇ app3 ⁇ file1, and the actual work is given to the lower layer of the file system for execution. After the lower layer execution returns, app3_install receives the redirected second path handle. The redirect file is complete.
  • Step S104 after all the application installations are updated, the auxiliary tool runs, and the auxiliary operation after the update is completed is performed.
  • the accessibility tool sends a message to the file system filter driver.
  • the file system filter driver detaches the node previously mounted on the registry branch.
  • the registry modification content is written to the F: ⁇ reg file, and then the file system filter driver enters the idle state.
  • Subsequent operations are performed by the auxiliary tools and are processed in the disk partition F: to clean up useless files, scan the registry file reg to get the path of the installed application, extract the application's icon, version number, and vendor information. Reported to the virtual desktop management platform storage.
  • the disk package template update is complete.
  • the template machine can unmount this disk.
  • This example provides the creation and use of a disk package on a physical mobile disk that is off the VDI system.
  • the operating system automatically mounts the hard disk, and the user formats the mounted disk (for example, NTFS, assuming that the drive letter is F:).
  • the auxiliary tool runs. Create an empty directory FILE on this partition. This directory corresponds to the C: ⁇ root directory. Create an empty registry file reg to record the modified key value of the registry record during the installation process. Create a configuration file vpack.ini that contains information describing the package, such as the version number and the guid unique identification value.
  • the auxiliary tool sends a control message to the file system filter driver, triggering into the production mode, and the file system filter driver intercepts all file system calls on C: in production mode.
  • the accessibility tool sends a message informing the file system that the filter driver is entering idle mode.
  • the auxiliary tool scans the F: unused files in the disc. The disk package is created.
  • the file system filter driver intercepts the volume mount message, scans the partition volume, and finds the configuration file (vpack.ini), FILE folder, and registry file (reg). Determine whether it is a disk package by analyzing the contents of the configuration file and the contents of the registry file. If it is a disk package, the file system filter driver triggers into the run mode.
  • the file system filter driver merges the contents of the registry file (F: ⁇ reg) on the mobile hard disk into the system cache registry file (C: ⁇ VPACK ⁇ REG) in read-only mode, if there is no such file in the system cache. Then create an empty file. If the system cache registry file has been merged according to a version number and guid match, the merge record is also recorded in the system cache registry file. Then mount the system cache registry file to the system registry path (HLM ⁇ SYSTEM ⁇ Setup ⁇ VPACK ⁇ ). Then start intercepting file system messages and registry messages.
  • the auxiliary tool runs, at this time the directory FILE, the registry file reg, the configuration file vpack.ini already exists. Accessibility tools are no longer created. Execute the setting mode to the production mode, send a control message to the file system filter driver, trigger into the production mode, and intercept all file system calls on C: in production mode.
  • the accessibility tool sends a message informing the file system that the filter driver is entering idle mode.
  • the auxiliary tool scans the F: unused files in the disc.
  • the disk package update is complete.

Landscapes

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

Abstract

An application software deployment method and device, and a virtual machine. The application software deployment method comprises: mounting a target disk in a read-write manner, intercepting a file operation and a registry operation by means of a file system filter driver, redirecting an actual installation path of an application to a partition of the target disk, and saving a registry operation record of the application by means of a registry file created on the target disk (S110); and mounting, in a read-only manner, the target disk carrying an application installation file and the registry operation record, and intercepting an access operation on the application by means of the file system filter driver and carrying out redirection processing (S120). The application deployment process can be simplified and the deployment efficiency is improved.

Description

一种部署应用软件的方法、装置及虚拟机Method, device and virtual machine for deploying application software 技术领域Technical field
本发明涉及计算机技术领域,尤其涉及的是一种部署应用软件的方法、装置及虚拟机。The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a virtual machine for deploying application software.
背景技术Background technique
虚拟桌面基础架构(Virtual Desktop Infrastructure,简称VDI)目前已经得到广泛的应用。VDI不是给每个用户都配置一台运行Windows操作系统的桌面PC,而是为每个用户创建一个Windows桌面映像,不同的用户使用统一的Windows桌面映像可以获得统一的体验。通过网络,可以迅速部署一个通用的桌面环境。一台服务器可以支持许多虚拟桌面,通过各种协议传输提供给最终用户的桌面操作系统。Virtual Desktop Infrastructure (VDI) has been widely used. Instead of configuring a desktop PC running Windows operating system for each user, VDI creates a Windows desktop image for each user. Different users can get a unified experience using a unified Windows desktop image. Through the network, you can quickly deploy a common desktop environment. A single server can support many virtual desktops and deliver the desktop operating system to end users through various protocols.
但是桌面不是目的,最终用户需要的还是桌面上的应用程序(Application,简称APP)。相关技术中,管理员在制作操作系统模板时,在所述模板中嵌入必要软件。虚拟机用户安装操作系统模板的同时完成必要软件的安装。但是,这种方法把应用程序和操作系统绑定,操作系统模板分发给各个虚拟机后,每个用户自己维护升级应用程序,非常不方便。But the desktop is not the purpose, the end user needs the application on the desktop (Application, referred to as APP). In related art, an administrator embeds necessary software in the template when creating an operating system template. The virtual machine user installs the necessary software while installing the operating system template. However, this method binds the application to the operating system, and after the operating system template is distributed to each virtual machine, it is very inconvenient for each user to maintain the upgrade application by himself.
发明内容Summary of the invention
本发明提供了一种部署应用软件的方法、装置及虚拟机,用于精简应用程序部署流程,提高部署效率。The invention provides a method, a device and a virtual machine for deploying application software, which are used for streamlining an application deployment process and improving deployment efficiency.
本发明实施例提供一种部署应用软件的方法,包括:The embodiment of the invention provides a method for deploying application software, including:
以读写方式挂载目标磁盘,通过文件系统过滤驱动拦截文件操作和注册表操作,将应用程序的实际安装路径重定向至所述目标磁盘的分区上,并通过在所述目标磁盘上创建的注册表文件保存所述应用程序的注册表 操作记录;Mounting the target disk in read-write mode, intercepting file operations and registry operations through the file system filter driver, redirecting the actual installation path of the application to the partition of the target disk, and creating on the target disk The registry file saves the registry operation record of the application;
以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘,通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理。The target disk hosting the application installation file and the registry operation record is mounted in a read-only mode, and the access operation of the application is intercepted and redirected by the file system filtering driver.
本发明实施例还提供一种部署应用软件的装置,包括:The embodiment of the invention further provides an apparatus for deploying application software, including:
磁盘软件包模板制作模块,设置为以读写方式挂载目标磁盘,通过文件系统过滤驱动拦截文件操作和注册表操作,将应用程序的实际安装路径重定向至所述目标磁盘的分区上,并通过在所述目标磁盘上创建的注册表文件保存所述应用程序的注册表操作记录;The disk package template creation module is configured to mount the target disk in a read-write manner, and the file system filter driver intercepts the file operation and the registry operation, and redirects the actual installation path of the application to the partition of the target disk, and Saving the registry operation record of the application by using a registry file created on the target disk;
磁盘软件包模板使用模块,设置为以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘,通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理。The disk package template uses a module that is configured to mount a target disk that hosts the application installation files and registry operation records in a read-only manner, and intercepts and redirects access operations to the application through the file system filter driver.
本发明实施例还提供一种虚拟机,包括:The embodiment of the invention further provides a virtual machine, including:
存储器、处理器及存储在所述存储器上并可在所述处理器上运行的部署应用软件的程序,所述部署应用软件的程序被所述处理器执行时实现上述部署应用软件的方法的步骤。a memory, a processor, and a program for deploying application software stored on the processor and operable on the processor, the step of implementing the method of deploying the application software when the program deploying the application software is executed by the processor .
本发明实施例还提供一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有部署应用软件的程序,所述部署应用软件的程序被处理器执行时实现上述部署应用软件的方法的步骤。The embodiment of the present invention further provides a computer readable storage medium, wherein the computer readable storage medium stores a program for deploying application software, where the program for deploying the application software is executed by the processor to implement the deployment application software. The steps of the method.
与相关技术相比,本发明实施例提供一种部署应用软件的方法、装置及虚拟机,通过在一个独立磁盘上统一安装(更新)所有应用程序生成磁盘软件包模板,虚拟机通过只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘(磁盘软件包模板所在的独立磁盘),通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理,应用程序实际并没有逐个在虚拟机上安装,只是通过重定向展现出已经安装,因此可以达到秒级的部署安装,从而精简应用程序部署流程,提高部署效率。Compared with the related art, the embodiment of the present invention provides a method, an apparatus, and a virtual machine for deploying application software, and a disk package template is generated by uniformly installing (updating) all applications on an independent disk, and the virtual machine is read-only. Mount the target disk (the independent disk where the disk package template is located) that carries the application installation file and the registry operation record. The file system filter driver intercepts the access operation of the application and performs redirection processing. The application does not actually need to be one by one. Installed on a virtual machine, it only shows through redirection that it has been installed, so it can achieve a second-level deployment installation, which can streamline the application deployment process and improve deployment efficiency.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1为本发明实施例1的一种部署应用软件的方法流程图;1 is a flowchart of a method for deploying application software according to Embodiment 1 of the present invention;
图2为本发明实施例2的一种部署应用软件的装置示意图;2 is a schematic diagram of an apparatus for deploying application software according to Embodiment 2 of the present invention;
图3为本发明示例1中一种虚拟桌面基础架构的示意图。3 is a schematic diagram of a virtual desktop infrastructure in Example 1 of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
实施例1Example 1
如图1所示,本发明实施例提供了一种部署应用软件的方法,包括:As shown in FIG. 1 , an embodiment of the present invention provides a method for deploying application software, including:
步骤S110,以读写方式挂载目标磁盘,通过文件系统过滤驱动拦截文件操作和注册表操作,将应用程序的实际安装路径重定向至所述目标磁盘的分区上,并通过在所述目标磁盘上创建的注册表文件保存所述应用程序的注册表操作记录;Step S110, mounting the target disk in a read-write manner, and intercepting the file operation and the registry operation by the file system filtering driver, redirecting the actual installation path of the application to the partition of the target disk, and passing the target disk The registry file created on the saves the registry operation record of the application;
步骤S120,以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘,通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理。In step S120, the target disk carrying the application installation file and the registry operation record is mounted in a read-only mode, and the access operation of the application is intercepted and redirected by the file system filtering driver.
所述方法还包括下述特点:The method also includes the following features:
在一种实施方式中,以读写方式挂载目标磁盘时,所述目标磁盘分配给虚拟机单独使用;以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘时,所述目标磁盘分配给一个或多个虚拟机共同使用;In one embodiment, when the target disk is mounted in a read-write manner, the target disk is allocated to the virtual machine for use alone; when the target disk carrying the application installation file and the registry operation record is mounted in a read-only manner, The target disk is allocated to one or more virtual machines for common use;
在一种实施方式中,所述目标磁盘是移动硬盘;In an embodiment, the target disk is a mobile hard disk;
在一种实施方式中,以读写方式挂载目标磁盘后,所述方法还包括:In an embodiment, after the target disk is mounted in a read-write manner, the method further includes:
在安装或更新应用程序前,通过辅助工具向文件系统过滤驱动发送通知消息,触发所述文件系统过滤驱动工作在磁盘软件包模板制作模式下;Sending a notification message to the file system filter driver through the auxiliary tool before installing or updating the application, triggering the file system filter driver to work in the disk package template creation mode;
在所有的应用程序安装或更新完毕后,通过辅助工具向文件系统过滤驱动发送通知消息,触发所述文件系统过滤驱动退出磁盘软件包模板制作模式,进入空闲模式;After all the applications are installed or updated, the auxiliary tool sends a notification message to the file system filter driver, triggering the file system filter driver to exit the disk package template creation mode and enter the idle mode;
在一种实施方式中,所述方法还包括:In an embodiment, the method further includes:
在所有的应用程序安装或更新完毕后,通过辅助工具收集应用程序安装信息,将所述应用程序安装信息保存在所述目标磁盘上创建的配置文件中;After all the applications are installed or updated, the application installation information is collected by the auxiliary tool, and the application installation information is saved in the configuration file created on the target disk;
在一种实施方式中,以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘后,所述方法还包括:In an embodiment, after the target disk carrying the application installation file and the registry operation record is mounted in a read-only manner, the method further includes:
通过辅助工具向文件系统过滤驱动发送通知消息,触发所述文件系统过滤驱动工作在磁盘软件包模板使用模式下;Sending a notification message to the file system filter driver through the auxiliary tool, triggering the file system filter driver to work in the disk package template usage mode;
在一种实施方式中,所述通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理,包括:In an implementation manner, the file system filtering driver intercepts an access operation to the application and performs a redirection process, including:
读取所述目标磁盘的分区上保存的注册表操作记录,拷贝到系统缓存中创建的注册表备份文件中;Reading the registry operation record saved on the partition of the target disk, and copying it to the registry backup file created in the system cache;
通过文件系统过滤驱动拦截到注册表操作时,将所述操作重定向至系统缓存中创建的注册表备份文件中的注册表记录;When the file system filter driver intercepts the registry operation, the operation is redirected to the registry record in the registry backup file created in the system cache;
在一种实施方式中,所述通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理,包括:In an implementation manner, the file system filtering driver intercepts an access operation to the application and performs a redirection process, including:
通过文件系统过滤驱动拦截到对所述应用程序在安装过程中生成的文件进行写操作时,将所述目标磁盘上保存的原始文件拷贝到系统缓存中,将所述写操作重定向至所述系统缓存中的对应文件;When the file system filter driver intercepts to write the file generated by the application during the installation process, copy the original file saved on the target disk to the system cache, and redirect the write operation to the The corresponding file in the system cache;
在一种实施方式中,所述通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理,包括:In an implementation manner, the file system filtering driver intercepts an access operation to the application and performs a redirection process, including:
通过文件系统过滤驱动拦截到对所述应用程序在安装过程中生成的文件进行读操作时,如果系统缓存中存在对应文件,则对所述系统缓存中的对应文件进行读操作,如果系统缓存中不存在所述对应文件,则对所述目标磁盘上的对应文件进行读操作;When the file system filter driver intercepts the read operation of the file generated by the application during the installation process, if a corresponding file exists in the system cache, the corresponding file in the system cache is read, if the system caches If the corresponding file does not exist, the corresponding file on the target disk is read;
实施例2Example 2
如图2所示,本发明实施例提供了一种部署应用软件的装置,包括:As shown in FIG. 2, an embodiment of the present invention provides an apparatus for deploying application software, including:
磁盘软件包模板制作模块201,设置为以读写方式挂载目标磁盘,通过文件系统过滤驱动拦截文件操作和注册表操作,将应用程序的实际安装路径重定向至所述目标磁盘的分区上,并通过在所述目标磁盘上创建的注册表文件保存所述应用程序的注册表操作记录;The disk package template creation module 201 is configured to mount the target disk in a read-write manner, and the file system filtering driver intercepts the file operation and the registry operation, and redirects the actual installation path of the application to the partition of the target disk. And saving the registry operation record of the application by using a registry file created on the target disk;
磁盘软件包模板使用模块202,设置为以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘,通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理。The disk package template uses module 202, which is configured to mount the target disk carrying the application installation file and the registry operation record in a read-only manner, and intercept the access operation to the application through the file system filtering driver and perform redirection processing.
在一种实施方式中,磁盘软件包模板使用模块,设置为采用以下方式通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理:In one embodiment, the disk package template uses a module that is configured to intercept and redirect access to the application through the file system filtering driver in the following manner:
读取所述目标磁盘的分区上保存的注册表操作记录,拷贝到系统缓存中创建的注册表备份文件中;Reading the registry operation record saved on the partition of the target disk, and copying it to the registry backup file created in the system cache;
通过文件系统过滤驱动拦截到注册表操作时,将所述操作重定向至系统缓存中创建的注册表备份文件中的注册表记录。When the file system filter driver intercepts the registry operation, the operation is redirected to the registry record in the registry backup file created in the system cache.
在一种实施方式中,磁盘软件包模板使用模块,设置为采用以下方式通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理:In one embodiment, the disk package template uses a module that is configured to intercept and redirect access to the application through the file system filtering driver in the following manner:
通过文件系统过滤驱动拦截到对所述应用程序在安装过程中生成的文件进行写操作时,将所述目标磁盘上保存的原始文件拷贝到系统缓存中, 将所述写操作重定向至所述系统缓存中的对应文件。When the file system filter driver intercepts to write the file generated by the application during the installation process, copy the original file saved on the target disk to the system cache, and redirect the write operation to the The corresponding file in the system cache.
在一种实施方式中,磁盘软件包模板使用模块,设置为采用以下方式通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理:In one embodiment, the disk package template uses a module that is configured to intercept and redirect access to the application through the file system filtering driver in the following manner:
通过文件系统过滤驱动拦截到对所述应用程序在安装过程中生成的文件进行读操作时,如果系统缓存中存在对应文件,则对所述系统缓存中的对应文件进行读操作,如果系统缓存中不存在所述对应文件,则对所述目标磁盘上的对应文件进行读操作。When the file system filter driver intercepts the read operation of the file generated by the application during the installation process, if a corresponding file exists in the system cache, the corresponding file in the system cache is read, if the system caches If the corresponding file does not exist, a read operation is performed on the corresponding file on the target disk.
在一种实施方式中,以读写方式挂载目标磁盘时,所述目标磁盘分配给虚拟机单独使用;以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘时,所述目标磁盘分配给一个或多个虚拟机共同使用。In one embodiment, when the target disk is mounted in a read-write manner, the target disk is allocated to the virtual machine for use alone; when the target disk carrying the application installation file and the registry operation record is mounted in a read-only manner, The target disk is allocated for use by one or more virtual machines.
实施例3Example 3
本发明实施例提供了一种虚拟机,包括:The embodiment of the invention provides a virtual machine, including:
存储器、处理器及存储在所述存储器上并可在所述处理器上运行的部署应用软件的程序,所述部署应用软件的程序被所述处理器执行时实现上述实施例1中所述的部署应用软件的方法的步骤。a memory, a processor, and a program for deploying application software stored on the memory and operable on the processor, the program deploying the application software being executed by the processor to implement the method described in Embodiment 1 above Steps to deploy the application's approach.
实施例4Example 4
本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质上存储有部署应用软件的程序,所述部署应用软件的程序被处理器执行时实现上述实施例1中所述的部署应用软件的方法的步骤。An embodiment of the present invention provides a computer readable storage medium, where the program for deploying application software is stored on a computer readable storage medium, and the program for deploying the application software is executed by the processor to implement the method described in Embodiment 1 above. Steps to deploy the application's approach.
下面通过多个示例说明本申请的部署应用软件的方法。The method of deploying application software of the present application is illustrated by a plurality of examples below.
示例1Example 1
如图3所示,本示例提供一种虚拟桌面基础架构VDI系统,至少包括 虚拟机资源池和虚拟桌面管理平台。As shown in FIG. 3, the example provides a virtual desktop infrastructure VDI system, which includes at least a virtual machine resource pool and a virtual desktop management platform.
其中,所述虚拟机资源池是数据中心多台物理机器组成的逻辑实体。在每台物理机上运行虚拟化层应用Hypervisor,Hypervisor是一种运行在物理服务器和操作系统之间的中间软件层,可允许多个操作系统和应用共享一套基础物理硬件,通过Hypervisor虚拟化硬件,产生多个CPU(Central Processing Unit,中央处理器),GPU(Graphics Processing Unit,图形处理器),磁盘,总线等等。The virtual machine resource pool is a logical entity composed of multiple physical machines in the data center. Running the virtualization layer application hypervisor on each physical machine, the hypervisor is an intermediate software layer running between the physical server and the operating system, allowing multiple operating systems and applications to share a set of basic physical hardware, virtualizing hardware through Hypervisor , generating multiple CPUs (Central Processing Units), GPUs (Graphics Processing Units), disks, buses, and the like.
虚拟机操作系统模板,是可以在虚拟硬件上直接启动、运行的操作系统(无需安装),比如windowsXP,windows7等等。VDI的一个优势是基于操作系统模板,快速分配创建新的虚拟机。这里的操作系统模板是基于虚拟硬件安装好的操作系统,并且在物理机上保存于文件中。创建新虚拟机时,通过指定分配模板,新的虚拟机就得到了一个基于模板的副本,此副本中含有可以直接启动的操作系统。本示例中,在操作系统模板中预先安装文件系统过滤驱动。文件系统过滤驱动在操作系统(windows操作系统)模板中安装好以后一直在操作系统后台运行,通过3个模式(空闲模式、制作模式、运行模式)执行不同的处理逻辑。在空闲模式下,文件过滤驱动既不拦截文件系统调用,也不修改接收到的路径。制作模式下,模板机的文件过滤驱动用于制作磁盘软件包模板。比如,拦截发送到文件系统层的消息、注册表消息。安装应用程序过程中,原本路径在第一路径(应用程序默认安装路径)下的文件,自动重定向到第二路径(磁盘软件包模板所在分区的应用程序安装路径)。原本路径在第三路径(默认的注册表保存路径)下的记录,自动重定向到第四路径(磁盘软件包模板所在分区的注册表保存路径)。运行模式下,用户机以只读方式挂载磁盘软件包模板,文件读写或注册表记录读写路径的优先级如下:系统缓存的路径的优先级高于磁盘软件包模板所在分区的路径的优先级,磁盘软件包模板所在分区的路径的优先级高于应用程序的默认安装路径(或默认的注册表保存路径)的优先级。The virtual machine operating system template is an operating system that can be directly started and run on virtual hardware (no need to install), such as windowsXP, windows7, and so on. One of the advantages of VDI is the rapid allocation of new virtual machines based on operating system templates. The operating system template here is based on the operating system installed by the virtual hardware and is saved in the file on the physical machine. When you create a new virtual machine, by specifying an allocation template, the new virtual machine gets a template-based copy of the operating system that can be started directly. In this example, the file system filter driver is pre-installed in the operating system template. The file system filter driver runs in the background of the operating system after being installed in the operating system (windows operating system) template, and executes different processing logic through three modes (idle mode, production mode, and operation mode). In idle mode, the file filter driver neither intercepts file system calls nor modifies the received path. In production mode, the template machine's file filter driver is used to make disk package templates. For example, intercept messages and registry messages sent to the file system layer. During the installation of the application, the files with the original path in the first path (the default installation path of the application) are automatically redirected to the second path (the application installation path of the partition where the disk package template is located). The record in the original path in the third path (the default registry save path) is automatically redirected to the fourth path (the registry save path of the partition where the disk package template is located). In the running mode, the user machine mounts the disk package template in read-only mode. The priority of the file read/write or registry record read/write path is as follows: the path of the system cache is higher than the path of the partition where the disk package template is located. Priority, the path of the partition where the disk package template is located has a higher priority than the application's default installation path (or default registry save path).
磁盘软件包模板,用于存放应用程序安装过程(由管理员在制作机器 上进行安装)中涉及到的新增文件,修改文件,注册表新增记录,注册表记录修改信息。磁盘软件包模板制作好以后,指派分配给虚拟机使用,与操作系统模板不同的是并不产生任何副本,而是以只读方式同时给多台虚机挂载使用。The disk package template is used to store new files, modify files, new registry records, and registry record modification information involved in the application installation process (installed by the administrator on the production machine). After the disk package template is created, the assignment is assigned to the virtual machine. Unlike the operating system template, no copy is generated, but multiple virtual machines are mounted in a read-only manner.
系统缓存(可选),用于用户机在以只读方式挂载磁盘软件包模板时,当需要修改磁盘软件包模板中的数据时,文件系统过滤驱动拷贝一份数据到系统缓存中,然后再执行读写操作。System cache (optional), when the user machine mounts the disk package template in read-only mode, when the data in the disk package template needs to be modified, the file system filter driver copies a copy of the data into the system cache, and then Then perform read and write operations.
其中,虚拟桌面管理平台包括虚拟桌面管理中心和虚拟桌面后台控制实体。所述虚拟桌面管理中心提供人机交互管理页面,包括查看,创建,指派,修改,更新操作。在制作磁盘软件包模板时,虚拟桌面管理中心控制虚拟桌面后台控制实体新建一个独立磁盘,然后将此独立磁盘指派到某个虚拟机上,此虚拟机角色变更为制作机器,然后进入操作系统进行程序包制作。The virtual desktop management platform includes a virtual desktop management center and a virtual desktop background control entity. The virtual desktop management center provides a human-computer interaction management page, including viewing, creating, assigning, modifying, and updating operations. When making a disk package template, the virtual desktop management center controls the virtual desktop background control entity to create a new independent disk, and then assigns the independent disk to a virtual machine. The virtual machine role is changed to the production machine and then enters the operating system. Package production.
示例2Example 2
本示例提供一种磁盘软件包模板的制作方法,假设在磁盘软件包模板上安装APP1和APP2,所述模板机执行以下处理:This example provides a method for creating a disk package template. Assume that APP1 and APP2 are installed on a disk package template. The template machine performs the following processing:
步骤S101,在制作磁盘软件包模板的虚拟机上安装虚拟机操作系统模板并启动;Step S101: Install a virtual machine operating system template on a virtual machine that creates a disk package template and start it.
其中,所述操作系统模板中包括文件系统过滤驱动。The operating system template includes a file system filtering driver.
其中,所述操作系统模板中还包括辅助工具,所述辅助工具用于与文件系统过滤驱动进行通信,设置文件过滤驱动的模式(空闲模式、制作模式、运行模式)The operating system template further includes an auxiliary tool, wherein the auxiliary tool is configured to communicate with the file system filter driver, and set a mode of the file filter driver (idle mode, production mode, and operation mode)
步骤S102,对挂载的磁盘做分区格式化;Step S102, performing partition formatting on the mounted disk.
比如格式化为NTFS(New Technology File System,新技术文件系统),将该磁盘的盘符设置为F:。For example, formatted as NTFS (New Technology File System), set the disk drive letter to F:.
步骤S103,辅助工具运行,在挂载的磁盘分区(比如,F:)上创建根目录FILE(F:\FILE),所述根目录用于重定向应用程序的默认安装目录(比如,C:\)。创建注册表文件(比如,reg),所述注册表文件用于记录安装过程中的注册表记录的修改键值。创建配置文件(比如,vpack.ini)。In step S103, the auxiliary tool runs to create a root directory FILE (F:\FILE) on the mounted disk partition (for example, F:), and the root directory is used to redirect the application's default installation directory (for example, C: \). Create a registry file (for example, reg) that records the modified key value of the registry record during the installation process. Create a configuration file (for example, vpack.ini).
其中,配置文件vpack.ini可以包含描述该磁盘软件包模板中各个应用程序的信息,例如版本号,GUID(Globally Unique Identifier,全局唯一标识符)。The configuration file vpack.ini may contain information describing each application in the disk package template, such as a version number, a GUID (Globally Unique Identifier).
其中,辅助工具发送控制消息给文件系统过滤驱动,触发所述文件系统过滤驱动进入制作模式,在所述制作模式下,文件系统过滤驱动拦截所有在应用程序默认安装目录(C:\)上的文件系统调用。The auxiliary tool sends a control message to the file system filter driver, triggering the file system filter driver to enter a production mode, in which the file system filter driver intercepts all the default installation directory (C:\) in the application. File system call.
步骤S104,安装两个应用程序APP1和APP2。In step S104, two applications APP1 and APP2 are installed.
安装程序执行的函数、文件操作、和注册表操作都会被文件系统过滤驱动拦截,拦截后,进行查询合并目录操作以及修改目标路径从而重定向。The functions, file operations, and registry operations executed by the installer are intercepted by the file system filter driver. After interception, the query merges the directory operation and the target path is modified to be redirected.
下面以APP1的安装程序(app1_install)为例,解释文件操作的拦截和重定向:The following uses the APP1 installer (app1_install) as an example to explain the interception and redirection of file operations:
(一)安装程序(app1_install)向底层发起只读方式的查询,路径c:\program files\app1;(1) The installer (app1_install) initiates a read-only query to the underlying path, path c:\program files\app1;
文件系统过滤驱动会执行2次查询动作。第一路径c:\program files\app1,第二路径F:\FILE\program files\app1。此时2个路径都不存在,立即返回失败。The file system filter driver performs 2 query actions. The first path is c:\program files\app1, and the second path is F:\FILE\program files\app1. At this point, neither path exists and immediately returns a failure.
(二)安装程序(app1_install)发起写方式的创建目录操作,创建路径为c:\program files\app1。(2) The installer (app1_install) initiates the create directory operation of the write mode, and the creation path is c:\program files\app1.
文件系统过滤驱动收到后仍然执行2次查询。第一路径c:\program files\app1,第二路径F:\FILE\program files\app1。此时由于是写方式的操作。并且第一路径的父目录c:\program files存在。文件系统过滤驱动先创建目录F:\FILE\program files,再将执行路径修改为第二路径F:\FILE\program files\app1。实际创建工作交给文件系统下层,下层创建完成后返回此句柄, 重定向完成。返回以后app1_install接收到的就是重定向后的第二路径句柄。The file system filter driver still performs 2 queries after receiving it. The first path is c:\program files\app1, and the second path is F:\FILE\program files\app1. At this time, it is a write mode operation. And the parent directory c:\program files of the first path exists. The file system filter driver first creates the directory F:\FILE\program files, and then changes the execution path to the second path F:\FILE\program files\app1. The actual creation work is handed to the lower layer of the file system. After the lower layer is created, the handle is returned, and the redirection is completed. After returning, app1_install receives the redirected second path handle.
(三)安装程序app1_install发起创建文件操作,要创建的文件是c:\program files\app1\file1。(3) The installer app1_install initiates the create file operation, and the file to be created is c:\program files\app1\file1.
安装程序app1_install查询路径c:\program files\app1。文件系统过滤驱动收到后执行2次查询。第一路径c:\program files\app1,第二路径F:\FILE\program files\app1。此时由于是写方式的操作。并且F:\FILE\program files\app1存在,优先选择第二路径F:\FILE\program files\app1。文件系统过滤驱动然后执行路径修改F:\FILE\program files\app1\file1,实际工作交给文件系统下层执行。下层执行返回以后app1_install接收到的就是重定向后的第二路径句柄。此次重定向创建文件完成。The installer app1_install queries the path c:\program files\app1. The file system filter driver receives 2 queries after receiving it. The first path is c:\program files\app1, and the second path is F:\FILE\program files\app1. At this time, it is a write mode operation. And F:\FILE\program files\app1 exists, and the second path F:\FILE\program files\app1 is preferred. The file system filter driver then executes the path modification F:\FILE\program files\app1\file1, and the actual work is given to the lower layer of the file system for execution. After the lower layer execution returns, app1_install receives the redirected second path handle. The redirection creation file is completed.
(四)、安装程序app1_install发起枚举指定目录文件操作,所述指定目录是c:\program files。(4) The installer app1_install initiates enumeration of the specified directory file operation, and the specified directory is c:\program files.
安装程序app1_install打开目录c:\program files。文件系统过滤驱动依次查询第一路径c:\program files,第二路径F:\FILE\program files。由于第二路径已经存在,按照优先原则,路径修改为第二路径F:\FILE\program files,文件系统下层返回第二路径句柄,重定向完成。接下来app1_install发起枚举目录文件。文件系统过滤驱动接收到路径为刚才打开的句柄路径F:\FILE\program files。此时执行2次枚举目录操作。The installer app1_install opens the directory c:\program files. The file system filter driver sequentially queries the first path c:\program files, and the second path F:\FILE\program files. Since the second path already exists, according to the priority principle, the path is modified to the second path F:\FILE\program files, and the lower layer of the file system returns the second path handle, and the redirection is completed. Next app1_install initiates the enumeration directory file. The file system filter driver receives the path to the handle path F:\FILE\program files that was just opened. At this point, the enumeration directory operation is performed twice.
第一次c:\program files\返回First c:\program files\return
Figure PCTCN2018102285-appb-000001
Figure PCTCN2018102285-appb-000001
Figure PCTCN2018102285-appb-000002
Figure PCTCN2018102285-appb-000002
第二次F:\FILE\program files\返回Second F:\FILE\program files\return
2017/07/11 10:35 <DIR> app12017/07/11 10:35 <DIR> app1
两次结果合并,如果有相同项,优先使用F:路径下的文件信息。The two results are merged. If there is the same item, the file information under the F: path is used first.
最后返回:Finally return:
Figure PCTCN2018102285-appb-000003
Figure PCTCN2018102285-appb-000003
app1_install程序得到了合并的文件列表。The app1_install program gets a list of merged files.
下面以APP1的安装程序(app1_install)为例,解释注册表信息的拦截和重定向:The following uses the APP1 installer (app1_install) as an example to explain the interception and redirection of registry information:
当辅助工具触发文件系统过滤驱动进入制作模式时,磁盘软件包模板所在分区上的注册表文件(F:\reg)由文件系统过滤驱动挂载到系统注册表路径HLM\SYSTEM\Setup\VPACK上,一开始内容为空,此路径(HLM\SYSTEM\Setup\VPACK)对应注册表的默认根路径(C:\)When the auxiliary tool triggers the file system filter driver to enter the production mode, the registry file (F:\reg) on the partition where the disk package template is located is mounted by the file system filter driver to the system registry path HLM\SYSTEM\Setup\VPACK. At the beginning, the content is empty. This path (HLM\SYSTEM\Setup\VPACK) corresponds to the default root path of the registry (C:\).
(一)安装程序(比如,app1_install)发起只读方式的查询,路径HCU\Software。(1) The installer (for example, app1_install) initiates a read-only query with the path HCU\Software.
文件系统过滤驱动会执行2次查询动作。第一路径HCU\Software,第二路径HLM\SYSTEM\Setup\VPACK\HCU\Software。此时2个路径都不存在,立即返回失败。The file system filter driver performs 2 query actions. The first path is HCU\Software, and the second path is HLM\SYSTEM\Setup\VPACK\HCU\Software. At this point, neither path exists and immediately returns a failure.
(二)安装程序(比如,app1_install)发起写方式的创建操作。创建路径为HCU\Software\app1。(2) The installer (for example, app1_install) initiates the creation of the write mode. Create a path of HCU\Software\app1.
文件系统过滤驱动收到后仍然执行2次查询。The file system filter driver still performs 2 queries after receiving it.
第一路径HCU\Software\app1;The first path HCU\Software\app1;
第二路径HLM\SYSTEM\Setup\VPACK\HCU\Software\app1;The second path is HLM\SYSTEM\Setup\VPACK\HCU\Software\app1;
此时由于是写方式的操作。并且第一路径的父路径HCU\Software\存在。文件系统过滤驱动此时创建路径项HLM\SYSTEM\Setup\VPACK\HCU\Software\。再将执行路径修改为第二路径HLM\SYSTEM\Setup\VPACK\HCU\Software\app1,系统下层执行创建后返回第二路径句柄,返回以后app1_install接收到的就是重定向后的第二路径句柄。重定向完成。At this time, it is a write mode operation. And the parent path HCU\Software\ of the first path exists. The file system filter driver creates the path entry HLM\SYSTEM\Setup\VPACK\HCU\Software\ at this time. Then modify the execution path to the second path HLM\SYSTEM\Setup\VPACK\HCU\Software\app1. After the system is executed, the second path handle is returned. After returning, app1_install receives the redirected second path handle. The redirect is complete.
(三)安装程序app1_install发起创建键值,对HCU\Software\app1\key1进行操作。(3) The installer app1_install initiates the creation of a key value and operates on HCU\Software\app1\key1.
首先打开路径HCU\Software\app1。此时由于是写方式的操作。并且HLM\SYSTEM\Setup\VPACK\HCU\Software\app1存在,优先选择路径HLM\SYSTEM\Setup\VPACK\HCU\Software\app1,路径修改后,实际创建工作交给系统下层执行。下层执行返回以后app1_install接收到的就是重定向后的路径句柄。此次重定向创建完成。First open the path HCU\Software\app1. At this time, it is a write mode operation. HLM\SYSTEM\Setup\VPACK\HCU\Software\app1 exists. The path HLM\SYSTEM\Setup\VPACK\HCU\Software\app1 is preferred. After the path is modified, the actual creation work is submitted to the lower layer of the system for execution. After the lower layer execution returns, app1_install receives the redirected path handle. The redirection is created.
(四)、安装程序app1_install发起枚举指定路径子记录操作。(4) The installer app1_install initiates the enumeration of the specified path sub-record operation.
首先app1_install打开注册表项HCU\Software\。文件系统过滤驱动依次查询First app1_install opens the registry key HCU\Software\. File system filter driver query in turn
第一路径HCU\Software\;The first path HCU\Software\;
第二路径HLM\SYSTEM\Setup\VPACK\HCU\Software\;The second path is HLM\SYSTEM\Setup\VPACK\HCU\Software\;
由于第二路径已经存在,按照优先原则,路径修改为第二路径HLM\SYSTEM\Setup\VPACK\HCU\Software,文件系统下层返回第二路径句柄,重定向完成。接下来app1_install发起枚举子记录。文件系统过滤驱动接收到路径为刚才打开的句柄路径Since the second path already exists, according to the priority principle, the path is modified to the second path HLM\SYSTEM\Setup\VPACK\HCU\Software, and the lower layer of the file system returns the second path handle, and the redirection is completed. Next app1_install initiates an enumeration child record. The file system filter driver receives the path to the handle path that was just opened.
HLM\SYSTEM\Setup\VPACK\HCU\Software\HLM\SYSTEM\Setup\VPACK\HCU\Software\
此时执行2次枚举操作。At this point, the enumeration operation is performed twice.
第一次HCU\Software\返回First HCU\Software\Back
7zip7zip
adobeAdobe
第二次HLM\SYSTEM\Setup\VPACK\HCU\Software\返回Second HLM\SYSTEM\Setup\VPACK\HCU\Software\Back
app1App1
两次结果合并,如果有相同项,优先使用第二路径Combine the two results, if there is the same item, use the second path first.
HLM\SYSTEM\Setup\VPACK\HCU\Software\下的信息。Information under HLM\SYSTEM\Setup\VPACK\HCU\Software\.
最后返回:Finally return:
7zip7zip
adobeAdobe
app1App1
安装程序app1_install得到了合并的列表。The installer app1_install got the merged list.
步骤S105,所有应用程序安装完毕后,辅助工具运行,执行安装完成后的辅助操作。In step S105, after all the applications are installed, the auxiliary tool runs, and the auxiliary operations after the installation is completed are performed.
其中,辅助工具发送消息给文件系统过滤驱动通知应用程序安装完毕,文件系统过滤驱动将先前挂载到注册表分支上的节点脱离,注册表修改内容写入到磁盘软件包模板所在磁盘分区的注册表文件(F:\reg)中,然后 文件系统过滤驱动进入到空闲状态。The auxiliary tool sends a message to the file system filter driver to notify the application that the installation is completed, the file system filter driver detaches the node previously mounted on the registry branch, and the registry modification content is written to the disk partition where the disk package template is located. In the table file (F:\reg), then the file system filter driver enters the idle state.
辅助工具还可以清理磁盘软件包模板所在磁盘分区中的无用文件(比如,临时文件),扫描注册表文件(F:\reg)得到安装的应用程序的路径,提取应用程序的图标、版本号、厂商信息等,上报给虚拟桌面管理平台存储。至此磁盘软件包模板制作完成。模板机可以卸载磁盘软件包模板所在的磁盘。The auxiliary tool can also clean up unnecessary files (such as temporary files) in the disk partition where the disk package template is located, scan the registry file (F:\reg) to get the path of the installed application, extract the icon of the application, version number, Vendor information, etc., is reported to the virtual desktop management platform for storage. At this point, the disk package template is created. The template machine can unmount the disk where the disk package template is located.
示例3Example 3
本示例提供一种磁盘软件包模板的使用方法,假设磁盘软件包模板上安装有应用程序APP1和APP2,用户机通过挂载所述磁盘软件包模板所在的磁盘使用应用程序(比如,APP1),所述用户机执行以下处理:This example provides a method for using a disk package template. Assume that the application package APP1 and APP2 are installed on the disk package template. The user machine uses an application (for example, APP1) by mounting the disk where the disk package template is located. The user machine performs the following processing:
步骤S101,磁盘软件包模板识别;Step S101, identifying a disk package template;
当操作系统启动时,磁盘软件包模板挂载消息被文件系统过滤驱动拦截,扫描此分区卷,查找配置文件(比如,vpack.ini)、FILE文件夹,注册表文件(比如,reg)。通过分析配置文件内容,注册表文件内容判断是否是磁盘软件包模板。如果是磁盘软件包模板,则文件系统过滤驱动触发进入运行模式。When the operating system starts, the disk package template mount message is intercepted by the file system filter driver, scans the partition volume, and looks for configuration files (for example, vpack.ini), FILE folder, and registry files (for example, reg). By analyzing the contents of the configuration file, the contents of the registry file determine whether it is a disk package template. If it is a disk package template, the file system filter driver triggers into run mode.
步骤S102,以只读方式将注册表文件(F:\reg)的文件内容合并到系统缓存注册表文件(比如,G:\REG)中,如果系统缓存中无此文件则创建一个空的文件。如果系统缓存注册表文件已经是按照某个版本号和GUID匹配合并过则忽略该步操作。合并记录也记录在系统缓存注册表文件(G:\REG)中。然后将系统缓存注册表文件(G:\REG)挂载到系统注册表HLM\SYSTEM\Setup\VPACK\路径上。然后开始拦截文件系统消息和注册表消息。Step S102, the file content of the registry file (F:\reg) is merged into the system cache registry file (for example, G:\REG) in a read-only manner, and an empty file is created if there is no such file in the system cache. . If the system cache registry file has been merged according to a version number and GUID match, then this step is ignored. The merge record is also recorded in the system cache registry file (G:\REG). Then mount the system cache registry file (G:\REG) to the system registry HLM\SYSTEM\Setup\VPACK\ path. Then start intercepting file system messages and registry messages.
下面说明文件系统过滤驱动在运行模式下对文件、目录的相关操作。The following describes the file system and file directory related operations in the file system filter driver.
(一)用户鼠标点击开始菜单。(1) The user clicks on the start menu.
比如,windows桌面程序explorer.exe发起枚举目录查询。目录路径C:\ProgramData\Microsoft\Windows\Start Menu\Programs。文件系统过滤驱动会执行3次查询动作。For example, the windows desktop program explorer.exe initiates an enumeration directory query. Directory path C:\ProgramData\Microsoft\Windows\Start Menu\Programs. The file system filter driver performs 3 query actions.
第一路径C:\ProgramData\Microsoft\Windows\Start Menu\Programs返回:The first path C:\ProgramData\Microsoft\Windows\Start Menu\Programs returns:
Figure PCTCN2018102285-appb-000004
Figure PCTCN2018102285-appb-000004
第二路径F:\FILE\ProgramData\Microsoft\Windows\Start Menu\Programs返回:The second path F:\FILE\ProgramData\Microsoft\Windows\Start Menu\Programs returns:
2017/07/03 16:30 <DIR> app12017/07/03 16:30 <DIR> app1
2017/07/03 15:52 <DIR> app22017/07/03 15:52 <DIR> app2
第三路径G:\FILE\ProgramData\Microsoft\Windows\Start Menu\Programs返回空;其中,G:\FILE\是系统缓存路径;The third path G:\FILE\ProgramData\Microsoft\Windows\Start Menu\Programs returns null; where G:\FILE\ is the system cache path;
此时2个路径存在,结果合并为:At this point 2 paths exist and the results are merged into:
Figure PCTCN2018102285-appb-000005
Figure PCTCN2018102285-appb-000005
Figure PCTCN2018102285-appb-000006
Figure PCTCN2018102285-appb-000006
explorer.exe程序得到了合并的文件列表。用户可以发现多出的app1和app2程序菜单。The explorer.exe program gets a list of merged files. Users can find out more app1 and app2 program menus.
(二)用户鼠标点击app1/app1.exe启动程序。(B) The user mouse clicks app1/app1.exe to start the program.
windows桌面程序explorer.exe发起只读方式打开app1.exe文件流程。文件系统过滤驱动会执行3次查询动作。第一路径C:\Program files\app1。第二路径F:\FILE\Program files\app1。第三路径G:\FILE\Program files\app1;The windows desktop program explorer.exe initiates a read-only mode to open the app1.exe file flow. The file system filter driver performs 3 query actions. The first path is C:\Program files\app1. The second path is F:\FILE\Program files\app1. The third path G:\FILE\Program files\app1;
其中,第二路径已经存在,优先使用此路径。文件系统过滤驱动修改路径为此路径。实际工作由文件系统下层执行,下层执行完毕后返回此路径句柄。explorer.exe得到了重定向后的句柄,开始后续操作。The second path already exists, and the path is used preferentially. The file system filter driver modifies the path to this path. The actual work is performed by the lower layer of the file system, and the path handle is returned after the lower layer is executed. Explorer.exe gets the redirected handle and starts the subsequent operations.
(三)app1.exe程序修改C:\Program files\app1\file1(3) app1.exe program to modify C:\Program files\app1\file1
文件系统过滤驱动会执行3次查询动作。The file system filter driver performs 3 query actions.
第一路径C:\Program files\app1\file1。返回失败不存在。The first path is C:\Program files\app1\file1. The return failure does not exist.
第二路径F:\FILE\Program files\app1\file1。返回成功存在。The second path is F:\FILE\Program files\app1\file1. The return succeeds.
第三路径G:\FILE\Program files\app1\file1。返回失败不存在。The third path is G:\FILE\Program files\app1\file1. The return failure does not exist.
第二路径已经存在,但是由于是修改动作,不能直接修改。拷贝(Copy)文件file1至系统缓存目录。首先依次建立目录G:\FILE\Program files,G:\FILE\Program files\app1\,然后执行copy文件至G:\FILE\Program files\app1\file1。修改路径为此路径,实际工作由文件系统下层执行,下层执行完毕后返回此路径句柄。app1.exe得到了重定向后的句柄,开始后续写操作。The second path already exists, but since it is a modification action, it cannot be directly modified. Copy the file file1 to the system cache directory. First create the directory G:\FILE\Program files, G:\FILE\Program files\app1\, and then execute the copy file to G:\FILE\Program files\app1\file1. Modify the path to this path, the actual work is performed by the lower layer of the file system, and the path handle is returned after the lower layer is executed. App1.exe gets the redirected handle and starts the subsequent write operation.
(四)app1.exe程序删除C:\Program files\app1\file1(4) The app1.exe program deletes C:\Program files\app1\file1
文件系统过滤驱动会执行3次查询动作。The file system filter driver performs 3 query actions.
第一路径C:\Program files\app1\file1。返回失败不存在。The first path is C:\Program files\app1\file1. The return failure does not exist.
第二路径F:\FILE\Program files\app1\file1。返回成功存在。The second path is F:\FILE\Program files\app1\file1. The return succeeds.
第三路径G:\FILE\Program files\app1\file1。返回成功存在。The third path is G:\FILE\Program files\app1\file1. The return succeeds.
删除属于修改操作的一种。由于第三路径存在,修改路径为第三路径,但是由于是删除操作。而且第二路径磁盘软件包路径存在。需要特殊处理。给此文件打上删除标记。比如:修改第三路径文件的创建时间为特定的日期的某一秒。立即返回成功而不让下层文件系统实际进行删除。之后遇到文件是这个特殊日期后,接管下层系统的操作,判断为已经删除的文件而返回失败。Delete one that belongs to the modification operation. Since the third path exists, the modified path is the third path, but since it is a delete operation. And the second path disk package path exists. Special handling is required. Mark this file with a delete. For example, modify the creation time of the third path file to a certain second of a specific date. Return immediately to the success without letting the underlying file system actually delete. After the file is encountered after this special date, it takes over the operation of the lower layer system and judges that it has been deleted and returns a failure.
下面说明文件系统过滤驱动在运行模式下对注册表的相关操作。The following describes the file system filter driver's operations on the registry in run mode.
(一)应用程序(比如,app1)发起只读方式的查询,路径HCU\Software。(1) The application (for example, app1) initiates a read-only query with the path HCU\Software.
文件系统过滤驱动会执行2次查询动作。The file system filter driver performs 2 query actions.
第一路径HCU\SoftwareFirst path HCU\Software
第二路径HLM\SYSTEM\Setup\VPACK\HCU\SoftwareSecond path HLM\SYSTEM\Setup\VPACK\HCU\Software
第二路径存在,并且是只读方式,修改路径为第二路径,实际工作由下层系统完成,返回后得到第二路径句柄,重定向完成。app1得到了第二路径句柄。The second path exists, and is a read-only mode. The modified path is the second path. The actual work is completed by the lower layer system, and the second path handle is obtained after the return, and the redirection is completed. App1 gets the second path handle.
(二)app1发起修改键值,路径HCU\Software\app1\key1。(2) app1 initiates the modification of the key value, the path HCU\Software\app1\key1.
文件系统过滤驱动会执行2次查询动作。The file system filter driver performs 2 query actions.
第一路径HCU\Software\app1\key1返回失败不存在;The first path HCU\Software\app1\key1 return failure does not exist;
第二路径HLM\SYSTEM\Setup\VPACK\HCU\Software\app1\key1返回成功;The second path HLM\SYSTEM\Setup\VPACK\HCU\Software\app1\key1 returns successfully;
第二路径存在,虽然是写操作,但是由于使用的系统缓存注册表文件,所以可以直接修改。修改路径为第二路径,实际工作由下层系统完成,返回后得到第二路径句柄,重定向完成。app1得到了第二路径句柄。The second path exists, although it is a write operation, but since the system used caches the registry file, it can be modified directly. The modified path is the second path, and the actual work is completed by the lower layer system. After returning, the second path handle is obtained, and the redirection is completed. App1 gets the second path handle.
(三)app1发起创建键值,对HCU\Software\app1\key1操作。(3) app1 initiates the creation of a key value and operates on HCU\Software\app1\key1.
首先查询路径HCU\Software\app1。First query the path HCU\Software\app1.
文件系统过滤驱动会执行2次查询动作The file system filter driver will perform 2 query actions.
第一路径HCU\Software\app1First path HCU\Software\app1
第二路径HLM\SYSTEM\Setup\VPACK\HCU\Software\app1Second path HLM\SYSTEM\Setup\VPACK\HCU\Software\app1
此时由于是写方式的操作。并且第二路径存在,优先选择第二路径,路径修改为第二路径下HLM\SYSTEM\Setup\VPACK\HCU\Software\app1\key1,实际创建工作交给系统下层执行。下层执行返回以后app1接收到的就是重定向后的路径句柄。此次重定向创建完成。At this time, it is a write mode operation. And the second path exists, the second path is preferentially selected, and the path is modified to be HLM\SYSTEM\Setup\VPACK\HCU\Software\app1\key1 in the second path, and the actual creation work is performed to the lower layer of the system for execution. After the lower layer performs the return, what app1 receives is the redirected path handle. The redirection is created.
(四)app1发起枚举指定路径子记录操作。(4) app1 initiates enumeration of the specified path sub-recording operation.
app1打开注册表项HCU\Software\。App1 opens the registry key HCU\Software\.
文件系统过滤驱动依次查询File system filter driver query in turn
第一路径HCU\Software\First path HCU\Software\
第二路径HLM\SYSTEM\Setup\VPACK\HCU\Software\Second path HLM\SYSTEM\Setup\VPACK\HCU\Software\
由于第二路径已经存在,按照优先原则,路径修改为第二路径。系统下层返回第二路径句柄,重定向完成。接下来枚举子记录。文件系统过滤驱动接收到路径为刚才打开的第二路径。此时执行2次枚举操作。Since the second path already exists, the path is modified to the second path according to the priority principle. The lower layer of the system returns the second path handle, and the redirection is completed. Next, enumerate the child records. The file system filter driver receives the path to the second path that was just opened. At this point, the enumeration operation is performed twice.
第一次HCU\Software\返回First HCU\Software\Back
7zip7zip
adobeAdobe
第二次HLM\SYSTEM\Setup\VPACK\HCU\Software\返回Second HLM\SYSTEM\Setup\VPACK\HCU\Software\Back
app1App1
app2App2
2次结果合并,如果有相同项,依次优先使用系统缓存,然后是磁盘 软件包模板,最后是系统默认的原始路径;2 results merge, if there is the same item, the system cache is used first, then the disk package template, and finally the system default original path;
最后返回:Finally return:
7zip7zip
adobeAdobe
app1App1
app2App2
因此,app1程序得到了合并的列表。Therefore, the app1 program gets a merged list.
(五)app1删除指定路径子记录操作。(5) app1 deletes the specified path sub-record operation.
app1打开注册表项HCU\Software\。App1 opens the registry key HCU\Software\.
文件系统过滤驱动依次查询File system filter driver query in turn
第一路径HCU\Software\app1\key1First path HCU\Software\app1\key1
第二路径HLM\SYSTEM\Setup\VPACK\HCU\Software\app1\key1Second path HLM\SYSTEM\Setup\VPACK\HCU\Software\app1\key1
由于第二路径已经存在,按照优先原则,路径修改为第二路径。系统下层返回第二路径句柄,重定向完成。然后系统执行后续删除操作。此处已经是系统缓存注册表文件,可以直接删除。Since the second path already exists, the path is modified to the second path according to the priority principle. The lower layer of the system returns the second path handle, and the redirection is completed. The system then performs subsequent delete operations. Here is the system cache registry file, you can delete it directly.
示例4Example 4
本示例提供一种磁盘软件包模板的更新方法。假设管理员要在模板机上对包含APP1和APP2的磁盘软件包模板进行更新,所述更新涉及:对APP1进行升级、删除APP2,以及新增APP3,在模板机上执行下述处理:This example provides an update method for a disk package template. Suppose the administrator wants to update the disk package template including APP1 and APP2 on the template machine. The update involves: upgrading APP1, deleting APP2, and adding APP3. Perform the following processing on the template machine:
步骤S101,将磁盘软件包模板分配给某台虚拟机。虚拟机启动后由操作系统自动挂载此磁盘。假设此盘符是F:。Step S101, assigning a disk package template to a virtual machine. This disk is automatically mounted by the operating system after the virtual machine is powered on. Suppose this drive letter is F:.
步骤S102,在制作磁盘软件包模板的虚拟机上安装好文件系统过滤驱动。安装好辅助工具。此时文件系统过滤驱动工作在空闲模式,既不拦截文件系统调用,也不修改接收到的路径。如果此机器已经安装过文件系 统过滤驱动,会自动触发进入使用模式。Step S102, installing a file system filter driver on the virtual machine that creates the disk package template. Install the accessibility tools. At this point, the file system filter driver works in idle mode, neither intercepting file system calls nor modifying the received path. If the file system filter driver has been installed on this machine, it will automatically trigger into the usage mode.
步骤S103,辅助工具运行,此时目录FILE,注册表文件reg,配置文件vpack.ini都已经存在。辅助工具不再创建。辅助工具发送控制消息给文件系统过滤驱动程序,触发进入制作模式。此时拦截所有在C:上的文件系统调用。In step S103, the auxiliary tool runs. At this time, the directory FILE, the registry file reg, and the configuration file vpack.ini already exist. Accessibility tools are no longer created. The auxiliary tool sends a control message to the file system filter driver, triggering the entry into production mode. At this point, all file system calls on C: are intercepted.
步骤S104,安装程序开始更新app1,删除app2,安装app3。在安装过程中安装程序执行的函数、文件操作、注册表操作都会被文件系统过滤驱动拦截,查询合并目录操作以及修改目标路径达到重定向。In step S104, the installer starts to update app1, deletes app2, and installs app3. The functions, file operations, and registry operations executed by the installer during the installation process are intercepted by the file system filter driver, query the merge directory operation, and modify the target path to reach the redirect.
(一)更新app1:(1) Update app1:
App1的安装程序app1_install发起修改文件(c:\program files\app1\file1)操作。App1's installer app1_install initiates a modification file (c:\program files\app1\file1) operation.
app1_install查询路径c:\program files\app1\file1。文件系统过滤驱动收到后执行2次查询。第一路径c:\program files\app1,第二路径F:\FILE\program files\app1。此时由于是写方式的操作。并且F:\FILE\program files\app1存在,优先选择第二路径F:\FILE\program files\app1。文件系统过滤驱动然后执行路径修改F:\FILE\program files\app1\file1,实际工作交给文件系统下层执行。下层执行返回以后app1_install接收到的就是重定向后的第二路径句柄。此次重定向文件完成。后续修改写操作也就在此路径文件上完成。App1_install queries the path c:\program files\app1\file1. The file system filter driver receives 2 queries after receiving it. The first path is c:\program files\app1, and the second path is F:\FILE\program files\app1. At this time, it is a write mode operation. And F:\FILE\program files\app1 exists, and the second path F:\FILE\program files\app1 is preferred. The file system filter driver then executes the path modification F:\FILE\program files\app1\file1, and the actual work is given to the lower layer of the file system for execution. After the lower layer execution returns, app1_install receives the redirected second path handle. The redirect file is complete. Subsequent modification writes are also done on this path file.
(二)删除app2:(2) Delete app2:
App2的安装程序app2_install发起删除文件(c:\program files\app2\file1)操作。App2's installer app2_install initiates the delete file (c:\program files\app2\file1) operation.
app2_install查询路径c:\program files\app2\file1。文件系统过滤驱动收到后执行2次查询。第一路径c:\program files\app2,第二路径F:\FILE\program files\app2。此时由于是写方式的操作。并且第二路径存在,优先选择第二路径。文件系统过滤驱动然后执行路径修改为F:\FILE\program files\app2\file1,实际工作交给文件系统下层执行。下层执 行返回以后app2_install接收到的就是重定向后的第二路径句柄。此次重定向文件完成。后续删除操作也就在此路径文件上完成。App2_install queries the path c:\program files\app2\file1. The file system filter driver receives 2 queries after receiving it. The first path is c:\program files\app2, and the second path is F:\FILE\program files\app2. At this time, it is a write mode operation. And the second path exists, and the second path is preferentially selected. The file system filter driver then changes the execution path to F:\FILE\program files\app2\file1, and the actual work is given to the lower layer of the file system for execution. After the lower layer executes the return, app2_install receives the redirected second path handle. The redirect file is complete. Subsequent deletions are also done on this path file.
(三)安装app3:(3) Install app3:
App3的安装程序app3_install发起创建文件(c:\program files\app3\file1)操作。App3's installer app3_install initiates the create file (c:\program files\app3\file1) operation.
app3_install查询路径c:\program files\app3。文件系统过滤驱动收到后执行2次查询。第一路径c:\program files\app3,第二路径F:\FILE\program files\app3。此时由于是写方式的操作。并且第二路径存在,优先选择第二路径。文件系统过滤驱动然后执行路径修改为F:\FILE\program files\app3\file1,实际工作交给文件系统下层执行。下层执行返回以后app3_install接收到的就是重定向后的第二路径句柄。此次重定向文件完成。App3_install queries the path c:\program files\app3. The file system filter driver receives 2 queries after receiving it. The first path is c:\program files\app3, and the second path is F:\FILE\program files\app3. At this time, it is a write mode operation. And the second path exists, and the second path is preferentially selected. The file system filter driver then changes the execution path to F:\FILE\program files\app3\file1, and the actual work is given to the lower layer of the file system for execution. After the lower layer execution returns, app3_install receives the redirected second path handle. The redirect file is complete.
步骤S104,所有应用程序安装更新完毕后,辅助工具运行,执行更新完成后的辅助操作。辅助工具发送消息给文件系统过滤驱动。文件系统过滤驱动将先前挂载到注册表分支上的节点脱离。注册表修改内容写入到F:\reg文件中,然后文件系统过滤驱动进入到空闲状态。后续的操作由辅助工具完成并且都在磁盘分区F:中处理:清理无用的文件,扫描注册表文件reg得到安装的应用程序的路径,提取应用程序的图标,版本号,厂商信息。上报给虚拟桌面管理平台存储。至此磁盘软件包模板更新完成。模板机可以卸载此磁盘。Step S104, after all the application installations are updated, the auxiliary tool runs, and the auxiliary operation after the update is completed is performed. The accessibility tool sends a message to the file system filter driver. The file system filter driver detaches the node previously mounted on the registry branch. The registry modification content is written to the F:\reg file, and then the file system filter driver enters the idle state. Subsequent operations are performed by the auxiliary tools and are processed in the disk partition F: to clean up useless files, scan the registry file reg to get the path of the installed application, extract the application's icon, version number, and vendor information. Reported to the virtual desktop management platform storage. At this point, the disk package template update is complete. The template machine can unmount this disk.
示例5Example 5
本示例提供一种脱离VDI系统的实体移动盘上磁盘软件包的制作和使用。This example provides the creation and use of a disk package on a physical mobile disk that is off the VDI system.
一、制作磁盘软件包。First, make a disk package.
1、在制作磁盘软件包的物理机上安装好文件系统过滤驱动和辅助工具。此时文件系统过滤驱动工作在空闲模式,既不拦截文件系统调用,也不修改接收到的路径。1. Install the file system filter driver and auxiliary tools on the physical machine that makes the disk package. At this point, the file system filter driver works in idle mode, neither intercepting file system calls nor modifying the received path.
2、插入移动硬盘,操作系统自动挂载此硬盘,用户对挂载的磁盘做分区格式化(比如NTFS,假设此盘符是F:)。2. Insert the mobile hard disk, the operating system automatically mounts the hard disk, and the user formats the mounted disk (for example, NTFS, assuming that the drive letter is F:).
3、辅助工具运行,在这个分区上创建空目录FILE,此目录对应于C:\根目录。创建空注册表文件reg用于记录安装过程中的注册表记录的修改键值。创建配置文件vpack.ini,所述配置文件包含描述此软件包的信息,例如版本号,guid唯一标识值。辅助工具发送控制消息给文件系统过滤驱动,触发进入制作模式,文件系统过滤驱动在制作模式下拦截所有在C:上的文件系统调用。3. The auxiliary tool runs. Create an empty directory FILE on this partition. This directory corresponds to the C:\ root directory. Create an empty registry file reg to record the modified key value of the registry record during the installation process. Create a configuration file vpack.ini that contains information describing the package, such as the version number and the guid unique identification value. The auxiliary tool sends a control message to the file system filter driver, triggering into the production mode, and the file system filter driver intercepts all file system calls on C: in production mode.
4、开始安装app1,app2。在安装过程中安装程序(比如,app1_install和app2_install)执行的函数、文件操作、注册表操作都会被文件系统过滤驱动拦截。文件系统过滤驱动查询合并目录操作以及修改目标路径达到重定向。4. Start installing app1, app2. Functions, file operations, and registry operations performed by the installer (for example, app1_install and app2_install) during the installation process are intercepted by the file system filter driver. The file system filter driver queries the merge directory operation and modifies the target path to reach the redirect.
5、结束安装app1,app2。辅助工具发送消息通知文件系统过滤驱动进入空闲模式。辅助工具扫描F:盘中的无用文件。磁盘软件包制作完成。5. End the installation of app1, app2. The accessibility tool sends a message informing the file system that the filter driver is entering idle mode. The auxiliary tool scans the F: unused files in the disc. The disk package is created.
二、使用磁盘软件包。Second, use the disk package.
1、在某台物理机器上安装好文件系统过滤驱动。此时文件系统过滤程序运行在空闲状态。1. Install the file system filter driver on a physical machine. At this point the file system filter runs in an idle state.
2、插入移动硬盘后,文件系统过滤驱动拦截到卷挂载消息,扫描此分区卷,查找配置文件(vpack.ini),FILE文件夹,注册表文件(reg)。通过分析配置文件内容和注册表文件内容判断是否是磁盘软件包。如果是磁盘软件包,文件系统过滤驱动触发进入到运行模式。2. After inserting the mobile hard disk, the file system filter driver intercepts the volume mount message, scans the partition volume, and finds the configuration file (vpack.ini), FILE folder, and registry file (reg). Determine whether it is a disk package by analyzing the contents of the configuration file and the contents of the registry file. If it is a disk package, the file system filter driver triggers into the run mode.
3、文件系统过滤驱动以只读方式将移动硬盘上的注册表文件(F:\reg)的内容合并到系统缓存注册表文件(C:\VPACK\REG)中,如果系统缓存中无此文件则创建一个空的文件。如果系统缓存注册表文件已经是按照某个版本号和guid匹配合并过则忽略,合并记录也记录在系统缓存注册表文件中。然后将系统缓存注册表文件挂载到系统注册表路径(HLM\SYSTEM\Setup\VPACK\)上。然后开始拦截文件系统消息和注 册表消息。3. The file system filter driver merges the contents of the registry file (F:\reg) on the mobile hard disk into the system cache registry file (C:\VPACK\REG) in read-only mode, if there is no such file in the system cache. Then create an empty file. If the system cache registry file has been merged according to a version number and guid match, the merge record is also recorded in the system cache registry file. Then mount the system cache registry file to the system registry path (HLM\SYSTEM\Setup\VPACK\). Then start intercepting file system messages and registry messages.
三、更新磁盘软件包。Third, update the disk package.
1、在某台物理机器上安装好文件系统过滤驱动和辅助工具。如果是已经安装过则无需再次安装。此时文件系统过滤驱动工作在空闲模式。既不拦截文件系统调用,也不修改接收到的路径。1. Install the file system filter driver and auxiliary tools on a physical machine. If it is already installed, you do not need to install it again. At this point the file system filter driver works in idle mode. Neither intercept file system calls nor modify received paths.
2、插入移动硬盘。由操作系统自动挂载此磁盘。假设此盘符是F:。文件系统过滤驱动会自动触发进入使用模式。2. Insert the mobile hard disk. This disk is automatically mounted by the operating system. Suppose this drive letter is F:. The file system filter driver will automatically trigger into the usage mode.
3、辅助工具运行,此时目录FILE,注册表文件reg,配置文件vpack.ini都已经存在。辅助工具不再创建。执行设定模式为制作模式,发送控制消息给文件系统过滤驱动,触发进入制作模式,在制作模式下拦截所有在C:上的文件系统调用。3, the auxiliary tool runs, at this time the directory FILE, the registry file reg, the configuration file vpack.ini already exists. Accessibility tools are no longer created. Execute the setting mode to the production mode, send a control message to the file system filter driver, trigger into the production mode, and intercept all file system calls on C: in production mode.
4、开始更新app1,删除app2,安装app3。在安装过程中安装程序执行的函数、文件操作和注册表操作都会被文件系统过滤驱动拦截,文件系统过滤驱动查询合并目录操作以及修改目标路径达到重定向。4. Start updating app1, delete app2, and install app3. The functions, file operations, and registry operations performed by the installer during the installation process are intercepted by the file system filter driver. The file system filter driver queries the merge directory operation and modifies the target path to reach the redirect.
5、结束安装app1,app2。辅助工具发送消息通知文件系统过滤驱动进入空闲模式。辅助工具扫描F:盘中的无用文件。磁盘软件包更新完成。5. End the installation of app1, app2. The accessibility tool sends a message informing the file system that the filter driver is entering idle mode. The auxiliary tool scans the F: unused files in the disc. The disk package update is complete.
需要说明的是,本发明还可有其他多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。It is to be understood that the invention may be susceptible to various other modifications and changes in the embodiments of the present invention without departing from the spirit and scope of the invention. Corresponding changes and modifications are intended to be included within the scope of the appended claims.

Claims (12)

  1. 一种部署应用软件的方法,包括:A method of deploying application software, including:
    以读写方式挂载目标磁盘,通过文件系统过滤驱动拦截文件操作和注册表操作,将应用程序的实际安装路径重定向至所述目标磁盘的分区上,并通过在所述目标磁盘上创建的注册表文件保存所述应用程序的注册表操作记录;Mounting the target disk in read-write mode, intercepting file operations and registry operations through the file system filter driver, redirecting the actual installation path of the application to the partition of the target disk, and creating on the target disk The registry file saves the registry operation record of the application;
    以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘,通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理。The target disk hosting the application installation file and the registry operation record is mounted in a read-only mode, and the access operation of the application is intercepted and redirected by the file system filtering driver.
  2. 如权利要求1所述的方法,其中,The method of claim 1 wherein
    所述通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理,包括:The file system filtering driver intercepts access operations of the application and performs redirection processing, including:
    读取所述目标磁盘的分区上保存的注册表操作记录,拷贝到系统缓存中创建的注册表备份文件中;Reading the registry operation record saved on the partition of the target disk, and copying it to the registry backup file created in the system cache;
    通过文件系统过滤驱动拦截到注册表操作时,将所述操作重定向至系统缓存中创建的注册表备份文件中的注册表记录。When the file system filter driver intercepts the registry operation, the operation is redirected to the registry record in the registry backup file created in the system cache.
  3. 如权利要求1所述的方法,其中,The method of claim 1 wherein
    所述通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理,包括:The file system filtering driver intercepts access operations of the application and performs redirection processing, including:
    通过文件系统过滤驱动拦截到对所述应用程序在安装过程中生成的文件进行写操作时,将所述目标磁盘上保存的原始文件拷贝到系统缓存中,将所述写操作重定向至所述系统缓存中的对应文件。When the file system filter driver intercepts to write the file generated by the application during the installation process, copy the original file saved on the target disk to the system cache, and redirect the write operation to the The corresponding file in the system cache.
  4. 如权利要求3所述的方法,其中,The method of claim 3, wherein
    所述通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理,包括:The file system filtering driver intercepts access operations of the application and performs redirection processing, including:
    通过文件系统过滤驱动拦截到对所述应用程序在安装过程中生成的文件进行读操作时,如果系统缓存中存在对应文件,则对所述系统缓存中 的对应文件进行读操作,如果系统缓存中不存在所述对应文件,则对所述目标磁盘上的对应文件进行读操作。When the file system filter driver intercepts the read operation of the file generated by the application during the installation process, if a corresponding file exists in the system cache, the corresponding file in the system cache is read, if the system caches If the corresponding file does not exist, a read operation is performed on the corresponding file on the target disk.
  5. 如权利要求1-4中任一项所述的方法,其中,A method according to any one of claims 1 to 4, wherein
    以读写方式挂载目标磁盘时,所述目标磁盘分配给虚拟机单独使用;When the target disk is mounted in read/write mode, the target disk is allocated to the virtual machine for use alone;
    以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘时,所述目标磁盘分配给一个或多个虚拟机共同使用。When a target disk hosting an application installation file and a registry operation record is mounted read-only, the target disk is allocated for use by one or more virtual machines.
  6. 一种部署应用软件的装置,包括:A device for deploying application software, comprising:
    磁盘软件包模板制作模块,设置为以读写方式挂载目标磁盘,通过文件系统过滤驱动拦截文件操作和注册表操作,将应用程序的实际安装路径重定向至所述目标磁盘的分区上,并通过在所述目标磁盘上创建的注册表文件保存所述应用程序的注册表操作记录;The disk package template creation module is configured to mount the target disk in a read-write manner, and the file system filter driver intercepts the file operation and the registry operation, and redirects the actual installation path of the application to the partition of the target disk, and Saving the registry operation record of the application by using a registry file created on the target disk;
    磁盘软件包模板使用模块,设置为以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘,通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理。The disk package template uses a module that is configured to mount a target disk that hosts the application installation files and registry operation records in a read-only manner, and intercepts and redirects access operations to the application through the file system filter driver.
  7. 如权利要求6所述的装置,其中,The apparatus of claim 6 wherein
    磁盘软件包模板使用模块,设置为采用以下方式通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理:The disk package template uses a module that is set to intercept and redirect access to the application through the file system filter driver in the following manner:
    读取所述目标磁盘的分区上保存的注册表操作记录,拷贝到系统缓存中创建的注册表备份文件中;Reading the registry operation record saved on the partition of the target disk, and copying it to the registry backup file created in the system cache;
    通过文件系统过滤驱动拦截到注册表操作时,将所述操作重定向至系统缓存中创建的注册表备份文件中的注册表记录。When the file system filter driver intercepts the registry operation, the operation is redirected to the registry record in the registry backup file created in the system cache.
  8. 如权利要求6所述的装置,其中,The apparatus of claim 6 wherein
    磁盘软件包模板使用模块,设置为采用以下方式通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理:The disk package template uses a module that is set to intercept and redirect access to the application through the file system filter driver in the following manner:
    通过文件系统过滤驱动拦截到对所述应用程序在安装过程中生成的 文件进行写操作时,将所述目标磁盘上保存的原始文件拷贝到系统缓存中,将所述写操作重定向至所述系统缓存中的对应文件。When the file system filter driver intercepts to write the file generated by the application during the installation process, copy the original file saved on the target disk to the system cache, and redirect the write operation to the The corresponding file in the system cache.
  9. 如权利要求8所述的装置,其中,The device of claim 8 wherein
    磁盘软件包模板使用模块,设置为采用以下方式通过文件系统过滤驱动拦截对应用程序的访问操作并进行重定向处理:The disk package template uses a module that is set to intercept and redirect access to the application through the file system filter driver in the following manner:
    通过文件系统过滤驱动拦截到对所述应用程序在安装过程中生成的文件进行读操作时,如果系统缓存中存在对应文件,则对所述系统缓存中的对应文件进行读操作,如果系统缓存中不存在所述对应文件,则对所述目标磁盘上的对应文件进行读操作。When the file system filter driver intercepts the read operation of the file generated by the application during the installation process, if a corresponding file exists in the system cache, the corresponding file in the system cache is read, if the system caches If the corresponding file does not exist, a read operation is performed on the corresponding file on the target disk.
  10. 如权利要求6-9中任一项所述的装置,其中,The apparatus according to any one of claims 6 to 9, wherein
    以读写方式挂载目标磁盘时,所述目标磁盘分配给虚拟机单独使用;When the target disk is mounted in read/write mode, the target disk is allocated to the virtual machine for use alone;
    以只读方式挂载承载应用程序安装文件和注册表操作记录的目标磁盘时,所述目标磁盘分配给一个或多个虚拟机共同使用。When a target disk hosting an application installation file and a registry operation record is mounted read-only, the target disk is allocated for use by one or more virtual machines.
  11. 一种虚拟机,包括:A virtual machine that includes:
    存储器、处理器及存储在所述存储器上并可在所述处理器上运行的部署应用软件的程序,所述部署应用软件的程序被所述处理器执行时实现如权利要求1-5中任一项所述的部署应用软件的方法的步骤。a memory, a processor, and a program for deploying application software stored on the memory and operable on the processor, the program deploying the application software being executed by the processor to implement any of claims 1-5 A step of the method of deploying an application software as described.
  12. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有部署应用软件的程序,所述部署应用软件的程序被处理器执行时实现如权利要求1-5中任一项所述的部署应用软件的方法的步骤。A computer readable storage medium, wherein the computer readable storage medium stores a program for deploying application software, and the program for deploying the application software is executed by a processor to implement any one of claims 1-5 The steps of the method of deploying the application software.
PCT/CN2018/102285 2017-12-21 2018-08-24 Application software deployment method and device, and virtual machine WO2019119850A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711395237.4A CN107992355B (en) 2017-12-21 2017-12-21 Method and device for deploying application software and virtual machine
CN201711395237.4 2017-12-21

Publications (1)

Publication Number Publication Date
WO2019119850A1 true WO2019119850A1 (en) 2019-06-27

Family

ID=62038154

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102285 WO2019119850A1 (en) 2017-12-21 2018-08-24 Application software deployment method and device, and virtual machine

Country Status (2)

Country Link
CN (1) CN107992355B (en)
WO (1) WO2019119850A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457871A (en) * 2019-08-13 2019-11-15 杭州安恒信息技术股份有限公司 A kind of finger daemon method and apparatus based on filter Driver on FSD frame

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107992355B (en) * 2017-12-21 2021-07-13 中兴通讯股份有限公司 Method and device for deploying application software and virtual machine
CN109284161B (en) * 2018-09-13 2021-10-08 深圳市青葡萄科技有限公司 Software distribution method in desktop virtualization environment
CN109992207A (en) * 2019-03-29 2019-07-09 深圳市天威视讯股份有限公司 A kind of optimization method and system of the memory space suitable for Intelligent set top box
CN110442389B (en) * 2019-08-07 2024-01-09 北京技德系统技术有限公司 Method for sharing GPU (graphics processing Unit) in multi-desktop environment
CN113806007A (en) * 2020-06-15 2021-12-17 中兴通讯股份有限公司 Disk mounting method, disk mounting device, storage medium, and electronic device
CN113946276A (en) * 2020-07-16 2022-01-18 北京达佳互联信息技术有限公司 Disk management method and device in cluster and server
CN112506451B (en) * 2020-12-08 2023-04-07 西安雷风电子科技有限公司 Printer information management toolkit and management method
CN112506532A (en) * 2020-12-10 2021-03-16 西安雷风电子科技有限公司 Software installation package generation method, installation method and system
CN114706659B (en) * 2022-04-01 2022-12-09 燕东科技(广东)有限公司 Virtual machine software deployment method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231116A (en) * 2011-07-04 2011-11-02 成都市华为赛门铁克科技有限公司 Application program virtualization installing and loading method and device
CN105701409A (en) * 2015-12-29 2016-06-22 北京金山安全软件有限公司 Method and device for realizing file virtualization
CN106022100A (en) * 2016-05-17 2016-10-12 北京金山安全软件有限公司 Method and device for intercepting installation of malicious program and electronic equipment
CN107992355A (en) * 2017-12-21 2018-05-04 中兴通讯股份有限公司 A kind of method, apparatus and virtual machine of application deployment software

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279748A (en) * 2011-08-29 2011-12-14 焦秀琴 Method, system, server and client side for remotely storing locally executed software
CN102662741B (en) * 2012-04-05 2014-04-02 华为技术有限公司 Method, device and system for realizing virtual desktop
US10193924B2 (en) * 2014-09-17 2019-01-29 Acalvio Technologies, Inc. Network intrusion diversion using a software defined network
CN104766007B (en) * 2015-03-27 2017-07-21 杭州安恒信息技术有限公司 A kind of method that the fast quick-recovery of sandbox is realized based on file system filter driver

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231116A (en) * 2011-07-04 2011-11-02 成都市华为赛门铁克科技有限公司 Application program virtualization installing and loading method and device
CN105701409A (en) * 2015-12-29 2016-06-22 北京金山安全软件有限公司 Method and device for realizing file virtualization
CN106022100A (en) * 2016-05-17 2016-10-12 北京金山安全软件有限公司 Method and device for intercepting installation of malicious program and electronic equipment
CN107992355A (en) * 2017-12-21 2018-05-04 中兴通讯股份有限公司 A kind of method, apparatus and virtual machine of application deployment software

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457871A (en) * 2019-08-13 2019-11-15 杭州安恒信息技术股份有限公司 A kind of finger daemon method and apparatus based on filter Driver on FSD frame

Also Published As

Publication number Publication date
CN107992355B (en) 2021-07-13
CN107992355A (en) 2018-05-04

Similar Documents

Publication Publication Date Title
WO2019119850A1 (en) Application software deployment method and device, and virtual machine
JP5026509B2 (en) Converting a machine to a virtual machine
JP5681465B2 (en) Information processing system, information processing apparatus, preparation method, program, and recording medium
EP2765508B1 (en) Installation method and installation device for application software
JP5066613B2 (en) Security management apparatus and method, and program
US20170147390A1 (en) Creating templates of offline resources
US8677111B2 (en) Booting devices using virtual storage arrays over wide-area networks
US7203774B1 (en) Bus specific device enumeration system and method
US20110276963A1 (en) Virtual Data Storage Devices and Applications Over Wide Area Networks
WO2020103904A1 (en) Cloud desktop upgrade method, device, cloud server, and storage medium
JP2011076605A (en) Method and system for running virtual machine image
US11138028B1 (en) Hot growing a cloud hosted block device
CN102289513A (en) Method and system for obtaining internal files of virtual machine
JP2021515299A (en) A system for chronological out-of-place updates, a method for chronological out-of-place updates, and a computer program for chronological out-of-place updates.
CN110221868B (en) Host system deployment method and device, electronic equipment and storage medium
CN100547550C (en) Install and be written into the system and method for installation system supervisory routine behind the operating system of user
AU2012200600B2 (en) &#34;Converting machines to virtual machines&#34;

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.10.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18890883

Country of ref document: EP

Kind code of ref document: A1