1. Technical Field
The disclosure generally relates to a method and a system for managing windows in a virtual environment.
2. Description of Related Art
A virtualization technique in which a plurality of virtual machines are installed on a physical computer makes each of the virtual machines run an arbitrary operating system (OS) and arbitrary software applications. A typical virtual system can operate multiple virtual machine (VM) guests by installing a VM host with a host OS for operating the VM guests. Each of the VM guests may include a guest OS and one or more software applications that are installed and executable in the VM Guest. The VM host may provide a host window displayed as a guest screen for each VM guest. The VM guest may run multiple software applications in the host window. One software application may form a guest window displayed in the host window to play as a user interface (UI) for the software application. However, since there is only a single host window for a single VM guest, and when the virtual system instantiates more than one VM guest and each VM guest runs a great number of software applications and creates a great number of guest windows for these software applications, switching to a particular running application in a particular VM guest becomes inconvenient for a user. Therefore, there is room for improvement within the art.
Many aspects of the embodiments can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the embodiments. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
In general, the word “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
The computer system 100 can operate one or more virtual machine (VM) guests 1301, 1302 . . . 130N, collectively designated by a reference numeral 130, by installing a VM host 120 with a host operating system (OS) 122 for operating the VM guests 130. Each of the VM guests 130 may include a guest OS and one or more software applications. For example, the VM guest 1301 includes a guest OS 132 and an application 134 that is installed and executable in the VM guest 1301.
The VM host 120 may control the hardware platform 110, present to the VM guest 130 virtualized hardware resources, and manage the execution of the VM guests 130 and any of them. Multiple instances of the VM guests 130 may share the virtualized hardware resources and each of them may execute programs like a physical machine.
The VM host 120 may provide a host window displayed as a guest screen for each of the VM guests 130. Each of the VM guests may run multiple software applications in the corresponding host window. One software application may form a guest window displayed in the host window to play as a user interface for itself.
In
The computer system 100 may assign a unique Internet protocol (IP) address for each of the VM guests 130 manually or automatically. The computer system may create an Address Resolution Protocol (ARP) table that stores and maintains all the IP addresses of the VM guests 130. The ARP table may further store a VM ID or a MAC address corresponding to the unique IP address for each VM guest. The VM ID is an identification key to identify a unique VM guest. The MAC address is assigned by the VM host 120 when the corresponding VM guest is created. Each of the VM guests 130 has a unique MAC address which can be recognized in a local area network (LAN) or a wide area network (WAN) such as the Internet. The IP address of a VM guest can be acquired from the ARP table according to either the VM ID or the MAC address of the VM guest.
The VM host 120 may establish a connection channel based on a transmission control protocol (TCP) between the VM host 120 and each of the VM guests 30. For example, when a connection channel is established between the VM host 120 and the VM guest 1301, the VM host 120 and the VM guest 1301 can communicate with each other.
When any guest window of a VM guest becomes inactive, the VM guest may capture a snapshot of the inactive guest window and transmit the snapshot and corresponding information about the inactive guest window to the VM host 120 via the connection channel. The corresponding information about the inactive guest window may include the window name, the window position, and the window size, and information as to the application running in the inactive guest window.
The VM host 120 may create a host window in its host screen and display the snapshot received from the VM guest in the host window. The VM host 120 may correlate the host window to the corresponding information about the inactive guest window.
In
The VM guest 1301 may continually capture snapshots of the inactive guest windows at predetermined intervals such as 10 seconds while the guest windows are inactive, and send the captured snapshots to the VM host 120. The VM host 120 may update the snapshots presented in the corresponding host windows accordingly.
When a user selects one of the host windows 330 and 340, the VM host 120 may send an activation request for activating a guest window, which is correlated to the selected host window, to the VM gust 1301 via the connection channel. In response to the activation request, the VM guest 1301 can activate the corresponding guest window.
With reference to
With reference to
In step S601, the VM guest 1301 captures a snapshot of a guest window when the guest window becomes inactive, and transmits the snapshot and corresponding information about the inactive guest window to the VM host 120 via the connection channel.
In step S602, the VM host 120 creates a target host window and displays the target host window in the host screen 200.
In step S603, the VM host 120 presents the snapshot in the target host window and correlates the target host window with the corresponding information about the inactive guest window.
In step S604, the VM host 120 detects that the target host window has been selected.
In step S605, the VM host 120 sends an activation request for activating the inactive guest window, which is correlated to the selected target host window, to the VM gust 1301 via the connection channel.
In step S606, the VM gust 1301 activates the inactive guest window.
In step S607, the VM host 120 destroys the target host window.
Although numerous characteristics and advantages have been set forth in the foregoing description of the embodiments, together with details of the structures and functions of the embodiments, the disclosure is illustrative only and changes may be made in detail, especially in the matters of shape, size, and arrangement of parts within the principles of the disclosure to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.
Depending on the embodiment, certain steps or methods described may be removed, others may be added, and the sequence of steps may be altered. It is also to be understood that the description and the claims drawn for or in relation to a method may include some indication in reference to certain steps. However, any indication used is only to be viewed for identification purposes and not as a suggestion as to an order for the steps.
Number | Date | Country | Kind |
---|---|---|---|
100101322 | Jan 2011 | TW | national |