Connection Groups are proving a really popular feature in App-V 5.0, however how do we handle the situation whereby one application is the member of more than one connection group and both are published to the same AD group?
Let’s take this following theoretical scenario with 3 apps (NotePad++, Winrar and Mozilla Thunderbird), apps that would never normally need to be in a connection group however they will do for the sake of explanation in this case:
In the above scenario WinRar is a member of two connection groups, so what happens if we publish both these two connection groups to a user and that user launches one of these applications?
Well it all depends what application we launch in terms of how this conflict is handled….
This works fine, NotePad++ launches and loads Connection Group 1 that also contains WinRar:
Notice Connection Group 1 is in use after launching NotePad++.
Same as above, when we launch Thunderbird it will go ahead and load its Connection Group 2 with WinRar:
WinRar is at the centre of this conflict because it has a foot in each connection group, therefore when we launch WinRar the App-V client doesn’t know which connection group to launch and we get the following error:
If we look this error up in Event Viewer we get a much clearer description of the issue stating
“The virtual application '\Device\HarddiskVolume1\ProgramData\App-V\FEA2DAD8-4B20-4F3E-9CC1-94023FDC5E8B\E425387E-5AD4-4279-B941-01B8691A1337\Root\WinRAR.exe' could not be launched because the App-V Client could not determine which environment to use. Provide a priority to the app connection group for the package and try again.”
To fix this conflict we need to set a priority for the connection groups as advised by the error log. Theoretically we can do this on the Management Server using PowerShell:
This command will show the current connection groups, notice the priority values for both are set to 0 as default:
Let’s now make Connection Group 2 have a lower priority by running the following command:
Set-AppvServerConnectionGroup "Connection Group 2" -Priority 1
Now this connection group has a lower priority and allow us to run WinRar. NOTE: I have experienced some issues around this setting not being reflected on the client however I have got this working in standalone mode or by manually editing the PackageGroupDescriptor.xml for the user.
This actually works just fine because we are never in the position where the client doesn’t know which connection group to launch, in this case launching NotePad++ will launch Connection Group 1 and then subsequently launching Thunderbird will in turn load Connection Group 2.
I hope this sheds some light on how Connection Group conflicts are handled in App-V 5.0
For more on Connection Groups check these links out:
Connection Groups - DSC improved for App-V 5.0
Deploying Connection Groups in Microsoft App-V v5
Connection Groups Internals (App-V 5.0)
Sequencing for Connection Groups
This will come in handy. Thanks for posting it Thamim. I'm still learning App-V but got a quick question.
Let's say Connection Group 1 is not working for whatever reason. Will WinRar automatically default to Connection Group 2 and launch from there?
Hi Parvez, If the failure is on a application level App-V has no way to detect this therefore there will be no failover. The priority is only to handle conflicts and not for failing over. Hope that helps and give us a shout if you need more info!
Hi Thamim, thanks a lot for this post. It's very interresting. But, I have two questions :
Which App-V 5.0 version have you use ?
Can you do those steps with App-V 5.0 SP1 ? (Have you tried?)
Hi Marie, this applies to all currently released versions of App-V 5.0 including SP1
Thank you for your quick answer.
I work with App-V 5.0 SP1 and even if I set the priority for each group (with PowerShell on the server), the App-V 5.0 Client doesn't see those values.
I note that the Xml generated on the server doesn't send the groups priority to the App-V Client. In the database ([AppVManagement].[PackageGroups].[Priority]), each groups have a different priority, but in the XML generated on the server, the priority of each group is "0" every time. On the Client, in PowerShell, the priority of each group is "0".
Hi, I get exactly the same! It's mentioned in the post that I have been unable to set priorities with the server. This is a known issue and you are not alone! The only current workarounds are to manually edit the descriptor.xml locally on the client or deliver the groups via standalone mode.