CN104503772B - The method and apparatus that operating system installation based on virtual machine, test environment are built - Google Patents

The method and apparatus that operating system installation based on virtual machine, test environment are built Download PDF

Info

Publication number
CN104503772B
CN104503772B CN201410678091.4A CN201410678091A CN104503772B CN 104503772 B CN104503772 B CN 104503772B CN 201410678091 A CN201410678091 A CN 201410678091A CN 104503772 B CN104503772 B CN 104503772B
Authority
CN
China
Prior art keywords
virtual machine
file
configuration
compact disc
image files
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.)
Active
Application number
CN201410678091.4A
Other languages
Chinese (zh)
Other versions
CN104503772A (en
Inventor
李珂
张�杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410678091.4A priority Critical patent/CN104503772B/en
Publication of CN104503772A publication Critical patent/CN104503772A/en
Application granted granted Critical
Publication of CN104503772B publication Critical patent/CN104503772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

An embodiment of the present invention provides a kind of installation method of operating system and device based on virtual machine, the method include:The compact disc image files of installation operation system needed for obtaining;The compact disc image files include automatic installation configuration information;Obtain the automatic installation configuration information of the compact disc image files;The virtual machine is configured according to the automatic installation configuration information;Start the virtual machine, is the virtual machine installation operation system according to the compact disc image files.The embodiment of the present invention is reducing human cost.

Description

The method and apparatus that operating system installation based on virtual machine, test environment are built
Technical field
The present invention relates to operation system technology fields, more particularly to a kind of installation method of operating system based on virtual machine With a kind of operating system mounting device based on virtual machine, a kind of method that the test environment based on virtual machine is built and a kind of base In the device that the test environment of virtual machine is built.
Background technology
Operating system be manage computer hardware and software computer program, while be also computer system core with Foundation stone.In order to adapt to the demand of country variant or area, had differences between the operating system version provided for it.Such as WINDOWS operating systems can provide the operating system for being suitble to its category of language for country variant, and operating system is certain first Begin to be arranged and have differences, therefore the software of international application layer needs the operating system of compatible different editions.
Software publication before test session in, in order to build different editions operating system test environment, tester Member firstly the need of in physical machine or virtual machine use ISO (Isolation, compact disc image files) installation operation system, by It is numerous in ISO kind of document, heavy workload is manually operated, efficiency is very low.Such as ISO files conventional installation side in physical machine There are three types of methods:1. being mounted directly after decompression;2. using the guiding installation of virtual machine CD-ROM drive;3. being burnt in CD, drawn using CD-ROM drive Lead installation.If ISO files are installed on a virtual machine, simulation CD-ROM drive guiding installation is typically used.
Above-mentioned ISO files installation method conventional in physical machine is installed using ISO files by tester manually entirely Then operating system again backs up mounted operating system.Even ISO files installation operation system on a virtual machine Method, be also required to a large amount of interactive operation in installation process, test period is long, occupies a large amount of human resources.
Synthesis can be learnt:The period of 1.ISO file installation operations systems is longer, and human resources expend huge;2. manually Test is difficult to realize Multi-task Concurrency execution, and execution efficiency is low;3. it is lack of standardization to execute flow, it be easy to cause operating system environment quilt It destroys.
Invention content
In view of the above problems, it is proposed that the present invention overcoming the above problem in order to provide one kind or solves at least partly State a kind of installation method of operating system based on virtual machine of problem, a kind of method that the test environment based on virtual machine is built and A kind of corresponding operating system mounting device based on virtual machine and a kind of device that the test environment based on virtual machine is built.
One side according to the present invention provides a kind of installation method of operating system based on virtual machine, including:
The compact disc image files of installation operation system needed for obtaining;The compact disc image files include that confidence is matched in automatic installation Breath;
Obtain the automatic installation configuration information of the compact disc image files;
The virtual machine is configured according to the automatic installation configuration information;
Start the virtual machine, is the virtual machine installation operation system according to the compact disc image files.
Optionally, the virtual machine includes virtual machine configuration, and the virtual machine configuration record has CD mirroring File path information;
The compact disc image files step of installation operation system needed for the acquisition includes:
Configure the compact disc image files routing information of the virtual machine configuration to specified path;
The compact disc image files of installation operation system needed for being obtained from the specified path.
Optionally, it is described according to the automatic installation configuration information to the virtual machine carry out configuration include:
Parse the automatic installation configuration information obtained from the compact disc image files;
The virtual machine configuration is configured using the automatic installation configuration information.
Optionally, the virtual machine configuration includes language form configuration item, and the virtual machine includes guiding file, institute It includes language pack and file of cataloging to state automatic installation configuration information;It is described to parse the automatic installation obtained from compact disc image files The step of configuration information includes:
The language form of the compact disc image files is judged using the language pack;
And/or
The system version of the compact disc image files is judged using the file of cataloging.
Optionally, described the step of configuring the virtual machine configuration using automatic installation configuration information, includes:
Decompress the guiding file;The guiding file includes automatic installation response configuration file;The automatic installation The language form configuration item and system version configuration item of response configuration file;
The language form configuration item of the automatic installation response configuration file is changed using the language form;
The language pack is written in the automatic installation response configuration file;
Preserve the automatic installation response configuration file;
Re-compress the guiding file;
And/or
System version configuration item in the automatic installation response configuration file is changed using the system version.
Optionally, described to include for the step of virtual machine installation operation system according to compact disc image files:
Start to install the operating system of the virtual machine using the compact disc image files;
Virtual machine described in logon attempt;
Judge whether successfully to log in the virtual machine;
If so, judging that the operating system of the virtual machine is installed successfully.
Optionally, it is described according to compact disc image files be the virtual machine installation operation system the step of after, also wrap It includes:
Preserve the system snapshot of presently described VME operating system.
Other side according to the present invention provides a kind of method that the test environment based on virtual machine is built, including:
The compact disc image files of installation operation system needed for obtaining;The compact disc image files include that confidence is matched in automatic installation Breath;
Obtain the automatic installation configuration information of the compact disc image files;
The virtual machine is configured according to the automatic installation configuration information;
Start the virtual machine, is the virtual machine installation operation system according to the compact disc image files;
When needing to test test file, test file is inputted into the virtual machine;
It is tested for the test file in the virtual machine;
Export test result of the virtual machine to the test file.
Other side according to the present invention provides a kind of operating system mounting device based on virtual machine, including:
First acquisition module, the compact disc image files for obtaining required installation operation system;The compact disc image files Including installing configuration information automatically;
Second acquisition module, the automatic installation configuration information for obtaining the compact disc image files;
First configuration module, for being configured to the virtual machine according to the automatic installation configuration information;
First installation module is installed according to the compact disc image files for the virtual machine for starting the virtual machine Operating system.
Optionally, the virtual machine includes virtual machine configuration, and the virtual machine configuration record has CD mirroring File path information;
First acquisition module includes:
Path configures submodule, for the compact disc image files routing information of the virtual machine configuration to be configured to refer to Determine path;
File acquisition submodule, the CD mirroring text for obtaining required installation operation system from the specified path Part.
Optionally, first configuration module includes:
Information analyzing sub-module, for parsing the automatic installation configuration information obtained from the compact disc image files;
Information configuration submodule, for configuring the virtual machine configuration using the automatic installation configuration information.
Optionally, the virtual machine configuration includes language form configuration item, and the virtual machine includes guiding file, institute It includes language pack and file of cataloging to state automatic installation configuration information;Described information analyzing sub-module includes:
Language form judging unit, the language form for judging the compact disc image files using the language pack;
And/or
System version judging unit judges the system version of the compact disc image files for file of cataloging described in use This.
Optionally, described information configuration submodule includes:
File decompression units, for decompressing the guiding file;The guiding file includes automatic installation response configuration File;The automatic installation response configuration file includes language form configuration item and system version configuration item;
Language form configuration item changes unit, for using the language form modification automatic installation response configuration text The language form configuration item of part;
Language pack writing unit, for the language pack to be written in the automatic installation response configuration file;
Save file unit, for preserving the automatic installation response configuration file;
Compressing file unit, for re-compressing the guiding file;
And/or
System version configuration item changes unit, for using the system version modification automatic installation response configuration text System version configuration item in part.
Optionally, the first installation module includes:
System installs submodule, starts the operating system for installing the virtual machine for the use compact disc image files;
Virtual machine entry submodule, for virtual machine described in logon attempt;
Judging submodule is logined successfully, the virtual machine is successfully logged in for judging whether;It is installed successfully if so, calling Judging submodule;
Successfully judging submodule is installed, for judging that the operating system of the virtual machine is installed successfully.
Optionally, further include:
System snapshot preserving module, the system snapshot for preserving presently described VME operating system.
Other side according to the present invention provides a kind of device that the test environment based on virtual machine is built, including:
Third acquisition module, the compact disc image files for obtaining required installation operation system;The compact disc image files Including installing configuration information automatically;
4th acquisition module, the automatic installation configuration information for obtaining the compact disc image files;
Second configuration module, for being configured to the virtual machine according to the automatic installation configuration information;
Second installation module is installed according to the compact disc image files for the virtual machine for starting the virtual machine Operating system;
Input module, for when needing to test test file, test file to be inputted the virtual machine;
Test module, for being tested for the test file in the virtual machine;
Output module, the test result for exporting the virtual machine to the test file.
The embodiment of the present invention uses virtual machine boot compact disc image files automatic installing operating system.According to the CD mirror As the automatic installation configuration information in file configures the virtual machine, restart virtual machine, according to the CD mirroring File is virtual machine installation operation system.The embodiment of the present invention installs the operation system of virtual machine using compact disc image files automation System is not necessarily to manual intervention, reduces human cost, highly practical.
Configuration file and floppy disk the guiding file of virtual machine are carried out according to compact disc image files in the embodiment of the present invention Configuration so that virtual machine supports the automatic installation of the compact disc image files of different editions.Specifically, after can be by decompression Compact disc image files judge the system version and language version of current optical disc image file, and are mutually coped with for judging result Configuration file and floppy disk the guiding file of virtual machine are configured so that virtual machine configuration is that can use different CD mirrors As file installation operations system, simply it is easily achieved.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technical means of the present invention, And can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, below the special specific implementation mode for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of step of the installation method of operating system embodiment of virtual machine according to an embodiment of the invention Rapid flow chart;
Fig. 2A -2L show a kind of signal of the operating system installation process of virtual machine according to an embodiment of the invention Figure;
Fig. 3 shows a kind of flow signal of the installation method of operating system of virtual machine according to an embodiment of the invention Figure;
Fig. 4 shows that the method that a kind of test environment based on virtual machine according to an embodiment of the invention is built is implemented The step flow chart of example;
Fig. 5 shows a kind of knot of the operating system mounting device embodiment of virtual machine according to an embodiment of the invention Structure block diagram;And
Fig. 6 shows that the device that a kind of test environment based on virtual machine according to an embodiment of the invention is built is implemented The structure diagram of example.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
Referring to Fig.1, show that a kind of installation method of operating system of virtual machine according to an embodiment of the invention is implemented The step flow chart of example, can specifically include following steps:
Step 101, the compact disc image files of installation operation system needed for obtaining;The compact disc image files may include certainly Dynamic installation configuration information;
It should be noted that the virtual machine of the embodiment of the present invention, may include VMware, EXSI and vsphere etc..Institute The compact disc image files for needing installation operation system may include ISO formats, IMG formats, VCD formats and NRG formats etc. CD Image file.
Certainly, above-mentioned virtual machine and compact disc image files are intended only as example, can be with when implementing the embodiment of the present invention Using other virtual machines and compact disc image files, the embodiment of the present invention does not limit this.
In embodiments of the present invention, virtual machine is created using the compact disc image files of primary English edition, is installed as future The original virtual machine of other compact disc image files.During establishment, original virtual machine is configured to draw from compact disc image files Installation operation system is led, and is the process that opening operation system is not installed immediately after creating by the virtual machine configuration.
For using VMware virtual machines installation ISO files below, to the process of installation operation system of the embodiment of the present invention It illustrates.
With reference to Fig. 2A, VMware original virtual machines are created, VMware original virtual machine automatic installing operating systems are removed VMware original virtual machines are configured to from ISO file installation operations systems by option.With reference to Fig. 2 B, in VMware original virtuals The option of " this virtual machine is opened after establishment " is not selected in machine.Based on the strategy of VMware virtual machines, virtual machine meeting is opened immediately System installation process is carried out, floppy disk guiding file is destroyed, automation installation is empty even if deletion has no effect on the embodiment of the present invention The process of quasi- machine operating system, floppy disk guide file after installation operation system finishing, are the remaining files that remove.Reference Fig. 2 C start virtual machine, and the startup item for changing original virtual machine is from optical disk start-up, it is therefore an objective to guide ISO files from light in the future Disk is installed.Specifically, CD-ROM options can be adjusted to first in the boot options of virtual machine BIOS.
Preserve the original virtual machine for not installing any operating system at this time.In the future to the peace of progress VME operating system Then dress can clone the configuration file of virtual machine, to guide clone's virtual machine by cloning the original virtual machine by modification The other compact disc image files of installation.
In a kind of example of concrete application of the present invention, original void can be completed by executing VMware virtual machine clone's orders The clone operations of quasi- machine, clone's order are specific as follows shown:
"C:Program Files (x86) VMware VMware VIX vmrun.exe " clone " source virtual machine text Part " " new virtual machine file " full,
After the completion of original virtual machine clone, new compact disc image files can be obtained to install new operating system.
In one preferred embodiment of the invention, the virtual machine may include virtual machine configuration, described virtual Machine configuration file can record compact disc image files routing information;
The step 101 may include following sub-step:
Sub-step S11 configures the compact disc image files routing information of the virtual machine configuration to specified path;
Sub-step S12 obtains the compact disc image files of required installation operation system from the specified path.
In embodiments of the present invention, it configures light to be mounted the compact disc image files path of virtual machine configuration to The path of disk mirroring file, guiding virtual machine get required compact disc image files from the path.
With reference to Fig. 2 D, the file directory of the VMware original virtual machines created shown in this figure, this document catalogue In include autoinst.flp (floppy floppy disks guide file) and Windows XP Professional.vmx (virtual Machine configuration file).
The autoinst.flp that VMware original virtual machines create realizes the automatic installation of ISO files, and institute is to be mounted The path of ISO files is configured in Professional.vmx.With reference to Fig. 2 E, ISO is installed using VMware original virtual machines File, in order to install required ISO files, the file path configuration of Professional.vmx in VMware original virtual machines Item ide1:0.fileName is modified as the path where specified ISO files, to guide VMware original virtual machines according to Operating system needed for ISO files installation.
Step 102, the automatic installation configuration information of the compact disc image files is obtained;
Step 103, the virtual machine is configured according to the automatic installation configuration information;
In one preferred embodiment of the invention, the step 103 may include following sub-step:
Sub-step S21 parses the automatic installation configuration information obtained from the compact disc image files;
Sub-step S22 configures the virtual machine configuration using the automatic installation configuration information.
In one preferred embodiment of the invention, the virtual machine configuration may include language form configuration item, The virtual machine includes that can guide file, and the automatic installation configuration information may include language pack and file of cataloging;Institute It may include following sub-step to state sub-step S21:
Sub-step S21-1 judges the language form of the compact disc image files using the language pack;
And/or
Sub-step S21-2 judges the system version of the compact disc image files using the file of cataloging.
In one preferred embodiment of the invention, the sub-step S22 may include following sub-step:
Sub-step S22-1 decompresses the guiding file;The guiding file includes automatic installation response configuration file; The language form configuration item and system version configuration item of the automatic installation response configuration file;
Sub-step S22-2, the language form that the automatic installation response configuration file is changed using the language form are matched Set item;
The language pack is written in the automatic installation response configuration file sub-step S22-3;
Sub-step S22-4 preserves the automatic installation response configuration file;
Sub-step S22-5 re-compresses the guiding file;
And/or
Sub-step S22-6 changes the system version in the automatic installation response configuration file using the system version Configuration item.
In the concrete realization, autoinst.flp is a kind of compressed file, and the file of this document can be got after decompression Catalogue specifically can refer to the file directory of autoinst.flp shown in Fig. 2 F, include in this document catalogue Autounattend.xml (automatic installation response configuration file).
In embodiments of the present invention, can according to the autounattend.xml in ISO file modifications autoinst.flp, Virtual machine is allow to support other language packet systems (such as Chinese edition, Taiwan version and English edition etc.) and different behaviour Make system version (such as HOME, PROFESSIONAL, ULTIMATE etc.).
Specifically, autounattend.xml is the configuration file of guiding installation ISO files, Autounattend.xml includes the configuration item of language Packet type.With reference to Fig. 2 G, it is assumed that be now to the ISO texts of installation English edition Part illustrates that this installs the operating system of what language pack then the configuration item to be modified as to the variable of English edition.
With reference to Fig. 2 H, the sources Resource TOCs of ISO files after decompression are shown, include zh-tw under the Resource TOC (language pack) may determine that the language Packet type of current ISO files by zh-tw, which be filled into In the configuration item of autounattend.xml, then preserve in autounattend.xml.The process of filling is to use The modification interface of autounattend.xml.
For the step of judging language Packet type according to zh-tw for according to the language pack file in language pack.Specifically, join According to Fig. 2 I, it is shown the file directory of zh-tw after decompression, has acres.mui (language pack file), this document in this document catalogue It is the language pack file of the carry out speech selection of Microsoft official definition, the language of ISO files is may determine that according to acres.mui Type.
After the completion of VMware virtual machine language type configurations, by modified autounattend.xml, it is added Remaining original file, re-compresses into autoinst.flp, is installed using the floppy disk of virtual machine.
It should be noted that if the language Packet type of VMware virtual machines is not modified according to ISO files, for void The process of quasi- machine installation operation system can interrupt, and the current language packet that reports an error is not found in ISO files.
With reference to Fig. 2 J, ISO files can support the installation of several system types in practice, and system type can also be It is found under the sources Resource TOCs of ISO files.Suffix is .clg files, for example, if Resource TOC includes install_ Windows 7HOMEBASIC.clg are then changed in autounattend.xml then indicating that HOMEBASIC versions can be installed System configuration item InstallFrom.
This completes the image files for installing different ISO language forms and system version, and virtual machine correlation is matched The change of file is set, whole process can be realized with the mode of automation.
Step 104, start the virtual machine, be the virtual machine installation operation system according to the compact disc image files.
In one preferred embodiment of the invention, the step 104 may include following sub-step:
Sub-step S31 starts the operating system for installing the virtual machine using the compact disc image files;
Sub-step S32, virtual machine described in logon attempt;
Sub-step S33 judges whether successfully to log in the virtual machine;If so, executing sub-step S34;
Sub-step S34 judges that the operating system of the virtual machine is installed successfully.
In embodiments of the present invention, it after completing virtual machine configuration, can begin attempt to as the virtual machine installation operation System.
Specifically, the language pack and ISO file paths for changing virtual machine, execute order:
"C:Program Files (x86) VMware VMware VIX vmrun.exe "-T ws start " it is new virtual Machine ",
VMware virtual machines start to guide ISO files to be installed automatically from CD, specifically can refer to Fig. 2 K.
After VMware virtual machines start installation, the user login interface LoginGuest that VMware can be called to provide, no Disconnected logon attempt VMware virtual machines indicate the operating system peace of VMware virtual machines after the success of VMware virtual machine entries Work(is dressed up, it will be to providing the picture of user as shown in figure 2l.
Compact disc image files can be independently carried out in the embodiment of the present invention in conjunction with the mode of multi-process, each process Installation improves efficiency.For example, can start the installation system that 20 virtual machines use compact disc image files simultaneously, the time shortens 20 times, improve installation effectiveness.Certainly, can also be multiple void if subsequently tested using mounted system environments Quasi- machine is performed simultaneously.
In one preferred embodiment of the invention, after the step 104, can also include the following steps:
Preserve the system snapshot of presently described VME operating system.
In embodiments of the present invention, the system snapshot of VME operating system can also be preserved, in case subsequent automated survey Examination uses.For example, for VMware, the snapshot of VMware can be used to create CreateSnapshot interfaces and preserve current system Snapshot.
The embodiment of the present invention guides file by the configuration file and floppy disk for changing virtual machine, supports for different editions Compact disc image files automatic installation.By decompressing compact disc image files, the system that can determine whether current optical disc image file Version and language version, and virtual machine can be configured according to judging result so that automation peace may be implemented in virtual machine Fill operating system.
With reference to Fig. 4, the side that a kind of test environment based on virtual machine according to an embodiment of the invention is built is shown The step flow chart of method embodiment, can specifically include following steps:
Step 201, the compact disc image files of installation operation system needed for obtaining;The compact disc image files include automatic peace Fill configuration information;
Step 202, the automatic installation configuration information of the compact disc image files is obtained;
Step 203, the virtual machine is configured according to the automatic installation configuration information;
Step 204, start the virtual machine, be the virtual machine installation operation system according to the compact disc image files;
Step 205, when needing to test test file, test file is inputted into the virtual machine;
Step 206, it is tested for the test file in the virtual machine;
Step 207, test result of the virtual machine to the test file is exported.
The embodiment of the present invention uses virtual machine boot compact disc image files automatic installing operating system.According to the CD mirror As the automatic installation configuration information in file configures the virtual machine, restart virtual machine, according to the CD mirroring File is virtual machine installation operation system.After installation is complete for the operating system of virtual machine, so that it may to be carried out in the virtual machine Automatic test.
With VMware virtual machine instances, when installation is complete for the operating system of VMware virtual machines, and after successfully logging in, make Interface CopyFileFromHostToGuest is copied into the file of VMware virtual machines, copies test file to VMware void In quasi- machine, the testing tool in virtual machine is executed using project operation interface RunProgramInGuest, is carried out for the test The test of the automation of file is completed and then copies outgoing interface CopyFileFromGuestToHost using file to incite somebody to action when testing Test result is copied out from virtual machine.
In order to make those skilled in the art more fully understand the flow of the embodiment of the present invention, survey is built below based on virtual machine The flow in test ring border is sketched.With reference to Fig. 3, show a kind of virtual machine according to an embodiment of the invention builds test The flow diagram of environment, detailed process are as follows:
1, create original virtual machine;
2, clone new virtual machine;
3, the path of compact disc image files is changed in virtual machine;
4, change the language Packet type and system type of virtual machine;
5, start modified virtual machine;
6, logon attempt virtual machine;
7, preserve the system snapshot of virtual machine;
8, the automatic test for test file is executed in virtual machine.
The present invention realizes the operating system that virtual machine is installed using compact disc image files, and carries out the complete of follow-up test Automation process.Fixing disc image file automatic first, instead of manual installation for the huge occupancy of human resources;Then Test environment is automatically saved, the maintenance management cost of test environment is reduced.And fixing disc image file and tested Journey can greatly improve the efficiency of execution in conjunction with multi-process mode.
It should be noted that for embodiment of the method, for simple description, therefore it is all expressed as a series of action group It closes, but those skilled in the art should understand that, the embodiment of the present invention is not limited by the described action sequence, because according to According to the embodiment of the present invention, certain steps can be performed in other orders or simultaneously.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, and the involved action not necessarily present invention is implemented Necessary to example.
With reference to Fig. 5, a kind of operating system mounting device based on virtual machine according to an embodiment of the invention is shown The structure diagram of embodiment, can specifically include following module:
First acquisition module 301, the compact disc image files for obtaining required installation operation system;The CD mirroring text Part includes automatic installation configuration information;
In one preferred embodiment of the invention, the virtual machine may include virtual machine configuration, described virtual Machine configuration file can record compact disc image files routing information;
First acquisition module 301 may include following submodule:
Path configures submodule, for the compact disc image files routing information of the virtual machine configuration to be configured to refer to Determine path;
File acquisition submodule, the CD mirroring text for obtaining required installation operation system from the specified path Part.
Second acquisition module 302, the automatic installation configuration information for obtaining the compact disc image files;
First configuration module 303, for being configured to the virtual machine according to the automatic installation configuration information;
In one preferred embodiment of the invention, first configuration module 303 may include following submodule:
Information analyzing sub-module, for parsing the automatic installation configuration information obtained from the compact disc image files;
Information configuration submodule, for configuring the virtual machine configuration using the automatic installation configuration information.
In one preferred embodiment of the invention, the virtual machine configuration includes language form configuration item, described Virtual machine includes guiding file, and the automatic installation configuration information includes language pack and file of cataloging;Described information parsing Module may include such as lower unit:
Language form judging unit, the language form for judging the compact disc image files using the language pack;
And/or
System version judging unit judges the system version of the compact disc image files for file of cataloging described in use This.
In one preferred embodiment of the invention, described information configuration submodule may include such as lower unit:
File decompression units, for decompressing the guiding file;The guiding file includes automatic installation response configuration File;The automatic installation response configuration file includes language form configuration item and system version configuration item;
Language form configuration item changes unit, for using the language form modification automatic installation response configuration text The language form configuration item of part;
Language pack writing unit, for the language pack to be written in the automatic installation response configuration file;
Save file unit, for preserving the automatic installation response configuration file;
Compressing file unit, for re-compressing the guiding file;
And/or
System version configuration item changes unit, for using the system version modification automatic installation response configuration text System version configuration item in part.
First installation module 304 is pacified according to the compact disc image files for the virtual machine for starting the virtual machine Fill operating system.
In one preferred embodiment of the invention, the first installation module 304 may include following submodule:
System installs submodule, starts the operating system for installing the virtual machine for the use compact disc image files;
Virtual machine entry submodule, for virtual machine described in logon attempt;
Judging submodule is logined successfully, the virtual machine is successfully logged in for judging whether;It is installed successfully if so, calling Judging submodule;
Successfully judging submodule is installed, for judging that the operating system of the virtual machine is installed successfully.
In one preferred embodiment of the invention, described device can also include following module:
System snapshot preserving module, the system snapshot for preserving presently described VME operating system.
With reference to Fig. 6, the dress that a kind of test environment based on virtual machine according to an embodiment of the invention is built is shown The structure diagram for setting embodiment, can specifically include following module:
Third acquisition module 401, the compact disc image files for obtaining required installation operation system;The CD mirroring text Part includes automatic installation configuration information;
In one preferred embodiment of the invention, the virtual machine may include virtual machine configuration, described virtual Machine configuration file can record compact disc image files routing information;
The third acquisition module 401 may include following submodule:
Path configures submodule, for the compact disc image files routing information of the virtual machine configuration to be configured to refer to Determine path;
File acquisition submodule, the CD mirroring text for obtaining required installation operation system from the specified path Part.
4th acquisition module 402, the automatic installation configuration information for obtaining the compact disc image files;
Second configuration module 403, for being configured to the virtual machine according to the automatic installation configuration information;
In one preferred embodiment of the invention, second configuration module 403 may include following submodule:
Information analyzing sub-module, for parsing the automatic installation configuration information obtained from the compact disc image files;
Information configuration submodule, for configuring the virtual machine configuration using the automatic installation configuration information.
In one preferred embodiment of the invention, the virtual machine configuration includes language form configuration item, described Virtual machine includes guiding file, and the automatic installation configuration information includes language pack and file of cataloging;Described information parsing Module may include such as lower unit:
Language form judging unit, the language form for judging the compact disc image files using the language pack;
And/or
System version judging unit judges the system version of the compact disc image files for file of cataloging described in use This.
In one preferred embodiment of the invention, described information configuration submodule may include such as lower unit:
File decompression units, for decompressing the guiding file;The guiding file includes automatic installation response configuration File;The automatic installation response configuration file includes language form configuration item and system version configuration item;
Language form configuration item changes unit, for using the language form modification automatic installation response configuration text The language form configuration item of part;
Language pack writing unit, for the language pack to be written in the automatic installation response configuration file;
Save file unit, for preserving the automatic installation response configuration file;
Compressing file unit, for re-compressing the guiding file;
And/or
System version configuration item changes unit, for using the system version modification automatic installation response configuration text System version configuration item in part.
Second installation module 404 is pacified according to the compact disc image files for the virtual machine for starting the virtual machine Fill operating system;
In one preferred embodiment of the invention, the first installation module 404 may include following submodule:
System installs submodule, starts the operating system for installing the virtual machine for the use compact disc image files;
Virtual machine entry submodule, for virtual machine described in logon attempt;
Judging submodule is logined successfully, the virtual machine is successfully logged in for judging whether;It is installed successfully if so, calling Judging submodule;
Successfully judging submodule is installed, for judging that the operating system of the virtual machine is installed successfully.
In one preferred embodiment of the invention, described device can also include following module:
System snapshot preserving module, the system snapshot for preserving presently described VME operating system.
Input module 405, for when needing to test test file, test file to be inputted the virtual machine;
Test module 406, for being tested for the test file in the virtual machine;
Output module 407, the test result for exporting the virtual machine to the test file.
For device embodiments, since it is basically similar to the method embodiment, so fairly simple, the correlation of description Place illustrates referring to the part of embodiment of the method.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein. Various general-purpose systems can also be used together with teaching based on this.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that can utilize various Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:It is i.e. required to protect Shield the present invention claims the more features of feature than being expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific implementation mode are expressly incorporated in the specific implementation mode, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment Change and they are arranged in the one or more equipment different from the embodiment.It can be the module or list in embodiment Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it may be used any Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit requires, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to run on one or more processors Software module realize, or realized with combination thereof.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor (DSP) realize the operating system peace according to the ... of the embodiment of the present invention based on virtual machine The some or all functions of some or all components in the method and apparatus equipment that dress, test environment are built.The present invention Be also implemented as some or all equipment for executing method as described herein or program of device (for example, Computer program and computer program product).It is such to realize that the program of the present invention may be stored on the computer-readable medium, Or it can be with the form of one or more signal.Such signal can be downloaded from internet website and be obtained, or It provides on carrier signal, or provides in any other forms.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference mark between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be by the same hardware branch To embody.The use of word first, second, and third does not indicate that any sequence.These words can be explained and be run after fame Claim.

Claims (16)

1. a kind of installation method of operating system based on virtual machine, which is characterized in that including:
The compact disc image files of installation operation system needed for obtaining;The compact disc image files include automatic installation configuration information;
Obtain the automatic installation configuration information of the compact disc image files;
The virtual machine is configured according to the automatic installation configuration information;
Start the virtual machine, is the virtual machine installation operation system according to the compact disc image files;
Wherein, it is described according to the automatic installation configuration information to the virtual machine carry out configuration include:
Parse the automatic installation configuration information obtained from the compact disc image files;
Using the automatic automatic installation response configuration file of installation configuration information configuration.
2. according to the method described in claim 1, it is characterized in that, the virtual machine includes virtual machine configuration, the void Quasi- machine configuration file record has compact disc image files routing information;
The compact disc image files step of installation operation system needed for the acquisition includes:
Configure the compact disc image files routing information of the virtual machine configuration to specified path;
The compact disc image files of installation operation system needed for being obtained from the specified path.
3. according to the method described in claim 1, it is characterized in that, the automatic installation response configuration file includes language form Configuration item, the virtual machine include guiding file, and the automatic installation configuration information includes language pack and file of cataloging;It is described Parse obtained from compact disc image files automatic installation configuration information the step of include:
The language form of the compact disc image files is judged using the language pack;
And/or
The system version of the compact disc image files is judged using the file of cataloging.
4. according to the method described in claim 3, it is characterized in that, described described automatic using automatic installation configuration information configuration Install response configuration file the step of include:
Decompress the guiding file;The guiding file includes automatic installation response configuration file;The automatic installation response Configuration file includes language form configuration item and system version configuration item;
The language form configuration item of the automatic installation response configuration file is changed using the language form;
The language pack is written in the automatic installation response configuration file;
Preserve the automatic installation response configuration file;
Re-compress the guiding file.
5. according to the method described in claim 3, it is characterized in that, described described automatic using automatic installation configuration information configuration Install response configuration file the step of include:
System version configuration item in the automatic installation response configuration file is changed using the system version.
6. according to the method described in claim 1, it is characterized in that, described install according to compact disc image files for the virtual machine The step of operating system includes:
Start to install the operating system of the virtual machine using the compact disc image files;
Virtual machine described in logon attempt;
Judge whether successfully to log in the virtual machine;
If so, judging that the operating system of the virtual machine is installed successfully.
7. according to the method described in claim 6, it is characterized in that, being pacified for the virtual machine according to compact disc image files described After the step of filling operating system, further include:
Preserve the system snapshot of presently described VME operating system.
8. a kind of method that the test environment based on virtual machine is built, which is characterized in that including:
The compact disc image files of installation operation system needed for obtaining;The compact disc image files include automatic installation configuration information;
Obtain the automatic installation configuration information of the compact disc image files;
The virtual machine is configured according to the automatic installation configuration information;
Start the virtual machine, is the virtual machine installation operation system according to the compact disc image files;
When needing to test test file, test file is inputted into the virtual machine;
It is tested for the test file in the virtual machine;
Export test result of the virtual machine to the test file;
Wherein, it is described according to the automatic installation configuration information to the virtual machine carry out configuration include:
Parse the automatic installation configuration information obtained from the compact disc image files;
Using the automatic automatic installation response configuration file of installation configuration information configuration.
9. a kind of operating system mounting device based on virtual machine, which is characterized in that including:
First acquisition module, the compact disc image files for obtaining required installation operation system;The compact disc image files include Automatic installation configuration information;
Second acquisition module, the automatic installation configuration information for obtaining the compact disc image files;
First configuration module, for being configured to the virtual machine according to the automatic installation configuration information;
First installation module is the virtual machine installation operation according to the compact disc image files for starting the virtual machine System;
Wherein, first configuration module includes:
Information analyzing sub-module, for parsing the automatic installation configuration information obtained from the compact disc image files;
Information configuration submodule, for using the automatic automatic installation response configuration file of installation configuration information configuration.
10. device according to claim 9, which is characterized in that the virtual machine includes virtual machine configuration, the void Quasi- machine configuration file record has compact disc image files routing information;
First acquisition module includes:
Path configures submodule, for configuring the compact disc image files routing information of the virtual machine configuration to specified circuit Diameter;
File acquisition submodule, the compact disc image files for obtaining required installation operation system from the specified path.
11. device according to claim 9, which is characterized in that the automatic installation response configuration file includes class of languages Type configuration item, the virtual machine include guiding file, and the automatic installation configuration information includes language pack and file of cataloging;Institute Stating information analyzing sub-module includes:
Language form judging unit, the language form for judging the compact disc image files using the language pack;
And/or
System version judging unit judges the system version of the compact disc image files for file of cataloging described in use.
12. according to the devices described in claim 11, which is characterized in that described information configures submodule and includes:
File decompression units, for decompressing the guiding file;The guiding file includes automatic installation response configuration file; The automatic installation response configuration file includes language form configuration item and system version configuration item;
Language form configuration item changes unit, for changing the automatic installation response configuration file using the language form Language form configuration item;
Language pack writing unit, for the language pack to be written in the automatic installation response configuration file;
Save file unit, for preserving the automatic installation response configuration file;
Compressing file unit, for re-compressing the guiding file.
13. according to the devices described in claim 11, which is characterized in that described information configures submodule and includes:
System version configuration item changes unit, for being changed in the automatic installation response configuration file using the system version System version configuration item.
14. device according to claim 9, which is characterized in that described first, which installs module, includes:
System installs submodule, starts the operating system for installing the virtual machine for the use compact disc image files;
Virtual machine entry submodule, for virtual machine described in logon attempt;
Judging submodule is logined successfully, the virtual machine is successfully logged in for judging whether;Successfully judge if so, calling to install Submodule;
Successfully judging submodule is installed, for judging that the operating system of the virtual machine is installed successfully.
15. device according to claim 14, which is characterized in that further include:
System snapshot preserving module, the system snapshot for preserving presently described VME operating system.
16. a kind of device that the test environment based on virtual machine is built, which is characterized in that including:
Third acquisition module, the compact disc image files for obtaining required installation operation system;The compact disc image files include Automatic installation configuration information;
4th acquisition module, the automatic installation configuration information for obtaining the compact disc image files;
Second configuration module, for being configured to the virtual machine according to the automatic installation configuration information;It is described according to institute It states automatic installation configuration information and the virtual machine configure and include:Parse the automatic peace obtained from the compact disc image files Fill configuration information;Using the automatic automatic installation response configuration file of installation configuration information configuration;
Second installation module is the virtual machine installation operation according to the compact disc image files for starting the virtual machine System;
Input module, for when needing to test test file, test file to be inputted the virtual machine;
Test module, for being tested for the test file in the virtual machine;
Output module, the test result for exporting the virtual machine to the test file.
CN201410678091.4A 2014-11-21 2014-11-21 The method and apparatus that operating system installation based on virtual machine, test environment are built Active CN104503772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410678091.4A CN104503772B (en) 2014-11-21 2014-11-21 The method and apparatus that operating system installation based on virtual machine, test environment are built

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410678091.4A CN104503772B (en) 2014-11-21 2014-11-21 The method and apparatus that operating system installation based on virtual machine, test environment are built

Publications (2)

Publication Number Publication Date
CN104503772A CN104503772A (en) 2015-04-08
CN104503772B true CN104503772B (en) 2018-10-12

Family

ID=52945173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410678091.4A Active CN104503772B (en) 2014-11-21 2014-11-21 The method and apparatus that operating system installation based on virtual machine, test environment are built

Country Status (1)

Country Link
CN (1) CN104503772B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808317B (en) * 2016-03-07 2020-01-10 中标软件有限公司 Cloud computing platform virtual machine editing management method
CN106406951B (en) * 2016-09-20 2020-02-11 新华三信息技术有限公司 Installation method and device of operating system
CN106528263B (en) * 2016-10-21 2019-08-02 郑州云海信息技术有限公司 The method injecting metamessage to virtual machine in virtualized environment and being initialized
CN107229496A (en) * 2017-05-27 2017-10-03 郑州云海信息技术有限公司 A kind of auxiliary machine, machine to be measured, terminal test system and method
CN108762894A (en) * 2018-06-21 2018-11-06 郑州云海信息技术有限公司 A kind of virtual machine display methods and device
CN112835595B (en) * 2021-02-03 2023-06-30 浪潮商用机器有限公司 Method, device, equipment and medium for running AIX system on small core architecture
CN113467887B (en) * 2021-06-25 2024-02-23 深信服科技股份有限公司 Fault repairing method, host machine and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8055737B2 (en) * 2008-07-21 2011-11-08 International Business Machines Corporation Method and system for improvements in or relating to off-line virtual environments
CN102779094A (en) * 2012-08-21 2012-11-14 深圳中兴网信科技有限公司 Terminal and software exception test method
CN102981888A (en) * 2012-10-16 2013-03-20 北京华胜天成科技股份有限公司 Virtualization implementing method for Power server
CN103092650A (en) * 2013-01-09 2013-05-08 华中科技大学 Virtual machine mirror image generating method and device based on software preinstallation in cloud environment
CN103458002A (en) * 2013-08-15 2013-12-18 中电长城网际系统应用有限公司 One-key deployment method and device for cloud system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IL185224A0 (en) * 2007-08-13 2008-01-06 C S L Computing Solutions Lead System and method for managing a virtual machine environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8055737B2 (en) * 2008-07-21 2011-11-08 International Business Machines Corporation Method and system for improvements in or relating to off-line virtual environments
CN102779094A (en) * 2012-08-21 2012-11-14 深圳中兴网信科技有限公司 Terminal and software exception test method
CN102981888A (en) * 2012-10-16 2013-03-20 北京华胜天成科技股份有限公司 Virtualization implementing method for Power server
CN103092650A (en) * 2013-01-09 2013-05-08 华中科技大学 Virtual machine mirror image generating method and device based on software preinstallation in cloud environment
CN103458002A (en) * 2013-08-15 2013-12-18 中电长城网际系统应用有限公司 One-key deployment method and device for cloud system

Also Published As

Publication number Publication date
CN104503772A (en) 2015-04-08

Similar Documents

Publication Publication Date Title
CN104503772B (en) The method and apparatus that operating system installation based on virtual machine, test environment are built
US8533676B2 (en) Single development test environment
US8745585B2 (en) Meta-data for single development test environment
US8881105B2 (en) Test case manager
KR100915762B1 (en) Pseudo translation within integrated development environment
US20130174124A1 (en) Version numbering in single development and test environment
GB2508643A (en) Method for Performing a Regression Test after Modifying Source Code File
CN105446775B (en) The configuration metaplasia of game installation kit is at method and device
US20110179073A1 (en) Method for Localizing Text in a Software Application
EP2107458A1 (en) Modelling software appliance
US20070169018A1 (en) Method and an apparatus for translating programming language code
AU2012201749B2 (en) Single development test environment
US8776031B1 (en) Manipulating resources embedded in a dynamic-link library
CN111338925A (en) Applet test method, device and system, electronic equipment and storage medium
Hans Appium essentials
CN111142861B (en) Method and device for integrating structured comprehensive control system
Sprouse et al. The berkeley phonetics machine
EP2503450A2 (en) Version numbering in single development and test environment
CN113672465A (en) Method, system, medium, terminal and unmanned aerial vehicle for generating process log system by process name
CN114238831A (en) HTML code fragment processing method, system, electronic equipment and storage medium
Tak et al. Mobile DevOps: Deliver continuous integration and deployment within your mobile applications
EP2503451A2 (en) Metadata for single development test environment
JPH07219980A (en) Test execution system
Versluis et al. Creating and running tests with xamarin test cloud
Heinonen Learning Puppet

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220729

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.