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: If you are experiencing some issues around this setting not being reflected on the client please install Hotfix 1 for App-V 5.0 SP1 Management Server as detailed here.
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.
The connection group priority feature is broken. Hopefully MS will come out with a fix.
You are right, we hope to have this fixed soon...
Thanks in part to Tim Mangan's AppV_Manage tool found here (www.tmurgent.com/.../AppV_Manage) I was able to come up with work around for the Connection Group Priority issue while Microsoft attempts to fix this. The work around involves a few more steps and at large scale I would not use it but it suffices for now.
Step 1. Download AppV_Manage and install on App-V 5.0 client
Step 2. Create the connection group(s) you need using the tool. Set the appropriate priority for the group.
Step 3. Copy the connection group XML files from the client to a central repository; optionally renaming them something that makes sense. I rename the XML files the same name that I chose for the connection group name.
Step 4. Go to each end point where clients will be logging in and add the connection group; DO NOT enable it at this point. Powershell: Add-AppvClientConnectionGroup -Path C:\pathtoXMLFile.xml
Step 5. Use a logon script or similar technology to enable the connection group for the user at logon based on their AD group membership. I am using Appsense to do this. Basically if user is in group A then enable connection group A. Powershell: Enable-AppvClientConnectiongroup -Name NameofCconnectiongroup
I still am maintaining the Default Connection group with a priority of 0 on the management server with no issue. All subsequent groups need to be managed in this way or something similar.
I would be interested to find out about any other work arounds people find.
PS. This is just one of several problems with App-V 5.0. Microsoft please fix your product!!!
Hi all, this particular issue around connection group priority has now been fixed with Hotfix 1 for App-V 5.0 SP1 Management Server - blogs.technet.com/.../hotfix-package-1-for-microsoft-application-virtualization-5-0-server-service-pack-1-now-available.aspx
In the Example mentioned above, When i launch Winrar which is there in both connection groups, will winrar able to talk to both the other apps notepad++ and thunderbird. I mean to ask, we create connection group, so that they talk to each other. so can winrar talk to both the apps here as it is part of both connection groups.
No, not in the setup above. Winrar can only open in one connection group. To achieve this you would put Winrar into a single connection group with both Thunderbird and NotePad++.
Thanks. i am trying to use connection groups using app-v 5 sp1 + hotfix(KB2873465) . i published 2 conneciton groups and assigned priority. but in publishing server page, am seeing only one conenction group and priority has not been changed. In short, changes to connection groups are not taking place.
is there a bug already there.
Hmmm the groups should publish in any instance so that might be a separate issue however the priority setting not passing through was fixed in HF 1 for the management server as here: blogs.technet.com/.../hotfix-package-1-for-microsoft-application-virtualization-5-0-server-service-pack-1-now-available.aspx
I ahev applied this HF1. still no luck...