In version 1.1 of the Citrix Linux VDA, the Broker Agent service (ctxvda) adds a new feature that detects system power state and networking changes. This feature provides the Delivery Controller (Broker) with details on the state of the Linux VDA and in particular the ability of that VDA to accept brokered connections.
So what does this mean? When the Broker Agent service detects a change in either power state (suspend/hibernate or wake/resume), or IP address change on a network interface, the service will notify the Delivery Controller that a change has occurred. When the machine is suspended or hibernated the Broker Agent service will disconnect active sessions and deregister from the Delivery Controller. When the machine is woken from a sleep, resumes from a hibernate or the IP address changes on one of the network interfaces, the Broker Agent will re-register with the Delivery Controller.
The below table summarises the action taken by the Broker Agent service when a system power or networking state change occurs.
System State Change
Broker Agent Action
|Networking – New IP||Re-register with Delivery Controller|
|Networking – Delete IP||Re-register with Delivery Controller|
|Power – Sleep/Hibernate||Disconnect all sessions and de-register with Delivery Controller|
|Power – Wake/Resume||Register with Delivery Controller|
And how is this achieved? As you may be aware, the Linux VDA Broker Agent is a Java component, and consequently cannot subscribe to Power and Network events using only managed code. To overcome this limitation, we use a Java Native Interface (JNI) to access native system events and send these notifications up into the Java portion of the service.
For network state changes, the Broker Agent service JNI component listens for changes on the network interfaces and if an IP address is added or deleted, the Broker Agent service triggers a re-registration process with the Delivery Controller. The re-registration notifies the Delivery Controller of the new IP address to use for brokering connections to this Linux VDA.
For power state changes, the Broker Agent service is dependent upon the Power Management Utilities (pm-utils) framework in RedHat 6.x and SUSE 11.x, or systemd suspend and resume service files in RedHat 7.x and SUSE 12.x. When a power state event occurs, pm-utils or systemd triggers our custom hook, which in turn notifies the Broker Agent service JNI component of the power state event.
When the Linux VDA is about to sleep or hibernate the Broker Agent service triggers a disconnect of all sessions and de-registration from the Delivery Controller. And when the Linux VDA is woken from sleep or resumes from a hibernate the Broker Agent service triggers a registration with the Delivery Controller.
To read more from the Linux Virtual Desktop Team, please check out all our our team’s posts here.