CN116974592A - Software deployment method, device, computer equipment and storage medium - Google Patents
Software deployment method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN116974592A CN116974592A CN202310789908.4A CN202310789908A CN116974592A CN 116974592 A CN116974592 A CN 116974592A CN 202310789908 A CN202310789908 A CN 202310789908A CN 116974592 A CN116974592 A CN 116974592A
- Authority
- CN
- China
- Prior art keywords
- virtual
- disk
- virtual machine
- registry
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 94
- 238000003860 storage Methods 0.000 title claims abstract description 30
- 238000012217 deletion Methods 0.000 claims description 27
- 230000037430 deletion Effects 0.000 claims description 27
- 238000009434 installation Methods 0.000 claims description 9
- 230000004044 response Effects 0.000 claims description 9
- 238000012937 correction Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 description 33
- 230000004048 modification Effects 0.000 description 23
- 238000012986 modification Methods 0.000 description 22
- 238000012545 processing Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000009826 distribution Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000003032 molecular docking Methods 0.000 description 1
- 238000013138 pruning Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a software deployment method, a software deployment device, computer equipment and a storage medium. Responding to the operation for logging in the first virtual machine, and creating a virtual difference disk corresponding to the first virtual machine by taking the virtual disk as a master disk; mounting the virtual difference disk to a first virtual machine in a read-write mode; and acquiring a target data item from the configuration file based on login information of logging in the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identifier in the login information, and storing the corrected data item to the virtual difference disk. By creating the writable virtual difference disk, the user information in the virtual disk is corrected to the information corresponding to the first user identifier logged in the first virtual machine, so that the user logged in the first virtual machine can use software data installed in the virtual disk under the other user directories, and the compatibility of the virtual application program is improved.
Description
Technical Field
The present application relates to the field of computer security, and more particularly, to a software deployment method, apparatus, computer device, and storage medium.
Background
Virtual desktop architecture (Virtual Desktop Infrastructure, VDI) is widely used in various fields of social life nowadays, and the VDI creates a unified system desktop for different users, so that different users can obtain unified experiences by using the unified system desktop, and the users can obtain personalized application software management and supply through application virtualized recording and distribution processes. However, in general, the application virtualization is recorded by logging in the authority account of the operating system administrator by the virtual desktop administrator, and once the user uses an operating system account with a different recording environment in the distributed use environment, the compatibility effect of the application virtualization is greatly reduced.
Disclosure of Invention
In view of the above problems, the present application provides a software deployment method, apparatus, computer device, and storage medium, so that a user currently logged in a first virtual machine can use software data installed in a virtual disk under the directory of other users, thereby improving the compatibility of virtual application programs.
In a first aspect, an embodiment of the present application provides a software deployment method, where the method includes: sharing a virtual disk to a first virtual machine in a read-only mode, and responding to an operation for logging in the first virtual machine, creating a virtual difference disk corresponding to the first virtual machine by taking the virtual disk as a master disk, wherein the virtual disk comprises a data item of a pre-installed application program and a configuration file related to user information, the data item comprises a file and a registry, and the user information recorded in the data item in the configuration file is user information corresponding to the software recording operation; mounting the virtual difference disk to the first virtual machine in a read-write mode; and acquiring a target data item from data items of an application program pre-installed in the virtual disk based on login information of the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identification in the login information, and storing the corrected data item to the virtual difference disk.
In a second aspect, an embodiment of the present application provides a software deploying apparatus, the apparatus comprising: the system comprises a difference disc creation module, a disc mounting module and a permission correction module, wherein the difference disc creation module is used for sharing a virtual disc to a first virtual machine in a read-only mode, responding to an operation for logging in the first virtual machine, creating a virtual difference disc corresponding to the first virtual machine by taking the virtual disc as a master disc, wherein the virtual disc comprises a data item of a pre-installed application program and a configuration file related to user information, the data item comprises a file and a registry, and user information recorded in the data item in the configuration file is user information corresponding to a software recording operation; the disk mounting module is used for mounting the virtual difference disk to the first virtual machine in a read-write mode; the permission correction module is used for acquiring a target data item from data items of an application program pre-installed in the virtual disk based on login information of the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identifier in the login information, and storing the corrected data item to the virtual difference disk.
In a third aspect, an embodiment of the present application provides a computer apparatus, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more application programs configured to perform the software deployment method provided in the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium having stored therein program code that is callable by a processor to perform the software deployment method provided in the first aspect above.
According to the scheme provided by the application, a virtual disk is shared to a first virtual machine in a read-only mode, and a virtual difference disk corresponding to the first virtual machine is created by taking the virtual disk as a master disk in response to an operation for logging in the first virtual machine, wherein the virtual disk comprises a data item of a pre-installed application program and a configuration file related to user information, the data item comprises a file and a registry, and the user information recorded in the data item in the configuration file is user information corresponding to a software recording operation; mounting the virtual difference disk to a first virtual machine in a read-write mode; and acquiring a target data item from data items of an application program pre-installed in the virtual disk based on login information of the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identification in the login information, and storing the corrected data item to the virtual difference disk. By creating the writable virtual difference disk, the user information in the virtual disk is corrected to the information corresponding to the first user identifier logged in the first virtual machine, so that the user logged in the first virtual machine can use software data installed in the virtual disk under the other user directories, and the compatibility of the virtual application program is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a software deployment method according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a software deployment method according to another embodiment of the present application.
Fig. 3 is a schematic flow chart of software recording in the software deployment method according to the embodiment of the present application.
Fig. 4 is a schematic flow chart of virtual machine operation in the software deployment method according to the embodiment of the present application.
Fig. 5 is a schematic flow chart of a software deployment method according to another embodiment of the present application.
Fig. 6 shows a schematic structural diagram of a software deploying device according to an embodiment of the present application.
Fig. 7 shows a block diagram of a computer device according to an embodiment of the present application.
Fig. 8 shows a block diagram of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings.
The application provides a software deployment method, a device, computer equipment and a storage medium, wherein user information in a virtual disk is corrected to information corresponding to a first user identifier logged in a first virtual machine by creating a writable virtual difference disk, so that a user logged in the first virtual machine can also use software data installed in the virtual disk under the directory of other users, and the compatibility of virtual application programs is improved. The specific software deployment method is described in detail in the following embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of a software deployment method according to an embodiment of the present application, and the detailed description will be given below with respect to the flow chart shown in fig. 1, where the software deployment method specifically includes the following steps:
step S110: and sharing a virtual disk to a first virtual machine in a read-only mode, and responding to an operation for logging in the first virtual machine, and creating a virtual difference disk corresponding to the first virtual machine by taking the virtual disk as a master disk, wherein the virtual disk comprises a data item of a pre-installed application program and a configuration file related to user information, the data item comprises a file and a registry, and the user information recorded in the data item in the configuration file is the user information corresponding to the software recording operation.
In the embodiment of the application, the computer equipment can share the virtual disk comprising the pre-installed application programs to the first virtual machine in a read-only manner, so that a user can log in the first virtual machine and use the application programs in the virtual disk. In order to protect the data of each application program in the virtual disk from being changed by the user at will, and to consider sharing efficiency, the computer device may limit the access authority of the first virtual machine to the virtual disk, that is, make it only access the data in the virtual disk in a read-only manner, but not modify the data therein. It will be appreciated that while the software data in the virtual disk is thus protected, restrictions on permissions for a user logging into the first virtual machine may affect the user's use experience and efficiency. Especially if the user information logged into the first virtual machine is inconsistent with the user information recorded in the virtual disk, then the user logged into the first virtual machine will have limited access to the software in the virtual disk. For example, in an application program installed in the virtual disk, the user information recorded in the target data item related to the user information is user information corresponding to a user performing software recording, where the user information is different from information corresponding to a user logging in the first virtual machine, and then the user logging in the first virtual machine cannot access the target data item in the virtual disk, that is, the access authority of the user logging in the first virtual machine is limited. Therefore, after the computer device mounts the virtual disk to the first virtual machine in a read-only manner, when a user logs in the first virtual machine, the virtual disk is used as a master disk, and a readable and writable virtual difference disk is created for the first virtual machine, so that target data items related to user information in the virtual disk can be corrected through the virtual difference disk, the user information recorded in the corrected target data is user information corresponding to the user currently logged in the first virtual machine, and the user logged in the first virtual machine can access the target data items which cannot be accessed originally.
It can be understood that the virtual disk stores data items such as files, registries and the like of each pre-installed application program, wherein the user information recorded in the data items is necessarily the user information corresponding to the recording user for recording the software in the virtual disk.
It can be understood that, in order to avoid that the user modifies the file and registry data in the virtual disk through the first virtual machine after logging in the first virtual machine, the computer device must mount the virtual disk onto the virtual machine in a read-only manner, so as to ensure that after logging in different virtual machines, a plurality of users can only read the data in the virtual disk, but cannot modify the data in the virtual disk. In this case, if the user needs to modify an application program in the virtual disk, in general, the computer device needs to copy all files and registry data corresponding to the application program into a system disk corresponding to the virtual machine, and then modify the file data in the system disk based on the modification requirement of the user. Obviously, the modification mode is complex in operation, the data quantity required to be migrated is large, the occupied dead space is large, the probability of error occurrence is also large, and the modification mode still has the problem that a login user cannot access data items in a user catalog corresponding to a recording user performing software recording operation, namely, the software compatibility is low.
In one embodiment, the recording user may pre-install a plurality of different application programs in the virtual disk, where each application program includes a plurality of files and data items such as a registry, so that when the virtual disk is shared to the first virtual machine, the first virtual machine can quickly correct the target data item in the virtual disk, where the user information corresponding to the recording user is recorded, and in the process of performing software recording, the target data item in the application program recorded in the virtual disk, where the user information corresponding to the recording user is recorded, may be recorded in advance in the configuration file. After the virtual disk is shared to the first virtual machine, the first virtual machine can directly find the target data item recorded with the user information of the recording user in the application program based on the configuration file in the virtual disk, and then the target data item is modified. Specifically, the configuration file can record and record the corresponding user name, user security identifier SID, user domain name, user configuration file path and other information when the user logs in the recording virtual machine to record the software; after the software is recorded, the computer equipment can traverse key values of all registries in data items of the application program in the virtual disk so as to identify path information related to a recording user in the data of the key values of the character string type, and record the items where the key values are positioned, names of the key values, the type of the key values and the like in a configuration file; the computer device may also traverse all shortcuts corresponding to the application program in the virtual disk, parse the formats of the shortcuts, and if path information related to the recording user exists in the shortcuts, record the file positions including the shortcuts into the configuration file.
In other words, in the software recording process of the recording user, the computer device may traverse the files and registry data of each application program in the virtual disk after the installation of each application program is completed and the completion of the recording is confirmed, record the data related to the recording user in the configuration file, so that the user configuration file directory in the data item of the application program of the virtual disk is renamed to the user configuration file directory logged in the first virtual machine directly based on the data recorded in the configuration file, modify the user information corresponding to the recording user in the ACL security attribute control items of the data items such as the recording file and registry to the user information corresponding to the user logged in the first virtual machine, modify the path information string key value related to the path information string of the recording user configuration file in the registry to the user configuration file path matched with the first virtual machine, and modify the shortcut destination path in the file data to have the shortcut associated with the user configuration file path matched with the user configuration file path.
It can be appreciated that, in response to the operation for logging in the first virtual machine, the computer device can obtain user information corresponding to a logged-in user logging in the first virtual machine, such as a user name, a user SID, a user domain name, and the like of the logged-in user. Meanwhile, the computer equipment can also establish a corresponding virtual difference disk for the first virtual machine by taking the shared virtual disk as a master disk. Therefore, in order to enable a login user to directly use data items of application programs stored in the virtual disk under the meshes of other users after logging in the first virtual machine, the computer equipment can read configuration files related to user information and special components in the virtual disk through a preset fixed program in the process of logging in the first virtual machine by the login user, acquire user information corresponding to the login user in the process of logging in the user, record data items related to the user information corresponding to the recording user in the data items of the application programs pre-installed in the virtual disk, modify the data items into data items adapted to the user information corresponding to the login user, and transfer data change information into a writable virtual difference disk for storage. Therefore, after the login user logs in the first virtual machine, if virtual software data originally installed under the user directory of the recording user is needed to be used, the computer equipment can determine that the login user can use the virtual software data under the user directory of the recording user based on the corrected file and the registry data item stored in the virtual difference disk corresponding to the first virtual machine. Therefore, the effect of distributing the application programs recorded and stored in the user directory of the recording user to different virtual machines for calling the user accounts can be achieved.
In some embodiments, the computer device may be pre-notified by a credenalalprovider component provided by a custom Windows system, or other registered Windows user login service, so that when a login user logs in to a first virtual machine, the computer device may execute the software deployment method provided by the present application, create a virtual difference disk corresponding to the first virtual machine with a virtual disk as a master disk, and correct related operations of user authority information of files and registry data in subsequent steps, thereby achieving an effect of distributing an application program stored in a recorded user directory to virtual machines logged in by different users.
In some embodiments, the computer device may create a corresponding virtual differencing disk for each different logged-in user, where the virtual differencing disk includes modified target data items, and the user information recorded in the modified target data items is user information corresponding to the logged-in user.
Step S120: and mounting the virtual difference disk to the first virtual machine in a read-write mode.
In the embodiment of the application, after the computer equipment creates the corresponding virtual difference disk for the first virtual machine, the virtual difference disk can be mounted to the first virtual machine in a read-write mode, so that the computer equipment can correct files and registry data items needing to change user information in the writable virtual difference disk. It can be appreciated that, in order to protect the data security and sharing efficiency of each application program in the virtual disk, the virtual disk is usually mounted to each virtual machine in a read-only manner, that is, the virtual machine cannot modify the software data installed in the virtual disk. And once the user information corresponding to the recording user for recording the software on the virtual disk is different from the user information corresponding to the login user logging in the first virtual machine, the login user cannot access the software data installed in the virtual disk under the user directory of the recording user on the first virtual machine. Therefore, the computer equipment can establish a corresponding virtual difference disk for the first virtual machine by taking the virtual disk as a master disk, and mount the virtual difference disk to the first virtual machine in a read-write mode, so that the computer equipment can achieve the effect of distributing software data stored in the virtual disk under the user's directory of a recording user to the first virtual machine for use by recording modification of partial data items in the virtual disk after sharing the virtual disk to the first virtual machine.
Step S130: and acquiring a target data item from data items of an application program pre-installed in the virtual disk based on login information of the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identification in the login information, and storing the corrected data item to the virtual difference disk.
In the embodiment of the application, the computer equipment can acquire login information corresponding to a login user in the process of logging in the first virtual machine by the user, acquire a target data item recorded with user information corresponding to a recording user in a data item of an application program in a virtual disk based on a configuration file in the virtual disk after creating a writable virtual difference disk corresponding to the first virtual machine, modify the user information recorded in the target data item into the user information corresponding to the login user currently logged in the first virtual machine, and store modified data in the virtual difference disk, so that the login user logged in the first virtual machine can normally access the data item stored in the user directory of the user in the original software recording process, and realize compatible processing of the data item in the user directory.
It can be understood that after the computer device modifies the user information in the file and registry data item to the user information corresponding to the login user currently logged in the first virtual machine, the computer device may further redirect, through the file registry, the access operation for the data item such as the file and registry that does not exist in the system disk, to the access operation for the data item such as the file and registry stored in the virtual difference disk, and because the user information recorded in the data item such as the file and registry stored in the virtual disk has been modified to the user information corresponding to the login user currently logged in the first virtual machine through the virtual difference disk, the computer device may allow the login user currently logged in the first virtual machine to access the software and data originally stored in the user directory of the recording user in the virtual disk based on the data item stored in the virtual difference disk, thereby implementing the compatible processing of the software and data under the user directory of the recording user. The system disk is a default installation position in the recording process of the application program, the virtual disk created in the software package disk is a position where the application program is actually installed when the software is recorded, and the computer equipment can redirect the system disk position originally installed by default in the recording process of the software to the virtual disk through the file registry to separate the application program in the virtual disk from the system file in the system disk.
According to the software deployment method provided by the embodiment of the application, a virtual disk is shared to a first virtual machine in a read-only manner, and a virtual difference disk corresponding to the first virtual machine is created by taking the virtual disk as a master disk in response to an operation for logging in the first virtual machine, wherein the virtual disk comprises data items of a pre-installed application program, and the data items comprise files and a registry; mounting the virtual difference disk to a first virtual machine in a read-write mode; and acquiring a target data item from data items of an application program pre-installed in the virtual disk based on login information of the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identification in the login information, and storing the corrected data item to the virtual difference disk. By creating the writable virtual difference disk, the user information in the virtual disk is corrected to the information corresponding to the first user identifier logged in the first virtual machine, so that the user logged in the first virtual machine can use software data installed in the virtual disk under the other user directories, and the compatibility of the virtual application program is improved.
Referring to fig. 2, fig. 2 is a schematic flow chart of a software deployment method according to another embodiment of the present application, and the detailed description will be given below with respect to the flow chart shown in fig. 2, where the software deployment method specifically includes the following steps:
step S210: and responding to the software recording operation by the recording virtual machine, creating the virtual disk in a software package disk and carrying out writable mounting, wherein the software package disk is a storage disk area prepared in advance for recording the application program.
Step S220: and when the application program is virtually installed on the system disk, redirecting and installing the data item of the application program on the virtual disk through a file registry redirection driver.
In the embodiment of the application, in general, in order to enable a user to acquire personalized application management and supply, the computer device can redirect the driver through the file registry, and in the process of recording software, the application program originally installed to the system disk by default is redirected to the software package disk, so that the operating system and the application program are distributed respectively. However, in this software recording manner, during the recording process of the file and registry of the application program, there may be a case that a part of data items are installed in the user directory corresponding to the recording user performing the software recording operation, and once the user information corresponding to the login user logging in the first virtual machine is not matched with the user information corresponding to the recording user, the login user cannot access the data items in the virtual disk under the user directory of the recording user, which results in poor software compatibility. Therefore, the computer equipment can create a virtual disk in the software package disk, write and mount the virtual disk, redirect and drive the application program which is originally redirected to the software package disk to the virtual disk through the file registry, and then after the virtual disk is read-only and shared to the first virtual machine, the virtual disk can be used as a master disk to create a writable virtual difference disk, and further correct the target data item which records the user information in the virtual disk through the writable virtual difference disk, so that a login user which logs in the first virtual machine can access the data item which is originally installed under the user directory of the recording user, and the compatibility of the software data is improved.
Step S230: and determining a configuration file related to the user information based on a second user identifier corresponding to the software recording operation, wherein the recorded user information in the configuration file is the user information corresponding to the second user identifier.
In the embodiment of the application, in order to enable the first virtual machine sharing the virtual disk to more conveniently and rapidly correct the user information of the recording user recorded in the target data item of each application program in the virtual disk to the user information corresponding to the login user of the first virtual machine, the computer device may further traverse the data items such as the file and the registry in the virtual disk to determine all the data related to the user information and all the data related to the special component in the data items as the target data items when the software recording process is finished, that is, after the virtual installation of each application program is confirmed, and record the data items in the configuration file so that the subsequent first virtual machine sharing the virtual disk can directly correct the user information recorded in the data items of the file and the registry related to the user information corresponding to the login user of the first virtual machine based on the configuration file in the virtual disk.
It can be understood that, in the process of recording software in the virtual disk, each application program is virtually installed and configured by the recording user, so if some application program installation data includes data related to user information, the user information recorded by the data item is necessarily user information corresponding to the recording user, that is, user information corresponding to the second user identifier corresponding to the execution of the software recording operation. Obviously, if the first user identifier corresponding to the login user logged in the first virtual machine sharing the virtual disk is different from the second user identifier, the login user logged in the first virtual machine cannot use the software data in the user directory corresponding to the second user identifier. Therefore, in order to completely share the data items in each application program in the virtual disk to any login user, the computer device can record the target data item with the user information recorded in the data items of the application program in the configuration file in advance in the process of recording the software by recording the virtual machine.
In general, referring to FIG. 3, a computer device may record software in a virtual disk by recording a virtual machine. The method comprises the steps that firstly, computer equipment can conduct partition formatting on a software package disk on a recording virtual machine, and secondly, auxiliary tools are started; the second step, the computer equipment can create a virtual disk file in a software package disk through a software package auxiliary tool, set the authority of the virtual disk as the read-write authority, perform operations such as partition formatting and the like on the virtual disk, and finish the operation of creating the virtual disk; the fourth step, the computer equipment can start the software recording operation, namely, the data items of all application programs are redirected and installed into the virtual disk through a file registry redirection driver; after all the applications to be installed are successfully installed, the computer device can execute the auxiliary operation of the fifth step, for example, send a message to a file registry redirection driver to inform that the installation of the applications is completed, the file registry redirection driver can separate the nodes previously installed on the registry branch, the software recording daemon can also clean useless files (such as temporary files) in the virtual disk, scan the registry files to obtain the installed application paths, extract icons, version numbers, manufacturer information and the like of the applications, and report the icons, version numbers, manufacturer information and the like to the virtual desktop management platform for storage; and then, in order to facilitate the subsequent sharing of the virtual disk to the first virtual machine, the computer device can perform a sixth step of identifying the data items such as the files and the registry of each application program in the virtual disk, generating a corresponding configuration file, and finally, the computer device can execute a seventh step of unloading the virtual disk.
Step S240: and sharing a virtual disk to a first virtual machine in a read-only mode, and responding to an operation for logging in the first virtual machine, and creating a virtual difference disk corresponding to the first virtual machine by taking the virtual disk as a master disk, wherein the virtual disk comprises a data item of a pre-installed application program and a configuration file related to user information, the data item comprises a file and a registry, and the user information recorded in the data item in the configuration file is the user information corresponding to the software recording operation.
Step S250: and mounting the virtual difference disk to the first virtual machine in a read-write mode.
Step S260: and acquiring a target data item from the configuration file based on login information of the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identifier in the login information, and storing the corrected data item to the virtual difference disk.
In the embodiment of the present application, the steps S240 to S260 may refer to the content of other embodiments, which are not described herein.
Step S270: and removing the mounting of the virtual difference disk and replacing the virtual difference disk with the mounting of the virtual difference disk to the first virtual machine in a read-only mode.
In the embodiment of the application, after the computer device corrects the user information recorded in the application program files and registry data in the virtual disk to the information corresponding to the first user identifier based on the writable virtual difference disk corresponding to the first virtual machine, in order to prevent the user from modifying the data items such as the files and registry in the virtual difference disk again due to misoperation after logging in the first virtual machine, or modifying the data items such as the files and registry in the virtual difference disk by other application programs maliciously, the computer device can cancel the mounting of the virtual difference disk before the completion of the operation of logging in the first virtual machine by the user and after storing the corrected target data items in the virtual difference disk based on the login information of logging in the first virtual machine, and mount the virtual difference disk corresponding to the first virtual machine in a read-only manner again. That is, after the computer device completes the correction operation on the user information recorded in the data item based on the fixed program set in advance, in order to avoid the target data item in the virtual difference disc, on which the user information of the login user is recorded, from being destroyed again, the write authority of the first virtual machine to the virtual difference disc may be prohibited, and thus the security of the data items such as files, registry, and the corresponding application programs in the virtual difference disc may be ensured.
Step S280: creating a virtual writable disk in the personal disk corresponding to the first user identifier, wherein the virtual writable disk is used for storing use data generated when an application program in the virtual disk is virtually operated in a virtual machine logged in by the first user identifier.
In the embodiment of the application, in order to enable the operation data of the user on the first virtual machine to roam along with the user, the computer device can also create a virtual writable disk in the personal disk corresponding to the first user identifier in the process that the user logs in the first virtual machine. The computer device may record in the virtual writable disk modification and usage data generated by the user running the respective application in the first virtual machine that was logged in. If the same user subsequently logs in other virtual machines, after the user logs in the virtual machine, the computer equipment can acquire the modification and use data corresponding to each application program recorded in the personal disk corresponding to the user based on the user information corresponding to the user, so that the user can continuously use each application program in the virtual disk on the basis of the modification and use data of the application program on the other virtual machine last time, and the user can use each application program of the virtual machine more conveniently. The personal disk can be bound with the user information corresponding to the first user identification, and a user can check all data in the personal disk corresponding to the first user identification as long as the user logs in any virtual machine through the user information corresponding to the first user identification.
Step S290: and installing a font file in the first virtual machine based on the font information recorded in the font data file.
In the embodiment of the application, after the computer equipment mounts the virtual disk to the first virtual machine, in the process of logging in the first virtual machine by a login user, the corresponding font file can be installed in the first virtual machine based on the font data file stored in the virtual disk. In particular, the font data file may include a font configuration file and corresponding data items such as a file, a registry, and the like. The computer device may perform installation of the font file by calling an API interface addfontsource provided by the system, and after the installation is completed, broadcast a message of successful font installation through an API interface wm_fonthage so that each process on the system may use the font.
In some embodiments, after the software recording operation is finished in the virtual disk, the computer device may further obtain a registry data key value corresponding to the font component in the recording virtual machine, and record the key value information into a configuration file in the font data file. After sharing the virtual disk to the first virtual machine, in response to an operation of logging in the first virtual machine, the computer device may install the font file in the first virtual machine by recording the font data file of the font information in the virtual disk, so as to implement distribution of the relevant font component.
In some embodiments, in the process of recording software in the virtual disk, the computer device may record related files of the imeinput method in the system environment of the recording virtual Machine, specifically, may search a registry, that is, a registry under the machine\sylem\control set001\control\keyboard languages, and record key value information in the registry to the input method configuration file, and store the input method configuration file in the virtual disk. The key values specifically recorded in the input method configuration file may include: imefile, layout Text, layout File, layout Display Name, layout Id, system imefile, system, etc. After sharing the virtual disk to the first virtual machine, after the login user logs in to the first virtual machine, that is, after the file registry redirection driver takes effect, the computer device may determine whether to install the imeinput method on the first virtual machine based on the input method configuration file in the virtual disk and the input method information already installed in the local system environment of the first virtual machine. Specifically, if the recording imeinput method is not installed on the system of the first virtual machine, the computer device may call the system API to perform the local new installation and docking, and install the corresponding imeinput method in the first virtual machine environment.
In general, referring to fig. 4, a computer device may share a virtual disk, which has been recorded in advance in software, to a first virtual machine in a read-only manner, and then start an auxiliary tool when a user logs in the first virtual machine; the auxiliary tool can use the virtual disk as a master disk to create a virtual difference disk corresponding to the first virtual machine, and mount the virtual difference disk with read-write permission, so that compatibility of an application program in the virtual difference disk can be processed, namely a recorded data item is obtained from a configuration file, and user information recorded in a target data item is corrected to user information corresponding to a login user logged in the first virtual machine; after the compatibility processing of the application program is completed through the virtual disk, the computer equipment can also create a corresponding virtual writable disk for a login user, and mount the virtual writable disk with the read-write permission. At this time, the computer device has completed the compatibility processing, in order to avoid the user from changing the user information in the virtual difference disk again after logging in the first virtual machine, at this time, the computer device may uninstall the virtual difference disk and mount it again with the read-only authority. In this way, the application in the virtual disk becomes active, i.e., the user can view the application in the virtual disk. After that, the computer device may process the service system related compatibility, the input method related compatibility, and the font related compatibility in the virtual disk in order to further improve the compatibility of the virtual disk. The software distribution daemon may send a virtual software validation message to the file registry redirection driver whereby the application in the virtual disk is fully validated.
According to the software deployment method provided by the embodiment of the application, the virtual disk is created in the software package disk and is subjected to writable mounting by the recording virtual machine in response to the software recording operation, and the software package disk is a storage disk area prepared for recording the application program in advance; when the application program is virtually installed on a system disk, redirecting and installing the data item of the application program to the virtual disk through a file registry redirection driver; and determining a configuration file related to the user information based on a second user identifier corresponding to the software recording operation, wherein the user information recorded in the configuration file is the user information corresponding to the second user identifier. Creating a virtual disk in a software package disk through software recording operation, virtually installing an application program in the virtual disk to complete recording, thereby enabling a first virtual machine to create a corresponding virtual difference disk by taking the virtual disk as a master disk, storing data items such as files, a registry and the like of the application program with user information corrected in the writable virtual difference disk, further enabling a login user logging in the first virtual machine to access software data recorded under a user directory of the login user in the virtual disk in the software recording operation, and improving the compatibility of the application program; meanwhile, by creating a virtual writable disk in the personal disk to record the use data generated when the application program runs in the process of logging in the virtual machine by a user, the effects of software modification and use data roaming reservation along with the user can be realized.
Referring to fig. 5, fig. 5 is a schematic flow chart of a software deployment method according to another embodiment of the present application, and the detailed description will be given below with respect to the flow chart shown in fig. 5, where the software deployment method specifically includes the following steps:
step S310: and responding to the software recording operation by the recording virtual machine, creating the virtual disk in a software package disk and carrying out writable mounting, wherein the software package disk is a storage disk area prepared in advance for recording the application program.
Step S320: and when the application program is virtually installed on the system disk, redirecting and installing the data item of the application program on the virtual disk through a file registry redirection driver.
In the embodiment of the present application, the steps S310 to S320 can refer to the content of other embodiments, which are not described herein.
Step S330: and determining an environment variable adding registry and an environment variable deleting registry based on a first path environment variable corresponding to the recording virtual machine before responding to the software recording operation and a second path environment variable corresponding to the recording virtual machine after responding to the software recording operation.
Step S340: and storing the environment variable adding registry and the environment variable deleting registry in the virtual disk.
In the embodiment of the application, the environment variable addition registry is a path item added relative to the first path environment variable in the second path environment variable, and the environment variable deletion registry is a path item deleted relative to the first path environment variable in the second path environment variable. In the process that the computer equipment records software in the virtual disk through the recording virtual machine, each path environment variable in the recording virtual machine can be modified based on actual requirements, including adding the path item of a certain path environment variable or deleting the path item of a certain path environment variable. It can be understood that, in order to avoid that the path environment variable modified in the software recording process is directly covered by the same name path environment variable on the first virtual machine after the virtual disk is shared to the first virtual machine, the computer device can avoid that the path environment variable modified in the software recording process is directly stored to the final registry key value of the path environment variable, and in turn, the modification operation of the recording user on the path environment variable is stored in the virtual disk, so that the modification operation can be shared with the application program in the virtual disk to the first virtual machine. Thus, the computer device may compare and analyze a first path environment variable corresponding to the recording virtual machine before responding to the software recording operation, and determine an environment variable addition registry for recording path items added in the software recording process and an environment variable deletion registry for recording path items deleted in the software recording process according to a change condition between the first path environment variable and the second path environment variable after responding to the software recording operation, that is, after the software recording operation has been completed. Thereafter, the computer device may store the environment variable addition registry and the environment variable deletion registry entries in the virtual disk, whereby both registries are also read by the shared first virtual machine along with each application in the virtual disk. When a login user logs in the first virtual machine, the computer equipment can add the registry and delete the registry based on the environment variable in the virtual disk and the original environment variable registry corresponding to the first virtual machine to obtain the actual environment variable registry which is finally effective to be presented.
Step S350: and sharing a virtual disk to a first virtual machine in a read-only mode, and responding to an operation for logging in the first virtual machine, and creating a virtual difference disk corresponding to the first virtual machine by taking the virtual disk as a master disk, wherein the virtual disk comprises a data item of a pre-installed application program and a configuration file related to user information, the data item comprises a file and a registry, and the user information recorded in the data item in the configuration file is the user information corresponding to the software recording operation.
Step S360: and mounting the virtual difference disk to the first virtual machine in a read-write mode.
Step S370: and acquiring a target data item from the configuration file based on login information of the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identifier in the login information, and storing the corrected data item to the virtual difference disk.
In the embodiment of the present application, the steps S350 to S370 may refer to the content of the foregoing embodiment, and are not described herein.
Step S380: and merging the original environment variable registry corresponding to the first virtual machine, the environment variable addition registry and the environment variable deletion registry to obtain an actual environment variable registry.
Step S390: and redirecting an access request of the original environment variable registry corresponding to the first virtual machine to the actual environment variable registry through the file registry redirection driver.
In the embodiment of the application, after the computer equipment shares the virtual disk to the first virtual machine in a read-only manner, the first virtual machine can acquire not only the data items of each application program stored in the virtual disk, but also the environment variable adding registry and the environment variable deleting registry stored in the virtual disk. It can be understood that, in the process of recording the virtual disk by the recording virtual machine, the modification operation of the recording user on the path environment variable corresponding to the recording virtual machine is recorded in the two files. The computer device may perform merging processing on the environment variable data in the original environment variable registry corresponding to the first virtual machine based on the data items recorded in the two registries, so as to ensure that a path environment variable adding path item added by the recording user exists in the merged actual environment variable registry, and ensure that a path environment variable deleting path item deleted by the recording user does not exist in the corrected environment variable registry. The computer device can redirect the original access request to the original environment variable registry to the merged actual environment variable registry through the file registry redirection driver, so that the path environment variable obtained by the actual access of the access request, namely the environment variable corrected by the recording user, can be redirected to the merged actual environment variable registry.
It is noted that, the operation that the computer device performs merging on the original environment variable registry, the environment variable adding registry and the environment variable deleting registry is that before the login user finishes logging in the first virtual machine, that is, the file registry redirection driver does not start executing yet, the computer device performs operation of merging the registries before the login user logs in the first virtual machine based on the fixed program, notifies the file registry redirection driver to start effective operation, and then performs the user login process of the first virtual machine, wherein the access request of the user to the environment variable registry corresponding to the first virtual machine is redirected to the actual environment variable registry, that is, the original environment variable registry corresponding to the first virtual machine is invisible and inaccessible to the login user.
It should be appreciated that the corresponding raw environment variable registry may be different for different virtual machines, i.e., there may be differences in the raw environment variable data that is present. For example, PATH environment variables corresponding to a recorded virtual machine in which the recording user records software to the virtual disk include (PATH 1; PATH2; PATH3; PATH 4), but PATH environment variables corresponding to a first virtual machine in which the user distributes and uses the virtual disk include (PATH 1; PATH2; PATH 3). However, at this time, for the first virtual machine, it is important to record the user's modification data for recording the virtual machine environment variables. Then path4 is unlikely to appear in the environment variable addition registry in the virtual disk, then the first virtual machine should ensure that this data (path 4) does not preserve presentation. If path1, path2, path3 appear in the environment variable pruning registry in the virtual disk, then the first virtual machine should ensure that the corresponding data does not retain the presentation. In some embodiments, after sharing the virtual disk to the first virtual machine, a login user logged in to the first virtual machine may also change an actual environment variable registry corresponding to the first virtual machine, where the computer device may determine, in response to an environment variable change operation performed by the login user, environment variable registry data that needs to be modified, where the environment variable registry data may include actual environment variable deletion data and actual environment variable addition data. It should be noted that the actual environment variable deletion data and the actual environment variable addition data obtained at this time are both obtained based on the modification operation performed on the actual environment variable registry corresponding to the first virtual machine by the login user logging in the first virtual machine.
In some embodiments, after the user logs in the first virtual machine and performs the modification operation on the actual environment variable registry corresponding to the first virtual machine, the computer device may prune the data based on the actual environment variable obtained by the modification operation and the actual environment variable addition data. Thereafter, the computer device may also match the data with an environment variable addition registry and an environment variable deletion registry stored in the virtual disk to determine whether a cancellation relationship exists between a modification operation of the actual environment variable registry of the first virtual machine by the logged user and a modification operation of the environment variable registry corresponding to the logged virtual machine by the logged user. Specifically, if the actual environment variable deletion data is matched with any path segmentation data stored in the environment variable addition registry, copying the environment variable addition registry to a virtual writable disk corresponding to the first user identifier, and deleting corresponding data stored in the environment variable addition registry in the virtual writable disk based on the actual environment variable deletion data; and if the actual environment variable addition data is matched with any path segmentation data stored in the environment variable deletion registry, copying the environment variable deletion registry to the virtual writable disk, and deleting corresponding data stored in the environment variable deletion registry in the virtual writable disk based on the actual environment variable addition data.
Specifically, in the first virtual MACHINE and the recording virtual MACHINE, the Environment variables that the USER can modify include the SYSTEM Environment variable and the USER Environment variable, which are typically stored in the [ hkey_local_machine\system\current Control set\control\session\environment ] registry item and the [ hkey_current_user\environment ] registry item, respectively. In the process of starting software recording in a virtual disk, a virtual registry repository bound to the virtual disk can be created and installed under a registry path such as [ hkey_local_machine\app-VHD-HiveLoad ], at which time the computer device can migrate all key value data in a registry entry for storing a system environment variable to a temporarily created [ hkey_local_machine\app-VHD-hiveload\machinery ] volatile registry entry, which is also a temporarily created volatile registry entry, before the file registry redirection driver is turned on. Thus, after the file registry redirection driver is turned on, the registry access to the system environment variable or the user environment variable is correspondingly redirected to the volatile registry entry temporarily created in the virtual disk binding virtual registry storage nest, that is, the system environment variable and the user environment variable in the first virtual machine can preferentially use the data stored in the temporary registry entry at this time, and the environment variable registry data stored in the original virtual machine system disk is not modified any more.
At this time, the recording user can add variable, add data or delete variable and delete data to the system environment variable and the user environment variable of the recording environment. After finishing the manufacture of the virtual disk and closing the file registry redirection drive, the computer equipment can compare and analyze the original system environment variable and user environment variable registry item with the system environment variable and user environment variable registry item which are currently used temporarily to obtain the added and deleted data of the system environment variable and the added and deleted data of the user environment variable which are respectively stored in [ HKEY_LOCAL_MACHINE\App-VHD-Hiveload\machine environmental Add ] in a nonvolatile way,
[HKEY_LOCAL_MACHINE\App-VHD-HiveLoad\UserEnvironmentAdd]、
[HKEY_LOCAL_MACHINE\App-VHD-HiveLoad\MachineEnvironmentDelete]、
In the [ HKEY_LOCAL_MACHINE\App-VHD-HiveLoad\UserEnvironmentDelete ] registry entry. That is, the environment variable addition registry and the environment variable deletion registry obtained in the embodiment of the present application.
For example, the PATH key value of the SYSTEM environment variable is originally stored in the [ HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl set\Control\SessionMaager\Enviro ] registry item, and the character string data comprises PATH1, PATH2, PATH3, PATH4 and other split PATH items. Before the file registry redirection driver is started, the computer equipment can migrate all system environment variable key values in the registry item to a temporarily created volatile registry item [ HKEY_LOCAL_MACHINE\App-VHD-HiveLoad\MachineEnvironmentVolatile ], after the file registry redirection driver is started, a recording user can modify the system environment variable, and data in the MachineEnvironmentVolatile item is actually modified. PATH items PATH0 and PATH5 are added to PATH key values and PATH items PATH2 and PATH4 are deleted. After the recording user finishes the operation of recording the software to the virtual disk, the computer equipment can obtain the modification of the deleted and added environment variable key values under the recording environment based on the comparison analysis, and store PATH key value character string content as PATH0 in the [ HKEY_LOCAL_MACHINE\App-VHD-HiveLoad\machinery environment Add ] registry item of the virtual disk respectively; PATH5, storing PATH key value character string content as PATH2 in the [ HKEY_LOCAL_MACHINE\App-VHD-HiveLoad\MachineEnvironemtDelete ] registry item; path4.
And then, the computer equipment can share and distribute the virtual disk to each virtual machine, in the process of logging in the first virtual machine by the user, before the file registry redirection driver is started, the computer equipment can add the registry and delete the registry based on the environment variables corresponding to the system environment variables and the user environment variables in the virtual disk respectively, and key items in the original environment variable registry comprising the system environment variables and the user environment variables corresponding to the first virtual machine, merge key values in the actual environment variable registry for determining the system environment variables and the user environment variables, and store the merged actual environment variable registry in the temporary volatile registry item. At this time, after the file registry redirection driver is turned on, the first virtual machine preferably uses the key value in the actual environment variable registry which is finally incorporated into the temporary volatile registry item, and then, the original access to the system environment variable and the user environment variable is totally redirected to the newly created actual environment variable registry of the temporary volatile environment.
For example, after the computer device mounts the virtual disk to the first virtual MACHINE, the PATH of the environment variable corresponding to the first virtual MACHINE includes PATH1, PATH2 and PATH5, these environment variables are stored in [ hkey_local_machine\system\currentcontrol set\control\session\environment ] registry item, at this time, the computer device may obtain the content of the PATH environment variable string from [ hkey_local_machine\app-VHD-hiveload\machine environment additional ] by mounting the virtual disk binding virtual registry to [ hkey_local_machine\app-VHD-HiveLoad ], thereby obtaining the content of the PATH environment variable string from [ hkey_local_machine environment additional ] environment variable addition registry; PATH5, and acquiring PATH environment variable character string content as PATH2 from the environment variable deletion registry of [ HKEY_LOCAL_MACHINE\App-VHD-HiveLoad\machine environment Delete ]; path4. Therefore, the computer equipment can determine that the PATH PATH environment variable key value content in the last obtained actual environment variable registry of the first virtual machine is PATH0; path1; path5, the PATN key is merged and stored in the real environment variable registry of the temporary volatile environment [ hkey_local_machine\wirteable-VHD-HiveLoad\machine environment Volatile ].
After the file registry redirection driver of the first virtual machine is started, the login user can normally modify the system environment variable corresponding to the first virtual machine, and actually changes the actual environment variable registry of the temporary volatile environment. For example, if the user adds PATH4 to the PATH environment variable, the PATH key value included in the registry item [ hkey_local_machine\wirteable-VHD-hiveload\machine environment volatile ] is changed to PATH0; path1; path5; PATH4, and the PATH key value included in the original environment variable registry [ hkey_local_machine \system\currentcontrol set\control\session ] corresponding to the first virtual MACHINE SYSTEM is also changed to PATH1 correspondingly; path2; path5; path4. At this time, the computer device further matches PATH key value newly added PATH item PATH4 with the same name key value data in the [ hkey_local_machine\app-VHD-hiveload\machine environment variable deletion registry in the virtual disk, if PATH4 also exists in the environment variable deletion registry, the computer device copies the environment variable deletion registry PATH key value in the virtual disk to the virtual writable disk corresponding to the first user identifier, and correspondingly modifies the registry in the virtual writable disk, where the PATH key value in the modified [ hkey_local_machine_vhd-hiveload\machine environment variable delete ] registry only includes PATH item PATH2.
For another example, if the user deletes PATH5 from the PATH environment variable, the PATH key value included in the registry entry [ hkey_local_machine\wirteable-VHD-hiveload\machine environment volatile ] is changed to PATH0; path1; the first time the path4 is used,
PATH key values included in [ HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl set\Control\SessionMaager\enviro nment ] are also changed to PATH1 correspondingly; path2; path4. At this time, the computer device also matches PATH key deletion PATH item PATH5 with the same name key data in the [ hkey_local_machine\app-VHD-hiveload\machine environment variable addition registry in the virtual disk, and because the PATH key includes PATH5 PATH item, the computer device migrates the PATH key in the PATH key deletion registry in the virtual disk to the [ hkey_local_machine\wiriteable-VHD-hiveload\machine environment add ] registry, and modifies the key data thereof so as to not include PATH item PATH5.
According to the software deployment method provided by the embodiment of the application, the virtual disk is created in the software package disk and is subjected to writable mounting by responding to the software recording operation through the recording virtual machine, and the software package disk is a storage disk area prepared for recording the application program in advance; when the application program is virtually installed on a system disk, redirecting and installing the data item of the application program to the virtual disk through a file registry redirection driver; determining an environment variable adding registry and an environment variable deleting registry based on a first path environment variable corresponding to the recording virtual machine before responding to the software recording operation and a second path environment variable corresponding to the recording virtual machine after responding to the software recording operation; storing the environment variable addition registry and the environment variable deletion registry in the virtual disk; combining an original environment variable registry corresponding to the first virtual machine, the environment variable addition registry and the environment variable deletion registry to obtain an actual environment variable registry; and redirecting an access request of the original environment variable registry corresponding to the first virtual machine to the actual environment variable registry through the file registry redirection driver. The method comprises the steps that an environment variable adding registry and an environment variable deleting registry, which are obtained by modifying environment variables corresponding to a login virtual machine by a recording user, are distributed to a first virtual machine, so that the first virtual machine sharing a virtual disk can merge and take effect with a local original environment variable registry, and environment variables corresponding to the recording virtual machine, which is recorded to the virtual disk, of software do not need to be directly covered by the environment variables of the first virtual machine for distribution; meanwhile, when the user needs to delete the personalized modification reserved data of the environment variable, the computer equipment can directly delete all data in the virtual writable disk, so that the first virtual machine is restored to the environment when the virtual disk is initially shared, the effect of conveniently distributing the environment variable is achieved, and safety guarantee is provided for the user to customize modification of the environment variable.
Referring to fig. 6, which is a block diagram illustrating a software deploying apparatus 200 according to an embodiment of the present application, the software deploying apparatus 200 includes: the system comprises a difference disc creation module 210, a disc mounting module 220 and a permission modification module 230. The difference disc creating module 210 is configured to share a virtual disc to a first virtual machine in a read-only manner, and create a virtual difference disc corresponding to the first virtual machine by taking the virtual disc as a master disc in response to an operation for logging in the first virtual machine, where the virtual disc includes a data item of a pre-installed application program and a configuration file related to user information, the data item includes a file and a registry, and user information recorded in the data item in the configuration file is user information corresponding to performing a software recording operation; the disk mounting module 220 is configured to mount the virtual difference disk to the first virtual machine in a read-write manner; the permission modification module 230 is configured to obtain a target data item from the configuration file based on login information for logging in the first virtual machine, modify the target data item, so that user information recorded in the modified target data item is user information corresponding to a first user identifier in the login information, and store the modified data item to the virtual difference disk.
As a possible implementation manner, the software deploying apparatus 200 further includes a read-write correction module, configured to mount the virtual differencing disk to the first virtual machine in a read-only manner.
As a possible implementation manner, the software deploying apparatus 200 further includes a writable disk creating module, configured to create a virtual writable disk in a personal disk corresponding to the first user identifier, where the virtual writable disk is configured to store usage data generated when an application program in the virtual disk is virtually executed in a virtual machine registered by the first user identifier.
As a possible implementation, the software deploying device 200 further includes a template making module, a software installing module, and a file integrating module. The template making module is used for responding to software recording operation through the recording virtual machine, creating the virtual disk in a software package disk and carrying out writable mounting, wherein the software package disk is a storage disk area prepared for recording the application program in advance; the software installation module is used for redirecting and installing data items of the application program to the virtual disk through a file registry redirection driver when the application program is virtually installed to the system disk; the file integration module is used for determining a configuration file related to the user information based on a second user identifier corresponding to the software recording operation, wherein the recorded user information in the configuration file is the user information corresponding to the second user identifier.
As one possible implementation, the software deploying apparatus 200 further includes a variable correction module and a registry storage module, where the variable correction module determines an environment variable addition registry and an environment variable deletion registry based on a first path environment variable corresponding to the recording virtual machine before responding to the software recording operation and a second path environment variable corresponding to the recording virtual machine after responding to the software recording, the environment variable addition registry being a path item of the second path environment variable that is added relative to the first path environment variable, the environment variable deletion registry being a path item of the second path environment variable that is subtracted relative to the first path environment variable; the registry storage module is used for storing the environment variable adding registry and the environment variable deleting registry in the virtual disk.
As a possible implementation manner, the software deploying apparatus 200 further includes a variable updating module, configured to combine the original environment variable registry corresponding to the first virtual machine, the environment variable addition registry, and the path environment variable deletion registry to obtain an actual environment variable registry; and redirecting an access request of the original environment variable registry corresponding to the first virtual machine to the actual environment variable registry through the file registry redirection driver.
As a possible implementation manner, the virtual disk includes a font data file therein, and the software deploying apparatus 200 further includes a font installation module for installing the font file in the first virtual machine based on the font information recorded in the font data file.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In several embodiments provided by the present application, the coupling of the modules to each other may be electrical, mechanical, or other.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
In summary, according to the scheme provided by the application, a virtual disk is shared to a first virtual machine in a read-only manner, and a virtual difference disk corresponding to the first virtual machine is created by taking the virtual disk as a master disk in response to an operation for logging in the first virtual machine, wherein the virtual disk comprises data items of a pre-installed application program, and the data items comprise files and a registry; mounting the virtual difference disk to a first virtual machine in a read-write mode; and acquiring a target data item from data items of an application program pre-installed in the virtual disk based on login information of the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identification in the login information, and storing the corrected data item to the virtual difference disk. By creating the writable virtual difference disk, the user information in the virtual disk is corrected to the information corresponding to the first user identifier logged in the first virtual machine, so that the user logged in the first virtual machine can use software data installed in the virtual disk under the other user directories, and the compatibility of the virtual application program is improved.
Referring to fig. 7, a block diagram of a computer device 400 according to an embodiment of the application is shown. The computer device 400 may be a physical server, a cloud server, or the like. The computer device 400 of the present application may include one or more of the following components: a processor 410, a memory 420, and one or more application programs, wherein the one or more application programs may be stored in the memory 420 and configured to be executed by the one or more processors 410, the one or more program(s) configured to perform the method as described in the foregoing method embodiments.
Processor 410 may include one or more processing cores. The processor 410 utilizes various interfaces and lines to connect various portions of the overall computer device, perform various functions of the computer device, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 420, and invoking data stored in the memory 420. Alternatively, the processor 410 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 410 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 410 and may be implemented solely by a single communication chip.
The Memory 420 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Memory 420 may be used to store instructions, programs, code sets, or instruction sets. The memory 420 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc. The storage data area may also store data created by the computer device in use (e.g., phonebook, audio-video data, chat-record data), etc.
Referring to fig. 8, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable medium 800 has stored therein program code which can be invoked by a processor to perform the methods described in the method embodiments described above.
The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 comprises a non-volatile computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be appreciated by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (10)
1. A method of software deployment, the method comprising:
sharing a virtual disk to a first virtual machine in a read-only mode, and responding to an operation for logging in the first virtual machine, creating a virtual difference disk corresponding to the first virtual machine by taking the virtual disk as a master disk, wherein the virtual disk comprises a data item of a pre-installed application program and a configuration file related to user information, the data item comprises a file and a registry, and the user information recorded in the data item in the configuration file is user information corresponding to the software recording operation;
mounting the virtual difference disk to the first virtual machine in a read-write mode;
And acquiring a target data item from the configuration file based on login information of the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identifier in the login information, and storing the corrected data item to the virtual difference disk.
2. The method according to claim 1, wherein after the target data item is acquired from the data items of the application program previously installed in the virtual disk based on the login information to login to the first virtual machine and the target data item is corrected, the method further comprises:
and removing the mounting of the virtual difference disk and replacing the virtual difference disk with the mounting of the virtual difference disk to the first virtual machine in a read-only mode.
3. The method according to claim 1, wherein after the target data item is acquired from the data items of the application program previously installed in the virtual disk based on the login information to login to the first virtual machine and the target data item is corrected, the method further comprises:
creating a virtual writable disk in the personal disk corresponding to the first user identifier, wherein the virtual writable disk is used for storing use data generated when an application program in the virtual disk is virtually operated in a virtual machine logged in by the first user identifier.
4. The method of claim 1, wherein prior to the creating a virtual differencing disk for the first virtual machine with the virtual disk as a master in response to the operation to log in to the first virtual machine, the method further comprises:
responding to a software recording operation by a recording virtual machine, creating a virtual disk in a software package disk and carrying out writable mounting, wherein the software package disk is a storage disk area prepared in advance for recording the application program;
when the application program is virtually installed on a system disk, redirecting and installing the data item of the application program to the virtual disk through a file registry redirection driver;
and determining a configuration file related to the user information based on a second user identifier corresponding to the software recording operation, wherein the recorded user information in the configuration file is the user information corresponding to the second user identifier.
5. The method of claim 4, wherein upon said redirecting installation of the data items of the application to the virtual disk via a file registry redirection driver at the time of virtual installation of the application to the system disk, the method further comprises:
Determining an environment variable addition registry and an environment variable deletion registry based on a first path environment variable corresponding to the recording virtual machine before responding to the software recording operation and a second path environment variable corresponding to the recording virtual machine after responding to the software recording, wherein the environment variable addition registry is a path item which is added relative to the first path environment variable in the second path environment variable, and the environment variable deletion registry is a path item which is deleted relative to the first path environment variable in the second path environment variable;
and storing the environment variable adding registry and the environment variable deleting registry in the virtual disk.
6. The method of claim 1, wherein after said storing said modified data item to said virtual differencing disk, the method further comprises:
combining an original environment variable registry corresponding to the first virtual machine, the environment variable addition registry and the path environment variable deletion registry to obtain an actual environment variable registry;
and redirecting an access request of the original environment variable registry corresponding to the first virtual machine to the actual environment variable registry through the file registry redirection driver.
7. The method according to any one of claims 1 to 6, wherein the virtual disk includes a font data file, and after the login information based on logging into the first virtual machine, a target data item is obtained from data items of an application program pre-installed in the virtual disk, and the target data item is revised, so that user information recorded in the revised target data item is user information corresponding to a first user identifier in the login information, and the revised data item is stored in the virtual differencing disk, the method further includes:
and installing a font file in the first virtual machine based on the font information recorded in the font data file.
8. A software deploying apparatus, the apparatus comprising:
the system comprises a difference disc creation module, a storage module and a storage module, wherein the difference disc creation module is used for sharing a virtual disc to a first virtual machine in a read-only mode, responding to an operation for logging in the first virtual machine, creating a virtual difference disc corresponding to the first virtual machine by taking the virtual disc as a master disc, wherein the virtual disc comprises a data item of a pre-installed application program and a configuration file related to user information, the data item comprises a file and a registry, and the user information recorded in the data item in the configuration file is user information corresponding to a software recording operation;
The disk mounting module is used for mounting the virtual difference disk to the first virtual machine in a read-write mode;
and the permission correction module is used for acquiring a target data item from the configuration file based on login information of the first virtual machine, correcting the target data item, enabling user information recorded in the corrected target data item to be user information corresponding to a first user identifier in the login information, and storing the corrected data item to the virtual difference disk.
9. A computer device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code, which is callable by a processor for executing the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310789908.4A CN116974592A (en) | 2023-06-29 | 2023-06-29 | Software deployment method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310789908.4A CN116974592A (en) | 2023-06-29 | 2023-06-29 | Software deployment method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116974592A true CN116974592A (en) | 2023-10-31 |
Family
ID=88474086
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310789908.4A Pending CN116974592A (en) | 2023-06-29 | 2023-06-29 | Software deployment method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116974592A (en) |
-
2023
- 2023-06-29 CN CN202310789908.4A patent/CN116974592A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10324696B2 (en) | Dynamic container deployment with parallel conditional layers | |
CN102402446B (en) | Method and device for installing application software | |
US20190187969A1 (en) | Method for virtualizing software applications | |
KR101619557B1 (en) | Computer application packages with customizations | |
KR101150019B1 (en) | System and method for controlling inter-application association through contextual policy control | |
US11704120B2 (en) | Out of band layer scrubbing | |
US10216510B2 (en) | Silent upgrade of software with dependencies | |
US11030025B2 (en) | Managing inter-process communications in a containerized application environment | |
CN107992355B (en) | Method and device for deploying application software and virtual machine | |
US8327096B2 (en) | Method and system for efficient image customization for mass deployment | |
US11144292B2 (en) | Packaging support system and packaging support method | |
CN111881473B (en) | Privacy file protection method, device, computer equipment and readable storage medium | |
US20110252412A1 (en) | Maintenance system, maintenance method and program for maintenance | |
US9560121B2 (en) | Provisioning a web hosting resource using a cloud service | |
WO2020029995A1 (en) | Application upgrading through sharing dependencies | |
CN110543789A (en) | method and device for adapting handle and third-party application program and storage medium | |
US9513762B1 (en) | Static content updates | |
JP2009276859A (en) | Server computer, computer system and file management method | |
US7900202B2 (en) | Identification of software execution data | |
CN112579202A (en) | Method, device, equipment and storage medium for editing service program of Windows system | |
KR20120037381A (en) | Controlling access to software component state | |
CN116974592A (en) | Software deployment method, device, computer equipment and storage medium | |
CN112650713A (en) | File system operation method, device, equipment and storage medium | |
CN113986858B (en) | Linux compatible android system shared file operation method and device | |
CN110928639B (en) | Windows virtualization mirror image hierarchical management method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |