WO2013075514A1 - 应用软件的安装方法和应用软件的安装装置 - Google Patents
应用软件的安装方法和应用软件的安装装置 Download PDFInfo
- Publication number
- WO2013075514A1 WO2013075514A1 PCT/CN2012/079347 CN2012079347W WO2013075514A1 WO 2013075514 A1 WO2013075514 A1 WO 2013075514A1 CN 2012079347 W CN2012079347 W CN 2012079347W WO 2013075514 A1 WO2013075514 A1 WO 2013075514A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- virtual machine
- file
- application software
- change record
- Prior art date
Links
Classifications
-
- 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
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
Definitions
- the present invention relates to the field of computer and communication technologies, and in particular, to an application software installation method and an application software installation device. Background technique
- Hardware virtualization technology virtualizes one or more virtual machines on a single physical host, allowing several or even dozens of virtual machines to share the hardware resources of one physical host.
- Cloud computing is an important application scenario for hardware virtualization technology.
- Cloud computing refers to the delivery and use of an information technology infrastructure that allows users to access the resources they need, on an as-needed, and easily scalable basis.
- Cloud computing has also been promoted as a delivery and usage model for services, where users can get the services they need, on an as-needed, and easily scalable basis.
- the core idea of cloud computing is to uniformly manage and schedule a large number of resources connected to the network (the resources here include storage resources, computing resources, and various application software) to form a resource pool to provide services to users on demand.
- the network that provides the resources is called the "cloud.”
- the installation process includes: the user starts the virtual machine, enters the operation After the system, manually trigger the browser or the client tool to connect to the resource server that can provide the application software, request to download the application software; the virtual machine is installed after downloading from the resource server to the application software, or;
- the resource update client is automatically run in the background of the virtual machine operating system, and the client sends an online prompt message to the resource server. After receiving the online prompt message, the resource server pushes the application to the virtual machine according to the pre-configured push policy.
- the inventors found that at least the following problems exist in the prior art: It is necessary to pre-install a browser or a client tool in a virtual machine to obtain application software that needs to be installed. Moreover, how to choose a safe and appropriate version of the application software and installation package requires users to have high information technology knowledge and skills. Therefore, in the prior art, there is a problem that the installation process of the application software is complicated and difficult to implement. Summary of the invention
- the embodiment of the invention provides a method for installing an application software, which is used to solve the problem that the installation process of the existing application software is complicated and difficult to implement.
- the embodiment of the present invention further provides a method for creating an application software package, an installation device for an application software, and an apparatus for creating an application software package.
- An application software installation method includes:
- a method for creating an application package including:
- An application software installation device comprising:
- the mounting module is configured to mount the mirrored data of the virtual machine, where the virtual machine is a virtual machine to be installed with the application software, and the mirrored data is mapped to a virtual disk in the local file system;
- a first update module configured to update a registry file in the virtual disk according to registry change record data included in an application software package of the application software, where the application software package includes files added or modified during installation
- the registry change record data and the file change record data are obtained according to differences in the host operating system environment before and after the installation of the application software
- a second update module configured to update a file structure in the virtual disk according to the file change record data, and a file added or modified during an installation process included in the application software package, thereby implementing installation in the virtual machine Application software.
- An apparatus for creating an application package comprising:
- An obtaining unit configured to obtain a difference between a host operating system environment before and after installing the application software; and a determining unit, configured to determine, according to the difference obtained by the obtaining unit, the registry change record data and the file change record data;
- a creating unit configured to generate an application software package, where the application software package includes the registry change record data and file change record data determined by the determining unit, and files added or modified in the host machine during the installation process.
- the embodiment of the present invention first maps the mirrored data of the virtual machine to be installed into a virtual disk in the software installation server file system; and then updates the drive according to the registry change record data of the application software package.
- the registry file is updated; the file structure in the virtual disk is updated according to the file added or modified during the installation process in the application package, and the file change record data, thereby achieving the purpose of installing the application software.
- it is not necessary to install a browser or a client tool in the virtual machine in advance, and the virtual machine user does not need to perform complicated operations, which reduces the difficulty of software installation for the user.
- FIG. 1 is a flow chart of a main implementation principle of an embodiment of the present invention.
- 2a is a flowchart of a process for creating an application software package according to an embodiment of the present invention
- 2b is a flowchart of a manner of obtaining a difference in a host operating system environment before and after installing an application software according to an embodiment of the present invention
- 2c is a flowchart of generating an application software package according to an embodiment of the present invention.
- 2d is a schematic diagram of an application software package according to an embodiment of the present invention.
- FIG. 3a is a schematic diagram of a deployment environment of a software installation system according to an embodiment of the present invention.
- FIG. 3b illustrates the mirrored data in a storage area network (SAN, Storage) according to an embodiment of the present invention.
- SAN storage area network
- FIG. 3c is a schematic image storage network (NAS, Network) provided by an embodiment of the present invention.
- FIG. 5 is a flowchart of another application software installation method according to an embodiment of the present invention
- FIG. 6 is a schematic diagram of a deployment environment of another software installation system according to an embodiment of the present invention
- FIG. 7 is a schematic structural diagram of an apparatus for installing an application software according to an embodiment of the present invention
- FIG. 8 is a schematic structural diagram of a mounting module according to an embodiment of the present invention
- FIG. 9 is a schematic structural diagram of a first determining unit according to an embodiment of the present disclosure.
- FIG. 9b is a schematic structural diagram of a second determining unit according to an embodiment of the present disclosure.
- FIG. 10 is a schematic structural diagram of an apparatus for creating an application software package according to an embodiment of the present invention
- FIG. 11 is a schematic structural diagram of a creation unit according to an embodiment of the present invention. detailed description
- the user may adopt a similar installation process to be successfully installed in some virtual machines, but in other virtual The installation failed in the machine.
- Step 10 Mount the mirror data of the virtual machine to be installed with the application software, and map the mirrored data to a virtual disk in the local file system.
- the mirrored data refers to the static storage form of the virtual machine instance, which includes the virtual machine operating system files and user files.
- storage resources and operational resources of a virtual machine may be distributed among different physical entities.
- the physical host used to start the virtual machine starts the virtual machine by loading the mirror data of the virtual machine.
- Mirrored data payload content (including virtual machine operating system files and user files, etc.) is stored in the same way as data in a personal computer, that is, the field definitions in the physical disk sectors used to store data are the same. The difference is that different virtual machine vendors have encapsulated the payload content, added data headers, or some vendors have also compressed the mirrored data.
- a virtual disk refers to a storage object that can be recognized by an operating system of a software installation server.
- the software installation server is a Windows series operating system
- the mirrored data is mapped to a drive in the software installation server file system; in the case where the software installation server is a Linux, UNIX series operating system
- the mirror data is mapped.
- Install a block device in the server file system for the software Whether it is a drive or a block device, the subsequent operating principles are basically similar.
- Step 20 Update the registry file in the virtual disk according to the registry change record data in the application software package of the application software.
- the registry change record data, the file change record data, and the file added or modified during the installation process are provided, and one of the three types of data is organized:
- the application package includes a change log file and files added or modified during the installation process.
- the change record file includes at least registry change record data and file change record data, and the registry change record data and the file change record data are pre-installed in the host (for example, a physical host).
- the program is obtained by comparing the differences between the snapshots of the host operating system environment before and after running the installer.
- the registry change record data is obtained by comparing differences between the registry files in the snapshot before and after executing the software installation program; the registry change record data includes keys for adding, deleting or modifying, increasing, The value that was deleted or modified.
- the file change record data is obtained by comparing differences between file structures in a snapshot before and after running the software installer, and the file change record data includes records of adding, deleting or modifying files on the disk, or adding, deleting or modifying The record of the directory.
- Step 30 Update the file structure in the virtual disk according to the file change record data in the application package and the file added or modified during the installation process included in the application package.
- the mirroring data of the virtual machine to be installed with the application software may be generated according to the hardware configuration parameter and the operating system version identifier input when the user applies for the virtual machine, that is, the mirror data is generated during the process of creating the virtual machine.
- the application software package is obtained from the application software resource library according to the application for the virtual machine; the image data of the virtual machine to be installed with the application software may also be the virtual machine creation completed.
- the storage location of the virtual machine image data is obtained, and the obtained storage address is obtained according to the obtained storage address.
- the application software package is found from the application software resource library according to the pre-installed software identifier input by the user or the software identifier that needs to be installed indicated by the virtual machine management system.
- steps 20 and 30 are not limited in the order of execution.
- steps are based on the above inventive principles of the present invention, four embodiments are described in detail to explain and explain the main implementation principles of the method of the present invention in detail. .
- FIG. 2 is a flowchart of a process of creating an application software package according to an embodiment of the present invention.
- Step 200 The application device creation device obtains the difference between the host operating system environment before and after the application software is installed.
- Step 210 The application software creation device determines the registry change record data and the file change record data according to the difference.
- the registry change record data includes a key added, deleted or modified in the host registry after the application software is installed, or a value added, deleted or modified.
- the registry change record data can contain both keys added, deleted, or modified in the registry, as well as values added, deleted, or modified.
- the file change record data includes a record of adding, deleting, or modifying a file on the disk after installing the application software, or adding, deleting, or modifying a record of the directory.
- Step 220 The application software package creation device generates an application software package including the registry change record data and the file change record data, and files added or modified during the installation process.
- a manner of obtaining differences between the host operating system environment before and after the application software is installed including but not limited to the following three types:
- Step 201 The application package creation device copies the installation package of the application software to be installed provided by the application software provider to the operating system environment of the host hostO.
- the application package creation device should select one according to the information in the registry file.
- a host with a "clean" operating system environment as a dedicated host for creating application packages.
- a "clean" operating system environment is an operating system that has as few non-essential applications as possible, such as an operating system when no other applications are installed.
- Step 202 The application software creation device establishes a first snapshot to the current host operating system environment.
- the host operating system environment includes a registry and a disk.
- the Registry is an important database in the operating system for storing configuration information of the system and applications.
- Snapshots on a disk refer to the file structure information on the disk by enumeration, that is, all directories and files, as well as the storage path, modification time, and size of the directories and files.
- the first snapshot created at this time reflects the status information of the hostO registry and disk before the application is installed.
- Step 203 The application software creation device installs the application software in the host hostO. Setup.exe, run the installer to achieve the purpose of installing the application.
- Step 204 The application software creation device establishes a second snapshot to the current host operating system environment.
- the second snapshot created at this time reflects the status information of the hostO registry and disk after the application software is installed.
- Step 205 The device for creating an application software package compares the first snapshot and the second snapshot, and determines, according to the difference between the first snapshot and the second snapshot, the difference between the host operating system environment before and after the application software is installed, and then obtains the registry change record data from the application package. And file change record data.
- you can pre-specify the comparison range in the disk for example, to specify only the changes in files and directories in the predetermined disk sector or in the storage path.
- Method 2 Pre-select two hosts with the same operating system environment, hostl and host2.
- the application package creation device copies the installation package provided by the application software provider to be installed into the operating system environment of the host host2, and runs the installation program in the installation package in the host2;
- the application package creation device compares the difference between the hostl and host2 operating system environments at this time, thereby obtaining the difference of the host operating system environment before and after the application software is installed.
- Method 3 The application package creation device reverse-compiles the installation program in the installation package provided by the application software provider, and obtains an operator for the operating system environment from the reverse compilation result, for example, modifying the registry file. Operators, as well as operators that add or modify files in the file system, to infer the expected differences in the host operating system environment before and after the application is installed.
- the process of generating the application software package by the foregoing step 220 includes: Step 221: writing the registry change record data and the file change record data into the change record file;
- a description language such as Extensible Markup Language (XML)
- XML Extensible Markup Language
- the record data is written to the change log file.
- the format of the change log file is not limited and can be a text format file.
- Step 222 Package the change record file and the file added or modified during the installation process to generate an application software package of the application software.
- 2d is a schematic diagram of an application software package according to an embodiment of the present invention, wherein a file named fileA is added to the path C;/programe file/abc/, and a value is added in the registry. Keyl.valuel ;
- the application package also includes the added file fileA.
- the application package is generated by a packager, such as rar (Roshal ARchive zip), which packages the files that are added or modified during the process of changing the record file and the installer process.
- a packager such as rar (Roshal ARchive zip)
- rar Roshal ARchive zip
- first snapshot and the second snapshot do not represent a sequence relationship, but to distinguish different snapshots, and the first, second, etc. mentioned below are also used to distinguish different information, data, requests, messages. Or unit module, etc.
- the embodiment of the present invention provides an application software package creation solution, which can be used to modify the mirror data of the virtual machine by using the application software package created by the creation solution, thereby implementing the purpose of installing the application software in the virtual machine.
- FIG. 3a is a schematic diagram of a deployment environment of a software installation system according to an embodiment of the present invention, and is a typical cloud computing basic implementation framework.
- the system includes at least one software installation server, at least one elastic computing controller, at least one physical host, and a distributed storage device.
- the elastic computing controller is a core component of the existing cloud computing infrastructure, and is the backbone for managing storage resources, computing resources, and other resources.
- the elastic computing controller allocates storage resources and computing resources to the user according to the application of the user, and controls to create mirror data of the virtual machine in the distributed storage device.
- the mirrored data of each virtual machine is stored in a distributed storage device, and the distributed storage device is described by taking SAN and NAS as examples respectively.
- the software installation server is connected to the application software resource repository, and the application software resource library stores at least one application software package created by the method shown in FIG. 2a.
- FIG. 3a is only an example of a cloud computing basic implementation architecture, and an embodiment of the present invention provides an application software installation method, which is an application created based on the method shown in FIG. 2a.
- the software package which is implemented in the scenario shown in FIG. 3a, is used to implement software installation in the process of applying for a virtual machine by a user.
- FIG. 4 For the specific process, please refer to FIG. 4 .
- Step 410 The elastic computing controller receives the hardware configuration parameter, the operating system version identifier, and the pre-installed software identifier input when the user applies for the virtual machine.
- the user can select the hardware configuration parameters, operating system version identifier, and pre-installed software that the requested virtual machine should have according to several configuration options that the virtual machine management system provides in the virtual machine application page.
- the user can send a virtual machine application request message through the client tool in the physical host, where the request message carries the selected hardware configuration parameter, the operating system version identifier, and the pre-installed software identifier.
- the foregoing hardware configuration parameters, the operating system version identifier, and the pre-installed software identifier may also be default configuration options provided by the virtual machine management system. For example, when the user selects a typical installation, according to the default configuration parameters, the operating system version identifier, Generate mirrored data with pre-installed software identifiers.
- Step 420 The elastic computing controller controls to create virtual machine image data in the distributed storage device according to the hardware configuration parameter and the operating system version identifier that are input when the user applies for the virtual machine.
- the virtual machine hardware specification is configured according to the hardware configuration parameter, and the corresponding operating system template is selected from the operating system template set according to the operating system version identifier; then the virtual machine image data is created according to the virtual machine hardware specification and the operating system template.
- the mirror data WMdata1 of the virtual machine WM1 is created according to the user application. turn off.
- the virtual machine mirror data is the hard disk sector data in the specified storage space (ie, the virtual machine mirror data area).
- IP address + port number in the access request to access the virtual machine image data area corresponding to the virtual machine to be started on the SAN.
- IP address + The port number is corresponding to a storage area in the SAN. As shown in Figure 3b.
- the virtual machine image data is the image file under the specified storage path.
- Other devices such as the physical host used to start the virtual machine, can access the virtual machine image file corresponding to the virtual machine to be started on the NAS through the Network File System (NFS). As shown in Figure 3c.
- NFS Network File System
- the mirrored data of VMs VM1 and WM2 are stored in the NAS, and the mirrored data of VM VM3 is stored in the NAS.
- Figure 3a is only an example of a cloud computing infrastructure implementation architecture.
- the management database maintains the correspondence between the virtual machine identifier and the mirrored data address.
- VM ID The storage address of the virtual machine mirror data used to start the VM.
- Step 430 The software installation server determines the type of the virtual machine image data.
- the manner of determining the mirrored data type includes but is not limited to:
- the software installation server first tests whether the data header of the mirrored data can be successfully read from the storage location of the virtual machine mirror data, and the storage location of the virtual machine mirror data may be a SAN or a NAS notification software installation server.
- the type of the mirrored data is determined according to the data header. For example, according to the definition of the mirror data format, the file type field in the data header is read, and the read field is compared with each type identifier. If they are consistent, the type of the virtual machine mirror data is determined to be consistent with the read field. The file type corresponding to the type identifier.
- the types of mirror data include QCOW (QEMU Copy-on-write), VMDK (VMWare Virtual Machine Disk Format), VHD (Microsoft Virtual Hard Disk format), VDI (Sun xVM VirtualBox Virtual Disk Images), etc., a virtual machine system. Can be compatible with a variety of image data types.
- the test can successfully parse the mirrored data according to the RAW format. If the parsing operation is successful, it is determined that the mirrored data type is a RAW format.
- the RAW format stores the mirror data in the same way as the data stored in the personal computer, that is, it has a 1:1 correspondence with the physical disk data, and is not encapsulated on the physical disk data. Therefore, the physical disk data format is parsed, and the physical disk is parsed.
- the characteristics of the data format include but are not limited to:
- the 0th sector (the first 512 bytes) is the main boot record (MBR), the signature word "55AA" exists at the end of the sector; the initial position of the 0th sector
- the data with an offset of 01BEH-01FDH is a disk partition table containing fields describing the file system identifiers for each partition, and so on.
- the type identifier of the mirrored data of each virtual machine is recorded in the database.
- the type identifier may be recorded in the elastic computing controller.
- the maintenance management list is as shown in Table 2.
- the type confirmation request message of "192.168.0.1:/vmimages /vml .QCOW" the elastic calculation controller queries the management list according to the storage location of the carried virtual machine identifier or virtual machine mirror data, and searches for the type of mirror data. "raw” is returned to the software installation server in the type confirmation response message. The software installation server extracts the type of the mirror data carried from the type confirmation response message.
- the type of virtual machine image data WMdata1 created for the user is QCOW.
- Step 440 The software installation server invokes the corresponding mount program to mount the virtual machine image data according to the mirror data type.
- the software installation server loads the mirror data WMdata1 by calling the mount program corresponding to the file type QCOW according to the type QCOW of the mirror data WMdata1.
- the file system type (that is, the file system type of the virtual machine) inside the virtual machine mirror data is determined according to the mapping relationship between the mirror data type and the file system type.
- the file system type inside the mirrored data can be a 16-bit file allocation table (FAT16, File Allocation Table), a FAT32, a second extended file system (EXT2, Second extended file system), and a third extension.
- the hard disk sector data in the specified storage space is mapped to the drive by the driver, and the drive contains several files.
- the image file under the specified storage path is mapped to the drive by the driver, and the drive contains several files.
- the mirrored data is mapped to a drive in the software installation server file system, and subsequent operations on the files in the drive are equivalent to operations on the files in the virtual machine.
- the mirror data is mapped to the driver DriverWl.
- Step 450 The software installation server obtains a corresponding application software package from the application software resource library according to the pre-installed software identifier.
- an application software package clock-Package corresponding to the timer software is used as an example for description.
- the application package includes a change log file and files modified or added during the installation process.
- the change log file includes registry change record data and file change record data.
- Step 460 The software installation server updates the registry file in the drive according to the registration record change record data in the change record file included in the application package.
- the operating system version identifier input when the user applies for the virtual machine is an example of Windows XP.
- the registry file included in the driver DriverWl includes:
- DriverWl ⁇ Documents and Settings ⁇ LocalService ⁇ NTUSER.DAT DriverWl: ⁇ Documents and Settings ⁇ LocalService ⁇ Local Settings ⁇ Application
- the format of the registry file is HIVE format, and an HIVE file consists of multiple nest boxes (BIN).
- the header of the HIVE file has a header (basic block) that describes some global information about the HIVE file.
- a BIN consists of multiple cells (CELL), which can be divided into five specific types (key cell, value cell, sub-key list cell, value list cell, security descriptor cell) for storage.
- CELL multiple cells
- key cell key cell, value cell, sub-key list cell, value list cell, security descriptor cell
- Different registry data the contents of the above registry file can be logically mapped into a registry tree. For specific instructions, please refer to the related documents, which will not be detailed here.
- the registry change record data in the change log file contains the content of one CELL (ie, at least one key or value) in the at least one registry file, and the type of operation required to perform the CELL, such as adding, deleting, or modifying, etc. .
- the registration table file in the driver DriverWl is updated according to the contents of the CELL included in the registry change record data, the type of operation required for the CELL, and the location of the key or value corresponding to the CELL.
- step 470 the software installation server updates the file structure in the drive according to the file added or modified in the installation process included in the application package, and the file change record data in the change log file.
- the software installation server changes the record data according to the file in the change record file, adds, deletes or modifies the file in the drive, or adds, deletes or modifies the directory, thereby updating the file structure in the drive. Specifically, according to the record of deleting the file in the file change record data, deleting the file in the corresponding path on the disk; or adding or modifying the file according to the file change record data.
- the records of the pieces, as well as the files added or modified during the installation process in the application package modify the existing files or add files on the disk.
- files added, deleted or modified have corresponding path information, and file operations can use script programs to implement file operations.
- Step 480 the software installation server cancels the mirror data of the virtual machine.
- An embodiment of the present invention provides another application software installation method, which is an application software package created based on the method shown in FIG. 2a, which is implemented in the scenario shown in FIG. 3a, and is implemented in the scenario After the user allocates the virtual machine, install the software.
- FIG. 2a An application software package created based on the method shown in FIG. 2a, which is implemented in the scenario shown in FIG. 3a, and is implemented in the scenario After the user allocates the virtual machine, install the software.
- Figure 5 For the specific process, please refer to Figure 5.
- the management list stored by the elastic computing controller stores information such as an identifier of a physical host for starting each virtual machine, a storage address of mirror data of each virtual machine, and the like, as shown in Table 1, Table 1 Describes how mirrored data is stored in a SAN.
- the physical host for starting the virtual machine is instructed by reading the management list, and the mirror data is read from the storage address of the virtual machine mirror data to be loaded, thereby starting the virtual machine. .
- Step 510 The elastic computing controller receives the software installation request message, where the software installation request message may be sent by the user, or may be sent by the virtual machine management system, if an antivirus software needs to be installed for each virtual machine in the specified range. Wait.
- the software installation request message carries the virtual machine identifier and the application software identifier to be installed.
- Step 520 The software installation server obtains a storage location of the virtual machine image data corresponding to the virtual machine identifier.
- the software installation server and the elastic computing controller perform message interaction to obtain a storage location of the mirror data corresponding to the virtual machine WM1 in the elastic computing controller management list.
- Step 530 The software installation server determines the type of the virtual machine image data.
- Step 540 The software installation server invokes the corresponding mount program to mount the virtual machine mirror data according to the mirror data type, and maps the mirror data to a virtual disk in the software installation server file system.
- Step 550 The software installation server obtains the corresponding application software package from the application software resource library according to the to-be-installed application software identifier.
- Step 560 The software installation server updates the registry file in the virtual disk according to the registration record change record data in the change record file included in the application package.
- Step 570 The software installation server updates the file structure in the virtual disk according to the file added or modified in the installation process of the application software package and the file change record data in the change record file.
- Step 580 The software installation server cancels the mirroring data of the virtual machine.
- the installation method of the application software provided by the embodiment of the present invention first mounts the mirror data of the virtual machine to be installed with the application software. After the mount is completed, the mirror data of the virtual machine is mapped to a virtual disk in the software installation server file system. . Updating the registry file in the drive according to the registry change record data of the application package; updating the file structure in the virtual disk according to the file added or modified during the installation process in the application package, and the file change record data , thus achieving the purpose of installing application software. In the process of installing the application software, it is not necessary to install a browser or a client tool in the virtual machine in advance, thereby saving storage resources and eliminating complicated operations of the virtual machine user, which reduces the difficulty of software installation for the user.
- the software installation solution provided by the embodiment of the present invention can control the process of installing the application software of each virtual machine from the perspective of the software installation server, thereby ensuring software installation, when the application software needs to be installed on a large number of virtual machines in a large range.
- Embodiment 3 In addition to the basic implementation architecture of the computing system, it is also applicable to other relatively simple virtual machine application scenarios. In this case, the steps shown in Fig. 4 can be implemented by the same physical device, but the basic principle is similar to that of Fig. 4.
- FIG. 6a is a schematic diagram of an application scenario provided by an embodiment of the present invention.
- Three virtual machines VM1, VM2, and VM3 need to be created on a physical host host to implement parallel computing or software testing.
- the physical host's installation management module creates a virtual machine based on the virtual machine creation requirements entered by the user.
- FIG. 6b is a flowchart of an application software installation method according to an embodiment of the present invention.
- Step 610 The installation management module of the physical host receives the hardware configuration parameter, the operation system version identifier, and the pre-installed software identifier input by the user.
- the user can enter a creation requirement by installing a user interface of the management module.
- Step 620 The installation management module of the physical host creates virtual machine image data in the physical host according to the hardware configuration parameter and the operating system version identifier.
- Step 630 The installation management module determines the type of the virtual machine image data.
- the installation management module creates virtual machine image data in a specified format, such as QCOW, in step 620.
- the type of the virtual machine image data may be determined to be the specified format.
- Step 650 The installation management module searches for the application software package corresponding to the to-be-installed application software identifier from the stored at least one application software package according to the to-be-installed application software identifier.
- the application package includes a change log file and files modified or added during the installation process.
- the change log file includes registry change record data and file change record data.
- Step 660 The installation management module updates the registry file in the virtual disk according to the registration table change record data in the change record file included in the application software package.
- Step 670 The installation management module updates the file structure in the virtual disk according to the file added or modified in the installation process included in the application package, and the file change record data in the change record file.
- Step 680 The installation management module cancels the mirror data of the mounted virtual machine.
- the embodiment of the present invention provides an application example of the application software shown in FIG. 1 and an application example on the same physical device. This solution enables you to refine the steps that users take when installing applications in a virtual machine.
- Embodiment 4
- the embodiment of the present invention further provides an installation device for application software.
- the device includes a mounting module 701, a first update module 702, and a second update module 703, as follows: 701.
- the mirroring data is used to mount the virtual machine.
- the virtual machine is a virtual machine to be installed with application software, and the mirror data is mapped to a virtual disk in the local file system.
- the first update module 702 is configured to update a registry file in the virtual disk according to the registry change record data included in the application software package of the application software, where the application software package includes an addition or modification during the installation process.
- File, registry change record data, and file change record data, The registry change record data and the file change record data are obtained according to differences in the host operating system environment before and after the installation of the application software;
- a second update module 703 configured to update a file structure in the virtual disk according to the file change record data, and a file added or modified during an installation process included in the application software package, thereby implementing installation in the virtual machine The application software.
- the apparatus shown in FIG. 7 further includes:
- the unmounting unit 704 is configured to: after the first update module 702 updates the registry file in the virtual disk and the second update module 703 updates the file structure in the virtual disk, unmount the mirror of the virtual machine data.
- the mounting module 701 includes:
- a determining unit 801 configured to determine a type of mirror data of the virtual machine
- the mounting unit 802 is configured to invoke the corresponding mounter to mount the virtual machine image data on the storage location of the virtual machine image data according to the type of the mirror data determined by the determining unit 801.
- the determining unit 801 includes:
- the first test subunit 901 is configured to test, according to the storage location of the virtual machine mirror data, whether the data header of the mirrored data can be successfully read;
- a first determining subunit 902 configured to determine, according to a data format type field in the data header, a data format type of the mirrored data, if the first test subunit 901 can successfully read the data header of the mirrored data;
- a second test subunit 903 configured to: if the first test subunit 901 cannot successfully read the data header of the mirrored data, test whether the mirrored data can be successfully parsed according to the RAW format;
- the second determining sub-unit 904 is configured to determine that the data format type of the mirror data is RAW format if the second test sub-unit 903 can successfully parse the mirror data.
- the determining module 801 includes:
- a sending subunit 905 configured to send, to the elastic computing controller, a type confirmation request message carrying a storage location of the virtual machine identifier or the virtual machine mirror data;
- the receiving subunit 906 is configured to receive a type confirmation response message returned by the elastic computing controller; a third determining subunit 907, configured to extract, from the type confirmation response message received by the receiving subunit 906, a type of the mirrored data that is carried, where the type of the mirrored data is determined by the elastic computing controller according to the type confirmation request message.
- the virtual machine identifier is found in the correspondence between the virtual machine identifier saved in the virtual machine image file and the mirror data type; or the elastic computing controller confirms the storage location in the request message according to the type, and creates the virtual machine mirror data. It is found in the correspondence between the storage location of the saved virtual machine image data and the mirrored data type.
- an embodiment of the present invention further provides an apparatus for creating an application software package, where the apparatus includes an obtaining unit 110, a determining unit 120, and a creating unit 140, where:
- the obtaining unit 110 is configured to obtain a difference between the host operating system environment before and after the application software is installed, and the determining unit 120 is configured to determine the registry change record data and the file change record data according to the difference obtained by the obtaining unit 110;
- the creating unit 140 is configured to generate an application software package, where the application software package includes the registry change record data and the file change record data determined by the determining unit 120, and files added or tampered with during the installation process.
- the creating unit 140 includes:
- the writing subunit 111 is configured to write the registry change record data and the file change record data into the change record file; for example, the registry change record data and the file change record data may be written into a text format by using XML. Write change record file;
- the generating sub-unit 112 is configured to package the change record file and the file added or modified during the installation process to generate an application software package of the application software.
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
一种应用软件的安装方法和应用软件的安装装置,用以解决现有应用软件的安装过程操作复杂,实施难度大的问题。该方法包括:挂载虚拟机的镜像数据,所述虚拟机为待安装应用软件的虚拟机,将镜像数据映射为本地文件系统中的一个虚拟磁盘;根据应用软件包所包含的注册表变更记录数据,更新所述虚拟磁盘中的注册表文件,所述应用软件包包含安装过程中增加或修改的文件、注册表变更记录数据和文件变更记录数据;根据所述文件变更记录数据、应用软件包包含的安装过程中增加或修改的文件,更新虚拟磁盘中的文件结构,从而实现在虚拟机中安装所述应用软件。在安装应用软件的过程中,无需虚拟机用户进行复杂的操作,降低了软件安装难度。
Description
应用软件的安装方法和应用软件的安装装置 本申请要求于 2011 年 11 月 22 日提交中国专利局、 申请号为 201110372932.5、 发明名称为 "应用软件的安装方法和应用软件的安装装置" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及计算机及通信技术领域, 尤其涉及一种应用软件的安装方法 及一种应用软件的安装装置。 背景技术
硬件虚拟化技术在一台物理主机上虚拟出一台或多台虚拟机, 从而使得 几个甚至几十个虚拟机可以共用一个物理主机的硬件资源。 云计算是硬件虚 拟化技术的一个重要应用场景。 云计算是指一种信息技术基础设施的交付和 使用模式, 用户通过网络以按需、 易扩展的方式来获得所需资源。 云计算也 被推广为服务的交付和使用模式, 用户通过网络以按需、 易扩展的方式来获 得所需服务。 云计算的核心思想, 是将大量用网络连接的资源 (这里的资源 包括存储资源、 计算资源、 各种应用软件)统一管理和调度, 构成一个资源 池向用户按需提供服务。 提供资源的网络被称为 "云"。
在云计算场景下, 在 "云" 根据用户的申请, 分配一个虚拟机供用户使 用的情况下, 如果用户想要在虚拟机中安装应用软件, 则安装过程包括: 用户启动虚拟机, 进入操作系统后, 手动触发浏览器或客户端工具连接 能够提供应用软件的资源服务器, 请求下载应用软件; 虚拟机在从资源服务 器下载到应用软件后进行安装, 或者;
用户启动虚拟机后, 在虚拟机操作系统后台会自动运行资源更新客户端, 该客户端会向资源服务器发送上线提示消息。 接收到上线提示消息后, 资源 服务器会根据预先配置的推送策略, 将应用软件推送到虚拟机上。
发明人在实现本发明过程中, 发现现有技术至少存在以下问题: 需要在 虚拟机中预先安装浏览器或客户端工具, 以获得需要安装的应用软件。 并且, 如何选择安全、 适宜的应用软件的版本、 及安装包, 需要用户具备较高的信 息技术知识和技能。 因此现有技术存在着应用软件的安装过程操作复杂, 实 施难度大的问题。 发明内容
本发明实施例提供一种应用软件的安装方法,用以解决现有应用软件的安 装过程操作复杂, 实施难度大的问题。
对应地,本发明实施例还提供了一种应用软件包的创建方法、一种应用软 件的安装装置和一种应用软件包的创建装置。
本发明实施例提供的技术方案如下:
一种应用软件的安装方法, 包括:
挂载虚拟机的镜像数据, 所述虚拟机为待安装应用软件的虚拟机, 将所 述镜像数据映射为本地文件系统中的一个虚拟磁盘;
根据所述应用软件的应用软件包所包含的注册表变更记录数据, 更新所 述虚拟磁盘中的注册表文件, 所述应用软件包包含安装过程中增加或修改的 文件、 注册表变更记录数据和文件变更记录数据, 所述注册表变更记录数据 和文件变更记录数据是根据安装所述应用软件前后主机操作系统环境的差异 获得的;
根据所述文件变更记录数据、 以及应用软件包包含的安装过程中增加或 修改的文件, 更新所述虚拟磁盘中的文件结构, 从而实现在所述虚拟机中安 装所述应用软件。
一种应用软件包的创建方法, 包括:
获取安装应用软件前后主机操作系统环境的差异;
根据所述差异, 确定注册表变更记录数据和文件变更记录数据; 生成包含所述注册表变更记录数据和文件变更记录数据、 以及安装程序
过程中所述主机中增加或修改的文件的应用软件包。
一种应用软件的安装装置, 包括:
挂载模块, 用于挂载虚拟机的镜像数据, 所述虚拟机为待安装应用软件 的虚拟机, 将所述镜像数据映射为本地文件系统中的一个虚拟磁盘;
第一更新模块, 用于根据所述应用软件的应用软件包所包含的注册表变 更记录数据, 更新所述虚拟磁盘中的注册表文件, 所述应用软件包包含安装 过程中增加或修改的文件、 注册表变更记录数据和文件变更记录数据, 所述 注册表变更记录数据和文件变更记录数据是根据安装所述应用软件前后主机 操作系统环境的差异获得的;
第二更新模块, 用于根据所述文件变更记录数据、 以及应用软件包包含 的安装过程中增加或修改的文件, 更新所述虚拟磁盘中的文件结构, 从而实 现在所述虚拟机中安装所述应用软件。
一种应用软件包的创建装置, 包括:
获取单元, 用于获取安装应用软件前后主机操作系统环境的差异; 确定单元, 用于根据获取单元获得的所述差异, 确定注册表变更记录数 据和文件变更记录数据;
创建单元, 用于生成应用软件包, 该应用软件包包含确定单元确定出的 所述注册表变更记录数据和文件变更记录数据、 以及安装程序过程中所述主 机中增加或修改的文件。
本发明实施例先通过挂载待安装应用软件的虚拟机的镜像数据, 将其映 射为软件安装服务器文件系统中的一个虚拟磁盘; 然后根据应用软件包的注 册表变更记录数据, 更新所述驱动器中的注册表文件; 根据应用软件包中安 装过程中增加或修改的文件、 以及文件变更记录数据, 更新所述虚拟磁盘中 的文件结构, 从而实现安装应用软件的目的。 在安装应用软件的过程中, 无 需预先在虚拟机中安装浏览器或客户端工具, 也无需虚拟机用户进行复杂的 操作, 对用户而言降低了软件安装难度。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一筒单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例的主要实现原理流程图;
图 2a为本发明实施例提供的应用软件包的创建过程的流程图;
图 2b为本发明实施例提供的一种获取安装应用软件前后主机操作系统环 境的差异的方式的流程图;
图 2c为本发明实施例提供的生成应用软件包的流程图;
图 2d为本发明实施例提供的应用软件包的示意图;
图 3a为本发明实施例提供的软件安装系统的部署环境示意图;
图 3b 为本发明实施例提供的镜像数据在存储区域网络(SAN, Storage
Area Network ) 中存储的示意图;
图 3c 为本发明实施例提供的镜像数据在网络附属存储(NAS, Network
Attached Storage ) 中存储的示意图;
图 4为本发明实施例提供的一种应用软件安装方法的流程图;
图 5为本发明实施例提供的另一种应用软件安装方法的流程图; 图 6a为本发明实施例提供的另一种软件安装系统的部署环境示意图; 图 6b为本发明实施例提供的另一种应用软件安装方法的流程图; 图 7为本发明实施例提供的一种应用软件的安装装置的结构示意图; 图 8为本发明实施例提供的挂载模块的结构示意图;
图 9a为本发明实施例提供的第一种确定单元的结构示意图;
图 9b为本发明实施例提供的第二种确定单元的结构示意图;
图 10为本发明实施例提供的一种应用软件包的创建装置的结构示意图; 图 11为本发明实施例提供的创建单元的结构示意图。
具体实施方式
现有技术除了存在安装过程操作复杂, 实施难度大的问题之外, 由于各 虚拟机中防火墙配置的差异, 用户采用类似的安装过程可能出现在有的虚拟 机中能够安装成功, 而在其他虚拟机中安装失败的情况。
另外, 如果出于安全、 可靠性等方面的考虑, 需要对一定范围内的大量 虚拟机都安装应用软件时, 采用现有的安装方法还存在着效率较低、 不可控 的缺陷。
下面结合各个附图对本发明实施例技术方案的主要实现原理、 具体实施 方式及其对应能够达到的有益效果进行详细的阐述。
如图 1所示, 本发明实施例的主要实现原理流程如下:
步骤 10, 挂载待安装应用软件的虚拟机的镜像数据, 将所述镜像数据映 射为本地文件系统中的一个虚拟磁盘。
其中, 镜像数据是指虚拟机实例的静态存储形式, 其中包含虚拟机操作 系统文件和用户文件等。 在云计算基础设施构架中, 虚拟机的存储资源和运 行资源可能分布在不同的物理实体中。 当分配某个用户使用一个虚拟机时, 用于启动虚拟机的物理主机通过加载该虚拟机的镜像数据, 实现启动虚拟机 的目的。
镜像数据载荷内容(包括虚拟机操作系统文件和用户文件等) 的存储方 式与个人计算机中数据的存储方式相同, 即用于存储数据的物理磁盘扇区中 的字段定义等相同。 差别之处在于不同的虚拟机厂商在载荷内容的基础上进 行了封装, 增加了数据头, 或者有的厂商还对镜像数据进行了压缩等处理。
挂载具体来说, 在不同操作系统中, 挂载操作结果的形式也会有所不同。 在本实施例中, 虚拟磁盘是指可被软件安装服务器的操作系统识别出的存储 对象。 在软件安装月良务器为 Windows系列操作系统的情况下, 挂载完成后, 镜像数据被映射为软件安装服务器文件系统中的一个驱动器; 在软件安装服 务器为 Linux、 UNIX系列操作系统的情况下, 挂载完成后, 镜像数据被映射
为软件安装服务器文件系统中的一个块设备。 无论是驱动器还是块设备, 后 续的操作原理基本类似。
步骤 20, 根据所述应用软件的应用软件包中的注册表变更记录数据, 更 新所述虚拟磁盘中的注册表文件。
本领域技术人员可以理解, 数据的组织方式千变万化, 不可能将其进行 ——列举。 可选地, 本实施例给出了应用软件包所包含的注册表变更记录数 据、 文件变更记录数据、 以及安装过程中增加或修改的文件, 这三类数据的 一种组织方式:
所述应用软件包中包括变更记录文件、 以及安装过程中增加或修改的文 件。
所述变更记录文件至少包含注册表变更记录数据和文件变更记录数据, 所述注册表变更记录数据和文件变更记录数据是预先在主机(例如, 一台物 理主机) 中执行所述应用软件的安装程序, 通过对比运行安装程序前后所述 主机操作系统环境快照间的差异获得的。 具体来说: 所述注册表变更记录数 据是通过对比执行软件安装程序前后快照中, 注册表文件之间的差异获得的; 所述注册表变更记录数据包括增加、 删除或修改的键, 增加、 删除或修改的 值。 所述文件变更记录数据是通过对比运行软件安装程序前后快照中, 文件 结构之间的差异获得的, 所述文件变更记录数据包括磁盘中增加、 删除或修 改文件的记录, 或增加、 删除或修改目录的记录。
步骤 30, 根据应用软件包中的文件变更记录数据、 以及应用软件包包含 的安装过程中增加或修改的文件, 更新所述虚拟磁盘中的文件结构。
在步骤 10中, 待安装应用软件的虚拟机的镜像数据可以是根据用户申请 虚拟机时, 输入的硬件配置参数和操作系统版本标识生成的, 即该镜像数据 是在创建虚拟机的过程中生成的, 在这种情况下, 应用软件包是根据申请虚 拟机时, 输入的预装软件标识从应用软件资源库中获取的; 待安装应用软件 的虚拟机的镜像数据也可以是虚拟机创建完成后, 接收到用户指定的待安装 的软件标识后, 获取虚拟机镜像数据的存储位置, 并根据获取的存储地址获
得的, 在这种情况下, 应用软件包是根据用户输入的预装软件标识, 或者虚 拟机管理系统指示的需要安装的软件标识, 从应用软件资源库中查找到的。
需要说明的是, 上述步骤 20和步骤 30并无执行顺序上的限制, 当步骤 下面将依据本发明上述发明原理, 详细介绍四个实施例来对本发明方法 的主要实现原理进行详细的阐述和说明。
实施例一
附图 2a是本发明实施例提供的应用软件包的创建过程的流程图。
步骤 200,应用软件包的创建装置获取安装应用软件前后主机操作系统环 境的差异。
步骤 210, 应用软件包的创建装置根据所述差异, 确定注册表变更记录数 据和文件变更记录数据。
所述注册表变更记录数据中包含在安装所述应用软件后, 主机注册表中 增加、 删除或修改的键, 或者增加、 删除或修改的值。 当然注册表变更记录 数据可以既包含注册表中增加、 删除或修改的键, 也包含增加、 删除或修改 的值。
所述文件变更记录数据中包含在安装所述应用软件后, 磁盘中增加、 删 除或修改文件的记录, 或增加、 删除或修改目录的记录。
步骤 220,应用软件包的创建装置生成包含所述注册表变更记录数据和文 件变更记录数据、 以及安装程序过程中增加或修改的文件的应用软件包。
可选地, 在上述步骤 200 中获取安装应用软件前后主机操作系统环境的 差异的方式, 包括但不限于以下三种:
方式一: 参照附图 2b:
步骤 201 ,应用软件包的创建装置将应用软件提供商提供的待安装应用软 件的安装包复制到主机 hostO的操作系统环境中。
可选地, 为了便于在后续生成快照时减少不必要的垃圾信息, 提高快照 对比效率, 此时应用软件包的创建装置应根据注册表文件中的信息, 选择一
个具有 "干净" 的操作系统环境的主机作为用于创建应用软件包的专用主机,
"干净" 的操作系统环境是指安装有尽可能少的非必要应用软件的操作系统, 例如未安装任何其他应用软件时的操作系统。
步骤 202, 应用软件包的创建装置对当前主机操作系统环境建立第一快 照。 所述主机操作系统环境包含注册表和磁盘。
其中, 注册表(Registry )是操作系统中的一个重要数据库, 用于存储系 统和应用程序的配置信息。
对注册表建立快照是指通过枚举方式记录注册表中的所有键和值。 对磁 盘建立快照是指通过枚举方式记录磁盘上的文件结构信息, 即所有目录和文 件、 以及目录和文件的存储路径、 修改时间和大小等信息。
此时建立的第一快照反映了在安装所述应用软件之前, hostO注册表和磁 盘的状态信息。
步骤 203 ,应用软件包的创建装置在所述主机 hostO中安装所述应用软件。 setup.exe, 运行该安装程序即可实现实现安装应用软件的目的。
步骤 204, 应用软件包的创建装置对当前主机操作系统环境建立第二快 照。
建立快照的方法参照步骤 202 中的介绍。 此时建立的第二快照反映了在 安装所述应用软件之后, hostO注册表和磁盘的状态信息。
步骤 205 , 应用软件包的创建装置对比第一快照和第二快照,根据第一快 照和第二快照的差异, 确定安装应用软件前后主机操作系统环境的差异, 并 继而从中获得注册表变更记录数据和文件变更记录数据。 可选地, 为了加快 对比的效率, 可以预先指定磁盘中的对比范围, 例如指定只对比预定磁盘扇 区中、 或者存储路径下的文件、 目录的改变。
方式二: 预先选择两个操作系统环境完全相同的主机, 分别为 hostl 和 host2。 应用软件包的创建装置将待安装应用软件提供商提供的安装包复制到 主机 host2的操作系统环境中, 并在 host2中运行所述安装包中的安装程序;
应用软件包的创建装置对比此时 hostl和 host2操作系统环境的差异, 从而获 得安装应用软件前后主机操作系统环境的差异。
方式三: 应用软件包的创建装置对应用软件提供商提供的安装包中的安 装程序进行反向编译, 从反向编译结果中获得对操作系统环境所做的操作符, 例如修改注册表文件的操作符, 以及在文件系统中增加或修改文件的操作符, 从而推断安装应用软件前后主机操作系统环境预期应有的差异。
可选地, 参照附图 2c, 上述步骤 220生成应用软件包的过程包括: 步骤 221 ,将所述注册表变更记录数据和文件变更记录数据写入变更记录 文件;
可选地,可以使用描述语言,如可扩展标记语言(XML, Extensible Markup Language ), 来描述注册表变更记录数据和文件变更记录数据, 并将使用描述 语言描述的注册表变更记录数据和文件变更记录数据写入变更记录文件。 变 更记录文件的格式不限, 可以是文本格式文件。
步骤 222, 对所述变更记录文件, 和安装程序过程中增加或修改的文件进 行打包处理, 生成所述应用软件的应用软件包。
附图 2d为本发明实施例提供的应用软件包的示意图, 其中变更记录文件 中记录了在路径 C;/programe file/abc/下, 增加一个名为 fileA的文件, 在注册 表中增加一个值 keyl.valuel ; 应用软件包中还包括增加的文件 fileA。
可选地, 通过打包程序, 例如 rar ( Roshal ARchive zip, 将变更记录文 件和安装程序过程中增加或修改的文件进行打包封装, 从而生成应用软件包。
需要说明的是: 上述第一快照和第二快照并不是表示顺序关系, 而是为 了区别不同的快照, 下文中提到的第一、 第二等也是为了区别不同的信息、 数据、 请求、 消息或单元模块等。
本发明实施例提供了一种应用软件包的创建方案, 利用采用该创建方案 创建的应用软件包, 可用于对虚拟机的镜像数据进行修改, 从而实现在虚拟 机中安装应用软件的目的。
实施例二
附图 3a为本发明实施例提供的软件安装系统的部署环境示意图, 是一种 较为典型的云计算基础实施构架。 该系统中包含至少一个软件安装服务器, 至少一个弹性计算控制器, 至少一个物理主机、 以及分布式存储设备。 其中, 弹性计算控制器是现有云计算基础设施构架中的一个核心组成部分, 是管理 存储资源、 计算资源、 以及其他资源的中枢。 弹性计算控制器根据用户的申 请为用户分配存储资源、 计算资源, 控制在分布式存储设备中创建虚拟机的 镜像数据。 在本实施例中, 每个虚拟机的镜像数据存储于分布式存储设备中, 其中分布式存储设备以 SAN和 NAS分别为例进行说明。 软件安装服务器与 应用软件资源库连接, 应用软件资源库中存储有至少一个采用附图 2a所示方 法创建的应用软件包。
需要说明的是: 附图 3a所示的只是一种云计算基础实施构架的示例, 本 本发明实施例提供了一种应用软件的安装方法, 该安装方法是基于附图 2a所示方法创建的应用软件包, 在附图 3a所示的场景中进行的, 用于实现在 用户申请虚拟机的过程中安装软件, 具体流程请参照附图 4。
步骤 410, 弹性计算控制器接收用户申请虚拟机时输入的硬件配置参数、 操作系统版本标识、 和预装软件标识。
用户在申请虚拟机时, 可以根据虚拟机申请页面中提供的虚拟机管理系 统能够支持的若干配置选项中, 选择出所申请的虚拟机应具备的硬件配置参 数、 操作系统版本标识、 和预装软件标识等; 用户可以通过物理主机中的客 户端工具发送虚拟机申请请求消息, 该请求消息中携带选择出的硬件配置参 数、 操作系统版本标识、 和预装软件标识。
当然, 上述硬件配置参数、 操作系统版本标识、 和预装软件标识也可以 是虚拟机管理系统提供的默认配置选项, 例如, 用户在选择典型安装时, 根 据默认的配置参数、 操作系统版本标识、 和预装软件标识生成镜像数据。
步骤 420, 弹性计算控制器根据用户申请虚拟机时, 输入的硬件配置参数 和操作系统版本标识, 控制在分布式存储设备中创建虚拟机镜像数据。
具体地, 根据硬件配置参数配置虚拟机硬件规格, 根据操作系统版本标 识从操作系统模板集合中选择对应的操作系统模板; 然后根据虚拟机硬件规 格和操作系统模板创建虚拟机镜像数据。 本实施例中, 根据用户申请创建虚 拟机 WM1的镜像数据 WMdatal。 关。 例如对于 SAN来说, 虚拟机镜像数据为指定存储空间 (即虚拟机镜像数 据区) 内的硬盘扇区数据。 其他设备, 例如用于启动虚拟机的物理主机, 可 以用在访问请求中携带 "IP地址 +端口号" 的方式来访问 SAN上的待启动虚 拟机对应的虚拟机镜像数据区, "IP地址 +端口号"对应着 SAN中的一块存储 区。 如附图 3b所示。
对于 NAS来说, 虚拟机镜像数据为指定存储路径下的镜像文件。 其他设 备,例如用于启动虚拟机的物理主机,可以通过网络文件系统(NFS, Network File System )来访问 NAS上的待启动虚拟机对应的虚拟机镜像文件。 如附图 3c所示。
在表 1中虚拟机 VM1和 WM2的镜像数据存储在 NAS中,而虚拟机 VM3 的镜像数据存储在 NAS中。
需要说明的是: 附图 3a所示的只是一种云计算基础实施构架的示例, 本 构架场景中是由管理数据库来维护虚拟机标识和镜像数据地址的对应关系。
表 1
虚拟机标识 用于启动虚拟机的 虚拟机镜像数据的存储地址 物理主机的标识
VM1 Hostl 192.168.0.1 :/vmimages /vml.QCOW
VM2 Hostl 192.168.0.1 : /vmimages /vm2.vmdk
VM3 Host2 192.168.0.2: 10000
步骤 430, 软件安装服务器确定所述虚拟机镜像数据的类型。 可选地, 确定镜像数据类型的方式包括但不限于:
方式一:
软件安装服务器先测试是否能够从虚拟机镜像数据的存储位置, 成功读 取镜像数据的数据头, 所述虚拟机镜像数据的存储位置可以是 SAN或 NAS 通知软件安装服务器的。
若能够成功读取镜像数据的数据头, 则根据所述数据头, 确定所述镜像 数据的类型。 例如, 根据镜像数据格式的定义, 读取数据头中的文件类型字 段, 将读取的字段与各类型标识进行比较, 若一致, 则确定虚拟机镜像数据 的类型为与读取的字段一致的类型标识对应的文件类型。 镜像数据的类型包 括 QCOW ( QEMU Copy-on-write )、 VMDK ( VMWare Virtual Machine Disk Format )、 VHD ( Microsoft Virtual Hard Disk format )、 VDI ( Sun xVM VirtualBox Virtual Disk Images )等等, 一种虚拟机系统可以兼容多种镜像数据类型。
若不能成功读取镜像数据的数据头,则测试按照 RAW格式是否能够成功 解析所述镜像数据, 若解析操作成功, 则确定所述镜像数据的类型为 RAW格 式。 RAW格式存储镜像数据的方式与个人计算机中存储数据的方式相同, 即 与物理磁盘数据是 1:1的对应关系, 未在物理磁盘数据上进行封装, 因此按照 物理磁盘数据格式进行解析, 物理磁盘数据格式的特征包括但不限于: 第 0 扇区 (首个 512字节 )是主引导记录( MBR, Main Boot Record ), 该扇区末 尾存在签名字 "55AA";以第 0扇区初始位置为基准,偏移量为 01BEH-01FDH 的数据是磁盘分区表, 其中包含描述各分区文件系统标识的字段, 等等。
方式二:
当根据用户的虚拟机申请, 创建虚拟机实例对应的镜像数据时, 将每个 虚拟机的镜像数据的类型标识记录在数据库中, 在本实施例中, 可以将类型 标识记录在弹性计算控制器维护的管理列表中, 如表 2所示。 当软件安装服 务器需要获知某个虚拟机镜像数据的类型时,如需要获知虚拟机 WM1的镜像 数据类型时, 通过与弹性计算控制器进行消息交互, 来获得弹性计算控制器
管理列表中存储的镜像数据的类型。 例如软件安装服务器向弹性计算控制器 发送携带有虚拟机标识 "WM1" 或虚拟机镜像数据的存储位置
" 192.168.0.1:/vmimages /vml .QCOW" 的类型确认请求消息, 弹性计算控制 器根据携带的虚拟机标识或虚拟机镜像数据的存储位置, 查询管理列表, 并 将查找到的镜像数据的类型 "raw" 携带在类型确认响应消息中返回给软件安 装服务器。 软件安装服务器从类型确认响应消息中提取携带的镜像数据的类 型即可。
表 2
步骤 440, 软件安装服务器根据所述镜像数据类型, 调用对应的挂载程序 挂载虚拟机镜像数据。
在本实施例中, 软件安装服务器根据镜像数据 WMdatal的类型 QCOW, 调用文件类型 QCOW对应的挂载程序挂载镜像数据 WMdatal。
现有操作系统大多都提供能够实现挂载功能的命令或命令集合, 如 linux 系统中的 mount、 kpartx等命令。
挂载过程中, 根据镜像数据类型与文件系统类型的对应关系, 确定虚拟 机镜像数据内部的文件系统类型 (即虚拟机的文件系统类型)。 镜像数据内部 的文件系统类型可以为 16位文件分配表(FAT16, File Allocation Table )、 FAT32、 第二扩展文件系统(EXT2, Second extended file system ), 第三扩展
文件系统( EXT3 , Third extended file system ), 网络文件系统( NTFS , Network File System )等, 在挂载过程中需要使用文件系统类型对应的驱动程序来实现 对文件系统的支持。
对于 SAN来说, 指定存储空间内的硬盘扇区数据经驱动程序的处理被映 射为驱动器, 驱动器中包含若干文件。
对于 NAS来说, 指定存储路径下的镜像文件经驱动程序的处理被映射为 驱动器, 驱动器中包含若干文件。
挂载完成后, 镜像数据被映射为软件安装服务器文件系统中的一个驱动 器, 后续对该驱动器中文件的操作等价于对虚拟机内文件的操作。
软件安装服务器挂载镜像数据 WMdatal 后, 将镜像数据映射为驱动器 DriverWl。
步骤 450, 软件安装服务器根据所述预装软件标识,从应用软件资源库中 获取对应的应用软件包。
在本实施例中, 以安装定时器软件对应的应用软件包 clock-Package为例 进行说明。 应用软件包中包括变更记录文件, 以及安装过程中修改或增加的 文件。 变更记录文件中包括注册表变更记录数据和文件变更记录数据。
步骤 460,软件安装服务器根据应用软件包所包含的变更记录文件中的注 册表变更记录数据, 更新所述驱动器中的注册表文件。
在本实施例中, 以用户申请虚拟机时输入的操作系统版本标识为 WindowsXP为例, 挂载镜像文件后驱动器 DriverWl 中包含的注册表文件包 括:
DriverWl:\WINDOWS\system32\config\SAM
DriverWl:\WINDOWS\system32\config\SECURITY
DriverWl :\WINDOWS\system32\config\software
DriverWl:\WINDOWS\system32\config\system
DriverWl:\WINDOWS\system32\config\default
DriverWl: \Documents and Settings\LocalService\NTUSER.DAT
DriverWl: \Documents and Settings\LocalService\Local Settings\Application
Data\Microsoft\Windows\UsrClass.dat
DriverWl: \Documents and Settings\NetworkService\NTUSER.DAT
DriverWl: \Documents and Settings\NetworkService\Local Settings\Application
Data\Microsoft\Windows\UsrClass.dat
DriverWl: \Documents and Settings\Administrator\NTUSER.DAT
DriverWl: \Documents and Settings\Administrator\Local Settings\Application
Data\Microsoft\Windows\UsrClass.dat
注册表文件的格式为 HIVE格式, 一个 HIVE文件由多个巢箱 ( BIN )组 成。 HIVE文件的首部有一个文件头 (基本块), 用于描述这个 HIVE文件的 一些全局信息。 一个 BIN由多个巢室 (CELL )组成, CELL可以分为具体的 5种(键巢室、 值巢室、 子键列表巢室、 值列表巢室、 安全描述符巢室), 用 于存储不同的注册表数据, 上述注册表文件中的内容从逻辑上可以被映射成 注册表树。 具体说明可以参考相关文档, 在这里不再详述。
变更记录文件中的注册表变更记录数据包含上述至少一个注册表文件中 一个 CELL的内容(即至少一个键或值), 以及对该 CELL所需执行的操作类 型, 如增加、 删除或修改等等。
根据注册表变更记录数据中包含的 CELL的内容、 及对该 CELL所需执 行的操作类型, 以及 CELL对应的键或值的位置, 对驱动器 DriverWl中注册 表文件进行更新。
步骤 470,软件安装服务器根据应用软件包中包含的安装过程中增加或修 改的文件、 以及变更记录文件中的文件变更记录数据, 更新所述驱动器中的 文件结构。
软件安装服务器根据变更记录文件中的文件变更记录数据, 在所述驱动 器中增加、 删除或修改文件, 或增加、 删除或修改目录, 从而更新所述驱动 器中的文件结构。 具体地, 根据文件变更记录数据中删除文件的记录, 在磁 盘中删除对应路径下的文件; 或者根据文件变更记录数据中增加、 或修改文
件的记录, 以及应用软件包中安装过程中增加或修改的文件, 在磁盘中修改 已有文件或增加文件。 其中, 增加、 删除或修改的文件都有对应的路径信息, 文件操作可以使用脚本程序来实现文件操作。
步骤 480, 软件安装服务器取消挂载虚拟机的镜像数据。
后续需要启动虚拟机时, 用于启动该虚拟机的物理主机, 从该虚拟机镜 像数据的存储地址中读取经过步骤 430~步骤 480 处理的镜像数据进行加载 后, 所启动的虚拟机上已安装有应用软件。 本发明实施例提供了另一种应用软件的安装方法, 该安装方法是基于附 图 2a所示方法创建的应用软件包,在附图 3a所示的场景中进行的,用于实现 在已为用户分配虚拟机后, 安装软件, 具体流程请参照附图 5。
在本实施例中, 弹性计算控制器存储的管理列表中存储有用于启动每个 虚拟机的物理主机的标识、每个虚拟机的镜像数据的存储地址等信息, 如表 1 所示, 表 1描述了镜像数据存储于 SAN中的情况。 当分配某个用户使用一个 虚拟机时, 通过读取该管理列表, 指示用于启动该虚拟机的物理主机, 从该 虚拟机镜像数据的存储地址中读取镜像数据进行加载, 从而启动虚拟机。
步骤 510, 弹性计算控制器接收软件安装请求消息, 该软件安装请求消息 可以是用户发送的, 也可以是虚拟机管理系统发送的, 如需要对指定范围内 的每个虚拟机安装一个杀毒软件等等。 软件安装请求消息中携带虚拟机标识 和待安装应用软件标识。
步骤 520,软件安装服务器获得所述虚拟机标识对应的虚拟机镜像数据的 存储位置。
可选地, 在本实施例中, 软件安装服务器与弹性计算控制器进行消息交 互,来获得弹性计算控制器管理列表中虚拟机 WM1对应的镜像数据的存储位 置。
步骤 530, 软件安装服务器确定所述虚拟机镜像数据的类型。
具体确定镜像数据类型的方法可参照步骤 430 中的介绍, 在这里不再重
复。
步骤 540, 软件安装服务器根据所述镜像数据类型,调用对应的挂载程序 挂载虚拟机镜像数据, 将所述镜像数据映射为软件安装服务器文件系统中的 一个虚拟磁盘。
步骤 550, 软件安装服务器根据所述待安装应用软件标识, 从应用软件资 源库中获取对应的应用软件包。
步骤 560,软件安装服务器根据应用软件包所包含的变更记录文件中的注 册表变更记录数据, 更新所述虚拟磁盘中的注册表文件。
步骤 570,软件安装服务器根据应用软件包中安装过程中增加或修改的文 件、 以及变更记录文件中的文件变更记录数据, 更新所述虚拟磁盘中的文件 结构。
步骤 580, 软件安装服务器取消挂载虚拟机的镜像数据。
步骤 540~步骤580的具体处理方式与附图 4中的步骤 440~步骤480相类 似, 在这里不再重复。
本发明实施例提供的应用软件的安装方法, 先挂载待安装应用软件的虚 拟机的镜像数据, 挂载完成之后, 该虚拟机的镜像数据被映射为软件安装服 务器文件系统中的一个虚拟磁盘。 根据应用软件包的注册表变更记录数据, 更新所述驱动器中的注册表文件; 根据应用软件包中安装过程中增加或修改 的文件、 以及文件变更记录数据, 更新所述虚拟磁盘中的文件结构, 从而实 现安装应用软件的目的。 在安装应用软件的过程中, 无需预先在虚拟机中安 装浏览器或客户端工具, 从而节约了存储资源, 同时也无需虚拟机用户进行 复杂的操作, 对用户而言降低了软件安装难度。
在需要对大范围内数目较多的虚拟机同步安装应用软件时, 本发明实施 例提供的软件安装方案能够从软件安装服务器的角度, 控制每个虚拟机安装 应用软件的进程, 从而确保软件安装范围的可控性。 实施例三
计算基础实施构架中之外, 还适用于其他较为筒单的虚拟机应用场景。 在这 种情况下附图 4所示的各步骤可以由同一个实体设备来实现, 但基本原理与 附图 4相类似。
附图 6a为本发明实施例提供的应用场景的示意图, 需要在物理主机 host 上创建 3个虚拟机 VM1、 VM2、 VM3以实现并行计算或软件测试。 物理主机 的安装管理模块根据用户输入的虚拟机创建需求创建虚拟机。
附图 6b为本发明实施例提供的应用软件安装方法的流程图。
步骤 610, 物理主机的安装管理模块接收用户输入的硬件配置参数、操作 系统版本标识、 和预装软件标识。
可选地, 用户可以通过安装管理模块的用户界面来输入创建需求。
步骤 620,物理主机的安装管理模块根据硬件配置参数和操作系统版本标 识, 在该物理主机中创建虚拟机镜像数据。
在创建虚拟机镜像数据的过程中, 可以维护一个存储有虚拟机标识和虚 拟机镜像数据存储位置的对应关系表, 如表 3所示。
表 3
具体确定镜像数据类型的方法可参照步骤 430 中的介绍, 在这里不再重 复。
可选地, 安装管理模块在步骤 620 中创建指定格式的虚拟机镜像数据, 如 QCOW, 则在本步骤中可以确定虚拟机镜像数据的类型为所述指定格式。
步骤 640, 安装管理模块根据所述镜像数据类型, 调用对应的挂载程序挂 载虚拟机镜像数据, 将所述镜像数据映射为物理主机文件系统中的一个虚拟 磁盘。
步骤 650, 安装管理模块根据所述待安装应用软件标识,从存储的至少一 个应用软件包中查找到该待安装应用软件标识对应的应用软件包。
应用软件包中包括变更记录文件, 以及安装过程中修改或增加的文件。 变更记录文件中包括注册表变更记录数据和文件变更记录数据。
步骤 660,安装管理模块根据应用软件包所包含的变更记录文件中的注册 表变更记录数据, 更新所述虚拟磁盘中的注册表文件。
步骤 670,安装管理模块根据应用软件包中包含的安装过程中增加或修改 的文件、 以及变更记录文件中的文件变更记录数据, 更新所述虚拟磁盘中的 文件结构。
步骤 680, 安装管理模块取消挂载虚拟机的镜像数据。
步骤 640~步骤680的具体处理方式与附图 4中的步骤 440~步骤480相类 似, 在这里不再重复。
本发明实施例提供了一种附图 1 所示的应用软件的安装方法, 在同一实 体设备上的应用实例。 该方案能够筒化用户在虚拟机中安装应用软件时的操 作步骤。 实施例四
相应地, 本发明实施例还提供了一种应用软件的安装装置, 如图 7所示, 该装置包括挂载模块 701、第一更新模块 702和第二更新模块 703 ,具体如下: 挂载模块 701 , 用于挂载虚拟机的镜像数据, 所述虚拟机为待安装应用软 件的虚拟机, 将所述镜像数据映射为本地文件系统中的一个虚拟磁盘;
第一更新模块 702,用于根据所述应用软件的应用软件包所包含的注册表 变更记录数据, 更新所述虚拟磁盘中的注册表文件, 所述应用软件包包含安 装过程中增加或修改的文件、 注册表变更记录数据和文件变更记录数据, 所
述注册表变更记录数据和文件变更记录数据是根据安装所述应用软件前后主 机操作系统环境的差异获得的;
第二更新模块 703 , 用于根据所述文件变更记录数据、 以及应用软件包包 含的安装过程中增加或修改的文件, 更新所述虚拟磁盘中的文件结构, 从而 实现在所述虚拟机中安装所述应用软件。
可选地, 附图 7所示的装置还包括:
取消挂载单元 704,用于在第一更新模块 702更新所述虚拟磁盘中的注册 表文件和第二更新模块 703 更新所述虚拟磁盘中的文件结构后, 取消挂载所 述虚拟机的镜像数据。
可选地, 如附图 8所示, 所述挂载模块 701包括:
确定单元 801 , 用于确定所述虚拟机的镜像数据的类型;
挂载单元 802, 用于根据确定单元 801确定出的镜像数据的类型,调用对 应的挂载程序挂载所述虚拟机镜像数据的存储位置上的虚拟机镜像数据。
可选地, 如附图 9a所示, 所述确定单元 801包括:
第一测试子单元 901 , 用于根据所述虚拟机镜像数据的存储位置, 测试是 否能够成功读取镜像数据的数据头;
第一确定子单元 902,用于若第一测试子单元 901能够成功读取镜像数据 的数据头, 则根据所述数据头中的数据格式类型字段, 确定所述镜像数据的 数据格式类型;
第二测试子单元 903 ,用于若第一测试子单元 901不能成功读取镜像数据 的数据头, 则测试按照 RAW格式是否能够成功解析所述镜像数据;
第二确定子单元 904,用于若第二测试子单元 903能成功解析所述镜像数 据, 则确定所述镜像数据的数据格式类型为 RAW格式。
可选地, 如附图 9b所示, 所述确定模块 801包括:
发送子单元 905 ,用于向弹性计算控制器发送携带有虚拟机标识或虚拟机 镜像数据的存储位置的类型确认请求消息;
接收子单元 906, 用于接收弹性计算控制器返回的类型确认响应消息;
第三确定子单元 907,用于从接收子单元 906接收到的所述类型确认响应 消息中提取携带的镜像数据的类型, 所述镜像数据的类型是弹性计算控制器 根据类型确认请求消息中的虚拟机标识, 从虚拟机镜像文件创建时保存的虚 拟机标识与镜像数据类型的对应关系中查找到的; 或者是弹性计算控制器根 据类型确认请求消息中的存储位置, 从虚拟机镜像数据创建时保存的虚拟机 镜像数据的存储位置与镜像数据类型的对应关系中查找到的。
请参照附图 10, 本发明实施例还提供了一种应用软件包的创建装置, 该 装置包括获取单元 110、 确定单元 120和创建单元 140, 其中:
获取单元 110, 用于获取安装应用软件前后主机操作系统环境的差异; 确定单元 120, 用于根据获取单元 110获得的所述差异, 确定注册表变更 记录数据和文件变更记录数据;
创建单元 140, 用于生成应用软件包, 该应用软件包包含确定单元 120确 定出的所述注册表变更记录数据和文件变更记录数据、 以及安装程序过程中 增加或爹改的文件。
可选地, 请参照附图 11 , 创建单元 140包括:
写入子单元 111 ,用于将所述注册表变更记录数据和文件变更记录数据写 入变更记录文件; 例如, 可以采用 XML, 将所述注册表变更记录数据和文件 变更记录数据写入文本格式的写入变更记录文件;
生成子单元 112, 用于对所述变更记录文件, 和安装程序过程中增加或修 改的文件进行打包处理, 生成所述应用软件的应用软件包。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件来完成, 该程序可以存储于一计算机可读 取存储介质中, 如: ROM/RAM、 磁碟、 光盘等。 发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权利要 求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在内。
Claims
1、 一种应用软件的安装方法, 其特征在于, 包括:
挂载虚拟机的镜像数据, 所述虚拟机为待安装应用软件的虚拟机, 将所 述镜像数据映射为本地文件系统中的一个虚拟磁盘;
根据所述应用软件的应用软件包所包含的注册表变更记录数据, 更新所 述虚拟磁盘中的注册表文件, 所述应用软件包包含安装过程中增加或修改的 文件、 注册表变更记录数据和文件变更记录数据, 所述注册表变更记录数据 和文件变更记录数据是根据安装所述应用软件前后主机操作系统环境的差异 获得的;
根据所述文件变更记录数据、 以及应用软件包包含的安装过程中增加或 修改的文件, 更新所述虚拟磁盘中的文件结构, 从而实现在所述虚拟机中安 装所述应用软件。
2、如权利要求 1所述的方法, 其特征在于, 所述挂载虚拟机的镜像数据, 包括:
确定所述虚拟机的镜像数据的类型;
根据所述镜像数据的类型, 调用对应的挂载程序挂载所述虚拟机镜像数 据的存储位置上的虚拟机镜像数据。
3、 如权利要求 2所述的方法, 其特征在于, 所述确定所述虚拟机镜像数 据的类型, 包括:
根据所述虚拟机镜像数据的存储位置, 测试是否能够成功读取镜像数据 的数据头;
若能够成功读取镜像数据的数据头, 则根据所述数据头中的数据格式类 型字段, 确定所述镜像数据的数据格式类型;
若不能成功读取镜像数据的数据头,则测试按照 RAW格式是否能够成功 解析所述镜像数据, 若能成功解析所述镜像数据, 则确定所述镜像数据的数 据格式类型为 RAW格式。
4、 如权利要求 2所述的方法, 其特征在于, 所述确定所述虚拟机镜像数 据的类型, 包括:
向弹性计算控制器发送携带有虚拟机标识或虚拟机镜像数据的存储位置 的类型确认请求消息;
接收弹性计算控制器返回的类型确认响应消息;
从所述类型确认响应消息中提取携带的镜像数据的类型, 所述镜像数据 的类型是弹性计算控制器根据类型确认请求消息中的虚拟机标识, 从虚拟机 镜像文件创建时保存的虚拟机标识与镜像数据类型的对应关系中查找到的; 或者是弹性计算控制器根据类型确认请求消息中的存储位置, 从虚拟机镜像 数据创建时保存的虚拟机镜像数据的存储位置与镜像数据类型的对应关系中 查找到的。
5、 如权利要求 1至 4任一所述的方法, 其特征在于, 所述更新所述虚拟 磁盘中的注册表文件、 以及更新所述虚拟磁盘中的文件结构后, 还包括: 取消挂载所述虚拟机的镜像数据。
6、 一种应用软件包的创建方法, 其特征在于, 包括:
获取安装应用软件前后主机操作系统环境的差异;
根据所述差异, 确定注册表变更记录数据和文件变更记录数据; 生成包含所述注册表变更记录数据和文件变更记录数据、 以及安装程序 过程中所述主机中增加或修改的文件的应用软件包。
7、 如权利要求 6所述的方法, 其特征在于, 所述获取安装应用软件前后 主机操作系统环境的差异, 包括:
将应用软件提供商提供的所述应用软件安装包复制到主机操作系统环境 中, 所述安装包中包含可执行程序格式的安装程序;
在运行所述安装程序前后, 分别对所述主机操作系统环境建立快照; 通过对比运行安装程序前后所述主机操作系统环境的快照, 获得安装所 述应用软件前后所述主机操作系统环境的差异。
8、 如权利要求 6所述的方法, 其特征在于, 所述获取安装应用软件前后 主机操作系统环境的差异, 包括:
预先选择操作系统环境完全相同的第一主机和第二主机;
待安装应用软件提供商提供的安装包复制到第二主机的操作系统环境 中, 并在第二主机中运行所述安装包中的安装程序;
对比第一主机和运行所述安装包中的安装程序之后的第二主机的操作系 统环境的差异, 从而获得安装应用软件前后主机操作系统环境的差异。
9、 如权利权利要求 6所述的方法, 其特征在于, 所述获取安装应用软件 前后主机操作系统环境的差异, 包括: 译结果中获得对操作系统环境所做的操作符, 从获得的操作符确定安装应用 软件前后主机操作系统环境预期应有的差异。
10、 如权利要求 6至 9任一所述的方法, 其特征在于, 所述生成包含所 述注册表变更记录数据和文件变更记录数据、 以及安装程序过程中所述主机 中增加或修改的文件的应用软件包, 包括:
将所述注册表变更记录数据和文件变更记录数据写入变更记录文件; 对所述变更记录文件, 和安装程序过程中所述主机中增加或修改的文件 进行打包处理, 生成所述应用软件的应用软件包。
11、 一种应用软件的安装装置, 其特征在于, 包括:
挂载模块, 用于挂载虚拟机的镜像数据, 所述虚拟机为待安装应用软件 的虚拟机, 将所述镜像数据映射为本地文件系统中的一个虚拟磁盘;
第一更新模块, 用于根据所述应用软件的应用软件包所包含的注册表变 更记录数据, 更新所述虚拟磁盘中的注册表文件, 所述应用软件包包含安装 过程中增加或修改的文件、 注册表变更记录数据和文件变更记录数据, 所述 注册表变更记录数据和文件变更记录数据是根据安装所述应用软件前后主机 操作系统环境的差异获得的;
第二更新模块, 用于根据所述文件变更记录数据、 以及应用软件包包含 的安装过程中增加或修改的文件, 更新所述虚拟磁盘中的文件结构, 从而实 现在所述虚拟机中安装所述应用软件。
12、 如权利要求 11所述的装置, 其特征在于, 所述挂载模块包括: 确定单元, 用于确定所述虚拟机的镜像数据的类型;
挂载单元, 用于根据确定单元确定出的镜像数据的类型, 调用对应的挂 载程序挂载所述虚拟机镜像数据的存储位置上的虚拟机镜像数据。
13、 如权利要求 12所述的装置, 其特征在于, 所述确定单元包括: 第一测试子单元, 用于根据所述虚拟机镜像数据的存储位置, 测试是否 能够成功读取镜像数据的数据头;
第一确定子单元, 用于若第一测试子单元能够成功读取镜像数据的数据 头, 则根据所述数据头中的数据格式类型字段, 确定所述镜像数据的数据格 式类型;
第二测试子单元, 用于若第一测试子单元不能成功读取镜像数据的数据 头, 则测试按照 RAW格式是否能够成功解析所述镜像数据;
第二确定子单元, 用于若第二测试子单元能成功解析所述镜像数据, 则 确定所述镜像数据的数据格式类型为 RAW格式。
14、 如权利要求 12所述的装置, 其特征在于, 所述确定单元包括: 发送子单元, 用于向弹性计算控制器发送携带有虚拟机标识或虚拟机镜 像数据的存储位置的类型确认请求消息;
接收子单元, 用于接收弹性计算控制器返回的类型确认响应消息; 第三确定子单元, 用于从接收子单元接收到的所述类型确认响应消息中 提取携带的镜像数据的类型, 所述镜像数据的类型是弹性计算控制器根据类 型确认请求消息中的虚拟机标识, 从虚拟机镜像文件创建时保存的虚拟机标 识与镜像数据类型的对应关系中查找到的; 或者是弹性计算控制器根据类型 确认请求消息中的存储位置, 从虚拟机镜像数据创建时保存的虚拟机镜像数 据的存储位置与镜像数据类型的对应关系中查找到的。
15、 一种应用软件包的创建装置, 其特征在于, 包括:
获取单元, 用于获取安装应用软件前后主机操作系统环境的差异; 确定单元, 用于根据获取单元获得的所述差异, 确定注册表变更记录数 据和文件变更记录数据;
创建单元, 用于生成应用软件包, 该应用软件包包含确定单元确定出的 所述注册表变更记录数据和文件变更记录数据、 以及安装程序过程中所述主 机中增加或修改的文件。
16、 如权利要求 15所述的装置, 其特征在于, 所述创建单元包括: 写入子单元, 用于将所述注册表变更记录数据和文件变更记录数据写入 变更 i己录文件;
生成子单元, 用于对所述变更记录文件, 和安装程序过程中增加或修改 的文件进行打包处理, 生成所述应用软件的应用软件包。
17、 一种软件安装服务器, 其特征在于, 包括一个处理器,
所述处理器被配置用于挂载虚拟机的镜像数据, 所述虚拟机为待安装应 用软件的虚拟机, 将所述镜像数据映射为本地文件系统中的一个虚拟磁盘; 根据所述应用软件的应用软件包所包含的注册表变更记录数据, 更新所 述虚拟磁盘中的注册表文件, 所述应用软件包包含安装过程中增加或修改的 文件、 注册表变更记录数据和文件变更记录数据, 所述注册表变更记录数据 和文件变更记录数据是根据安装所述应用软件前后主机操作系统环境的差异 获得的;
根据所述文件变更记录数据、 以及应用软件包包含的安装过程中增加或 修改的文件, 更新所述虚拟磁盘中的文件结构, 从而实现在所述虚拟机中安 装所述应用软件。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
ES12851972T ES2570864T3 (es) | 2011-11-22 | 2012-07-30 | Método de instalación y dispositivo de instalación para software de aplicación |
EP12851972.5A EP2765508B1 (en) | 2011-11-22 | 2012-07-30 | Installation method and installation device for application software |
US13/712,645 US8924954B2 (en) | 2011-11-22 | 2012-12-12 | Application software installation method and application software installation apparatus |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110372932.5 | 2011-11-22 | ||
CN201110372932.5A CN102402446B (zh) | 2011-11-22 | 2011-11-22 | 应用软件的安装方法和应用软件的安装装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US13/712,645 Continuation US8924954B2 (en) | 2011-11-22 | 2012-12-12 | Application software installation method and application software installation apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2013075514A1 true WO2013075514A1 (zh) | 2013-05-30 |
Family
ID=45884679
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2012/079347 WO2013075514A1 (zh) | 2011-11-22 | 2012-07-30 | 应用软件的安装方法和应用软件的安装装置 |
Country Status (4)
Country | Link |
---|---|
EP (1) | EP2765508B1 (zh) |
CN (1) | CN102402446B (zh) |
ES (1) | ES2570864T3 (zh) |
WO (1) | WO2013075514A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109983442A (zh) * | 2016-11-14 | 2019-07-05 | 标致雪铁龙汽车股份有限公司 | 用于紧急维护车辆计算机的系统及方法 |
CN110443876A (zh) * | 2019-07-31 | 2019-11-12 | 新华三大数据技术有限公司 | 3d图像渲染方法及装置 |
CN114675893A (zh) * | 2022-04-19 | 2022-06-28 | 苏州浪潮智能科技有限公司 | 一种驱动的管理方法、装置及计算机设备 |
CN115686870A (zh) * | 2022-12-29 | 2023-02-03 | 深圳开鸿数字产业发展有限公司 | 并行计算方法、终端及计算机可读存储介质 |
Families Citing this family (36)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102402446B (zh) * | 2011-11-22 | 2014-12-17 | 华为数字技术(成都)有限公司 | 应用软件的安装方法和应用软件的安装装置 |
US8924954B2 (en) | 2011-11-22 | 2014-12-30 | Huawei Technologies Co., Ltd. | Application software installation method and application software installation apparatus |
CN102662727B (zh) * | 2012-04-05 | 2015-10-14 | 北京天地云箱科技有限公司 | 虚拟机的创建方法及装置 |
CN102707971A (zh) * | 2012-04-26 | 2012-10-03 | 广东电子工业研究院有限公司 | 一种在虚拟机中自动获取和安装软件的方法 |
CN103455365A (zh) * | 2012-05-28 | 2013-12-18 | 联想(北京)有限公司 | 一种获得软件资源的方法及电子设备 |
CN102819470A (zh) * | 2012-08-13 | 2012-12-12 | 广州杰赛科技股份有限公司 | 基于私有云计算平台的虚拟机修复方法 |
CN102981868A (zh) * | 2012-11-05 | 2013-03-20 | 广州杰赛科技股份有限公司 | 一种云计算在实现虚拟机批量部署的方法 |
CN102999369B (zh) * | 2012-12-25 | 2016-08-17 | 杭州华三通信技术有限公司 | 虚拟机升级的方法及装置 |
CN103970740A (zh) * | 2013-01-24 | 2014-08-06 | 北京伸得纬科技有限公司 | 一种虚拟机操作系统的系统层构建方法 |
CN103514023B (zh) * | 2013-10-22 | 2016-06-29 | 中国科学院信息工程研究所 | 一种虚拟机离线自动软件安装的方法及系统 |
CN103530162B (zh) * | 2013-10-22 | 2016-05-11 | 中国科学院信息工程研究所 | 一种虚拟机在线自动软件安装的方法及系统 |
CN104601617A (zh) * | 2013-10-31 | 2015-05-06 | 南京中兴新软件有限责任公司 | 虚拟桌面系统中外设的接入处理方法及装置 |
CN104679527B (zh) * | 2013-11-26 | 2017-12-01 | 中国银联股份有限公司 | 虚拟机镜像离线升级方法 |
CN103838603A (zh) * | 2013-12-04 | 2014-06-04 | 康佳集团股份有限公司 | 一种提升android电视首次开机速度的方法及系统 |
CN103729223A (zh) * | 2013-12-31 | 2014-04-16 | 曙光云计算技术有限公司 | Paas平台的快速部署应用的方法和系统 |
CN105592114A (zh) * | 2014-10-22 | 2016-05-18 | 北京云巢动脉科技有限公司 | 一种在虚拟桌面环境下的应用软件发布方法 |
CN104504000B (zh) * | 2014-12-08 | 2018-05-18 | 华为技术有限公司 | 一种远程镜像文件的传输方法,装置及系统 |
CN104639614A (zh) * | 2015-01-05 | 2015-05-20 | 广州杰赛科技股份有限公司 | 一种软件分发方法、系统及服务器 |
CN104618453A (zh) * | 2015-01-05 | 2015-05-13 | 广州杰赛科技股份有限公司 | 一种软件分发方法、系统及服务器 |
JP6729400B2 (ja) | 2015-01-29 | 2020-07-22 | 日本電気株式会社 | データファイル登録管理システム、方法、管理装置とプログラム |
CN105045644A (zh) * | 2015-09-17 | 2015-11-11 | 上海赛为信息技术有限公司 | 虚拟器件程序安装包的生产方法及虚拟器件的生产方法 |
CN106557379B (zh) * | 2015-09-30 | 2021-05-18 | 北京奇虎科技有限公司 | 一种静默安装包的生成方法和装置 |
CN105260231A (zh) * | 2015-11-03 | 2016-01-20 | 国云科技股份有限公司 | 一种降低物理磁盘io读写的方法 |
CN105407161B (zh) * | 2015-11-30 | 2019-06-14 | 北京奇艺世纪科技有限公司 | 应用服务管理方法、系统及应用服务发现方法、系统 |
CN107493204B (zh) * | 2016-06-13 | 2021-03-02 | 阿里巴巴集团控股有限公司 | 一种镜像检测的方法以及装置 |
CN106201502B (zh) * | 2016-07-06 | 2019-12-06 | 中国银联股份有限公司 | 一种跨主机应用程序部署方法及装置 |
CN106528265A (zh) * | 2016-10-24 | 2017-03-22 | 郑州云海信息技术有限公司 | 基于分布式san存储架构的虚拟机管理方法及系统 |
CN108021372A (zh) * | 2016-11-01 | 2018-05-11 | 深圳市中兴微电子技术有限公司 | 一种应用程序的管理方法和装置 |
CN106557354B (zh) * | 2016-11-17 | 2020-12-25 | 华为技术有限公司 | 设置私有镜像的属性参数的方法及计算机设备 |
CN108089890B (zh) * | 2016-11-21 | 2019-09-20 | 杨正 | 一种基于磁盘的应用运行方法及系统 |
CN108762821B (zh) * | 2017-04-18 | 2023-04-25 | 海马云(天津)信息技术有限公司 | 电子设备运行应用的装置及方法、电子设备 |
CN109799996A (zh) * | 2017-11-16 | 2019-05-24 | 中标软件有限公司 | 一种安装程序自动安装多种安装源的方法 |
CN108182366A (zh) * | 2017-12-29 | 2018-06-19 | 浪潮(北京)电子信息产业有限公司 | 一种度量虚拟机的文件的方法、装置及设备 |
CN108920216B (zh) * | 2018-08-03 | 2021-11-09 | 武汉斗鱼网络科技有限公司 | 关闭软件兼容模式的方法、装置、终端及存储介质 |
CN109683916A (zh) * | 2018-12-03 | 2019-04-26 | 武汉钢铁工程技术集团通信有限责任公司 | 一种自主创建包含应用软件的云主机镜像的方法 |
CN113806007A (zh) * | 2020-06-15 | 2021-12-17 | 中兴通讯股份有限公司 | 磁盘挂载方法、装置、存储介质以及电子装置 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425016A (zh) * | 2007-11-01 | 2009-05-06 | 珠海金山软件股份有限公司 | 运行安装软件的方法和系统 |
CN101454765A (zh) * | 2006-05-22 | 2009-06-10 | 微软公司 | 用补丁等来更新虚拟机 |
CN102110009A (zh) * | 2009-12-28 | 2011-06-29 | 中国移动通信集团公司 | 一种在虚拟化平台中部署应用的方法及虚拟平台管理器 |
CN102402446A (zh) * | 2011-11-22 | 2012-04-04 | 成都市华为赛门铁克科技有限公司 | 应用软件的安装方法和应用软件的安装装置 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8209680B1 (en) * | 2003-04-11 | 2012-06-26 | Vmware, Inc. | System and method for disk imaging on diverse computers |
US20050235281A1 (en) * | 2004-04-19 | 2005-10-20 | Telefonaktiebolaget L M Ericsson (Publ) | Combined software installation package |
CN102214118A (zh) * | 2010-04-08 | 2011-10-12 | 中国移动通信集团公司 | 一种虚拟机控制方法、系统及装置 |
-
2011
- 2011-11-22 CN CN201110372932.5A patent/CN102402446B/zh active Active
-
2012
- 2012-07-30 ES ES12851972T patent/ES2570864T3/es active Active
- 2012-07-30 EP EP12851972.5A patent/EP2765508B1/en active Active
- 2012-07-30 WO PCT/CN2012/079347 patent/WO2013075514A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101454765A (zh) * | 2006-05-22 | 2009-06-10 | 微软公司 | 用补丁等来更新虚拟机 |
CN101425016A (zh) * | 2007-11-01 | 2009-05-06 | 珠海金山软件股份有限公司 | 运行安装软件的方法和系统 |
CN102110009A (zh) * | 2009-12-28 | 2011-06-29 | 中国移动通信集团公司 | 一种在虚拟化平台中部署应用的方法及虚拟平台管理器 |
CN102402446A (zh) * | 2011-11-22 | 2012-04-04 | 成都市华为赛门铁克科技有限公司 | 应用软件的安装方法和应用软件的安装装置 |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109983442A (zh) * | 2016-11-14 | 2019-07-05 | 标致雪铁龙汽车股份有限公司 | 用于紧急维护车辆计算机的系统及方法 |
CN109983442B (zh) * | 2016-11-14 | 2023-03-14 | 标致雪铁龙汽车股份有限公司 | 用于紧急维护车辆计算机的系统及方法 |
CN110443876A (zh) * | 2019-07-31 | 2019-11-12 | 新华三大数据技术有限公司 | 3d图像渲染方法及装置 |
CN114675893A (zh) * | 2022-04-19 | 2022-06-28 | 苏州浪潮智能科技有限公司 | 一种驱动的管理方法、装置及计算机设备 |
CN114675893B (zh) * | 2022-04-19 | 2023-07-14 | 苏州浪潮智能科技有限公司 | 一种驱动的管理方法、装置及计算机设备 |
CN115686870A (zh) * | 2022-12-29 | 2023-02-03 | 深圳开鸿数字产业发展有限公司 | 并行计算方法、终端及计算机可读存储介质 |
CN115686870B (zh) * | 2022-12-29 | 2023-05-16 | 深圳开鸿数字产业发展有限公司 | 并行计算方法、终端及计算机可读存储介质 |
Also Published As
Publication number | Publication date |
---|---|
EP2765508A1 (en) | 2014-08-13 |
CN102402446B (zh) | 2014-12-17 |
ES2570864T3 (es) | 2016-05-20 |
CN102402446A (zh) | 2012-04-04 |
EP2765508A4 (en) | 2014-09-03 |
EP2765508B1 (en) | 2016-02-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2013075514A1 (zh) | 应用软件的安装方法和应用软件的安装装置 | |
US8924954B2 (en) | Application software installation method and application software installation apparatus | |
US20210349706A1 (en) | Release lifecycle management system for multi-node application | |
US9841966B2 (en) | Selective migration of virtualized applications | |
US10114705B1 (en) | Presenting virtual machine backup files for block and file level restore | |
JP5681465B2 (ja) | 情報処理システム、情報処理装置、準備方法、プログラムおよび記録媒体 | |
US8627310B2 (en) | Capturing multi-disk virtual machine images automatically | |
US8606886B2 (en) | System for conversion between physical machines, virtual machines and machine images | |
US8984510B1 (en) | Blocking file system for on-the-fly migration of a virtual execution environment | |
US8621461B1 (en) | Virtual machine based operating system simulation using host ram-based emulation of persistent mass storage device | |
US8166477B1 (en) | System and method for restoration of an execution environment from hibernation into a virtual or physical machine | |
US9268610B2 (en) | Rapid virtual machine cloning | |
US20110208929A1 (en) | In-place virtualization during operating system installation | |
WO2019196705A1 (zh) | 物理机到虚拟机迁移方法、装置及存储介质 | |
US9817592B1 (en) | Using an intermediate virtual disk format for virtual disk conversion | |
CN104182257B (zh) | 应用软件的安装方法和应用软件的安装装置 | |
US9569443B1 (en) | Method and apparatus for providing access to data in unsupported file systems and storage containers | |
JP6014257B2 (ja) | アプリケーション配布システムを動作させるためのシステム及び方法 | |
US11693689B2 (en) | Online disk encryption using mirror driver | |
Bosin et al. | Enhancing eucalyptus community cloud | |
US11010146B2 (en) | Unified management of heterogeneous applications | |
CA2524549C (en) | A system for conversion between physical machines, virtual machines and machine images |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12851972 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2012851972 Country of ref document: EP |
|
NENP | Non-entry into the national phase |
Ref country code: DE |