CN108804147A - Link closedown method, device and client - Google Patents
Link closedown method, device and client Download PDFInfo
- Publication number
- CN108804147A CN108804147A CN201810524131.8A CN201810524131A CN108804147A CN 108804147 A CN108804147 A CN 108804147A CN 201810524131 A CN201810524131 A CN 201810524131A CN 108804147 A CN108804147 A CN 108804147A
- Authority
- CN
- China
- Prior art keywords
- client
- shutdown
- virtual
- virtual desktop
- event
- 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/4401—Bootstrapping
- G06F9/442—Shutdown
-
- 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/451—Execution arrangements for user interfaces
- G06F9/452—Remote windowing, e.g. X-Window System, desktop virtualisation
Abstract
A kind of linkage closedown method of the application offer, device and client, are related to field of cloud computer technology, monitor the shutdown event of the currently used virtual desktop of the client;In the shutdown event for listening to the virtual desktop, shutdown event is sent to the client by providing the agency service program of the virtual machine of the virtual desktop, so that the client decides whether to carry out linkage shutdown with the virtual desktop according to the shutdown event received.In the above-mentioned methods, client decides whether to carry out linkage shutdown according to the shutdown event of server feedback, when client needs shutdown, client can shut down according to shutdown event, need not individual power-off operation individually be carried out to client again, it simplifies virtual desktop and needs the operational chain to shut down simultaneously with client, promote the convenience of linkage shutdown system management.
Description
Technical field
This application involves field of cloud computer technology, in particular to a kind of virtual desktop and client linkage shutdown side
Method, device and client.
Background technology
In today that cloud computing technology makes rapid progress, the application scenarios of virtual desktop are more and more extensive, such as routine office work,
School instruction etc. can be applied to virtual desktop solution, virtual desktop solution by reasonable distribution computer resource,
Computer management is simplified, reduces power consumption, and improve office efficiency.
Virtual desktop scheme platform is based on virtual desktop architecture (English:Virtual Desktop
Infrastructure, referred to as:VDI) realize, can by the desktop environment of user in the form of virtual machine trustship to high-performance
Server on, provide the user with the user experience almost the same with physics PC.Ordinary user can pass through PC, thin client etc.
A variety of client devices use the virtual desktop of oneself, complete routine office work, the tasks such as school instruction, and administrator may be implemented pair
All virtual desktop resources carry out visual management and batch deployment virtual desktop to meet the needs of a large number of users.
In the application scenarios of virtual desktop, if wanting to realize that virtual desktop shuts down with client, it is necessary first to which user is first right
Virtual desktop shuts down, and the running environment of client can be returned to after the shutdown for completing virtual desktop, then in client
It shuts down in running environment, the final shutdown for realizing client.Virtual desktop and client shutdown in above-mentioned shutdown process
Operational chain is longer, is not easy to linkage shutdown system management.The operational chain for how simplifying virtual desktop and client shutdown, promotes connection
The convenience of dynamic shutdown system management becomes those skilled in the art and is badly in need of technical problems to be solved.
Invention content
Embodiments herein describes a kind of linkage closedown method, device and client.
In a first aspect, the embodiment of the present application provides a kind of linkage closedown method, it is applied to linkage shutdown system, the linkage
Shutdown system includes client and server, and the server provides virtual desktop serve by virtual machine for the client,
The method includes:
The server monitors the shutdown event of the currently used virtual desktop of the client;
The server is described virtual by providing by shutdown event in the shutdown event for listening to the virtual desktop
The agency service program of the virtual machine of desktop is sent to the client;
The client decides whether to carry out linkage shutdown with the virtual desktop according to the shutdown event received.
Optionally, in the present embodiment, the server monitors the shutdown of the currently used virtual desktop of the client
The step of event includes:
Virtual machine process by being deployed with hook program intercepts and captures the shutdown command function of the virtual desktop;
Judge whether to listen to the pass of the virtual desktop from the shutdown command function according to the incoming parameter intercepted
Machine event.
Optionally, in the present embodiment, in the server institute is intercepted and captured by being deployed with the virtual machine process of hook program
Before the step of stating the shutdown command function of virtual desktop, the method further includes:
The server detect the virtual machine agency service program whether be upgrading after startup for the first time;
When for startup for the first time after upgrading, the hook program is deployed in the process of the virtual machine.
Optionally, in the present embodiment, the server will shut down in the shutdown event for listening to the virtual desktop
The step of event is sent to the client by the agency service program of the virtual machine of the offer virtual desktop, including:
Start the shutdown that virtual machine process is intercepted and captured described in name conduit acceptor by the agency service program of the virtual machine
Event, and after receiving the shutdown event shutdown event is sent to the client.
Optionally, in the present embodiment, the client according to the shutdown event received decide whether with it is described
Virtual desktop carries out the step of linkage shutdown, including:
Receive the shutdown event of the currently used virtual desktop of the client;
It is tactful to detect the linkage the shutdown whether client opens between the virtual machine;
When the client has turned on the shutdown strategy of the linkage between the virtual machine, whether detection client is thin
Client;
When client is thin-client, detecting the client, currently also whether operation has other virtual desktops;
When the client is currently without other virtual desktops are run, the client is closed.
Second aspect, the embodiment of the present application also provide a kind of linkage closedown method, are applied to server, and the server is used
In provide virtual desktop serve, the method includes:
Monitor the shutdown event of the currently used virtual desktop of the client;
In the shutdown event for listening to the virtual desktop, by shutdown event by providing the virtual of the virtual desktop
The agency service program of machine is sent to the client, so that the client is according to the shutdown event decision received
It is no to carry out linkage shutdown with the virtual desktop.
Optionally, in the present embodiment, the step of shutdown event for monitoring the virtual desktop includes:
Virtual machine process by being deployed with hook program intercepts and captures the shutdown command function of the virtual desktop;
Judge whether to listen to the pass of the virtual desktop from the shutdown command function according to the incoming parameter intercepted
Machine event.
Optionally, in the present embodiment, the virtual desktop is intercepted and captured in the virtual machine process by being deployed with hook program
Shutdown command function before, the method further includes:
Detect the virtual machine agency service program whether be upgrading after startup for the first time;
When for startup for the first time after upgrading, the hook program is deployed in the process of the virtual machine.
Optionally, in the present embodiment, described in the shutdown event for listening to the virtual desktop, shutdown event is led to
The step of agency service program of the virtual machine for providing the virtual desktop is sent to the client is crossed, including:
Start the shutdown that virtual machine process is intercepted and captured described in name conduit acceptor by the agency service program of the virtual machine
Event, and after receiving the shutdown event shutdown event is sent to the client.
The third aspect, the embodiment of the present application also provide a kind of linkage closedown method, are applied to client, the method packet
It includes:
The server is received when monitoring the shutdown event of the currently used virtual desktop of the client, the void of transmission
Quasi- desktop shutdown event;
It is tactful to detect the linkage the shutdown whether client opens between the virtual machine;
When the client has turned on the shutdown strategy of the linkage between the virtual machine, whether detection client is thin
Client;
When client is thin-client, detecting the client, currently also whether operation has other virtual desktops;
When the client is currently without other virtual desktops are run, the client is closed.
Fourth aspect, the embodiment of the present application also provide a kind of linkage shutdown system, the system comprises client and pass through
Virtual machine provides the server of virtual desktop serve for the client, the method includes:
The server, the shutdown event for monitoring the currently used virtual desktop of the client, and listening to
When the shutdown event of the virtual desktop, by shutdown event by providing the agency service program of the virtual machine of the virtual desktop
It is sent to the client;
The client, for deciding whether to link with the virtual desktop according to the shutdown event received
Shutdown.
Optionally, in the embodiment of the present application, the server is monitoring the currently used virtual desktop of the client
Shutdown event when, be specifically used for:
Virtual machine process by being deployed with hook program intercepts and captures the shutdown command function of the virtual desktop;
Judge whether to listen to the pass of the virtual desktop from the shutdown command function according to the incoming parameter intercepted
Machine event.
Optionally, in the present embodiment, the server is additionally operable to:
Whether the agency service program for detecting the virtual machine is to start for the first time;
When for startup for the first time after upgrading, the hook program is deployed in the process of the virtual machine.
Optionally, in the present embodiment, the server will shut down in the shutdown event for listening to the virtual desktop
During event is sent to the client by the agency service program of the virtual machine of the offer virtual desktop, the clothes
Business device is additionally operable to:
Start the shutdown that virtual machine process is intercepted and captured described in name conduit acceptor by the agency service program of the virtual machine
Event, and after receiving the shutdown event shutdown event is sent to the client.
Optionally, in the present embodiment, the client is specifically used for:
Receive the shutdown event of the currently used virtual desktop of the client;
It is tactful to detect the linkage the shutdown whether client opens between the virtual machine;
When the client has turned on the shutdown strategy of the linkage between the virtual machine, whether detection client is thin
Client;
When client is thin-client, detecting the client, currently also whether operation has other virtual desktops;
When the client is currently without other virtual desktops are run, the client is closed.
5th aspect, the embodiment of the present application also provide a kind of linkage shutdown unit, are applied to server, and the server is logical
It crosses virtual machine and provides virtual desktop serve for client, described device includes:
Monitor module, the shutdown event for monitoring the currently used virtual desktop of the client;
Sending module, it is in the shutdown event for listening to the virtual desktop, shutdown event is described by providing
The agency service program of the virtual machine of virtual desktop is sent to the client, so that the client is according to what is received
Shutdown event decides whether to carry out linkage shutdown with the virtual desktop.
Optionally, in the present embodiment, the monitoring module is specifically used for:
Virtual machine process by being deployed with hook program intercepts and captures shutdown command function;
Judge whether to listen to shutdown event according to the incoming parameter intercepted from the shutdown command function.
Optionally, in the present embodiment, the linkage shutdown unit further includes first detection module and deployment module;
The first detection module, whether the agency service program for detecting the virtual machine is opening for the first time after upgrading
It is dynamic;
The deployment module, for when for startup for the first time after upgrading, the hook program being deployed to described virtual
In the process of machine.
Optionally, in the present embodiment, the sending module is specifically used for:
Start the shutdown that virtual machine process is intercepted and captured described in name conduit acceptor by the agency service program of the virtual machine
Event, and after receiving the shutdown event shutdown event is sent to the client.
6th aspect, the embodiment of the present application also provide a kind of client, and the client is connect with server communication, so that
The virtual desktop serve provided by virtual machine with the server, the client include:
Receiving module, for receiving the server in the shutdown thing for monitoring the currently used virtual desktop of the client
When part, the virtual desktop shutdown event of transmission;
Whether the second detection module opens linkage between the virtual machine for detecting the client and shuts down plan
Slightly;
Third detection module, when for having turned on the shutdown strategy of the linkage between the virtual machine in the client,
Detect whether client is thin-client;
4th detection module, for when client is thin-client, detecting the client, currently also whether operation has it
Its virtual desktop;
Closedown module, for when the client is currently without other virtual desktops are run, closing the client.
7th aspect, the embodiment of the present application also provide a kind of server, including processor and are stored with computer instruction
Nonvolatile memory when computer instruction is executed by interchanger, realizes the linkage closedown method that second aspect provides.
In terms of existing technologies, the application has the advantages that:
Linkage closedown method, device and client provided by the embodiments of the present application, it is currently used to monitor the client
The shutdown event of virtual desktop;In the shutdown event for listening to the virtual desktop, by shutdown event by providing the void
The agency service program of the virtual machine of quasi- desktop is sent to the client, so that the client is according to the pass received
Machine event decides whether to carry out linkage shutdown with the virtual desktop.In the above-mentioned methods, client is according to server feedback
Shutdown event decides whether to carry out linkage shutdown, and when client needs shutdown, client can shut down according to shutdown event,
Need not individual power-off operation individually be carried out to client again, simplify operation when virtual desktop needs shutdown with client
Chain promotes the convenience of linkage shutdown system management.
Description of the drawings
It, below will be to needed in the embodiment attached in order to illustrate more clearly of the technical solution of the embodiment of the present application
Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the block diagram of linkage shutdown system provided by the embodiments of the present application;
Fig. 2 is the structure diagram of server in Fig. 1;
Fig. 3 is the flow diagram of linkage closedown method provided by the embodiments of the present application;
Fig. 4 is the sub-step flow diagram of step S410 in Fig. 3;
Fig. 5 is the sub-step flow diagram of step S430 in Fig. 3;
Fig. 6 is a kind of functional block diagram of linkage shutdown unit provided by the embodiments of the present application;
Fig. 7 is another functional block diagram of linkage shutdown unit provided by the embodiments of the present application;
Fig. 8 is the functional block diagram of client provided by the embodiments of the present application.
Specific implementation mode
To keep the purpose, technical scheme and advantage of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, technical solutions in the embodiments of the present application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.The application being usually described and illustrated herein in the accompanying drawings is implemented
The component of example can be arranged and be designed with a variety of different configurations.
Therefore, below the detailed description of the embodiments herein to providing in the accompanying drawings be not intended to limit it is claimed
Scope of the present application, but be merely representative of the selected embodiment of the application.Based on the embodiment in the application, this field is common
The every other embodiment that technical staff is obtained without creative efforts belongs to the model of the application protection
It encloses.
It should be noted that:Similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined, then it further need not be defined and explained in subsequent attached drawing in a attached drawing.
In the description of the present application, it is also necessary to which explanation is unless specifically defined or limited otherwise, term " first ",
" second " etc. is only used for distinguishing description, is not understood to indicate or imply relative importance.For the ordinary skill of this field
For personnel, the concrete meaning of term in this application can be understood as the case may be.
In the prior art, it is thin with client when needing virtual desktop (for example, cloud desktop) all to shut down with client
For client, thin-client refers to the unrelated function of major part of getting rid of PC, for example, CD-ROM, floppy drive, expansion slot etc.,
And the terminal device of virtual desktop is delivered to user by network connection and server communication.Thin-client is hidden upon actuation appoints
Business column and shielding harness hot key, user can only be operated in the application environment of thin-client.User matches to server ip address
It is the virtual desktop that thin-client provides by inputting username and password to may log into the server after the completion of setting.Herein
It carries out virtual desktop under kind of scene to shut down with client, user logs on to after virtual desktop shuts down, and can be withdrawn into Thin clients
The application environment at end, it is still necessary to continue that the shutdown of thin-client could be completed in thin-client progress power-off operation, this is extended
The operational chain entirely to shut down and inconvenient management platform management.
To solve the above-mentioned problems, the prior art provides the following two kinds scheme to realize the linkage of virtual desktop and client
Shutdown.
The first scheme notifies client after receiving VM_ENDSESSION message using the window writing routine in virtual desktop
Mode, control client close.
Second scheme reads system closedown daily record, keyword in parsing shutdown daily record (such as " close power supply ", " weight
It is new to start "), notify client to close when being resolved to corresponding keyword.
However, applicants have found that, in the first scheme, on the one hand, VM_ENDSESSION message is indistinguishable
Shutdown event and reboot event can not obtain determining shutdown information according to VM_ENDSESSION message.On the other hand, VM_
ENDSESSION message is received by window writing routine, and window reception program must can just generate after logging in system by user, i.e., and
A kind of scheme must be likely to realize linkage shutdown in the case of logging in system by user.
In second scheme, on the one hand, its different corresponding shutdown of OS Type or the keyword restarted may
It is incompatible, determining shutdown information can not be obtained according to parsing shutdown daily record.On the other hand, because the operating system of server writes pass
Opportunity of machine daily record is uncertain, and operating system writes what opportunity of shutdown daily record may exit than virtual desktop agency service program
In evening time, this can cause to monitor the failure of shutdown event, cannot achieve linkage shutdown.
In order to overcome above-mentioned defect existing in the prior art, applicant to provide solution by the following examples by research
Certainly scheme.
Fig. 1 is please referred to, Fig. 1 is the block diagram of linkage shutdown system provided by the embodiments of the present application.Linkage shutdown system
System 1 includes client 10 and server 30, and client 10 is communicated by network 20 with server 30.The server 30 can wrap
At least one virtual machine 31 is included, the virtual machine 31 can be that the client 10 provides virtual desktop serve.It is appreciated that
It is that in the present embodiment, the linkage shutdown system 1 also can also include for authorizing and dividing for the user of login client 10
Virtual desktop management platform (not shown) with the virtual machine 31.
Client 10 may be, but not limited to, smart mobile phone, PC (English:Personal computer, letter
Claim:PC), tablet computer, personal digital assistant (English:Personal digital assistant, referred to as:PDA), in movement
Net equipment (English:Mobile Internet device, referred to as:MID) etc..Client 10 is provided virtual by server 30
Desktop carries out business processing, and business procession is completed by server 30, therefore, in the present embodiment, the hardware of client 10
Configuration can be less than common client.
Fig. 2 is please referred to, Fig. 2 is the structural schematic diagram of server 30 provided by the embodiments of the present application.Server 30 includes connection
Dynamic shutdown unit 100, memory 310 and processor 320.
Memory 310 and processor 320 can be directly or indirectly electrically connected between each other, to realize the transmission of data
Or interaction.Linkage shutdown unit 100 can be deposited including at least one in the form of software (software) or firmware (firmware)
The computer program or software function module of storage in memory 310, processor 320 is for executing storage in memory 310
Executable module, such as storage linkage shutdown unit 100 in memory 310.
It should be appreciated that server 30 can also include than more or fewer components shown in Fig. 2, it is possible to have with Fig. 2
Shown entirely different configuration, the present embodiment are without limitation.Component shown in Fig. 2 can pass through software, hardware or its group
It closes and realizes.Accordingly, server 30 can also pass through hardware and/or software realization.
Fig. 3 is please referred to, Fig. 3 is the linkage shutdown side provided by the embodiments of the present application applied to the shutdown system 1 that links in Fig. 1
Method.Each step of linkage closedown method provided in this embodiment is illustrated in detail below.
Step S410, server 30 monitor the unused time of the currently used virtual desktop of client.
Fig. 4 is please referred to, in the present embodiment, step S410 may include sub-step S411 and sub-step S412.
Sub-step S411, the virtual machine process by being deployed with hook program intercept and capture the shutdown command letter of the virtual desktop
Number.
In the present embodiment, hook program is injected into os starting in the process of virtual machine, when virtual table
When shutdown event or reboot event occur for face, the shutdown event can be intercepted and captured or restart by being injected with the virtual machine process of hook program
Event.
Before sub-step S411, the method further includes the steps that deployment hook program, step in virtual machine process
Suddenly it specifically includes:
First, whether server 30 detects the agency service program of the virtual machine 31 and starts for the first time;
Then, when for startup for the first time after upgrading, the hook program is deployed in the process of the virtual machine 31.
The detailed process for disposing hook program is specific as follows:
Upon actuation, the agency service program in virtual machine 31 follows startup to virtual desktop as service routine, after startup
Server 30 judge this start whether be the agency service program startup for the first time, wherein for the first time start include upgrade after
Startup for the first time after starting for the first time and initially installing.By taking the startup for the first time after upgrading as an example, server 30 is according to generation in registration table
Reason service routine upgrading label judge this startup whether be the agency service program startup for the first time.
If it is the startup for the first time of agency service program, by under installation directory hook program (Hook.dll and
Hook64.dll) copy to system path (such as:32-bit operating system can be C:\Windows\System32;64 bit manipulations
System can be C:Windows System32 and C:\Windows\SysWOW64).And by the path of hook dynamic link library
Be written to registration table (such as:32-bit operating system can be HKEY_LOCAL_MACHINE SOFTWARE Microsoft
\WindowsNT\CurrentVersion\Windows;64 bit manipulation systems can be HKEY_LOCAL_
MACHINE SOFTWARE Microsoft WindowsNT CurrentVersi on Windows and HKEY_LOCAL_
MACHINE\SOFTWARE\Wow6432Node
\Microsoft\WindowsNT\CurrentVersion\Windows).By copying hook program to system
Path, and the deployment that hook program can be realized in registration table is written into hook program dynamic link library path.In next operation
After system starts, hook program can be injected into virtual machine process by operating system program according to the hook program path in registration table
In, to intercept the shutdown event and reboot event of virtual desktop by being injected with the virtual machine process of hook program.Specifically, exist
In the present embodiment, the virtual machine process of hook program is deployed with by intercepting and capturing shutdown command function acquisition shutdown event and restarting thing
Part.
When agency service program is non-initial start, agency service program can start name pipeline, and be managed as name
Road Server monitors shutdown event.
Pipeline also known as " name pipeline " (Named Pipes) are named, is a kind of simple inter-process communication mechanisms.Name pipe
Road can between the different processes of same computer or across a network different computers different processes between into
Reliable, one-way or bi-directional data of going communicate.
Sub-step 412 judges whether to listen to the virtual table according to the incoming parameter intercepted from shutdown command function
The shutdown event in face.
Shutdown command function may include ExitWindowsEx () function and InitiateShutdown () function,
In, ExitWindowsEx () function is used for exiting, restart or nullifying system.InitiateShutdown () function is for specifying
The computer of startup is shut down and is restarted.In the present embodiment, can by intercept ExitWindowsEx () function and
One of InitiateShutdown () function, which obtains, is passed to parameter.By taking ExitWindowsEx () function as an example, in WIN7
In 32 operating system, it is passed to parameter 29 and indicates that shutdown, the incoming expression of parameter 2 are restarted.By intercepting and capturing in shutdown command function
Incoming parameter may determine that the current corresponding event type of virtual desktop.
After server 30 listens to the shutdown event of virtual desktop, S420 is entered step.
Shutdown event is sent to by step S420 by providing the agency service program of the virtual machine 31 of the virtual desktop
The client 10.
If the event for listening to virtual desktop is reboot event, returns to operating system and restarted.If listening to void
The event of quasi- desktop is shutdown event, then virtual machine process creates name pipeline, and as name pipeline Client.Virtual machine into
Journey is by naming pipeline to send shutdown event notice to the agency service program of virtual machine 31.
After the agency service program of virtual machine 31 receives shutdown event, shutdown event is sent to client 10.
Step S430, client 10 decide whether to carry out linkage shutdown with virtual desktop according to the shutdown event received.
In the present embodiment, by taking client 10 is thin-client as an example, Fig. 5 is please referred to, step S430 includes following sub-step:
Sub-step S431 receives the shutdown event of the currently used virtual desktop of client.
Whether sub-step S432, detection client 10 open the shutdown strategy of the linkage between virtual machine.
Client 10 first checks for the visitor that virtual desktop management platform issues after receiving virtual desktop shutdown event
Whether the linkage shutdown strategy between family end 10 and virtual machine 31 is opened.In the present embodiment, virtual desktop management platform can be with
Between client 10 and virtual machine 31 linkage shutdown strategy be pre-configured with, virtual machine 31 agency service program to
After client 10 sends shutdown event, virtual desktop management platform will send the connection of the virtual machine 31 and client 10 of shutdown event
Dynamic shutdown strategy is sent to client 10.
Detect that client 10 has turned on the linkage between virtual machine 31 and closes according to linkage shutdown strategy in client 10
When machine strategy, into sub-step S433, otherwise terminate flow.
Sub-step S433, whether detection client 10 is thin-client.
When it is thin-client to detect client 10, S434 is entered step, flow is otherwise terminated.
Sub-step S434, whether also detect the current operation of the client 10 has other virtual desktops.
On the backstage for detecting the client 10 currently without other virtual desktops are run, then enter sub-step S435, otherwise
Terminate flow.
Sub-step S435 closes client 10.
It is that linkage shutdown is carried out under thin-client situation that above-mentioned steps S430 gives client 10 by way of example
Embodiment, it is to be understood that in other embodiments of the present embodiment, client 10 can also use other manner into
Row linkage shutdown, for example, client 10 is directly shut down after receiving shutdown event;Or client 10 is receiving shutdown
Event, and without shutting down after running other virtual desktops on detecting client 10;Also or, client 10 is receiving
Shutdown event, and shut down detecting that client 10 has turned on when the linkage between virtual machine 31 shuts down tactful.
Method provided in this embodiment, the virtual machine process by being deployed with hook carry out the shutdown event of virtual desktop
It monitors, when listening to shutdown event, shutdown event is fed back into client 10 and is decided whether by client 10 and virtual desktop
Carry out linkage shutdown.Pass through during the virtual machine process for being deployed with hook monitors the shutdown event of virtual desktop
The event type of virtual desktop can accurately be determined by intercepting and capturing the incoming parameter of shutdown command function, prevent event type identification wrong
Accidentally.This method does not need user's login and linkage shutdown can be realized independent of window writing routine simultaneously.The above method can pass through
The virtual machine process for being deployed with hook accurately monitors the shutdown event of the currently used virtual desktop of the client, and will shutdown
Event feeds back to client 10, realizes that client 10 and the linkage of virtual desktop are shut down, simplifies virtual desktop and client 10
Operational chain when shutdown is needed, the convenience of linkage shutdown system management is promoted.
The embodiment of the present application also provides a kind of linkage shutdown system, is referred to Fig. 1, unlike above example,
This linkage shutdown system 1 is client 10 and server in the angle introducing system for form system with client 10 and server 30
30 functions of being realized in the shutdown process that links.It is understood that client in the linkage shutdown system 1 next to be described
10 functions of being realized with server 30 have had been described in the specific steps of above example, below only to the shutdown system that links
1 is briefly described.
Server 30, the shutdown event for monitoring the currently used virtual desktop of client 10, and it is described listening to
When the shutdown event of virtual desktop, shutdown event is sent by providing the agency service program of the virtual machine of the virtual desktop
To client 10.
In the present embodiment, optionally, when monitoring the shutdown event of the currently used virtual desktop of client 10, service
Device 30 is specifically used for:
Virtual machine process by being deployed with hook program intercepts and captures the shutdown command function of the virtual desktop;
Judge whether to listen to the pass of the virtual desktop from the shutdown command function according to the incoming parameter intercepted
Machine event.
In the shutdown event for listening to the virtual desktop, by shutdown event by providing the virtual of the virtual desktop
During the agency service program of machine is sent to the client, the server 30 is additionally operable to:
Start the shutdown that virtual machine process is intercepted and captured described in name conduit acceptor by the agency service program of the virtual machine
Event, and after receiving the shutdown event shutdown event is sent to client 10.
In the present embodiment, server 30 is additionally operable to:
Whether the agency service program for detecting the virtual machine is to start for the first time;
When for startup for the first time after upgrading, the hook program is deployed in the process of the virtual machine.
Client 10, for deciding whether to carry out linkage pass with the virtual desktop according to the shutdown event received
Machine.
In the present embodiment, client 10 is specifically used for:
Receive the shutdown event of the currently used virtual desktop of client 10.
Whether detection client 10 opens the shutdown strategy of the linkage between the virtual machine.
When client 10 has turned on the shutdown strategy of the linkage between the virtual machine, whether detection client 10 is thin
Client.
When client 10 is thin-client, whether also detect the current operation of the client 10 has other virtual desktops.
When the client 10 is currently without other virtual desktops are run, the client 10 is closed.
The embodiment of the present application also provides a kind of linkage shutdown unit 100, unlike above example, this linkage shutdown
Device 100 is with server 300 for executive agent, and linkage shutdown process is described from the angle of virtual bench.It can be with
Understand, the concrete function that each function module involved in the linkage shutdown unit 100 next to be described executes is above
It is had been noted above in the specific steps of embodiment, the exhaustive of specific each function module can refer to above embodiment and retouch
It states, only linkage shutdown unit 100 is briefly described below.Fig. 6 is please referred to, linkage shutdown unit 100 includes following functions
Module.
Monitor module 110, the shutdown event for monitoring the currently used virtual desktop of the client.
In the present embodiment, module 110 is monitored to be specifically used for:
Virtual machine process by being deployed with hook program intercepts and captures shutdown command function;
Judge whether to listen to shutdown event according to the incoming parameter intercepted from shutdown command function.
Sending module 120, in the shutdown event for listening to the virtual desktop, by shutdown event by providing
The agency service program for stating the virtual machine of virtual desktop is sent to the client 10, so that the client 10 is according to receiving
The shutdown event decide whether to carry out linkage shutdown with the virtual desktop.
In the present embodiment, sending module 120 is specifically used for:
Start the shutdown event that name conduit acceptor virtual machine process is intercepted and captured by the agency service program of virtual machine 31, and
After receiving the shutdown event shutdown event is sent to the client 10.
Fig. 7 is please referred to, in the present embodiment, linkage shutdown unit 100 can also include:First detection module 130 and portion
Affix one's name to module 140.
First detection module 130, for detect the virtual machine 31 agency service program whether be upgrading after for the first time
Start;
Deployment module 140, for when for startup for the first time after upgrading, the hook program to be deployed to the virtual machine
In 31 process.
The embodiment of the present application also provides a kind of client 10, and unlike above example, client 10 is as execution
Main body is described linkage shutdown process from the angle of virtual bench.It is understood that the client next to be described
The concrete function that each function module involved in end 10 executes has been noted above in the specific steps of above example, specific each
The exhaustive of a function module can refer to above embodiment description, is only briefly described below to client 10.It please join
According to Fig. 8, client 10 includes following functions module.
Receiving module 101, for receiving server in the shutdown thing for monitoring the currently used virtual desktop of the client
When part, the virtual desktop shutdown event of transmission.
Second detection module 102, it is tactful for detecting the linkage shutdown whether client 10 opens between virtual machine 31.
Third detection module 103, for having turned on the shutdown strategy of the linkage between the virtual machine 31 in client 10
When, whether detection client 10 is thin-client.
4th detection module 104, for when client 10 is thin-client, detecting whether the client 10 currently also transports
Row has other virtual desktops.
Closedown module 105, for when the client 10 is currently without other virtual desktops are run, closing client 10.
It, can be with if above-mentioned function is realized and when sold or used as an independent product in the form of software function module
It is stored in a computer read/write memory medium.Based on this understanding, the technical solution of the application is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be expressed in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are executing each embodiment the method for the application
All or part of step.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
In conclusion linkage closedown method, device and client provided by the embodiments of the present application, first, server are monitored
The shutdown event of the currently used virtual desktop of the client;Then, in the shutdown event for listening to the virtual desktop,
Shutdown event is sent to the client;Finally, client decides whether and virtual desktop according to the shutdown event received
Carry out linkage shutdown.Pass through during the virtual machine process for being deployed with hook monitors the shutdown event of virtual desktop
The event type of virtual desktop can accurately be determined by intercepting and capturing the incoming parameter of shutdown command function, prevent event type identification wrong
Accidentally.This method does not need user's login and linkage shutdown can be realized independent of window writing routine simultaneously.The above method can pass through
The virtual machine process for being deployed with hook accurately monitors the shutdown event of the currently used virtual desktop of the client, and will shutdown
Event feeds back to client, realizes that the linkage of client and virtual desktop is shut down, simplifies virtual desktop and need to close with client
Operational chain when machine promotes the convenience of linkage shutdown system management.
The above, the only specific implementation mode of the application, but the protection domain of the application is not limited thereto, it is any
Those familiar with the art can easily think of the change or the replacement in the technical scope that the application discloses, and should all contain
It covers within the protection domain of the application.Therefore, the protection domain of the application shall be subject to the protection scope of the claim.
Claims (10)
1. a kind of linkage closedown method, which is characterized in that be applied to server, the server is for providing virtual desktop clothes
Business, the method includes:
Monitor the shutdown event of the currently used virtual desktop of the client;
In the shutdown event for listening to the virtual desktop, by shutdown event by providing the virtual machine of the virtual desktop
Agency service program is sent to the client so that the client according to the shutdown event received decide whether with
The virtual desktop carries out linkage shutdown.
2. the method as described in claim 1, which is characterized in that the step of shutdown event for monitoring the virtual desktop wraps
It includes:
Virtual machine process by being deployed with hook program intercepts and captures the shutdown command function of the virtual desktop;
Judge whether to listen to the shutdown thing of the virtual desktop from the shutdown command function according to the incoming parameter intercepted
Part.
3. method as claimed in claim 2, which is characterized in that intercept and capture institute in the virtual machine process by being deployed with hook program
Before the shutdown command function for stating virtual desktop, the method further includes:
Detect the virtual machine agency service program whether be upgrading after startup for the first time;
When for startup for the first time after upgrading, the hook program is deployed in the process of the virtual machine.
4. the method as described in claim 1, which is characterized in that it is described in the shutdown event for listening to the virtual desktop,
By shutdown event by providing the step of agency service program of the virtual machine of the virtual desktop is sent to the client, wrap
It includes:
Start the shutdown event that virtual machine process is intercepted and captured described in name conduit acceptor by the agency service program of the virtual machine,
And shutdown event is sent to the client after receiving the shutdown event.
5. a kind of linkage closedown method, which is characterized in that it is applied to client, the method includes:
The server is received when monitoring the shutdown event of the currently used virtual desktop of the client, the virtual table of transmission
Face shutdown event;
It is tactful to detect the linkage the shutdown whether client opens between the virtual machine;
When the client has turned on the shutdown strategy of the linkage between the virtual machine, whether detection client is Thin clients
End;
When client is thin-client, detecting the client, currently also whether operation has other virtual desktops;
When the client is currently without other virtual desktops are run, the client is closed.
6. a kind of linkage shutdown unit, which is characterized in that be applied to server, the server is carried by virtual machine for client
For virtual desktop serve, described device includes:
Monitor module, the shutdown event for monitoring the currently used virtual desktop of the client;
Sending module, it is in the shutdown event for listening to the virtual desktop, shutdown event is described virtual by providing
The agency service program of the virtual machine of desktop is sent to the client, so that the client is according to the shutdown received
Event decides whether to carry out linkage shutdown with the virtual desktop.
7. device as claimed in claim 6, characteristic are, the monitoring module is specifically used for:
Virtual machine process by being deployed with hook program intercepts and captures shutdown command function;
Judge whether to listen to shutdown event according to the incoming parameter intercepted from the shutdown command function.
8. device as claimed in claim 7, which is characterized in that the linkage shutdown unit further includes first detection module and portion
Affix one's name to module;
The first detection module, for detect the virtual machine agency service program whether be upgrading after startup for the first time;
The deployment module, for when for startup for the first time after upgrading, the hook program to be deployed to the virtual machine
In process.
9. device as claimed in claim 6, which is characterized in that the sending module is specifically used for:
Start the shutdown event that virtual machine process is intercepted and captured described in name conduit acceptor by the agency service program of the virtual machine,
And shutdown event is sent to the client after receiving the shutdown event.
10. a kind of client, which is characterized in that the client is connect with server communication, to use the server to pass through void
The virtual desktop serve that quasi- machine provides, the client include:
Receiving module, for receiving the server in the shutdown event for monitoring the currently used virtual desktop of the client
When, the virtual desktop shutdown event of transmission;
Second detection module, it is tactful for detecting the linkage the shutdown whether client opens between the virtual machine;
Third detection module, when for having turned on the shutdown strategy of the linkage between the virtual machine in the client, detection
Whether client is thin-client;
4th detection module, for when client is thin-client, detecting the client, currently also whether operation has other void
Quasi- desktop;
Closedown module, for when the client is currently without other virtual desktops are run, closing the client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810524131.8A CN108804147B (en) | 2018-05-28 | 2018-05-28 | Linkage shutdown method and device and client |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810524131.8A CN108804147B (en) | 2018-05-28 | 2018-05-28 | Linkage shutdown method and device and client |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108804147A true CN108804147A (en) | 2018-11-13 |
CN108804147B CN108804147B (en) | 2022-05-10 |
Family
ID=64090587
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810524131.8A Active CN108804147B (en) | 2018-05-28 | 2018-05-28 | Linkage shutdown method and device and client |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804147B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112286627A (en) * | 2020-09-25 | 2021-01-29 | 福建升腾资讯有限公司 | Virtual machine management method and system based on Ovirt and event driving |
CN114327010A (en) * | 2021-12-28 | 2022-04-12 | 杭州雾联科技有限公司 | System control method, device and medium |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101877713A (en) * | 2009-11-30 | 2010-11-03 | 英业达股份有限公司 | System for remotely operating virtual machine |
CN103618752A (en) * | 2013-12-18 | 2014-03-05 | 广东中科遥感技术有限公司 | Virtual machine remote desktop safety access system and method |
US20150006730A1 (en) * | 2013-06-27 | 2015-01-01 | Sap Ag | Enabling multi-tenant virtual servers in a cloud system |
CN105094896A (en) * | 2015-07-01 | 2015-11-25 | 北京奇虎科技有限公司 | Method, equipment and system for client side starting on virtualization platform |
CN105844148A (en) * | 2016-03-16 | 2016-08-10 | 北京金山安全软件有限公司 | Method and device for protecting operating system and electronic equipment |
CN106019957A (en) * | 2016-05-31 | 2016-10-12 | Tcl集团股份有限公司 | Intelligent terminal control method and intelligent terminal control system |
CN106203092A (en) * | 2016-06-30 | 2016-12-07 | 北京金山安全软件有限公司 | Method and device for intercepting shutdown of malicious program and electronic equipment |
CN106650410A (en) * | 2016-12-29 | 2017-05-10 | 北京奇虎科技有限公司 | Method and device for android application permission control |
CN106648937A (en) * | 2016-12-29 | 2017-05-10 | 北京奇虎科技有限公司 | Broadcast agent method and device for Android applications |
CN106657358A (en) * | 2016-12-29 | 2017-05-10 | 北京奇虎科技有限公司 | Service proxy method and device for Android applications |
US20170142134A1 (en) * | 2015-11-18 | 2017-05-18 | Red Hat, Inc. | Virtual machine malware scanning |
CN107483552A (en) * | 2017-07-24 | 2017-12-15 | 河南智业科技发展有限公司 | A kind of cloud desktop intelligent start/stop method based on cloud computing |
CN107689873A (en) * | 2016-08-05 | 2018-02-13 | 深圳市深信服电子科技有限公司 | A kind of method and device of switching on and shutting down |
CN107888430A (en) * | 2017-12-15 | 2018-04-06 | 新华三云计算技术有限公司 | Virtual Machine Manager operates synchronous method and device |
-
2018
- 2018-05-28 CN CN201810524131.8A patent/CN108804147B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101877713A (en) * | 2009-11-30 | 2010-11-03 | 英业达股份有限公司 | System for remotely operating virtual machine |
US20150006730A1 (en) * | 2013-06-27 | 2015-01-01 | Sap Ag | Enabling multi-tenant virtual servers in a cloud system |
CN103618752A (en) * | 2013-12-18 | 2014-03-05 | 广东中科遥感技术有限公司 | Virtual machine remote desktop safety access system and method |
CN105094896A (en) * | 2015-07-01 | 2015-11-25 | 北京奇虎科技有限公司 | Method, equipment and system for client side starting on virtualization platform |
US20170142134A1 (en) * | 2015-11-18 | 2017-05-18 | Red Hat, Inc. | Virtual machine malware scanning |
CN105844148A (en) * | 2016-03-16 | 2016-08-10 | 北京金山安全软件有限公司 | Method and device for protecting operating system and electronic equipment |
CN106019957A (en) * | 2016-05-31 | 2016-10-12 | Tcl集团股份有限公司 | Intelligent terminal control method and intelligent terminal control system |
CN106203092A (en) * | 2016-06-30 | 2016-12-07 | 北京金山安全软件有限公司 | Method and device for intercepting shutdown of malicious program and electronic equipment |
CN107689873A (en) * | 2016-08-05 | 2018-02-13 | 深圳市深信服电子科技有限公司 | A kind of method and device of switching on and shutting down |
CN106648937A (en) * | 2016-12-29 | 2017-05-10 | 北京奇虎科技有限公司 | Broadcast agent method and device for Android applications |
CN106657358A (en) * | 2016-12-29 | 2017-05-10 | 北京奇虎科技有限公司 | Service proxy method and device for Android applications |
CN106650410A (en) * | 2016-12-29 | 2017-05-10 | 北京奇虎科技有限公司 | Method and device for android application permission control |
CN107483552A (en) * | 2017-07-24 | 2017-12-15 | 河南智业科技发展有限公司 | A kind of cloud desktop intelligent start/stop method based on cloud computing |
CN107888430A (en) * | 2017-12-15 | 2018-04-06 | 新华三云计算技术有限公司 | Virtual Machine Manager operates synchronous method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112286627A (en) * | 2020-09-25 | 2021-01-29 | 福建升腾资讯有限公司 | Virtual machine management method and system based on Ovirt and event driving |
CN114327010A (en) * | 2021-12-28 | 2022-04-12 | 杭州雾联科技有限公司 | System control method, device and medium |
Also Published As
Publication number | Publication date |
---|---|
CN108804147B (en) | 2022-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6687817B1 (en) | Configuration of a network device via the network | |
US8683459B2 (en) | Automated virtual appliance sizing | |
US8346897B2 (en) | System and method for deploying and maintaining software applications | |
CN104113574B (en) | Safe transfer method and system of wide area network trusted virtual machine | |
US8763005B2 (en) | Virtual-machine-based application-service provision of front-end versions of back-end applications | |
WO2019184164A1 (en) | Method for automatically deploying kubernetes worker node, device, terminal apparatus, and readable storage medium | |
US8776018B2 (en) | System and method for restartable provisioning of software components | |
US20120151452A1 (en) | Remote debugging of server side code without blocking or high-level privileges | |
US20100175107A1 (en) | Secure workload partitioning in a server environment | |
CN103176775B (en) | A kind of method and apparatus realizing Web page application program localization | |
CN101821993A (en) | Method and system for handling failover in distributed environment that uses session affinity | |
CN111698283B (en) | Management and control method, device, equipment and storage medium of distributed cluster host | |
CN113626133B (en) | Virtual machine control method, device, equipment and computer readable storage medium | |
CN115629843A (en) | Cloud heterogeneous virtual digital simulation platform | |
CN108804147A (en) | Link closedown method, device and client | |
CN115766405B (en) | Fault processing method, device, equipment and storage medium | |
US8868758B2 (en) | Provider connection framework | |
Wan et al. | Design ideas of mobile internet desktop system based on virtualization technology in cloud computing | |
Vetter et al. | IBM Power Systems HMC Implementation and Usage Guide | |
CN114461352B (en) | Implementation method for managing virtual machine cluster, computer equipment and storage medium | |
CN113612756B (en) | Shared login method and device, computer readable storage medium and electronic equipment | |
CN113986358B (en) | Bare metal example installation method, device and equipment | |
US8271623B2 (en) | Performing configuration in a multimachine environment | |
Pan et al. | The design and implementation of secure cloud desktop system | |
TWI717457B (en) | Environmental isolation method and equipment |
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 |