CN108874459A - Quick start method and device based on virtualization technology - Google Patents
Quick start method and device based on virtualization technology Download PDFInfo
- Publication number
- CN108874459A CN108874459A CN201710327281.5A CN201710327281A CN108874459A CN 108874459 A CN108874459 A CN 108874459A CN 201710327281 A CN201710327281 A CN 201710327281A CN 108874459 A CN108874459 A CN 108874459A
- Authority
- CN
- China
- Prior art keywords
- configuration file
- file
- data
- application
- operating system
- 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.)
- Granted
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/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Abstract
The application provides a kind of quick start method and device based on virtualization technology, this method includes passing through virtual machine monitor VMM load images file, wherein, image file include in memory data and the first configuration file do the information pre-generated after snapshot, the first configuration file is operating system configuration file and the application configuration file that related application program is arranged with operating system;Start virtual machine according to image file;If there are the data different from the second configuration file in the first configuration file in postrun virtual machine, the data then data in the first configuration file being updated in the second configuration file, wherein, second configuration file is the operating system configuration file and application configuration file that virtual machine saves, and the holding time of the second configuration file is later than the holding time of the first configuration file.The speed of system recovery can be improved in the application.
Description
Technical field
This application involves the communication technology more particularly to a kind of quick start methods and device based on virtualization technology.
Background technique
With the fast development of the terminal devices such as smart phone, vehicle mounted guidance, intelligent operating system such as Android/IOS is flat
Platform is increasingly used in these products, but since the business complexity of intelligent operating system is higher, so that terminal device
Starting up's time is longer.
In order to solve this problem, it can use virtual machine snapshot technology usually to accelerate starting up's process.In system
When starting or operation, client computer (Guest) virtual machine whole system (including the file system in memory and disk) is made
Snapshot simultaneously saves the snapshot image, virtual machine monitor (Virtual Machine Monitor when starting;VMM it) will load whole
A snapshot image, is run with recovery system.Specifically, Fig. 1 is in the prior art based on utilization virtual machine snapshot technology booting
Flow diagram, as shown in Figure 1, the Booting sequence of terminal device is as follows:(1) booting powers on, and powers on by power key;(2)
Power-on self-test (POST), Ergodic Theory equipment are simultaneously initialized, and loading (bootloader) is booted up after initializing successfully
Program;(3) start-up loading device, and load VMM;(4) starting VMM and driving initialization, load Guest OS snapshot image;(5)
Start Guest operating system (Operating System;OS);(6) enter user interface.
However, system can only be restored to the state when virtual machine snapshot production when being booted up using aforesaid way.
Summary of the invention
The application provides a kind of quick start method and device based on virtualization technology, quick to solve terminal device
System can only be restored to the technical issues of state when virtual machine snapshot makes when booting.
In a first aspect, the embodiment of the present application provides a kind of quick start method based on virtualization technology, including:
Pass through virtual machine monitor VMM load images file, wherein image file includes to the data and first in memory
Configuration file does the information pre-generated after snapshot, and the first configuration file is operating system configuration file and is arranged with operating system
The application configuration file of related application program, operating system configuration file are the data text for defining operation system performance
Part, application configuration file are some information files generated relevant to application operation read according to operating system;
Start virtual machine according to image file;
It, will if there are the data different from the second configuration file in the first configuration file in postrun virtual machine
Data in first configuration file are updated to the data in the second configuration file, wherein the second configuration file is virtual machine preservation
Operating system configuration file and application configuration file, the holding time of the second configuration file is later than the preservation of the first configuration file
Time.
In the quick start method based on virtualization technology that above-mentioned first aspect provides, in image file and do not include interior
All information in data and entire disk deposited, but only include the data in memory and the number in the first configuration file
According to, in this way, can reduce the size of image file, the speed of raising system starting.In addition, the first configuration file is operating system
Configuration file and the application configuration file that related application program is set with operating system, wherein operating system configuration file is
For the data file of defining operation system performance, operating system characteristics typically refer to that (rather than third party answers with operating system
With) related characteristic, the i.e. included characteristic of operating system, these characteristics are usually when equipment is dispatched from the factory just by the operation of producer's offer
System determines, is the basic characteristic for ensureing user's normal use equipment.Application configuration file refers to be read according to operating system
To the relevant some information files generated of application operation.Specifically, operating system is in installation in application, can read application
Relevant some information are run, and (such as database) saves in a specified pattern.At this point it is possible to which these information are generated one
A file, this file are " the application configuration file that related application program is arranged in operating system ".It should be noted that system
Application using what is provided for producer, for system service, wherein system service is what manufacturer provided, for providing setting system
The service for feature of uniting, such as mobile phone house keeper or setting program etc..
In the above-mentioned methods, by VMM load images file, and by image file start virtual machine after, judgement passes through
In the first configuration file in the virtual machine of image file starting, if there are the data different from the second configuration file, if
In the presence of the data in the first configuration file being then updated to the data in the second configuration file, due to the guarantor of the second configuration file
The holding time that the time is later than the first configuration file is deposited, therefore the state before certain time can be restored the system to.In addition,
Due to only in memory data and the first configuration file do snapshot so that image file is smaller, to improve image file
Manufacturing speed and system starting speed.
In one possible implementation, the second configuration file is virtual machine last time before restarting or powering off
The operating system configuration file and application configuration file of preservation, the holding time of the second configuration file are later than the first configuration file
Holding time.
In above-mentioned possible implementation, due to the second configuration file can for virtual machine restart, normal power down or
Therefore the operating system configuration file and application configuration file that last time saves before person's abnormal power-down are configured by first
When data in file are updated to the data in the second configuration file, the data in system can be reverted into newest data.
In one possible implementation, this method further includes:
Control the application postponement starting that data are write into memory and the first configuration file;
To the data and the first configuration file creation image file in memory, image file is for after restarting or powering off
It is again started up virtual machine.
In above-mentioned possible implementation, usually terminal device is after first time activation system or system upgrade
When one-shot, image file is made, in this way, since the data in data and the first configuration file only in memory become
The production of image file is just carried out when change, it is possible thereby to the phenomenon that making image file repeatedly before shutting down/restarting is avoided, thus
The service life of flash media can be extended.
In addition, in practical applications, virtual machine would generally control in addition to minimum system in order to reduce the size of image file
Other application postpone starting, postpone starting after, virtual machine again in memory data and the first configuration file creation mirror image text
Part, wherein minimum system is the most basic software environment that can complete normally to start and run, and is operating system work
When indispensable part, can be applied for system or system service provide various services, such as in android system, minimum
System includes the software module etc. of kernel and the basic framework composition of Android.
It needs to be illustrated, controlling the other application in addition to minimum system and postponing starting may include controlling other to answer
With in operation suspension state or being in close state.
Starting is postponed since virtual machine first controls the other application in addition to minimum system, to guarantee that it is minimum that memory uses, this
The first configuration file of sample is also minimum, then virtual machine again in memory data and the first configuration file create image file, therefore
It can reduce the size of image file, it is possible thereby to improve the resume speed of system.
In one possible implementation, include by virtual machine monitor VMM load images file:
After power supply connection, system is initialized;
Start-up loading device, and load VMM;
VMM starting is controlled, and passes through VMM load images file.
In above-mentioned possible implementation, during terminal device quick open, start, when user presses voltage source
After key powers on, system will be initialized first, start-up loading device bootloader, and load VMM, control VMM is opened
It is dynamic, and aforementioned image file is loaded by VMM.Due to that will be avoided existing by VMM load images file after VMM starts
Start-up operation system is needed in technology, and needs the phenomenon that first initializing to operating system, it is possible thereby to improve system
Start speed.
In one possible implementation, include by virtual machine monitor VMM load images file:
After detecting that virtual machine breaks down or restarts, pass through VMM load images file.
In above-mentioned possible implementation, when VMM detects that virtual machine breaks down or restarts, VMM will be passed through
Load images file, due to only including the data and the first configuration file in memory in image file, so that the mirror image text of load
Part is smaller, therefore the speed of system starting can be improved.
In one possible implementation, the number data in the first configuration file being updated in the second configuration file
According to, including:
By data changed in the first configuration file, the data being updated in the second configuration file.
In above-mentioned possible implementation, it can only restore changed data in the first configuration file, without
Entire first configuration file is all restored, therefore the recovery of partial data can be carried out, it is possible thereby to improve data
Resume speed.
In one possible implementation, the data in the first configuration file are reverted to the number in the second configuration file
According to later, method further includes:
The application that starting is postponed in control continues to run.
In above-mentioned possible implementation, the data in the first configuration file are reverted into the number in the second configuration file
According to later, virtual machine continues to run the application that starting is postponed in control, and such as control is continued to run in the application of operation suspension, controls
The application being in close state is made to reopen.After starting system, the application that starting is postponed in control is continued to run,
It can guarantee the normal operation of system in this way.
In one possible implementation, the operating system configuration file includes at least one of following file:
The number provided to operating system is applied to the relevant configuration file of setting application, operating system application managed file or system
According to, wherein setting application is for carrying out various system settings.
It is relevant with setting application by taking Android operation system configuration file as an example in above-mentioned possible implementation
In configuration file, setting application is for carrying out various system settings, for example, font, brightness, fingerprint, sound etc., set with these
It sets the relevant configuration file of option and belongs to operating system configuration file.Operating system applies managed file.For example, desktop
It is a system application, desktop is provided with a picture, this picture is that this application manages by desktop, then desktop is managed
This picture be also a kind of operating system configuration file.System applies the data that provide to operating system, operating system according to
The various operations (starting, pause, recovery etc.) applied to system may be implemented in these data.
In one possible implementation, the operating system is Android operation system, the application configuration file
Including the information in Android Manifest.xml and/or the information in resource folder.
In above-mentioned possible implementation, operating system is in installation in application, can read more relevant using running
Information, and (such as database) saves in a specified pattern.At this point it is possible to these information are generated into a file, this text
Part is " the application configuration file that related application program is arranged in operating system ".By taking Android operation system as an example, operating system
The information of reading includes:Various information in Android Manifest.xml, for example, Activity statement, receiver sound
Bright, uses-permission statement, supports-screens etc.;Furthermore it is also possible to include resource folder (res file
Folder) in some information (as application icon).
Second aspect, the embodiment of the present application provide a kind of device for rapidly starting based on virtualization technology, including:
Loading module, for passing through virtual machine monitor VMM load images file, wherein image file includes to memory
In data and the first configuration file do the information pre-generated after snapshot, the first configuration file be operating system configuration file and
The application configuration file of related application program is set with operating system, and operating system configuration file is for defining operation system
The data file of characteristic, the application configuration file is reads some information institutes relevant to application operation according to operating system
The file of generation;
Starting module, for starting virtual machine according to image file;
Update module, in the first configuration file in virtual machine after operation exist in the second configuration file not
With data when, the data in the first configuration file are updated to the data in the second configuration file, wherein the second configuration file
For operating system configuration file and application configuration file that virtual machine saves, the holding time of the second configuration file is later than first and matches
Set the holding time of file.
In one possible implementation, the second configuration file is virtual machine last time before restarting or powering off
The operating system configuration file and application configuration file of preservation, the holding time of the second configuration file are later than the first configuration file
Holding time.
In one possible implementation, device further includes:
Control module, for controlling the application postponement starting for writing data into memory and the first configuration file;
Creation module, for the data and the first configuration file creation image file in memory, image file to be for weight
Virtual machine is again started up after opening or powering off.
In one possible implementation, loading module is specifically used for:
After power supply connection, system is initialized;
Start-up loading device, and load VMM;
VMM starting is controlled, and passes through VMM load images file.
In one possible implementation, loading module is specifically used for:
After detecting that virtual machine breaks down or restarts, pass through VMM load images file.
In one possible implementation, update module is specifically used for:
By data changed in the first configuration file, the data being updated in the second configuration file.
In one possible implementation, control module is also used to control the application postponed and started and continues to run.
In one possible implementation, the operating system configuration file includes at least one of following file:
The number provided to operating system is applied to the relevant configuration file of setting application, operating system application managed file or system
According to, wherein setting application is for carrying out various system settings.
In one possible implementation, the operating system is Android operation system, the application configuration file
Including the information in Android Manifest.xml and/or the information in resource folder.
Based on the fast of virtualization technology provided by each possible implementation of above-mentioned second aspect and second aspect
Fast starter, its advantages are referred to above-mentioned first aspect and each possible implementation of first aspect is brought
Beneficial effect, details are not described herein.
The third aspect, the embodiment of the present application provide a kind of terminal device, including:Memory and processor;
Memory is for storing program instruction;
For calling, the program instruction in memory executes above-mentioned first aspect to processor and the various of first aspect can
The implementation of energy.
Terminal device provided by each possible implementation of the above-mentioned third aspect and the third aspect, its advantages
It is referred to beneficial effect brought by each possible implementation of above-mentioned first aspect and first aspect, it is no longer superfluous herein
It states.
The application fourth aspect provides a kind of device for rapidly starting based on virtualization technology, including for executing above the
At least one processing element (or chip) of the method for one side.
The 5th aspect of the application provides a kind of program, and the program is when being executed by processor for executing the above first aspect
Method.
The 6th aspect of the application provides a kind of program product, such as computer readable storage medium, including the 5th aspect
Program.
The 7th aspect of the application provides a kind of computer readable storage medium, and finger is stored in computer readable storage medium
It enables, when run on a computer, so that the method that computer executes above-mentioned first aspect.
The embodiment of the present application provides a kind of quick start method and device based on virtualization technology, loads mirror by VMM
As file, and after starting virtual machine by image file, judge first in the virtual machine started by image file configure it is literary
In part, if there are the data different from the second configuration file, and if it exists, be then updated to the data in the first configuration file
Data in second configuration file, since the holding time of the second configuration file is later than the holding time of the first configuration file, because
This can restore the system to the state before certain time.In addition, due to only to the data and the first configuration file in memory
Snapshot is done, so that image file is smaller, to improve the manufacturing speed of image file and the resume speed of system.
Detailed description of the invention
Fig. 1 is in the prior art based on the flow diagram using the booting of virtual machine snapshot technology;
Fig. 2 is that the process of the quick start method embodiment one provided by the embodiments of the present application based on virtualization technology is illustrated
Figure;
Fig. 3 is the flow diagram of quick open, start;
Fig. 4 is the flow diagram of the fast quick-recovery of failure;
Fig. 5 is the structural representation of the device for rapidly starting embodiment one provided by the embodiments of the present application based on virtualization technology
Figure;
Fig. 6 is the structural representation of the device for rapidly starting embodiment two provided by the embodiments of the present application based on virtualization technology
Figure;
Fig. 7 is the structural schematic diagram of terminal device embodiment provided by the embodiments of the present application.
Specific embodiment
Quick start method provided by the embodiments of the present application based on virtualization technology, can be adapted in terminal device,
Including common computer equipment or embedding assembly machine equipment, such as smart phone, vehicle intelligent terminal, it is particularly suitable for terminal
Equipment needs in the application scenarios of quick start.The invention relates to quick start method, be primarily directed to be based on
When virtualization technology quick start terminal device, system can only be restored to state when virtual machine snapshot production, and can not will be
System starts to the problem of state before certain time.In the prior art, virtual to Guest when system starts or runs
Machine whole system (including the file system in memory and disk) creation image file simultaneously saves the image file, VMM when starting
The image file will be loaded, is run with recovery system.However, if the data in system are again after image file completes
Changed, at this point, when using the image file quick start system of production, when can only be restored to virtual machine snapshot production
State, and the system mode before certain time cannot be restored to.
Therefore, the quick start method and device provided by the embodiments of the present application based on virtualization technology, it is intended to solve existing
There is the technical issues of quick start scheme in technology can only restore the system to state when virtual machine snapshot makes.
It is described in detail below with technical solution of the specifically embodiment to the application.These specific implementations below
Example can be combined with each other, and the same or similar concept or process may be repeated no more in some embodiments.
Fig. 2 is that the process of the quick start method embodiment one provided by the embodiments of the present application based on virtualization technology is illustrated
Figure.The embodiment of the present application provides a kind of quick start method based on virtualization technology, and this method can be by arbitrarily executing base
It is executed in the device of the quick start method of virtualization technology, which can pass through software and or hardware realization.This implementation
In example, which be can integrate in terminal device.As shown in Fig. 2, the method for the present embodiment may include:
Step 201 passes through VMM load images file.
Wherein, the image file include in memory data and the first configuration file make the letter pre-generated after snapshot
Breath, first configuration file are operating system configuration file and the application configuration text of related application program are arranged with operating system
Part, the operating system configuration file are the data file for defining operation system performance, and application configuration file is according to operation
Some information files generated relevant to application operation that system is read.
In the prior art, all information in the data and entire disk in memory are generally comprised in image file,
For starting virtual machine.And in the present embodiment, on the one hand in order to reduce the size of image file, improve the speed of system starting
Degree, on the other hand for the state before making system be restored to certain time, virtual machine may not necessarily be to the institute in entire disk
There is information all to do snapshot, and only to the data and the progress data backup of the first configuration file in memory, to generate image file.
In the application, the first configuration file is operating system configuration file and related application program is arranged with operating system
Application configuration file, wherein operating system configuration file is data file for defining operation system performance, operating system
Characteristic typically refers to the related characteristic with operating system (rather than third-party application), the i.e. included characteristic of operating system, these
Characteristic is usually just determined by the operating system of producer's offer when equipment is dispatched from the factory, and is the basis for ensureing user's normal use equipment
Characteristic.Specifically, by taking Android operation system configuration file as an example, it may include following several classes:1) relevant with " setting " application
Configuration file." setting " application is for carrying out various system settings, for example, font, brightness, fingerprint, sound etc., set with these
It sets the relevant configuration file of option and belongs to operating system configuration file.If it is other operating systems, there is also similar to set
Option is set, relevant configuration file belongs to operating system configuration file with these setting options.2) operating system application is managed
The file of reason.For example, desktop be the application of system (usually provided by producer, for providing the application that system performance is arranged,
Such as " setting ", " desktop " application), desktop is provided with a picture, this picture is that this application manages by desktop, then table
This picture that face is managed is also a kind of operating system configuration file.3) system applies the data provided to operating system, behaviour
Making system, the various operations (starting, pause, recovery etc.) applied to system may be implemented according to these data.For example, WiFi is answered
Registration dragnet program is suppose with to operation, and subsequent if there is a application WiFi, operating system can call WiFi
Dragnet program.It should be noted that system application refers to the related application with operating system, generally also provided by producer
, guarantee the application (not including third-party application) needed for system operates normally, the typical table as in Android operation system
The applications such as face, setting program.
Wherein, the application configuration file for related application program being arranged with operating system refers to according to operating system reading
Some information files generated relevant to application operation.Specifically, operating system is in installation in application, can read using fortune
The relevant some information of row, and (such as database) saves in a specified pattern.At this point it is possible to which these information are generated one
File, this file are " the application configuration file that related application program is arranged in operating system ".It is with Android operation system
Example, the information that operating system is read include:1) the various information in Android Manifest.xml, for example, Activity sound
Bright, receiver statement, uses-permission statement, supports-screens etc.;2) resource folder (res file
Folder) in some information (as application icon).It is subsequent to install in application, call directly by saving these information
The information of preservation come use configuration when preservation install application, without user participate in, simplify installation process.
Optionally, include by VMM load images file:During terminal device quick start, when user presses
After power key powers on, system will be initialized first, start-up loading device bootloader, and load VMM, controlled
VMM starting, and aforementioned image file is loaded by VMM.
Specifically, Fig. 3 is the flow diagram of quick open, start, as shown in figure 3, after power supply connection powers on, terminal
Equipment is simultaneously initialized power-on self-test (POST), Ergodic Theory equipment, by start-up loading device after initializing successfully
Bootloader, and load VMM.After the completion of VMM load, control VMM starting and driving are initialized, and mirror is loaded by VMM
As file, subsequently into user interface.
In the present embodiment, will be by VMM load images file due to after VMM starts, avoid needs in the prior art
Start-up operation system is wanted, and needs the phenomenon that first initializing to operating system, it is possible thereby to improve the starting speed of system.
Optionally, include by VMM load images file:After detecting that virtual machine breaks down or restarts, pass through
VMM load images file.
Specifically, Fig. 4 is the flow diagram of the fast quick-recovery of failure, as shown in figure 4, detecting virtual machine in VMM
Failure or when restarting, will be by VMM load images file, subsequently into user interface.Due to only being wrapped in image file
The data and the first configuration file in memory are included, so that the image file of load is smaller, therefore system starting can be improved
Speed.
Optionally, during either being booted up after terminal device normal power down, or in virtual machine generation event
During hindering or restarting the fast quick-recovery of progress, before through VMM load images file, virtual machine is usually required in advance
The image file is made, in practical applications, usually terminal device is after first time activation system or system upgrade
When one-shot, image file is made, in this way, since the data in data and the first configuration file only in memory become
The production of image file is just carried out when change, it is possible thereby to the phenomenon that making image file repeatedly before shutting down/restarting is avoided, thus
The service life of flash media can be extended.Certainly, user can also according to their own needs or experience setting production mirror image
The time point of file, such as every preset time period make an image file, for the time point of image file production, this reality
Applying example, this is not restricted.
In general, the process of virtual machine production image file includes:It controls and writes data into memory and the first configuration file
Start using postponing;To the data and the first configuration file creation image file in the memory for postponing starting, image file use
It is again started up virtual machine later in restarting or powering off.
Specifically, in order to reduce the size of image file, in practical applications, VMM would generally send to virtual machine and instruct,
Virtual machine postpones starting according to other application of the instruction control received in addition to minimum system, and after postponing starting, virtual machine is again
To in memory data and the first configuration file create image file, wherein minimum system be can complete normally start and
The most basic software environment of operation, indispensable part when being operating system work can be system application or system
Service provides various services, and such as in android system, minimum system includes that the basic framework of kernel and Android are constituted
Software module etc..
It needs to be illustrated, controlling the other application in addition to minimum system and postponing starting may include controlling other to answer
With in operation suspension state or being in close state.
In addition, the step of virtual machine creating image file, certain one-shot that can be before this activation system is whole
It is executed during end equipment, it is also possible to be to be executed during this activation system, at this point, the mirror image text of creation
Part will be again started up virtual machine after being used to restart or power off.
Illustrate the production of image file for starting for the first time after first time activation system or system upgrade below
Journey.Specifically, after pressing power key powers on, terminal device simultaneously carries out power-on self-test (POST), Ergodic Theory equipment
Initialization, by start-up loading device bootloader after initializing successfully, and loads VMM.After the completion of VMM load, control is started
VMM and driving initialization, and OS, when OS starts data and the first configuration file in memory, virtual machine are loaded by VMM
It first controls other application in addition to minimum system and postpones starting, to guarantee memory using minimum, such first configuration file is also most
Small, then virtual machine is again to the data and the first configuration file creation image file in memory, therefore can reduce image file
Size, it is possible thereby to improve the resume speed of system.
Step 202 starts virtual machine according to image file.
In the present embodiment, terminal device according to the image file of load by will start after VMM load images file
Virtual machine, since image file includes the data and the first configuration file in memory, also include in the virtual machine after starting
There are the data in the data and the first configuration file in memory.
If existing in the first configuration file in step 203, postrun virtual machine different from the second configuration file
Data, the then data being updated to the data in the first configuration file in the second configuration file.
Wherein, the second configuration file is the operating system configuration file and application configuration file that virtual machine saves, and second matches
The holding time for setting file is later than the holding time of the first configuration file.
In the present embodiment, after virtual machine creating image file, with continuing to run for system, operating system configuration
File and the data being arranged in the application configuration file of related application program with operating system may also occur that variation, in order to
The state before certain time is restored the system to, virtual machine needs to match changed operating system configuration file and application
It sets file to be saved, therefore, the holding time of the second configuration file is later than the holding time of the first configuration file.
Optionally, the second configuration file is that the operating system that virtual machine saves for the last time before restarting or powering off is matched
File and application configuration file are set, the holding time of second configuration file is later than the holding time of the first configuration file.
Specifically, due to the second configuration file can for virtual machine restart, before normal power down or abnormal power-down most
Therefore the operating system configuration file and application configuration file once saved afterwards is updated by the data in the first configuration file
When at data in the second configuration file, the data in system can be reverted into newest data.
Data in first configuration file are updated to the process of the data in the second configuration file for virtual machine, in reality
Border application in, virtual machine at work, can the update to the second configuration file record at any time, that is, if there is software mould
Block is updated the second configuration file, then can be arrived by virtual machine monitoring, then be recorded, such as some configuration choosing is recorded
Item has update.More specifically, virtual machine can also be sent the option updated in the second configuration file in the form of parameter
To VMM, after VMM is received, it can send and instruct to virtual machine, to indicate that the first configuration file is updated by virtual machine, certainly,
Virtual machine can not also send the option updated to VMM, but exist and the second configuration file in finding the first configuration file
When middle different data, the data in the first configuration file are updated to the data in the second configuration file.
Optionally, the data in the first configuration file are reverted to the data in the second configuration file includes:First is matched
Changed data in file are set, the data in the second configuration file are reverted to.
Specifically, changed data in the first configuration file can only be restored, without configuring entire first
File is all restored, therefore can carry out the recovery of partial data, it is possible thereby to improve the resume speed of data.
In addition, virtual machine has difference in which data and the second configuration file in judging the first configuration file, that is, judge
Which when thering is option to carry out update in the first configuration file, can be realized by following several modes:
The first:Virtual machine passes through the option and updated numerical value that record updates in the process of running, under
It is updated when primary operation according to the option and updated numerical value of record.
Specifically, which option virtual machine can recorde in the process of running update, and updated numerical value is how many,
After virtual machine operation next time, will directly find these has the option of update to be updated.
Such as:It include the first configuration file A in image file comprising config option A1, A2, wherein the default of A1
Value is a1;, the default value of A2 is a2, and config option and correlation are as shown in table 1 below:
Table 1
Config option | Value |
A1 | a1 |
A2 | a2 |
In virtual machine operational process, if the value a1 of config option A1 becomes a11, virtual machine needs to record this change
Change, the information that may be recorded is as shown in table 2:
Table 2
The config option of variation | Updated value |
A1 | a11 |
In virtual machine operational process, if the value of config option A1 becomes a13, the information that virtual machine may record again
As shown in table 3:
Table 3
The config option of variation | Updated value |
A1 | a13 |
After the value of config option changes, virtual machine will record this variation, in this way, virtual machine or
VMM will know which option is changed in the first configuration file according to the information recorded, and need to be updated to assorted
Numerical value.
It is worth noting that, in the process of virtual machine operation, if the numerical value of some config option in the first configuration file
It after variation several times, and has become original numerical value again, then can delete record relevant to the config option
It removes.
Second:First configuration file is compared with the second configuration file, to get changed data.
It specifically, can will be in the config option and the second configuration file in the first configuration file after starting virtual machine
Config option be compared one by one, to get changed data, so as to by the data in the first configuration file
The data being updated in the second configuration file.
Optionally, further include after the data in the first configuration file being reverted to the data in the second configuration file:Control
The application that system postpones starting continues to run.
Specifically, after the data in the first configuration file to be reverted to the data in the second configuration file, virtual machine will
The application that starting is postponed in control continues to run, and such as control is continued to run in the application of operation suspension, and control is in close state
Application reopen.After system is started, will control postpone starting application continue to run, can guarantee in this way be
The normal operation of system.
The embodiment of the present application provides a kind of quick start method based on virtualization technology, by VMM load images file,
And by image file start virtual machine after, judge by image file starting virtual machine in the first configuration file in, be
It is no to there are the data different from the second configuration file, and if it exists, the data in the first configuration file are then updated to second and are matched
The data in file are set, it, can be with since the holding time of the second configuration file is later than the holding time of the first configuration file
Restore the system to the state before certain time.In addition, due to only in memory data and the first configuration file do snapshot,
So that image file is smaller, to improve the manufacturing speed of image file and the resume speed of system.
Fig. 5 is the structural representation of the device for rapidly starting embodiment one provided by the embodiments of the present application based on virtualization technology
Figure.The starter can be independent terminal device, can also be the device being integrated in terminal device, which can lead to
The mode for crossing software, hardware or software and hardware combining is realized.As shown in figure 5, the starter includes:
Loading module 11, for passing through virtual machine monitor VMM load images file, wherein the image file includes
To in memory data and the first configuration file do the information pre-generated after snapshot, first configuration file is operating system
Configuration file and the application configuration file that related application program is arranged with operating system, the operating system configuration file are to use
In the data file of defining operation system performance, the application configuration file be read according to operating system with application run phase
The some information file generated closed;
Starting module 12, for starting virtual machine according to the image file;
Update module 13, in the first configuration file in virtual machine after operation exist in the second configuration file
When different data, the data in first configuration file are updated to the data in second configuration file, wherein institute
Stating the second configuration file is the operating system configuration file and the application configuration file that the virtual machine saves, and described second matches
The holding time for setting file is later than the holding time of first configuration file.
Optionally, above-mentioned loading module 11, starting module 12 and 13 correspondence of update module can be the place in terminal device
Manage device.
Device for rapidly starting provided in an embodiment of the present invention based on virtualization technology can execute above method implementation
Example, it is similar that the realization principle and technical effect are similar, and details are not described herein.
Optionally, second configuration file is the behaviour that the virtual machine saves for the last time before restarting or powering off
Make system configuration file and the application configuration file, the holding time of second configuration file is later than the first configuration text
The holding time of part.
Fig. 6 is the structural representation of the device for rapidly starting embodiment two provided by the embodiments of the present application based on virtualization technology
Figure, as shown in fig. 6, described device further includes on the basis of the present embodiment embodiment shown in Fig. 5:Control module 14 and creation
Module 15, wherein
Control module 14 writes opening using postponement for data into the memory and first configuration file for controlling
It is dynamic;
Creation module 15, for in the memory data and first configuration file create image file, it is described
Image file is for being again started up the virtual machine after restarting or powering off.
Optionally, the loading module 11, is specifically used for:
After power supply connection, system is initialized;
Start-up loading device, and load the VMM;
The VMM starting is controlled, and the image file is loaded by the VMM.
Optionally, the loading module 11, is specifically used for:
After detecting that the virtual machine breaks down or restarts, the image file is loaded by the VMM.
Optionally, the update module 13, is specifically used for:
By changed data in first configuration file, the data being updated in second configuration file.
Optionally, the control module 14 is also used to control the application for postponing starting and continues to run.
Optionally, the operating system configuration file includes at least one of following file:It is relevant to setting application
Configuration file, operating system application managed file or system apply the data provided to operating system, wherein setting application
For carrying out various system settings.
Optionally, when operating system is Android operation system, application configuration file includes Android
The information in information and/or resource folder in Manifest.xml.
Device for rapidly starting provided by the embodiments of the present application based on virtualization technology can execute above method implementation
Example, it is similar that the realization principle and technical effect are similar, and details are not described herein.
Fig. 7 is the structural schematic diagram of terminal device embodiment provided by the embodiments of the present application.As shown in fig. 7, the terminal is set
Standby may include processor 21, memory 22 and at least one communication bus 23.Communication bus 23 is for realizing between element
Communication connection.Memory 22 may include high speed RAM memory, it is also possible to further include non-volatile memories NVM, for example, at least one
A magnetic disk storage can store various programs in memory 22, for completing various processing functions and realizing the present embodiment
Method and step.Optionally, which can also include transmitter 20 and receiver 24, and receiver 24 can be corresponding
Input interface with communication function and reception informational function can also be the radio-frequency module or base band mould on terminal device
Block, transmitter 20 can be the corresponding output interface with communication function and transmission informational function, can also be terminal device
On radio-frequency module or baseband module.Optionally, the transmitter 20 and receiver 24 can integrate in a communication interface,
It can also be independent two communication interfaces respectively.
In the present embodiment, processor 21, for passing through virtual machine monitor VMM load images file, wherein the mirror image
File include in memory data and the first configuration file do the information pre-generated after snapshot, first configuration file is
Operating system configuration file and the application configuration file that related application program is set with operating system, the operating system configuration
File is data file for defining operation system performance, the application configuration file be read according to operating system with answer
With the relevant some information files generated of operation;
Processor 21 is also used to start virtual machine according to the image file;
Processor 21, be also used in the first configuration file in virtual machine after operation exist in the second configuration file
When different data, the data in first configuration file are updated to the data in second configuration file, wherein institute
Stating the second configuration file is the operating system configuration file and the application configuration file that the virtual machine saves, and described second matches
The holding time for setting file is later than the holding time of first configuration file.
Optionally, second configuration file is the behaviour that the virtual machine saves for the last time before restarting or powering off
Make system configuration file and the application configuration file, the holding time of second configuration file is later than the first configuration text
The holding time of part.
Optionally, processor 21 are also used to control the application that data are write into the memory and first configuration file
Postpone starting;
Processor 21 is also used to the data and first configuration file creation image file in the memory, described
Image file is for being again started up the virtual machine after restarting or powering off.
Optionally, processor 21 are specifically used for:
After power supply connection, system is initialized;
Start-up loading device, and load the VMM;
The VMM starting is controlled, and the image file is loaded by the VMM.
Optionally, processor 21 are also used to after detecting that the virtual machine breaks down or restarts, by described
VMM loads the image file;
Processor 21 is also used to changed data in first configuration file being updated to second configuration
Data in file.
Optionally, processor 21 are also used to control the application for postponing starting and continue to run.
Optionally, the operating system configuration file includes at least one of following file:It is relevant to setting application
Configuration file, operating system application managed file or system apply the data provided to operating system, wherein setting application
For carrying out various system settings.
Optionally, when operating system is Android operation system, the application configuration file includes Android
The information in information and/or resource folder in Manifest.xml.
Terminal device provided by the embodiments of the present application can execute above method embodiment, realization principle and technology effect
Seemingly, details are not described herein for fruit.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
Aforesaid operations system can be various operating systems, for example, Windows, Linux, Unix, Android operation system
System, iOS, Mac OS etc. various operating systems.
Those of ordinary skill in the art will appreciate that:Realize that all or part of the steps of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned includes:Read-only memory
(Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk
Etc. the various media that can store program code.
Claims (18)
1. a kind of quick start method based on virtualization technology, which is characterized in that including:
Pass through virtual machine monitor VMM load images file, wherein the image file includes to the data and first in memory
Configuration file does the information pre-generated after snapshot, and first configuration file is for operating system configuration file and with operating system
The application configuration file of related application program is set, and the operating system configuration file is for defining operation system performance
Data file, the application configuration file be read according to operating system it is generated to the relevant some information of application operation
File;
Start virtual machine according to the image file;
It, will be described if there are the data different from the second configuration file in the first configuration file in postrun virtual machine
Data in first configuration file are updated to the data in second configuration file, wherein second configuration file is institute
State the operating system configuration file and the application configuration file of virtual machine preservation, evening holding time of second configuration file
In the holding time of first configuration file.
2. the method according to claim 1, wherein second configuration file be the virtual machine restarting or
The operating system configuration file and the application configuration file that last time saves before person's power-off, second configuration file
Holding time is later than the holding time of first configuration file.
3. method according to claim 1 or 2, which is characterized in that the method also includes:
Control the application postponement starting that data are write into the memory and first configuration file;
To in the memory data and first configuration file create image file, the image file for restarting or
The virtual machine is again started up after power-off.
4. method according to claim 1-3, which is characterized in that described to be loaded by virtual machine monitor VMM
Image file includes:
After power supply connection, system is initialized;
Start-up loading device, and load the VMM;
The VMM starting is controlled, and the image file is loaded by the VMM.
5. method according to claim 1-3, which is characterized in that described to be loaded by virtual machine monitor VMM
Image file includes:
After detecting that the virtual machine breaks down or restarts, the image file is loaded by the VMM.
6. method according to claim 1-5, which is characterized in that the number by first configuration file
According to the data being updated in second configuration file, including:
By changed data in first configuration file, the data being updated in second configuration file.
7. according to the method described in claim 3, it is characterized in that, the data by first configuration file revert to
After data in second configuration file, the method also includes:
The application for postponing starting is controlled to continue to run.
8. method according to claim 1-7, which is characterized in that the operating system configuration file includes as follows
At least one of file:Managed file or system application are applied to the relevant configuration file of setting application, operating system
The data provided to operating system, wherein setting application is for carrying out various system settings.
9. method according to claim 1-8, which is characterized in that the operating system is Android operation system
System, the application configuration file includes the information in Android Manifest.xml and/or the information in resource folder.
10. a kind of device for rapidly starting based on virtualization technology, which is characterized in that including:
Loading module, for passing through virtual machine monitor VMM load images file, wherein the image file includes to memory
In data and the first configuration file do the information pre-generated after snapshot, first configuration file is operating system configuration text
Part and the application configuration file that related application program is arranged with operating system, the operating system configuration file are for defining
The data file of operating system characteristics, the application configuration file be read according to operating system to apply operation relevant one
A little information file generated;
Starting module, for starting virtual machine according to the image file;
Update module is different from the second configuration file for existing in the first configuration file in virtual machine after operation
When data, the data in first configuration file are updated to the data in second configuration file, wherein described second
Configuration file is the operating system configuration file and the application configuration file that the virtual machine saves, second configuration file
Holding time be later than holding time of first configuration file.
11. device according to claim 10, which is characterized in that second configuration file is that the virtual machine is being restarted
Or last time saves before power-off operating system configuration file and the application configuration file, second configuration file
Holding time be later than holding time of first configuration file.
12. device described in 0 or 11 according to claim 1, which is characterized in that described device further includes:
Control module, for controlling the application postponement starting for writing data into the memory and first configuration file;
Creation module, for the data and first configuration file creation image file in the memory, the mirror image text
Part is for being again started up the virtual machine after restarting or powering off.
13. the described in any item devices of 0-12 according to claim 1, which is characterized in that the loading module is specifically used for:
After power supply connection, system is initialized;
Start-up loading device, and load the VMM;
The VMM starting is controlled, and the image file is loaded by the VMM.
14. the described in any item devices of 0-12 according to claim 1, which is characterized in that the loading module is specifically used for:
After detecting that the virtual machine breaks down or restarts, the image file is loaded by the VMM.
15. the described in any item devices of 0-14 according to claim 1, which is characterized in that the update module is specifically used for:
By changed data in first configuration file, the data being updated in second configuration file.
16. device according to claim 12, which is characterized in that the control module is also used to control the postponement starting
Application continue to run.
17. the described in any item devices of 0-16 according to claim 1, which is characterized in that the operating system configuration file includes
At least one of following file:Managed file or system are applied to the relevant configuration file of setting application, operating system
Using the data provided to operating system, wherein setting application is for carrying out various system settings.
18. the described in any item devices of 0-17 according to claim 1, which is characterized in that the operating system is Android operation
System, the application configuration file include the information in Android Manifest.xml and/or the information in resource folder.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710327281.5A CN108874459B (en) | 2017-05-10 | 2017-05-10 | Rapid starting method and device based on virtualization technology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710327281.5A CN108874459B (en) | 2017-05-10 | 2017-05-10 | Rapid starting method and device based on virtualization technology |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108874459A true CN108874459A (en) | 2018-11-23 |
CN108874459B CN108874459B (en) | 2021-06-29 |
Family
ID=64319354
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710327281.5A Active CN108874459B (en) | 2017-05-10 | 2017-05-10 | Rapid starting method and device based on virtualization technology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108874459B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110032870A (en) * | 2019-03-29 | 2019-07-19 | 网御安全技术(深圳)有限公司 | Safety guide method, system and the hardware security monitor card of monitor of virtual machine |
CN110209468A (en) * | 2019-05-24 | 2019-09-06 | 北京百度网讯科技有限公司 | For starting the method, apparatus, equipment and medium of virtual machine |
CN111782342A (en) * | 2020-06-30 | 2020-10-16 | 联想(北京)有限公司 | Virtual machine starting method and device |
CN112131052A (en) * | 2020-10-23 | 2020-12-25 | 北京安石科技有限公司 | Quick recovery method and system for operating system |
CN114510278A (en) * | 2022-01-21 | 2022-05-17 | 武汉噢易云计算股份有限公司 | Data static recovery method, device and equipment and readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102088367A (en) * | 2010-12-10 | 2011-06-08 | 北京世纪互联工程技术服务有限公司 | Method for quickly deploying in virtualization environment |
CN106598653A (en) * | 2016-11-24 | 2017-04-26 | 合肥中科云巢科技有限公司 | Method and device used for solving boot storm of virtual machine |
-
2017
- 2017-05-10 CN CN201710327281.5A patent/CN108874459B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102088367A (en) * | 2010-12-10 | 2011-06-08 | 北京世纪互联工程技术服务有限公司 | Method for quickly deploying in virtualization environment |
CN106598653A (en) * | 2016-11-24 | 2017-04-26 | 合肥中科云巢科技有限公司 | Method and device used for solving boot storm of virtual machine |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110032870A (en) * | 2019-03-29 | 2019-07-19 | 网御安全技术(深圳)有限公司 | Safety guide method, system and the hardware security monitor card of monitor of virtual machine |
CN110032870B (en) * | 2019-03-29 | 2020-10-02 | 网御安全技术(深圳)有限公司 | Safety guiding method and system of virtual machine monitor and hardware safety monitoring card |
CN110209468A (en) * | 2019-05-24 | 2019-09-06 | 北京百度网讯科技有限公司 | For starting the method, apparatus, equipment and medium of virtual machine |
CN111782342A (en) * | 2020-06-30 | 2020-10-16 | 联想(北京)有限公司 | Virtual machine starting method and device |
CN112131052A (en) * | 2020-10-23 | 2020-12-25 | 北京安石科技有限公司 | Quick recovery method and system for operating system |
CN112131052B (en) * | 2020-10-23 | 2024-02-09 | 北京安石科技有限公司 | Method and system for quickly recovering operating system |
CN114510278A (en) * | 2022-01-21 | 2022-05-17 | 武汉噢易云计算股份有限公司 | Data static recovery method, device and equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108874459B (en) | 2021-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108874459A (en) | Quick start method and device based on virtualization technology | |
US10592232B2 (en) | Preserving firmware setting during firmware update | |
US8171276B2 (en) | Minimal startup mode for performing multiple-reboot configuration | |
CN107291510B (en) | Rapid starting method for Linux vehicle-mounted information system | |
CN104794014A (en) | System operation method and intelligent terminal | |
US10684838B2 (en) | Dynamic application deployment | |
CN111813601B (en) | Micro-service rollback method and device for stateful distributed cluster | |
US10503489B1 (en) | Updating firmware via a remote utility | |
CN109857466B (en) | BIOS configuration method, device, server and computer readable storage medium | |
CN108319480A (en) | Bluetooth service starts method, apparatus and electronic equipment | |
CN109783149A (en) | Start-up control method, device, mobile terminal and storage medium | |
US10204011B1 (en) | Techniques for partially restarting a computing device in response to a configuration change | |
CN109683967A (en) | Firmware supports method, apparatus, mobile terminal and readable storage medium storing program for executing | |
US20060101372A1 (en) | Method, system, and software for determining platform management functionality | |
CN110515671A (en) | Initial method, apparatus for initializing, terminal device and readable storage medium storing program for executing | |
US10635560B2 (en) | Techniques for accurately apprising a user of progress in booting a virtual appliance | |
US9852028B2 (en) | Managing a computing system crash | |
US20230087221A1 (en) | Detection fields of view | |
US11789746B2 (en) | Computing device reboot | |
CN107453959B (en) | Network card management method and device | |
CN111381892B (en) | Data processing method, device, equipment and machine-readable medium | |
CN113453376A (en) | Network configuration method, related device, equipment and storage medium | |
CN114090329A (en) | Server restarting method under full-unloading architecture and related equipment | |
CN116662078B (en) | Operating system batch recovery method and system based on microkernel implementation | |
US20240036896A1 (en) | Generating installation images based upon dpu-specific capabilities |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |