N/A
Containerization in the computing context refers to a technique for packaging an application and its dependencies into a container to abstract/isolate the application from the underlying host operating system and environment. A number of containerization techniques exist.
Application 122 is an example of containerized applications that is hosted in a software container. As represented in
Application 123 is an example of a containerized application that is hosted in a hardware container. As represented in
It is becoming more common for an enterprise to use containerization solutions to run applications on computing devices that its employees may use. A primary benefit of employing containerization solutions is that it enables the applications to be deployed and launched from a cloud-based management server or other centralized repository as opposed to being installed on the computing devices in a traditional manner. As a result, the employees can launch the applications on a variety of computing devices.
Although employing a containerized environment to run applications on a computing device provides various benefits, it also introduces a number of limitations. For example, if a containerized application needs access to a peripheral, the peripheral will need to be mapped to the container in which the application in hosted. However, doing so may prevent other applications that are not hosted in the same container from accessing the peripheral. As an example, if a printer is mapped to container 132, application 122 may be able to access the printer, but application 121 and/or application 123 may not.
The present invention extends to systems, methods and computer program products for managing peripherals in a containerized environment. A peripheral can be virtualized in multiple containers to allow applications hosted in the containers to access the peripheral. Local applications may also be allowed to access the peripheral. Such access may be enabled by virtualizing handles to the peripheral. The applications' access to the peripheral may be managed in accordance with policy to thereby ensure that one application's access does not negatively impact another application's access.
In some embodiments, the present invention is implemented as a method for managing peripherals in a containerized environment. It can be detected that a first application is attempting to access a peripheral. A first virtualized handle can be provided to the first application by which the first application accesses the peripheral. It can also be detected that a second application is attempting to access the peripheral. A second virtualized handle can be provided to the second application by which the second application accesses the peripheral.
In some embodiments, the present invention is implemented as a method for managing peripherals in a containerized environment. It can be determined that a first application hosted in a first container should have access to a peripheral. The peripheral can be virtualized in the first container. It can be determined that a second application hosted in a second container should have access to the peripheral. The peripheral can be virtualized in the second container.
In some embodiments, the present invention may be implemented as computer storage media storing computer executable instructions which when executed implement a method for managing peripherals in a containerized environment. The method may include: determining that a first application hosted in a first container should have access to a peripheral; providing a first virtualized handle by which the first application accesses the peripheral; determining that a second application hosted in a second container should have access to the peripheral; and providing a second virtualized handle by which the second application accesses the peripheral.
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter.
Understanding that these drawings depict only typical embodiments of the invention and are not therefore to be considered limiting of its scope, the invention will be described and explained with additional specificity and detail through the use of the accompanying drawings in which:
In this specification and the claims, the term “containerized environment” will be used to reference a computing device on which applications may be run in containers, including hardware containers and software containers. A containerized environment may include a single type of container or multiple types of containers. The containerized environment could exist on an end user computing device or on a server computing device (e.g., when the containerized applications are accessed by the end user via a virtual desktop infrastructure).
Various drivers may be loaded on computing device 200 to provide access to a peripheral. For example, a bus driver 203 may support access to peripherals connected to a common bus. Additionally, a peripheral-specific function driver 205 may be loaded above bus driver 203 thereby creating a device stack for the peripheral. Although a single function driver 205 is shown, there may be multiple function drivers 205 loaded on computing device 200 corresponding to the peripherals that are connected to computing device 200. As is known, user mode components can interface with function driver 205 to access the corresponding peripheral.
In scenarios where one or more hardware containers 215 may be created on computing device 200, a virtualizer 204a can be employed on the host operating system in conjunction with a virtualizer 204b in the hardware container 215 to virtualize a peripheral within hardware container 215. More particularly, virtualizers 204a and 204b can cause a virtual peripheral to be accessible within hardware container 215 and can route communications targeting the virtual peripheral to the actual peripheral. Virtualizers 204a and 204b can employ any suitable virtualization technique to accomplish this (e.g., USB redirection, driver mapping, etc.). Similar to what is shown in
In accordance with embodiments of the present invention, a peripheral management driver 206 can be loaded above any function driver 205 in the host operating system environment and above virtualizer 204b in any hardware container 215. For example, peripheral management driver 206 could be in the form of an upper filter driver that is loaded on the device stack of any peripheral that embodiments of the present invention may manage. Because peripheral management driver 206 is loaded above function driver 205 and virtualizer 204b (which may include a function driver for the virtualized device) respectively, it will receive any I/O requests issued by user-mode components that target the corresponding peripheral. These sources of I/O requests can include containerized applications (e.g., application 213 and application 216) and local applications 207.
A container service 208 may also be loaded on computing device 200 and may represent any components that manage containers on computing device 200. As one example only, container service 208 could represent the Docker daemon and its corresponding CLI and API. A management service 209 may be employed to interface with container service 208 for the purpose of detecting when a container is started or stopped on computing device 200. Management service 209 may also interface with the host operating system to detect when a peripheral is connected to (or enumerated on) computing device 200.
A policy database 210 may be maintained on computing device 200 for storing policies defining how access to peripherals in a containerized environment should be managed. Policy database 210 can represent any type of storage mechanism for maintain or providing access to such policies. In some embodiments, policy database 210 may exist on a server rather than on computing device 200. In any case, policy database 210 may preferably be managed centrally to thereby allow an administrator to define and distribute policies. These policies may be specific to computing device 200 or specific to a particular user or may be applicable to some other category or grouping of computing devices and/or users. As described in detail below, management service 209 may obtain applicable policies from policy database 210 as part of managing how a particular application may access peripherals.
When a software container 211 is created to host an application 213 that relies on libraries/layers 214, a container service 212 can be included within software container 211. Container service 212 can interface with libraries/layers 214 and management service 209 to enable application 213 to access a peripheral. Similarly, when a hardware container 215 is created to host an application 216 that relies on libraries/layers 217, container service 212 can be included within hardware container 215. When run in a hardware container, container service 212 can interface with peripheral access manager 206 and management service 209 to enable application 216 to access a peripheral.
Management service 209 can be configured to detect when a container is started (i.e., when a containerized application is launched on computing device 200) and, in response, can perform various functionality to enable the containerized application to access peripherals in accordance with applicable polices. Likewise, management service 209 can be configured to detect when a peripheral is connected to computing device 200 and can cause the peripheral to be accessible to a containerized application in accordance with applicable policies. U.S. patent application Ser. No. 17/165,036, which is incorporated by reference, describes examples of how management service 209 may be configured to perform such functionality.
In accordance with embodiments of the present invention, management service 209 can be configured to enable a peripheral to be accessed by applications that are hosted in different containers and by local applications. In other words, management service 209 can enable a peripheral to be accessed regardless of how an application may be hosted on a computing device. Additionally or alternatively, in some embodiments, management service 209 can be configured to manage peripherals in a containerized environment. For example, management service 209 can enable arbitration, prioritization, quality of service (QoS), etc. when containerized applications access a peripheral.
In step 2, it is assumed that a peripheral 201a, which may be integrated into computing device 200 or manually connected, is being enumerated. As a result of this enumeration process, function driver 205 is loaded to enable peripheral 201a to be accessed. Notably, although
Turning to
The application information that management service 209 obtains can include an application's name (e.g., MS Word) and an identifier that represents the application on computing device 200. For example, when the application is a local application, the identifier may be the application's process ID. When the application is hosted in a software container, the identifier may be the process ID of the container. When the application is hosted in a hardware container, the identifier may be the VMCS ID of the hardware container.
In the depicted example, policy 301 identifies MS Word, Zoom and Chrome. It is assumed that MS Word is configured to be hosted in a software container, Zoom is configured to be hosted in a hardware container and Chrome is configured to run locally. Policy 301 dictates that MS Word should have access to smartcards and flash drives. Policy 301 also dictates that MS Word's access to flash drives should be read/write and that a quality of service of 0.1 Mbps should be provided. Policy 301 further assigns a medium trust level to MS Word. Similar configurations/settings are defined for Zoom and Chrome. Policy 301 is provided as an example only and any suitable information could be included within a policy.
Returning to
In conjunction with the above-described functionality, management service 209 can also determine which peripherals a containerized application should be able to access and can enable such access. In some embodiments, management service 209 could employ the techniques of U.S. patent application Ser. No. 17/165,036 for this purpose. Of primary relevance to embodiments of the present invention, management service 209 could enable a peripheral to be simultaneously accessed by multiple containerized applications and/or simultaneously accessed by one or more local applications and one or more containerized applications.
In step 1a, based on policy, management service 209 can determine which applications should be allowed to access peripheral 201a, and particularly, which containerized applications should have access. In this example, it can be assumed that application 207 is Chrome, application 213 is MS Word, peripheral 201a is smart card or a flash drive and policy 301 is used. Accordingly, management service 209 can determine that both applications 207 and 213 should be allowed to access peripheral 201a. In step 1b, management service 209 can cause peripheral 201a to be accessible in accordance with policy 301 which may include interfacing with container service 212 to cause peripheral 201a to be virtualized in software container 211 (and in any other container in which an application that should have access is running). As described in U.S. patent application Ser. No. 17/165,036, management service 209 can interface with container service 212 in any software container to implement this virtualization. In any hardware container, virtualization may be accomplished via virtualizers 204a and 204b.
In some embodiments, such as when peripheral 201a is shareable (e.g., a printer), this virtualization of peripheral 201a in software container 211 (and any other container) can enable application 213 and application 207 (and any application in another container in which peripheral 201a is virtualized) to simultaneously access peripheral 201a. For example, as described in U.S. patent application Ser. No. 17/165,036, management service 209 can implement separate channels by which applications in software containers can access peripheral 201a while local applications retain their ability to access peripheral 201a in a typical manner and applications in hardware containers obtain access through virtualizers 204a and 204b.
In accordance with one or more embodiments of the present invention, management service 209 may be configured to virtualize handles to peripheral 201a. In some embodiments, virtualizing handles can enable multiple applications to simultaneously have exclusive access to peripheral 201a. For example, multiple containerized applications may simultaneously be granted exclusive access to a smart card.
In some embodiments, peripheral management driver 206 may manage the virtualization of handles so that it may virtualize handles for containerized and local applications. In instances where a containerized application is running in a hardware container, the instance of peripheral management driver 206 running in the hardware container may manage the virtualization of handles for that application while the instance of peripheral management driver 206 running locally can handle virtualization of handles for applications running in software containers and possibly for local applications. Accordingly, different techniques could be employed to cause multiple applications running in software containers, hardware containers and/or locally to use virtualized handles. Therefore, although
Turning to
To enable applications 207, 213 and 216 to access peripheral 201a with their virtualized handles, in step 3, peripheral management driver 206 (or possibly management service 209) can be configured to inspect I/O requests targeting peripheral 201a and replace the virtualized handle with the actual handle and to inspect responses to the I/O requests to replace the actual handle with the virtualized handle. Virtualized handle mappings 550 can be used for this purpose.
As shown, application 207 and application 213 can both be allowed to access peripheral 201a in accordance with embodiments of the present invention. In some embodiments, one or both of applications 207 and 203 could receive virtualized handles as described above. However, virtualization of handles need not be performed. In any case, as applications 207 and 213 submit I/O requests targeting peripheral 201a, peripheral management driver 206 can receive such I/O requests and analyze them against configurations 401. For example, peripheral management driver 206 could determine whether application 207 is attempting a write request and, if so, can block it. Similarly, peripheral management driver 206 could queue the I/O requests from applications 207 and 213 to ensure that their respective QoS (or that of any other application that may be accessing peripheral 201a) can be met. In cases where application 216 may also be accessing peripheral 201a, the instances of peripheral management driver 206 can communicate (e.g., via management service 209) to coordinate such efforts.
By managing I/O requests in accordance with policy, peripheral management driver 206 can ensure that an application running in one container does not compromise an application running in another container. For example, by applying the QoS defined in a policy, peripheral management driver 206 can ensure that an application running in a container does not exhaust a flash drive's resources to thereby prevent another application, including another containerized application, from accessing the flash drive.
In some embodiments, policy 301 may define a priority for applications. In such cases, management service 209 may employ the defined priorities to selectively virtualize or remove a peripheral from a container. For example, if a peripheral is virtualized to a first container to enable a first application to access it and then a second application with a higher priority is launched in a second container, management service 209 may remove the virtualized peripheral from the first container and virtualize it in the second container.
In some embodiments, the peripheral information in policy 301 could be created or updated, including dynamically at runtime, using a machine learning solution. For example, the machine learning solution could consider a trust level of containers and/or applications, a trust level of the computing device, location information, peripheral type, battery, etc. to predict the most efficient or effective configurations to be used.
In summary, embodiments of the present invention facilitate virtualizing a peripheral in multiple containers and/or allowing the peripheral to be accessible to multiple applications that are hosted in different manners. This access can be provided by virtualizing handles to the peripheral. The applications' I/O requests can be managed to ensure that policy is enforced.
Embodiments of the present invention may comprise or utilize special purpose or general-purpose computers including computer hardware, such as, for example, one or more processors and system memory. Embodiments within the scope of the present invention also include physical and other computer-readable media for carrying or storing computer-executable instructions and/or data structures. Such computer-readable media can be any available media that can be accessed by a general purpose or special purpose computer system.
Computer-readable media are categorized into two disjoint categories: computer storage media and transmission media. Computer storage media (devices) include RAM, ROM, EEPROM, CD-ROM, solid state drives (“SSDs”) (e.g., based on RAM), Flash memory, phase-change memory (“PCM”), other types of memory, other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other similar storage medium which can be used to store desired program code means in the form of computer-executable instructions or data structures and which can be accessed by a general purpose or special purpose computer. Transmission media include signals and carrier waves. Because computer storage media and transmission media are disjoint categories, computer storage media does not include signals or carrier waves.
Computer-executable instructions comprise, for example, instructions and data which, when executed by a processor, cause a general-purpose computer, special purpose computer, or special purpose processing device to perform a certain function or group of functions. The computer executable instructions may be, for example, binaries, intermediate format instructions such as assembly language or P-Code, or even source code.
Those skilled in the art will appreciate that the invention may be practiced in network computing environments with many types of computer system configurations, including, personal computers, desktop computers, laptop computers, message processors, hand-held devices, multi-processor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, mobile telephones, PDAs, tablets, smart watches, pagers, routers, switches, and the like.
The invention may also be practiced in distributed system environments where local and remote computer systems, which are linked (either by hardwired data links, wireless data links, or by a combination of hardwired and wireless data links) through a network, both perform tasks. In a distributed system environment, program modules may be located in both local and remote memory storage devices. An example of a distributed system environment is a cloud of networked servers or server resources. Accordingly, the present invention can be hosted in a cloud environment.
The present invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is, therefore, indicated by the appended claims rather than by the foregoing description.