• The Basic Mechanics of a Publishing Refresh with App-V

    With App-V we have something called “Full Infrastructure”, this is used to refer to an App-V Management Server based method of delivery for App-V packages.

    App-V 4.x

    In App-V 4.x we had the App-V Management Server role which was responsible for not only managing the packages but also servicing client requests to refresh and publish App-V applications. This meant the Management Server bore the brunt of every single publishing refresh request from every client whether the client was local or in a branch location.

    App-V 5.0

    In App-V 5.0 the roles of management and publishing have been separated out. We have a Management Server which is responsible for managing our packages. We also have a Publishing Server which as the name suggests is responsible for handling refresh requests from client machines.

    Separating out these roles has pushed App-V Full Infrastructure towards a more scalable hub and spoke model:

    How does it work?

    The way it works is very simple, let’s start from the beginning.

    Management Server

    Our Management Server is essentially a web service, every time a new package is added, a subsequent record in the database is created alongwith an increment to a sequence number. Our Management Server also keeps a local .xml file containing all the information around what apps are available and to who they are published.

    Every time we change what is available to our users or computers in the Management Console this file will get updated with the latest information alongwith a reference to the new sequence number.

    Publishing Server

    Our Publishing Server which is also a web based role utilising http gets registered with our Management Server in the console:

     

    This is all you need to do to connect a spoke to the hub! Now our Publishing Server will be able to poll into our Management Server at set intervals. This interval is set to 10 minutes by default (set in seconds) and can be influenced in registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Server\PublishingService

    Our Publishing Server will then periodically retrieve the .xml hosted by the Management Server when the sequence number is newer than what it already has. It too, like the Management Server stores the .xml file locally, it has a raw file which is a container to onboard new changes and an active .xml which the changes get committed to when possible.

     

    Client

    The final piece of the puzzle is the client. Once a Publishing Server has been registered with the client the next refresh will trigger a communication into the publishing server, again via http. The publishing server will return a filtered view of the .xml file it holds and publish the relevant packages. You can see a user based filtered view of this file by simply hitting the publishing server URL from a web browser:

    The client refresh itself is handled via scheduled tasks:

    Again depending on whether we are using global or user based refresh, these tasks will run accordingly by running a .vbs script which will trigger the process.

    So that explains the basic mechanics of a publishing refresh in App-V 5.0, it really is simple!

    Thamim Karim

  • TechNet Radio: (Part 3) Building Your Hybrid Cloud - Networking Enhancements in Windows Server 2012 R2

    Back for Part 3 of the “Building a Hybrid Cloud” series, Keith Mayer and Matt Hester demo the latest networking enhancements made in Windows Server 2012 R2 . [ 1:36 ] Series Review [ 10:11 ] What specifically has been enhanced to make Networking better in Windows Server 2012 R2? [ 20:22 ] DEMO : Dynamic Load Balancing across NIC teams – How is it implemented now in R2? [ 31:52 ] DEMO : Virtual RSS – do I have to do anything special to enable for VMs? [ 35:45 ] DEMO : Virtual Switch – Extended ACL ...read more
  • TechNet Radio: (Part 1) Hyper-V from a VMware Admin’s Perspective - Managing Virtual Machine Hardware Resources

    Keith Mayer welcomes Andy Syrewicze , a Virtual Systems Administrator from Trivalent Group to the show as they kick off a multi-part series that examines Microsoft Hyper-V from a VMware Admin’s perspective. In this episode they’ll showcase the differences between managing virtual machine hardware resources between the two. [ 3:10 ] As an experienced VMware Admin, what’s some of the top capabilities that you look for in an enterprise-grade hypervisor [ 4:55 ] Does VMware support Hot operations across ...read more
  • The Issues of Sequencing .bat Shortcuts in App-V 5.0

    It not unusual that in the mix of all your weird and wonderful applications you will have a handful that will leverage a .bat file shortcut to kick off your application. Let’s deep dive into the mechanics of sequencing and delivering these type of applications.

    Take this example where I have sequenced an application and a .bat file which I then have a shortcut to in the start menu as shown here:

    The interesting part is when we deliver this application to the client we see the shortcut string transformed from what we see above to this:

    %ALLUSERSPROFILE%\Microsoft\AppV\Client\Integration\5B9A87F2-AE71-46B1-9C21-33AC3EF63EE0\Root\mybatch.bat  /appvve:5B9A87F2-AE71-46B1-9C21-33AC3EF63EE0_8DC3E0FE-5BE2-40B0-9ACE-248ADB34FA9A

    The key part is in bold, the App-V client tries to make sure this .bat loads into the virtual environment by adding a switch against it specifying the package GUID and version GUID parameters. In this case, this doesn’t work as the parameter doesn’t like being passed against the .bat FTA.

    Hence our application actually fails to see the virtualised location, not only that the virtual environment doesn’t even load and the application doesn’t show as in use in the client GUI.

    In a real world scenario this could be a Java based application for example that is launched via a .bat, as the .bat doesn’t spin up the virtual environment, it will fail to find its Java components and error.

    The Workaround

    To get around this issue we need to make sure we explicitly call the actual application rather than the FTA, in this case cmd.exe.

    We use a /c on the cmd.exe so that it executes the entire command specified and then stops. When we deliver this application to our client our shortcut looks like this:

    C:\Windows\System32\cmd.exe /c %ALLUSERSPROFILE%\Microsoft\AppV\Client\Integration\5B9A87F2-AE71-46B1-9C21-33AC3EF63EE0\Root\mybatch.bat  /appvve:5B9A87F2-AE71-46B1-9C21-33AC3EF63EE0_8DC3E0FE-5BE2-40B0-9ACE-248ADB34FA9A

    Now what will happen on launch is we will call the local cmd.exe process and pass it the parameter of our .bat while loading it into the virtual environment specified by the /appvve switch.

    This means the .bat has access to the virtual environment, shows as in use on the client GUI and can run successfully.

    So to summarise, if you have similar apps in your environment and they fail because they cannot see the virtual environment, specify the parent .exe explicitly and let the App-V client handle the load of the virtual environment.

    Thamim Karim

  • TechNet Radio: (Part 2) Building Your Hybrid Cloud - Hyper-V Enhancements in Windows Server 2012 R2

    Keith Mayer and Matt Hester are back for part 2 of their Building a Hybrid Cloud series and in today’s episode they showcase the latest Hyper-V enhancements made in Windows Server 2012 R2 . [ 1:36 ] Series Review and Windows Server 2012 Scalability [ 8:17 ] With all of these scalability features already built into Windows Server 2012, what could possibly be so “new and improved” in the R2 release? Is R2 a major release or just a Service Pack? [ 14:55 ] DEMO : Hyper-V Manager managing Gen 1 and Gen ...read more