CN107463402B - The operation method and device of virtual opetrating system - Google Patents
The operation method and device of virtual opetrating system Download PDFInfo
- Publication number
- CN107463402B CN107463402B CN201710640433.7A CN201710640433A CN107463402B CN 107463402 B CN107463402 B CN 107463402B CN 201710640433 A CN201710640433 A CN 201710640433A CN 107463402 B CN107463402 B CN 107463402B
- Authority
- CN
- China
- Prior art keywords
- instruction
- virtual opetrating
- destination
- resource
- virtual
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 110
- 230000004044 response Effects 0.000 claims abstract description 16
- 230000008569 process Effects 0.000 claims description 62
- 230000015654 memory Effects 0.000 claims description 37
- 230000026676 system process Effects 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 12
- 230000006399 behavior Effects 0.000 claims description 2
- 238000004590 computer program Methods 0.000 claims 2
- 238000004321 preservation Methods 0.000 claims 1
- 230000032258 transport Effects 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 23
- 230000006870 function Effects 0.000 description 13
- 230000004048 modification Effects 0.000 description 12
- 238000012986 modification Methods 0.000 description 12
- 238000002955 isolation Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 230000000694 effects Effects 0.000 description 7
- 230000004913 activation Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 238000013515 script Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 4
- 239000011800 void material Substances 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 238000009434 installation Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 238000007906 compression Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000009472 formulation Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
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/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/45575—Starting, stopping, suspending or resuming virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of operation method of virtual opetrating system and devices.Wherein, this method includes:The first instruction is received on the target device, and being run on target device has destination OS, and the first instruction is used to indicate the first virtual opetrating system that operation is provided by the first system container in destination OS;In response to the first instruction, it is retrieved as the first resource of the first virtual opetrating system distribution, first resource includes the physical resource run used in virtual opetrating system on target device;The target window of the first system container is shown on the system interface of destination OS, and the system interface for the first virtual opetrating system that display is run using first resource in target window, the system kernel of first virtual opetrating system is the system kernel of destination OS, and the system drive of the first virtual opetrating system is the system drive of destination OS.The present invention solves the slower technical problem of startup of virtual machine in the related technology.
Description
Technical field
The present invention relates to internet arenas, in particular to the operation method and device of a kind of virtual opetrating system.
Background technology
Virtualization, refer to by virtualization technology by a computer virtual be more logical computers.It is calculated at one
Multiple logical computers are run simultaneously on machine, each logical computer can run different operating system, and application program is all
It can run and be independent of each other in mutually independent space, to significantly improve the working efficiency of computer.Virtualization uses
The method of software, which redefines, divides IT resources, and the dynamic allocation, flexible dispatching, cross-domain shared, raising of IT resources may be implemented
IT resource utilizations enable IT resources really to become social infrastructure, serve application flexible and changeable in all trades and professions
Demand.
In the related art, the realization method of virtualization is as shown in Figure 1, first in the hardware and software resource of Host hosts
Different CPU (such as X86, PPC, SPARC) is fictionalized using QEMU on (such as included system resource of host, hardware resource)
Equal hardware devices, then use different driving Drivers and different systems (such as in the virtual different hardware equipments of QEMU
Linux, Windows etc.), then user is transported using management software as such as KVM, VMWare in the system fictionalized
The application program of row user oneself, operation file (install or be stored in user's space).
In the related art, there are the following problems:System starts slowly, needs to consume the long period.
Because in the scheme of the relevant technologies, needing first to use the hardware devices such as QEMU virtual cpus before activation system, then
It can activation system.And entire QEMU virtual process needs virtual phy CPU, disk, graphic processing apparatus, network equipment etc. to set
It is standby.During entire virtual hardware equipment, the virtualization provided using CPU is needed to support that VT-X (is that intel is used
An instruction set in Virtualization virtualization technologies) it is that Guest OS (i.e. passenger plane or virtual machine) are created at virtualization
Device is managed, is used kvm (being the abbreviation of Kernel-based Virtual Machine, be a system virtualization module increased income)
Host memory is virtualized into the address of independent virtualization memory, I/O Request is intercepted by QEMU, to complete to hardware device
Virtualization, for whole process is compared with the physical equipment for directly using Host hosts, it appears extremely slowly, dragged slowly opening for system
The dynamic time.
And since existing system needs to fictionalize different hardware devices, so the hardware fictionalized is running corresponding void
When quasi- operating system, also needs to start a set of driver of oneself in each virtual opetrating system, further reduced startup
Efficiency.
For the technical problem that the startup of virtual machine in the related technology is slower, currently no effective solution has been proposed.
Invention content
An embodiment of the present invention provides a kind of operation method of virtual opetrating system and devices, at least to solve the relevant technologies
Middle virtual machine starts slower technical problem.
One side according to the ... of the embodiment of the present invention provides a kind of operation method of virtual opetrating system, the operation side
Method includes:The first instruction is received on the target device, wherein operation has destination OS, the first instruction on target device
It is used to indicate the first virtual opetrating system that operation is provided by the first system container in destination OS;Refer in response to first
It enables, is retrieved as the first resource of the first virtual opetrating system distribution, wherein first resource, which includes operation virtual opetrating system, to be made
The physical resource being located on target device;The target of the first system container is shown on the system interface of destination OS
Window, and the system interface for the first virtual opetrating system that display is run using first resource in target window, wherein first
The system kernel of virtual opetrating system is the system kernel of destination OS, and the system drive of the first virtual opetrating system is mesh
Mark the system drive of operating system.
Another aspect according to the ... of the embodiment of the present invention additionally provides a kind of running gear of virtual opetrating system, the operation
Device includes:Receiving unit, for receiving the first instruction on the target device, wherein operation has target behaviour on target device
Make system, the first instruction is used to indicate the first pseudo operation system that operation is provided by the first system container in destination OS
System;Response unit, in response to the first instruction, being retrieved as the first resource of the first virtual opetrating system distribution, wherein first
Resource includes the physical resource run used in virtual opetrating system on target device;Display unit, in target
The target window of the first system container is shown on the system interface of operating system, and display uses first resource in target window
The system interface of first virtual opetrating system of operation, wherein the system kernel of the first virtual opetrating system is object run system
The system kernel of system, the system drive of the first virtual opetrating system are the system drive of destination OS.
In embodiments of the present invention, when receiving the first instruction on the target device, it is retrieved as the first virtual opetrating system
The first resource of distribution shows the target window of the first system container on the system interface of destination OS, and in target
The system interface for the first virtual opetrating system (i.e. virtual machine) that display is run using first resource in window, the first pseudo operation
System directly invokes the system kernel of destination OS, and directly invokes the system drive of destination OS to run, can
To solve the slower technical problem of the startup of virtual machine in the related technology, and then reach the skill for the startup speed for improving virtual machine
Art effect.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and is constituted part of this application, this hair
Bright illustrative embodiments and their description are not constituted improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is a kind of schematic diagram of optional virtual machine system in the related technology;
Fig. 2 is the schematic diagram of the hardware environment of the operation method of virtual opetrating system according to the ... of the embodiment of the present invention;
Fig. 3 is a kind of flow chart of the operation method of optional virtual opetrating system according to the ... of the embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of optional virtual machine system according to the ... of the embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of optional kernel compiling option according to the ... of the embodiment of the present invention;
Fig. 6 is a kind of schematic diagram of the running gear of optional virtual opetrating system according to the ... of the embodiment of the present invention;
Fig. 7 is a kind of schematic diagram of the running gear of optional virtual opetrating system according to the ... of the embodiment of the present invention;And
Fig. 8 is a kind of structure diagram of terminal according to the ... of the embodiment of the present invention.
Specific implementation mode
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The every other embodiment that member is obtained without making creative work should all belong to the model that the present invention protects
It encloses.
It should be noted that term " first " in description and claims of this specification and above-mentioned attached drawing, "
Two " etc. be for distinguishing similar object, without being used to describe specific sequence or precedence.It should be appreciated that using in this way
Data can be interchanged in the appropriate case, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover
It includes to be not necessarily limited to for example, containing the process of series of steps or unit, method, system, product or equipment to cover non-exclusive
Those of clearly list step or unit, but may include not listing clearly or for these processes, method, product
Or the other steps or unit that equipment is intrinsic.
First, the part noun or term occurred during the embodiment of the present invention is described is suitable for as follows
It explains:
CGroup:Cgroups is the abbreviation of control groups, and being one kind that linux kernel provides can limit, remember
Physical resource used in record, isolated process group (process groups) is (such as:CPU, memory, IO etc.) mechanism.
NameSpace:NameSpace is the mechanism for being used for realizing software resource isolation in linux kernel, isolation processing master
Machine name and domain name, mount point (file resource), process number, information content, message queue, shared drive, the network equipment, port net
The virtualizations such as network stack need the software resource created.
Virtualization:Refer to by virtualization technology by a computer virtual be more logical computers.It is calculated at one
Multiple logical computers are run simultaneously on machine, each logical computer can run different operating system, and application program is all
It can run and be independent of each other in mutually independent space, to significantly improve the working efficiency of computer.It specifically can be one
Operating system code using modification and driving in a physical equipment, it is soft that realization fictionalizes single or multiple hardware resource sharings
Part resource, and the technology of operating system that is mutually isolated and mutually switching.
LXC containers:LXC is writing a Chinese character in simplified form for Linux Container.The virtualization that lightweight can be provided, so as to be isolated into
Journey and resource, and instruction explanation facility and other fully virtualized complexity need not be provided.It is equivalent in C++
NameSpace.Container will be effectively divided by the resource of single operating management in isolated group, with preferably isolated
Group between balance have the resource use demand of conflict.
Host:The android equipment that physical resource and software resource are provided for respective fictional container is either virtual
Android equipment.
QEMU:It is a set of analog processor with GPL license distribution source codes write, makes on GNU/Linux platforms
With extensive.
busybox:It is the software for being integrated with more than 100 the most frequently used Linux command and tool.
PID:Full name is Process Identification, fingering journey identifier in operating system, that is, process mark
Know symbol.A program is often opened in operating system all can create a process ID, i.e. PID.
Adb:Full name is Android Debug Bridge, plays the role of debugging bridge.By adb tools, can manage
The state of equipment or mobile phone simulator can also carry out many mobile phone operations, such as install software, system upgrade, operation shell lives
Enable etc..
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of the method for the operation method of virtual opetrating system is provided.
Optionally, in the present embodiment, the operation method of above-mentioned virtual opetrating system can be applied to it is as shown in Figure 2 by
In the hardware environment that server 202 and terminal 204 are constituted.As shown in Fig. 2, server 202 is carried out by network and terminal 204
Connection, above-mentioned network include but not limited to:Wide area network, Metropolitan Area Network (MAN) or LAN, terminal 204 are not limited to PC, mobile phone, tablet
Computer etc..The operation method of the virtual opetrating system of the embodiment of the present invention can be executed by server 202, can also be by terminal
204 execute, and can also be and are executed jointly by server 202 and terminal 204.Wherein, terminal 204 executes the embodiment of the present invention
The operation method of virtual opetrating system can also be to be executed by client mounted thereto.
Fig. 3 is a kind of flow chart of the operation method of optional virtual opetrating system according to the ... of the embodiment of the present invention, such as Fig. 3
Shown, this method may comprise steps of:
Step S302 receives the first instruction on the target device, and being run on target device has destination OS, and first
Instruction is used to indicate the first virtual opetrating system that operation is provided by the first system container in destination OS.
Above-mentioned target device is run with system that linux kernel (or Unix kernels) is kernel (namely object run system
System), the system run includes but is not limited to Linux, Ubuntu, Android, and the type of the target device includes but not office
It is limited to mobile device, terminal PC, server;One or more system container are installed, each in destination OS
For system container for providing a virtual opetrating system, the virtual opetrating system that any two system container is provided can be identical
Or it is different.
When target device is mobile device or PC, (void is equivalent to by providing system container in mobile device or PC
Quasi- operating system), facilitate user that mobile device or PC, i.e., each user is used to be only capable of entering corresponding system appearance in the safe mode
The virtual opetrating system that device is provided, and multiple system container used by a user are mutual indepedent, physical isolation, it will not mutual shadow
It rings, the safety of information in mobile device or PC can be improved.
When target device is server, server can provide several system container by the form of cloud service, often
A user can use the system container of oneself by internet, and on the one hand can reduce user local terminal cost (only needs one
Networked devices can enter the virtual system of oneself), and do not have to frequent updating apparatus;On the other hand the peace of information can be improved
Full property (since used system container is mutual indepedent, is physically isolated).
Step S304 is retrieved as the first resource of the first virtual opetrating system distribution, first resource in response to the first instruction
Including the physical resource being located at used in operation virtual opetrating system on target device.
In the related technology, for different virtual opetrating systems, the case where there are the physical resources such as shared CPU, memory, from
And there are information when one of virtual opetrating system is run to be known (to be such as present in shared drive by other operating systems
Information) possibility, to affect the safety of virtual opetrating system.
For any two system container (being equivalent to two virtual opetrating systems) of the application, that is distributed is used to run
Or the physical resource of bearing system container is isolated independently of each other, cpu resource as used, memory source etc. differ, to
It can be known by other virtual opetrating systems to avoid the information in virtual opetrating system operational process, improve virtual opetrating system fortune
Capable safety.
Step S306 shows the target window of the first system container on the system interface of destination OS, and in mesh
The system interface for the first virtual opetrating system that display is run using first resource in window is marked, the first virtual opetrating system is
Kernel unite as the system kernel of destination OS, the system drive of the first virtual opetrating system is the system of destination OS
Driving.
In the related art, system starts slow, and the reason of needing to consume the long period includes mainly following two aspects:
(1) it needs first to use the hardware devices such as QEMU virtual cpus before activation system, it then could activation system;(2) independence and nothing are driven
Method is shared, and existing system needs to fictionalize different hardware devices, even if fictionalizing identical hardware, each virtual opetrating system
It is required for running a set of driver of oneself when startup.
In addition, in the related art, it is similar that there is also technical costs is high, the bit error rate is high, transmission speed is slow, safety is poor etc.
Problem experiences the defects of bad equal for personal user.
For the virtual opetrating system run in destination OS, directly utilize in the system in destination OS
Core and system drive are run, and are set without fictionalizing physical layer CPU, disk, graphics process for each virtual opetrating system
The standby, network equipment, memory, driving, system kernel etc. only need to establish corresponding system process when virtual opetrating system starts,
Associative directory (such as root) is initialized, and system kernel in invocation target operating system and system drive are run i.e.
Can, and it is started without physical layer CPU, disk, graphic processing apparatus, the network equipment, memory, driving, the system kernel fictionalized
Deng.So as to solve the problems in the relevant technologies, achieve the effect that the starting efficiency for improving virtual system.
Optionally, for each system container, a user can be belonged to and (be such as supplied to user in the form of cloud service
Using), it, can be according to the system of user's instruction when user needs the virtual opetrating system provided system container to upgrade
The virtual opetrating system that version provides system container upgrades.
It is advantageous in that using above-mentioned upgrading mode, user can be with the Telnet terminal, and does not have to upgrading local device, right
There is no any influence in user.And the consumption of customer upgrade equipment (such as mobile phone, tablet) can be reduced, while passing through newest system
It commands and gives user best experience.
S302 is to step S306 through the above steps, when receiving the first instruction on the target device, is retrieved as the first void
The first resource of quasi- operating system distribution, shows the target window of the first system container on the system interface of destination OS
Mouthful, and the system interface for the first virtual opetrating system (i.e. virtual machine) that display is run using first resource in target window,
First virtual opetrating system directly invokes the system kernel of destination OS, and the system for directly invoking destination OS is driven
It moves to run, can solve the slower technical problem of the startup of virtual machine in the related technology, and then reach and improve virtual machine
Start the technique effect of speed.
(1) system container and its running environment are created
The application has used the linux system kernel of Host hosts (i.e. target device), is driven using the Drivers of Host
It is dynamic, in order to enable the compatibility of host driven is more preferable, partial code modification can be carried out in driving, uses LXC tool (i.e. mesh
Mark tool) as the startup and management tool for virtualizing container, to start multiple mutually isolated containers on Host, to provide
It is used to user, for ease of description, subsequent target device is illustrated by taking Android hosts as an example, as shown in Figure 4:
The kernel version that Android is used is changed on the Host Android hosts changed, and uses linux kernel
CGroups and NameSpace functions support the virtualization of hardware and the virtualization of software resource.Use NameSpace and PID
The isolation of software resource is completed, and the use of LXC tools (LXC Tools) is each container one launching process of startup and creates
NameSpace (i.e. NameSpace) and corresponding CGroup (process of packetizing management), and (namely be according to LXC containers
System container) in configuration file (i.e. config files) in parameter progress initial configuration (such as configure relevant virtual hardware
Parameter), then after software and hardware resource is ready to complete, process calls " init.rc " (system initialization configuration file) to come
Start initialization and starts virtual operating system.
Include mainly following several from the above, it is seen that during creating system container and its running environment
A part:
1) to the modification of Host android systems, the code to Android source codes and kernel is needed to modify;
2) LXC tools need to be transplanted to android system by cross compile, allow LXC tools in android system
Middle operation;
3) it is that Host android systems add busybox tools, addition android system is lacked using LXC tools
Instruction and application;
4) the LXC containers that extracting and making can use in android system (include the phase of system startup operation needs
Close the configuration file of file and LXC);
5) modification addition kernel-driven code and related management code are used for the operating system of switching virtual.
(1) about the modification to Host android systems
In order in Host android systems use LXC tools, need system kernel support CGroup and
NameSpace, while needing modification Android source codes to get rid of and PIE is limited.
In order to start CGroup the and NameSpace functions of Android linux kernels, need to change Android
The compiling of linux kernel configures, a kind of optionally newly to add shown in config option following code:
Such as NameSpace functions:
CONFIG_NAMESPACES=y
CONFIG_IPC_NS=y
Above-mentioned " CONFIG_NAMESPACES=y ", which is equivalent to, opens NameSpace functions, " CONFIG_IPC_NS=y "
It is equivalent to and opens IPC functions.
For CGroup functions:
CONFIG_CGROUPS=y
CONFIG_CPUSETS=y
Above-mentioned " CONFIG_CGROUPS=y ", which is equivalent to, opens CGroup functions, and " CONFIG_CPUSETS=y " is equivalent to
Allow that CPU is arranged.
Optionally, in order to enable the operation of linux kernel is more stablized, the version according to Android linux kernels is needed
This selects the version of matched LXC tools.
When changing Android source codes to remove the limitation to PIE, it is also necessary to change " linker.cpp " (for executing
The link work of the dynamic base of Android), it comments out or deletes and the relevant codes of PIE.
(2) it is transplanted about the cross compile of LXC tools
The system kernel of destination OS not include target tool in the case of, receive the second instruction (namely
The instruction of cross compile and transplanting is carried out to LXC tools) when, target tool is passed through into cross compile according to the instruction of the second instruction
After install into destination OS, be added to target tool in destination OS and be used to distribute for different system container
Mutually isolated physical resource.
In order to realize the cross compile to LXC tools, " android ndk " this crossstool, configuration can be used
The configuration of corresponding cross compile parameter arch and corresponding compiler gcc, while also needing to a kind of compiling libcap (Linux
Packet capture kit under environment), (replacement is added to " lxc/lib " associated documents for adding and replacing in LXC tools
In, because lxc acquiescences are to run under Ubuntu systems rather than write to move the linux environment of version, by lxc
It needs to add lxc in mobile edition linux in migration process to use, but no libraries libcap, replaced so needing to add).
Because of the configuration file not instead of config culture in android system, the compressed file packet of one " config.gz ", because
This detection script that system kernel is supported in modification LXC tools after cross compile success.
(3) about addition busybox tools
In the case where the system kernel of destination OS does not include instruction set, (can be somebody's turn to do receiving third instruction
The instruction of busybox tools is added in instruction) when, instruction set is added to destination OS by the instruction instructed according to third
In, the instruction set in destination OS is added to for providing the finger used needed for the target tool in destination OS
It enables.
Above-mentioned instruction set is to be provided by busybox tools.
For Android hosts, the busybox tools of corresponding version can be downloaded, adb tool links to Host are used
Android system, and busybox is stored into the memory space of Host Android and then decompresses installation busybox, with
Add the instruction that the LXC tools operation of Host android systems missing needs.
(4) about extraction and making android system container
After instruction set is added in destination OS by the instruction instructed according to third, the 4th finger is being received
When enabling (instruction for being used to extract or make android system container), the instruction operational objective tool instructed according to the 4th, with
The configuration file of the first system container and the first system container is created, instruction set includes the 4th instruction, and configuration file is for matching
It is set to the physical resource of the first system container allocation and the file directory for the first system container allocation.
Above-mentioned LXC operating system containers include the file (such as the first file directory) and one of 1 entitled " rootfs "
A and relevant config configuration files of LXC, rootfs files include that system starts the associated documents needed and catalogue, certainly
If the shared correlation using in Host android systems of mode of carry can be used using android system partial list
Catalogue, config configuration files need to configure the relevant configuration of LXC such as " lxc.net ", and rootfs folder contents can be from
Using adb instructions extraction and compression correspondence system file generated in Android system, it can also use and be added in config configurations
LXC tools virtualize the start-up course Hook scripts of container, and Hook script carries Host is called before LXC instrument start-ups
Android system completes the generation of the associative directory and file of rootfs.
(5) kernel-driven code is added about modification
" drivers/staging/android/.drivers/rtc/ " and " drivers/staging/ can be changed
File under the catalogues such as android/ " is configured with adding compiling corresponding with Codes Revised, to complete new driving compiling.
Fig. 5 is to put LXC tools after cross compile LXC tools after changing kernel compiling option and Host Android source codes
Enter Host Android memory spaces, be after Host Android installation is complete busybox instructions are supported, operation it is modified
LXC tool kernels support the operation result of detection script.
The lxc-checkconfig files that the detection script formula lxc projects compiling used carries after the completion, run this foot
This can previously mentioned config.gz files in lookup system, and whether detect the part kernel setup code wherein changed
Effectively, to detect the virtualization running environment needed for lxc.Such as about the state of Namespace, Namespace functions, PID
Function, User namespace (i.e. user's control) are activated (i.e. enabled);About the state of Cgroup, Cgroup functions,
Cgroup device (with the relevant equipment of Cgroup), Cgroup CPU account (CPU controls account number) function are activated.
In the technical solution of the application, it is proposed that a kind of Android system virtual method of lightweight can be used for
The virtualization of multiple Android systems of physics android machines, improves virtualization efficiency, and it is hard to promote physics to greatest extent
The utilization rate of part can be used for fictionalizing the other virtual system of multiple lightweights in virtual Android system, make virtual unit
Quantity is largely promoted, the virtual demand for a large amount of Android systems on server.
(2) operating system container
In the technical solution that step S304 is provided, the first resource for being retrieved as the distribution of the first virtual opetrating system includes:
It obtains by the first resource that the system kernel of destination OS is the distribution of the first virtual opetrating system, first resource and by target
The system kernel of operating system is that the Secondary resource of the second virtual opetrating system distribution is different, is also run in destination OS
It includes that the second virtual opetrating system of operation is used to have the second virtual opetrating system provided by second system container, Secondary resource
Target device on physical resource.
File (such as first file directory) and one and LXC of the LXC operating system containers including 1 entitled " rootfs "
Relevant config configuration files can determine that the target tool (such as LXC) in system kernel is first virtual according to configuration file
The memory of operating system distribution, the resources such as CPU, GPU, and the first virtual opetrating system is run (as virtual using these resources
Android operation system), when distributing hardware resource for different system container, the resource of distribution is different, with ensure system it
Between have good isolation, ensure the safety of system operation.
In the technical solution that step S306 is provided, in the process for running the first virtual opetrating system using first resource
In, using the first file directory as the root of the first virtual opetrating system, wherein the first file directory is destination OS
System kernel be in advance the distribution of the first virtual opetrating system, the root of the first virtual opetrating system is empty for preserving first
File needed for quasi- operating system;The first process is run on first resource, the first process is the first virtual opetrating system
System process, for the first process for handling the file under the first file directory, the first process is different from the second process,
Second process is the system process of the second virtual opetrating system, and also operation has and carried by second system container in destination OS
The second virtual opetrating system supplied.
File (such as first file directory) and one and LXC of the LXC operating system containers including 1 entitled " rootfs "
Relevant config configuration files, are for system container, are not to provide a complete computer system, are equivalent to
An application runtime environment (rootfs catalogues) is provided, and provides a series of operating mechanism (by config configuration files
Realize), it is on the basis of host common drive and kernel, respectively uses independent hardware resource, and independent operating is respective
Process is not interfere with each other between process.
Specifically, changing the kernel version that Android is used on the Host Android hosts changed, use
CGroups the and NameSpace functions of linux kernel support the virtualization of hardware and the virtualization of software resource.It uses
NameSpace and PID completes the isolation of software resource, and the use of LXC tools (LXC Tools) is that each container startup one is opened
Dynamic process simultaneously creates NameSpace (i.e. NameSpace) and corresponding CGroup (process of packetizing management).
Optionally, using the container file for changing the different operating system made in advance, storage Host after the modification
In memory space, then realize that the purpose for starting multiple virtual opetrating systems, user can be multiple using virtualization technology
Switch in system, and the independent application program for running different or identical isolation of system.
For each system container, application program can be installed, the application program between system container is due to being in
Different roots, and process, CPU, the memory source difference of the data of application program are handled, so application program will not be caused
Leaking data, ensure that the data safety of application program.
In this embodiment, it can be directed to android equipment (namely target device), by changing Android system kernel,
Android system source code, cross compile and transplanting LXC, change android equipment associated drives, to realize in an android
The purpose of one or more identical or different operating system container is fictionalized in equipment.For example, in android equipment
Run 2 of different editions either Android system containers of multiple identical either different editions or in android equipment
The system container of middle operation busybox or ubuntu.On startup, all containers use driving and the hardware of host
Resource need not carry out the simulation of hardware resource, without corresponding hardware driving is loaded, so as to improve the effect of startup
Rate.
In the above-described embodiments, it is only illustrated so that target device is Android device as an example, actually target device is also
Can be the computer equipments such as desktop computer, server, as a kind of optional embodiment, below by taking Linux server as an example into
Row explanation:
Step S11 adds LXC tools.
According to the LXC tools of the corresponding version of version selection of linux kernel in Linux server, and LXC tools are passed through
The mode of cross compile is added in Linux server.
Step S12 increases command history.
The command history (such as busybox) of corresponding version is selected according to the version of LXC tools, then uses adb tools will
It is installed on server.
Step S13, extraction system container.
Its root and corresponding configuration file are defined for each container, to generate corresponding system container, in order to make
With the linux kernel of host server, the virtual opetrating system in the system container needs to support the linux kernel, virtual to grasp
It can be Android, Linux, Ubuntu etc. to make system.
Step S14, operating system container.
User can be by the one's own system container of Linux server application, and the computer for passing through oneself in distal end
This system container is logged in and used, is entered in the system by inputting the information such as username and password, and install using journey
The application program All Files of sequence, installation can be saved in the root of the virtual opetrating system, avoid by remaining user or
Person's operating system utilizes.
It should be noted that the file that (SuSE) Linux OS container includes 1 entitled formulation (corresponds to hereinbefore
" rootfs ") and one and the relevant config configuration files of LXC, it is for system container, is equivalent to and provides one
Application operation directory context, and a series of operating mechanism (being realized by config configuration files) is provided, it is that host shares
On the basis of driving and kernel, independent hardware resource, and the respective process of independent operating are respectively used, is not done mutually between process
It disturbs.So that it is mutually isolated between each virtual machine, it is independent of each other.
Optionally, it for LXC tools above-mentioned, can also be substituted using Docker tools, the operation in realization system
System it is virtual.
In the technical solution of the application, does not have to virtualization hardware equipment and associated drives are simulated, significantly promoted virtual
The startup speed of system.Isolation is completed using NameSpace and PID, carry function can be used to share Host Android's
Associated documents and software resource, while the related hardware that can directly use Host Android kernels to carry drives, and reduces
The operation of virtual system consumes.
It should be noted that for each method embodiment above-mentioned, for simple description, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the described action sequence because
According to the present invention, certain steps can be performed in other orders or simultaneously.Secondly, those skilled in the art should also know
It knows, embodiment described in this description belongs to preferred embodiment, and involved action and module are not necessarily of the invention
It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, technical scheme of the present invention is substantially in other words to existing
The part that technology contributes can be expressed in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal equipment (can be mobile phone, calculate
Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
Embodiment 2
According to embodiments of the present invention, it additionally provides a kind of for implementing the virtual of the operation method of above-mentioned virtual opetrating system
The running gear of operating system.Fig. 6 is a kind of running gear of optional virtual opetrating system according to the ... of the embodiment of the present invention
Schematic diagram, as shown in fig. 6, the device may include:Receiving unit 62, response unit 64 and display unit 66.
Receiving unit 62, for receiving the first instruction on the target device, being run on target device has object run system
System, the first instruction are used to indicate the first virtual opetrating system that operation is provided by the first system container in destination OS.
Above-mentioned target device is run with system that linux kernel (or Unix kernels) is kernel (namely object run system
System), the system run includes but is not limited to Linux, Ubuntu, Android, and the type of the target device includes but not office
It is limited to mobile device, terminal PC, server;One or more system container are installed, each in destination OS
For system container for providing a virtual opetrating system, the virtual opetrating system that any two system container is provided can be identical
Or it is different.
When target device is mobile device or PC, (void is equivalent to by providing system container in mobile device or PC
Quasi- operating system), facilitate user that mobile device or PC, i.e., each user is used to be only capable of entering corresponding system appearance in the safe mode
The virtual opetrating system that device is provided, and multiple system container used by a user are mutual indepedent, physical isolation, it will not mutual shadow
It rings, the safety of information in mobile device or PC can be improved.
When target device is server, server can provide several system container by the form of cloud service, often
A user can use the system container of oneself by internet, and on the one hand can reduce user local terminal cost (only needs one
Networked devices can enter the virtual system of oneself), and do not have to frequent updating apparatus;On the other hand the peace of information can be improved
Full property (since used system container is mutual indepedent, is physically isolated).
Response unit 64, in response to the first instruction, being retrieved as the first resource of the first virtual opetrating system distribution,
In, first resource includes the physical resource run used in virtual opetrating system on target device.
In the related technology, for different virtual opetrating systems, the case where there are the physical resources such as shared CPU, memory, from
And there are information when one of virtual opetrating system is run to be known (to be such as present in shared drive by other operating systems
Information) possibility, to affect the safety of virtual opetrating system.
For any two system container (being equivalent to two virtual opetrating systems) of the application, that is distributed is used to run
Or the physical resource of bearing system container is isolated independently of each other, cpu resource as used, memory source etc. differ, to
It can be known by other virtual opetrating systems to avoid the information in virtual opetrating system operational process, improve virtual opetrating system fortune
Capable safety.
Display unit 66, the target window for showing the first system container on the system interface of destination OS,
And the system interface for the first virtual opetrating system that display is run using first resource in target window, wherein first is virtual
The system kernel of operating system is the system kernel of destination OS, and the system drive of the first virtual opetrating system is grasped for target
Make the system drive of system.
In the related art, system starts slow, and the reason of needing to consume the long period includes mainly following two aspects:
(1) it needs first to use the hardware devices such as QEMU virtual cpus before activation system, it then could activation system;(2) independence and nothing are driven
Method is shared, and existing system needs to fictionalize different hardware devices, even if fictionalizing identical hardware, each virtual opetrating system
It is required for running a set of driver of oneself when startup.
In addition, in the related art, it is similar that there is also technical costs is high, the bit error rate is high, transmission speed is slow, safety is poor etc.
Problem experiences the defects of bad equal for personal user.
For the virtual opetrating system run in destination OS, directly utilize in the system in destination OS
Core and system drive are run, and are set without fictionalizing physical layer CPU, disk, graphics process for each virtual opetrating system
The standby, network equipment, memory, driving, system kernel etc. only need to establish corresponding system process when virtual opetrating system starts,
Associative directory (such as root) is initialized, and system kernel in invocation target operating system and system drive are run i.e.
Can, and it is started without physical layer CPU, disk, graphic processing apparatus, the network equipment, memory, driving, the system kernel fictionalized
Deng.So as to solve the problems in the relevant technologies, achieve the effect that the starting efficiency for improving virtual system.
It should be noted that the receiving unit 62 in the embodiment can be used for executing the step in the embodiment of the present application 1
S302, the response unit 64 in the embodiment can be used for executing the step S304 in the embodiment of the present application 1, in the embodiment
Display unit 66 can be used for executing the step S306 in the embodiment of the present application 1.
Herein it should be noted that above-mentioned module is identical as example and application scenarios that corresponding step is realized, but not
It is limited to 1 disclosure of that of above-described embodiment.It should be noted that above-mentioned module as a part for device may operate in as
In hardware environment shown in Fig. 2, it can also pass through hardware realization by software realization.
By above-mentioned module, when receiving the first instruction on the target device, it is retrieved as the distribution of the first virtual opetrating system
First resource, the target window of the first system container is shown on the system interface of destination OS, and in target window
The system interface for the first virtual opetrating system (i.e. virtual machine) that middle display is run using first resource, the first virtual opetrating system
The system kernel of destination OS is directly invoked, and directly invokes the system drive of destination OS to run, can be solved
It has determined the slower technical problem of startup of virtual machine in the related technology, and then the technology for reaching the startups speed for improving virtual machine is imitated
Fruit.
Optionally, as shown in fig. 7, in order to realize the cross compile and transplanting of target tool, the device of the application can be with
Including:Second processing unit 68, in the case where the system kernel of destination OS does not include target tool, receiving
To when the second instruction, target tool is installed into the system kernel of destination OS according to the instruction of the second instruction, wherein
The target tool being added in the system kernel of destination OS is used to distribute mutually isolated object for different system container
Manage resource.
Optionally, in order to realize that instruction to target tool is supported, the device of the application can also include:Third processing is single
Member is used in the case where the system kernel of destination OS does not include instruction set, when receiving third instruction, according to
Instruction set is added in destination OS by the instruction of third instruction, wherein the instruction being added in destination OS
Set is for providing with the instruction needed for the target tool in destination OS.
Optionally, the device of the application can also include:Creating unit, for that will be instructed in the instruction instructed according to third
After set is added in destination OS, when receiving the 4th instruction, according to the instruction operational objective work of the 4th instruction
Tool, to create the configuration file of the first system container and the first system container, wherein instruction set includes the 4th instruction, configuration
File is used to be configured to the physical resource of the first system container allocation and the file directory for the first system container allocation.
It is the first virtual opetrating system point that above-mentioned response unit, which is additionally operable to obtain by the system kernel of destination OS,
The first resource matched, wherein first resource is the distribution of the second virtual opetrating system with the system kernel by destination OS
Secondary resource is different, and also operation has the second virtual opetrating system provided by second system container in destination OS, the
Two resources include the physical resource run on target device used in the second virtual opetrating system.
In an alternative embodiment, the device of the application can also include:First processing units, for using the
During one resource runs the first virtual opetrating system, using the first file directory as the root mesh of the first virtual opetrating system
Record, wherein it is what the first virtual opetrating system was distributed in advance that the first file directory, which is the system kernel of destination OS, first
The root of virtual opetrating system is used to preserve the file needed for the operation of the first virtual opetrating system;Running unit, for the
The first process is run in one resource, wherein the first process be the first virtual opetrating system system process, the first process for pair
File under first file directory is handled, and the first process is different from the second process, and the second process is the second pseudo operation system
The system process of system, also operation has the second virtual opetrating system provided by second system container in destination OS.
Optionally, using the container file for changing the different operating system made in advance, storage Host after the modification
In memory space, then realize that the purpose for starting multiple virtual opetrating systems, user can be multiple using virtualization technology
Switch in system, and the independent application program for running different or identical isolation of system.
In this embodiment, it can be directed to android equipment (namely target device), by changing Android system kernel,
Android system source code, cross compile and transplanting LXC, change android equipment associated drives, to realize in an android
The purpose of one or more identical or different operating system container is fictionalized in equipment.For example, in android equipment
Run 2 of different editions either Android system containers of multiple identical either different editions or in android equipment
The system container of middle operation busybox or ubuntu.On startup, all containers use driving and the hardware of host
Resource need not carry out the simulation of hardware resource, without corresponding hardware driving is loaded, so as to improve the effect of startup
Rate.
In the above-described embodiments, it is only illustrated so that target device is Android device as an example, actually target device is also
Can be the computer equipments such as desktop computer, server.
In above-mentioned apparatus embodiment, involved unit or module are opposite with the method and step in preceding method embodiment
It answers, for the specific implementation of unit or module in device embodiment, can refer to corresponding side in preceding method embodiment
The specific implementation mode of method step.Details are not described herein.
Herein it should be noted that above-mentioned module is identical as example and application scenarios that corresponding step is realized, but not
It is limited to 1 disclosure of that of above-described embodiment.It should be noted that above-mentioned module as a part for device may operate in as
In hardware environment shown in Fig. 2, it can also pass through hardware realization by software realization, wherein hardware environment includes network
Environment.
Embodiment 3
According to embodiments of the present invention, a kind of service for implementing the operation method of above-mentioned virtual opetrating system is additionally provided
Device or terminal (namely electronic device above-mentioned).
Fig. 8 is a kind of structure diagram of terminal according to the ... of the embodiment of the present invention, as shown in figure 8, the terminal may include:One
A or multiple (one is only shown in Fig. 8) processor 801, memory 803 and transmitting device 805 are (in such as above-described embodiment
Sending device), as shown in figure 8, the terminal can also include input-output equipment 807.
Wherein, memory 803 can be used for storing software program and module, such as the pseudo operation system in the embodiment of the present invention
Corresponding program instruction/the module of operation method and device of system, processor 801 are stored in soft in memory 803 by operation
Part program and module realize the fortune of above-mentioned virtual opetrating system to perform various functions application and data processing
Row method.Memory 803 may include high speed random access memory, can also include nonvolatile memory, such as one or more
Magnetic storage device, flash memory or other non-volatile solid state memories.In some instances, memory 803 can be wrapped further
The memory remotely located relative to processor 801 is included, these remote memories can pass through network connection to terminal.Above-mentioned net
The example of network includes but not limited to internet, intranet, LAN, mobile radio communication and combinations thereof.
Above-mentioned transmitting device 805 is used to receive via network or transmission data, can be also used for processor with
Data transmission between memory.Above-mentioned network specific example may include cable network and wireless network.In an example,
Transmitting device 805 includes a network adapter (Network Interface Controller, NIC), can pass through cable
It is connected with other network equipments with router so as to be communicated with internet or LAN.In an example, transmission dress
It is radio frequency (Radio Frequency, RF) module to set 805, is used to wirelessly be communicated with internet.
Wherein, specifically, memory 803 is for storing application program.
Processor 801 can call the application program that memory 803 stores by transmitting device 805, to execute following steps
Suddenly:The first instruction is received on the target device, wherein operation has destination OS, the first instruction to be used on target device
It indicates to run the first virtual opetrating system provided by the first system container in destination OS;It is instructed in response to first,
It is retrieved as the first resource of the first virtual opetrating system distribution, wherein first resource includes that operation virtual opetrating system is used
Be located at target device on physical resource;The target window of the first system container is shown on the system interface of destination OS
Mouthful, and the system interface for the first virtual opetrating system that display is run using first resource in target window, wherein first is empty
The system kernel of quasi- operating system is the system kernel of destination OS, and the system drive of the first virtual opetrating system is target
The system drive of operating system.
Processor 801 is additionally operable to execute following step:Using the first file directory as the root mesh of the first virtual opetrating system
Record, wherein it is what the first virtual opetrating system was distributed in advance that the first file directory, which is the system kernel of destination OS, first
The root of virtual opetrating system is used to preserve the file needed for the operation of the first virtual opetrating system;Is run on first resource
One process, wherein the first process is the system process of the first virtual opetrating system, and the first process is used under the first file directory
File handled, the first process be different from the second process, the second process be the second virtual opetrating system system process,
Also operation has the second virtual opetrating system provided by second system container in destination OS.
Using the embodiment of the present invention, when receiving the first instruction on the target device, it is retrieved as the first virtual opetrating system
The first resource of distribution shows the target window of the first system container on the system interface of destination OS, and in target
The system interface for the first virtual opetrating system (i.e. virtual machine) that display is run using first resource in window, the first pseudo operation
System directly invokes the system kernel of destination OS, and directly invokes the system drive of destination OS to run, can
To solve the slower technical problem of the startup of virtual machine in the related technology, and then reach the skill for the startup speed for improving virtual machine
Art effect.
Optionally, the specific example in the present embodiment can refer to showing described in above-described embodiment 1 and embodiment 2
Example, details are not described herein for the present embodiment.
It will appreciated by the skilled person that structure shown in Fig. 8 is only to illustrate, terminal can be smart mobile phone
(such as Android phone, iOS mobile phones), tablet computer, palm PC and mobile internet device (Mobile Internet
Devices, MID), the terminal devices such as PAD.Fig. 8 it does not cause to limit to the structure of above-mentioned electronic device.For example, terminal is also
May include than shown in Fig. 8 more either less components (such as network interface, display device) or with shown in Fig. 8
Different configurations.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
To be completed come command terminal device-dependent hardware by program, which can be stored in a computer readable storage medium
In, storage medium may include:Flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random
Access Memory, RAM), disk or CD etc..
Embodiment 4
The embodiments of the present invention also provide a kind of storage mediums.Optionally, in the present embodiment, above-mentioned storage medium can
For the program code of the operation method of execution virtual opetrating system.
Optionally, in the present embodiment, above-mentioned storage medium can be located at multiple in network shown in above-described embodiment
On at least one of network equipment network equipment.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps:
S21 receives the first instruction on the target device, wherein and being run on target device has destination OS, and first
Instruction is used to indicate the first virtual opetrating system that operation is provided by the first system container in destination OS;
S22 is retrieved as the first resource of the first virtual opetrating system distribution, wherein first resource in response to the first instruction
Including the physical resource being located at used in operation virtual opetrating system on target device;
S23 shows the target window of the first system container on the system interface of destination OS, and in target window
The system interface for the first virtual opetrating system that middle display is run using first resource, wherein the first virtual opetrating system is
Kernel unite as the system kernel of destination OS, the system drive of the first virtual opetrating system is the system of destination OS
Driving.
Optionally, storage medium is also configured to store the program code for executing following steps:
S31, using the first file directory as the root of the first virtual opetrating system, wherein the first file directory is mesh
The system kernel for marking operating system is in advance the distribution of the first virtual opetrating system, and the root of the first virtual opetrating system is used for
Preserve the file needed for the operation of the first virtual opetrating system;
S32 runs the first process on first resource, wherein the first process be the first virtual opetrating system system into
Journey, for the first process for handling the file under the first file directory, the first process is different from the second process, the second process
For the system process of the second virtual opetrating system, also operation has second provided by second system container in destination OS
Virtual opetrating system.
Optionally, the specific example in the present embodiment can refer to showing described in above-described embodiment 1 and embodiment 2
Example, details are not described herein for the present embodiment.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to:USB flash disk, read-only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disc or
The various media that can store program code such as CD.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and as independent product
Sale in use, can be stored in the storage medium that above computer can be read.Based on this understanding, skill of the invention
Substantially all or part of the part that contributes to existing technology or the technical solution can be with soft in other words for art scheme
The form of part product embodies, which is stored in a storage medium, including some instructions are used so that one
Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) execute each embodiment institute of the present invention
State all or part of step of method.
In the above embodiment of the present invention, all emphasizes particularly on different fields to the description of each embodiment, do not have in some embodiment
The part of detailed description may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side
Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, for example, the unit division, only one
Kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can combine or
It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it
Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, unit or module
It connects, can be electrical or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (13)
1. a kind of operation method of virtual opetrating system, which is characterized in that including:
The first instruction is received on the target device, wherein being run on the target device has destination OS, and described first
Instruction is used to indicate the first virtual opetrating system that operation is provided by the first system container in the destination OS;
In response to first instruction, it is retrieved as the first resource of the first virtual opetrating system distribution, wherein described first
Resource includes the physical resource on the target device used in the operation virtual opetrating system;
The target window of the first system container is shown on the system interface of the destination OS, and in the target
The system interface of first virtual opetrating system run using the first resource is shown in window, wherein described first
The system kernel of virtual opetrating system is the system kernel of the destination OS, the system of first virtual opetrating system
It is driven to the system drive of the destination OS;
Wherein, during running first virtual opetrating system using the first resource, the method further includes:It will
Root of first file directory as first virtual opetrating system, wherein first file directory is the target
The system kernel of operating system is first virtual opetrating system distribution, the root mesh of first virtual opetrating system in advance
Employ the file needed for preservation the first virtual opetrating system operation;The first process is run on the first resource,
In, first process is the system process of first virtual opetrating system, and first process is used for first text
File under part catalogue is handled, and first process is different from the second process, and second process is the second pseudo operation
The system process of system, also operation has the described second virtual behaviour provided by second system container in the destination OS
Make system.
2. according to the method described in claim 1, it is characterized in that, being retrieved as the first of the first virtual opetrating system distribution
Resource includes:
It obtains by the first resource that the system kernel of the destination OS is first virtual opetrating system distribution,
Wherein, the first resource and the system kernel by the destination OS are the second money of the second virtual opetrating system distribution
Source is different, and also operation has second virtual opetrating system provided by second system container in the destination OS,
The Secondary resource includes the physical resource on the target device used in operation second virtual opetrating system.
3. method according to claim 1 or 2, which is characterized in that before receiving first instruction, in the mesh
The system kernel of operating system is marked not including in the case of target tool, the method further includes:
When receiving the second instruction, the target tool is installed to the object run according to the instruction of second instruction
In the system kernel of system, wherein the target tool being added in the system kernel of the destination OS is for being
Different system container distributes mutually isolated physical resource.
4. method according to claim 1 or 2, which is characterized in that before receiving first instruction, in the mesh
The system kernel of operating system is marked not including in the case of instruction set, the method further includes:
When receiving third instruction, described instruction set is added to the object run by the instruction instructed according to the third
In system, wherein the described instruction set being added in the destination OS uses the object run system for providing
The instruction needed for target tool in system.
5. according to the method described in claim 4, it is characterized in that, in the instruction instructed according to the third by described instruction collection
After conjunction is added in the destination OS, the method further includes:
When receiving the 4th instruction, the target tool is run according to the instruction of the 4th instruction, to create described first
The configuration file of system container and the first system container, wherein described instruction set includes the 4th instruction, described to match
Set physical resource of the file for being configured to the first system container allocation and the file for the first system container allocation
Catalogue.
6. method according to claim 1 or 2, which is characterized in that the system kernel of the destination OS is Linux
Kernel, first virtual opetrating system are the operating system realized based on linux kernel.
7. a kind of running gear of virtual opetrating system, which is characterized in that including:
Receiving unit, for receiving the first instruction on the target device, wherein operation has object run on the target device
System, first instruction be used to indicate in the destination OS operation provided by the first system container it is first virtual
Operating system;
Response unit, in response to first instruction, being retrieved as the first resource of the first virtual opetrating system distribution,
Wherein, the first resource includes the physics money on the target device used in the operation virtual opetrating system
Source;
Display unit, the target window for showing the first system container on the system interface of the destination OS
Mouthful, and system circle that first virtual opetrating system run using the first resource is shown in the target window
Face, wherein the system kernel of first virtual opetrating system is the system kernel of the destination OS, and described first is empty
The system drive of quasi- operating system is the system drive of the destination OS;
First processing units, for during running first virtual opetrating system using the first resource, by the
Root of one file directory as first virtual opetrating system, wherein first file directory is grasped for the target
The system kernel for making system is first virtual opetrating system distribution, the root of first virtual opetrating system in advance
For preserving the file needed for the first virtual opetrating system operation;
Running unit, for running the first process on the first resource, wherein first process is described first virtual
The system process of operating system, first process is for handling the file under first file directory, and described the
One process is different from the second process, and second process is the system process of the second virtual opetrating system, in the object run
Also operation has second virtual opetrating system provided by second system container in system.
8. device according to claim 7, which is characterized in that the response unit is additionally operable to obtain by the object run
The system kernel of system be first virtual opetrating system distribution the first resource, wherein the first resource with by
The system kernel of the destination OS is that the Secondary resource of the second virtual opetrating system distribution is different, in the object run
It includes operation institute that also operation, which has second virtual opetrating system provided by second system container, the Secondary resource, in system
State the physical resource on the target device used in the second virtual opetrating system.
9. device according to claim 7 or 8, which is characterized in that described device further includes:
Second processing unit, in the case where the system kernel of the destination OS does not include target tool, connecing
When receiving the second instruction, the target tool is installed to the destination OS it is according to the instruction of second instruction
In system kernel, wherein the target tool being added in the system kernel of the destination OS for being for different
The mutually isolated physical resource of container allocation of uniting.
10. device according to claim 7 or 8, which is characterized in that described device further includes:
Third processing unit, in the case where the system kernel of the destination OS does not include instruction set, connecing
When receiving third instruction, described instruction set is added in the destination OS by the instruction instructed according to the third,
Wherein, the described instruction set in the destination OS is added to for providing with the mesh in the destination OS
Instruction needed for mark tool.
11. device according to claim 10, which is characterized in that described device further includes:
Creating unit, for described instruction set to be added to the destination OS in the instruction instructed according to the third
In after, when receiving the 4th instruction, the target tool is run according to the instruction of the 4th instruction, to create described the
The configuration file of one system container and the first system container, wherein described instruction set includes the 4th instruction, described
Configuration file is used to be configured to the physical resource of the first system container allocation and the text for the first system container allocation
Part catalogue.
12. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein when described program is run
Execute the method according to any one of claims 1 to 6.
13. a kind of electronic device, including memory, processor and it is stored on the memory and can transports on the processor
Capable computer program, which is characterized in that the processor executes the claim 1 to 6 times by the computer program
Method described in one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710640433.7A CN107463402B (en) | 2017-07-31 | 2017-07-31 | The operation method and device of virtual opetrating system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710640433.7A CN107463402B (en) | 2017-07-31 | 2017-07-31 | The operation method and device of virtual opetrating system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107463402A CN107463402A (en) | 2017-12-12 |
CN107463402B true CN107463402B (en) | 2018-09-14 |
Family
ID=60547196
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710640433.7A Active CN107463402B (en) | 2017-07-31 | 2017-07-31 | The operation method and device of virtual opetrating system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107463402B (en) |
Families Citing this family (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108287733A (en) * | 2017-12-19 | 2018-07-17 | 广东睿江云计算股份有限公司 | A kind of virtual machine load startup method |
CN108897617A (en) * | 2018-06-19 | 2018-11-27 | 北京元心科技有限公司 | The method, apparatus and terminal device of memory management |
CN108984195B (en) * | 2018-06-27 | 2022-05-31 | 新华三技术有限公司 | Software upgrading method and device |
CN109359450B (en) * | 2018-10-29 | 2021-03-05 | 北京猎户星空科技有限公司 | Security access method, device, equipment and storage medium of Linux system |
CN111200535B (en) * | 2018-11-16 | 2022-11-15 | 阿里巴巴集团控股有限公司 | Simulation system and method for equipment |
CN111367648A (en) * | 2018-12-25 | 2020-07-03 | 成都鼎桥通信技术有限公司 | Resource allocation method and device |
CN110209602A (en) * | 2019-05-17 | 2019-09-06 | 北京航空航天大学 | Region division and space allocation method in cross-domain virtual data space |
CN110780817B (en) * | 2019-10-18 | 2021-12-07 | 腾讯科技(深圳)有限公司 | Data recording method and apparatus, storage medium, and electronic apparatus |
CN111240802A (en) * | 2020-01-06 | 2020-06-05 | 华东师范大学 | Virtualization method suitable for equipment side |
CN111221627A (en) * | 2020-01-06 | 2020-06-02 | 华东师范大学 | Virtualization system suitable for equipment side |
WO2021170054A1 (en) * | 2020-02-28 | 2021-09-02 | 安徽寒武纪信息科技有限公司 | Virtualization method, device, board card and computer-readable storage medium |
CN111639335A (en) * | 2020-05-29 | 2020-09-08 | 深信服科技股份有限公司 | Sandbox control method and device, electronic equipment and storage medium |
CN111752683A (en) * | 2020-06-30 | 2020-10-09 | 北京小米松果电子有限公司 | Vehicle control method and device |
CN112114916B (en) * | 2020-08-31 | 2021-06-08 | 北京技德系统技术有限公司 | Method and device for compatibly running Android application on Linux operating system |
CN114168203B (en) * | 2020-09-10 | 2024-02-13 | 成都鼎桥通信技术有限公司 | Dual-system running state control method and device and electronic equipment |
CN111935323A (en) * | 2020-10-12 | 2020-11-13 | 江苏润和软件股份有限公司 | Remote LXC container application dynamic management system and method |
CN112328356B (en) * | 2020-10-21 | 2023-09-29 | 成都安易迅科技有限公司 | Intercommunication method and device for Android and Windows, storage medium and computer equipment |
US11567796B2 (en) | 2020-10-22 | 2023-01-31 | International Business Machines Corporation | Configuring hardware multithreading in containers |
CN112231017B (en) * | 2020-10-27 | 2021-06-22 | 北京技德系统技术有限公司 | Virtual keyboard and mouse method and device compatible with Android running environment running on Linux |
CN112269604B (en) * | 2020-11-11 | 2021-06-01 | 北京技德系统技术有限公司 | Window interaction method and device for compatibly running Android application on Linux |
CN112527336B (en) * | 2020-12-24 | 2024-03-12 | 深圳市科力锐科技有限公司 | Operating system software installation method, device, equipment and storage medium |
CN113132969B (en) * | 2021-03-03 | 2024-04-12 | 翱捷科技股份有限公司 | Method and device for realizing multiple virtual independent telephone systems by multi-card mobile phone |
CN113176899A (en) * | 2021-03-15 | 2021-07-27 | 西安神鸟软件科技有限公司 | Operation method of multi-android operating system and terminal equipment |
CN113190854A (en) * | 2021-04-19 | 2021-07-30 | 亚信科技(成都)有限公司 | Resource isolation method and electronic equipment |
CN113885861B (en) * | 2021-09-24 | 2024-07-02 | 北京字节跳动网络技术有限公司 | Method and device for multiplexing components of cross-system |
CN114035976A (en) * | 2021-10-20 | 2022-02-11 | 北京鲸鲮信息系统技术有限公司 | Method, device, equipment, medium and product for sharing adhesive board |
CN114047960A (en) * | 2021-11-10 | 2022-02-15 | 北京鲸鲮信息系统技术有限公司 | Operating system running method and device, electronic equipment and storage medium |
CN115988129B (en) * | 2022-12-28 | 2024-08-09 | 天翼电信终端有限公司 | Dual-system cloud security mobile phone wifi security use method |
CN116820657A (en) * | 2023-08-30 | 2023-09-29 | 北京创易云互联科技有限公司 | Intelligent virtualized logic algorithm based on Docker and AI technology |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101493781A (en) * | 2008-01-24 | 2009-07-29 | 中国长城计算机深圳股份有限公司 | Virtual machine system and start-up method thereof |
CN103605559A (en) * | 2013-11-21 | 2014-02-26 | 中标软件有限公司 | KVM (kernel-based virtual machine) virtualized service system and data communication method for same |
CN103927227A (en) * | 2014-04-16 | 2014-07-16 | 乐视致新电子科技(天津)有限公司 | Method and device for switching multiple operating systems and smart television |
CN106020929A (en) * | 2016-05-13 | 2016-10-12 | 深圳市青葡萄科技有限公司 | System and method for supporting 3D application in virtual environment |
CN106598653A (en) * | 2016-11-24 | 2017-04-26 | 合肥中科云巢科技有限公司 | Method and device used for solving boot storm of virtual machine |
CN106933654A (en) * | 2017-03-17 | 2017-07-07 | 中山大学 | A kind of virtual machine based on caching starts method |
-
2017
- 2017-07-31 CN CN201710640433.7A patent/CN107463402B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101493781A (en) * | 2008-01-24 | 2009-07-29 | 中国长城计算机深圳股份有限公司 | Virtual machine system and start-up method thereof |
CN103605559A (en) * | 2013-11-21 | 2014-02-26 | 中标软件有限公司 | KVM (kernel-based virtual machine) virtualized service system and data communication method for same |
CN103927227A (en) * | 2014-04-16 | 2014-07-16 | 乐视致新电子科技(天津)有限公司 | Method and device for switching multiple operating systems and smart television |
CN106020929A (en) * | 2016-05-13 | 2016-10-12 | 深圳市青葡萄科技有限公司 | System and method for supporting 3D application in virtual environment |
CN106598653A (en) * | 2016-11-24 | 2017-04-26 | 合肥中科云巢科技有限公司 | Method and device used for solving boot storm of virtual machine |
CN106933654A (en) * | 2017-03-17 | 2017-07-07 | 中山大学 | A kind of virtual machine based on caching starts method |
Also Published As
Publication number | Publication date |
---|---|
CN107463402A (en) | 2017-12-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107463402B (en) | The operation method and device of virtual opetrating system | |
US8271976B2 (en) | Systems and methods for initializing multiple virtual processors within a single virtual machine | |
US8205194B2 (en) | Updating offline virtual machines or VM images | |
US8776041B2 (en) | Updating a virtual machine monitor from a guest partition | |
US7580826B2 (en) | Systems and methods for development of emulated devices in a virtual machine environment | |
US8650273B2 (en) | Virtual serial concentrator for virtual machine out-of-band management | |
US8312212B2 (en) | Systems and methods for attaching a virtual machine virtual hard disk to a host machine | |
Bartholomew | Qemu: a multihost, multitarget emulator | |
US20070011444A1 (en) | Method, apparatus and system for bundling virtualized and non-virtualized components in a single binary | |
CN106293781B (en) | The method and apparatus of online upgrading machine virtual machine | |
CN103430142B (en) | The method and apparatus started for compiling system map and segmentation | |
US8839231B2 (en) | Method and system for software installation | |
CN105447203A (en) | Shared file access method and system and associated equipment | |
CN107992381A (en) | System reducing method, device, system, backup and reduction server and storage medium | |
US20140359618A1 (en) | Creating a Virtual Appliance | |
CN108021378A (en) | Upgrade-system, the upgrade method based on virtual machine and device | |
Sally | Pro Linux embedded systems | |
Deka et al. | Application of virtualization technology in IaaS cloud deployment model | |
CN107229506B (en) | Virtual machine migration method and device | |
CN107147532A (en) | The virtual method and device of a kind of distributed apparatus | |
CN108021408A (en) | Upgrade method and device | |
CN114253655A (en) | Security container isolation method and device based on MIPS64 instruction set | |
Rechert et al. | Towards a Risk Model for Emulation-based Preservation Strategies: A Case Study from the Software-based Art Domain | |
Leon | The dark side of unikernels for machine learning | |
EP3161652B1 (en) | Full virtual machine functionality |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231016 Address after: 518000 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 Floors Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. Patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd. Address before: 518000 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 Floors Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |