Citrix AppDNA: Importing, Analysing and Report Generation of Applications

Here are the sequence of steps that are involved in Importing, Analysing and Report Generation of Applications using Citrix AppDNA.

  • Launch AppDNA > Click on “Import & Analyze” > Click Browse and locate your application installer via UNC path as shown below:  image  image
  • The Import Applications screen has three tabs:
    • Direct Import – Use to import applications for which you have a Windows Installer (.msi) or App-V (.sft or .appv) package. This is the quickest way to get the application DNA into the database.
    • Install Capture – Use to import applications for which you do not have a Windows installer (.msi) or App-V (.sft or .appv) package. Install Capture uses a virtual machine to capture the details of the application’s installation and configuration into an MSI which is then imported.
    • Self-Provisioning – Use to manage Self-Provisioning, which provides an alternative mechanism for capturing desktop applications for import into AppDNA. The capture takes place on a separate machine from AppDNA. This can be any type of machine (virtual, physical, or VDI). Self-Provisioning can be used to delegate the responsibility for capturing and packaging applications to end users.
  • If you are importing a .EXE application, then Clicking on Import option will prompt you to setup a “Create a Virtual Machine” as shown below:                                                     :image

CREATING A NEW VM:

  • Click on “Create a Virtual Machine” option, in the resulting Wizard, Click New which results in “Virtual Machine Configuration Wizard”image
  • image
  • image
  • image
  • image
  • If you check in your XenServer Console you’ll notice the newly created snapshot as shown below image
  • image
  • Install Citrix AppDNA VM Configuration.msi on the VM and run Test which shall succeed as shown below          :image
  • image
  • image
  • Confirm the Details provided :
    • Virtual Machine identifier: WIN2K801
    • Virtual Machine guest address: 172.25.1.166
    • RemoteAdmin communication protocol: TCP
    • RemoteAdmin TCP Port: 54593
    • Output Directory: E:\AppDNA-Output
    • image
  • image
  • Click Save to close the Wizard

IMPORTING THE APPLICATION:

Upon creation of the VM, click on Import option and follow steps as below:

  • To simplify the example, I am choosing cmd.exe as the application to be imported and analyzed.
  • Click on Browse and Select the \\localhost\c$\Windows\System32\cmd.exe as the application to be imported
  • Then Click on Import button, during the import
    • You need to logon to the VM via Console, which is needed for RemoteAdmin agent to communicate with the AppDNA to run the commands.
    • Upon completion of the Launch Command step, enter Exit 0, in cmd.exe to exit the application with success status
  • Then After Snapshot steps automatically takes places and completes importing the application.
  • You’ll find complete steps log as shown in below section

 

LOG of successful .exe application import activity:

The AppDNA Application reports “Loading Completed Successfully.” as shown below upon successfully Importing an application into AppDNA.

image

Below is the complete verbose log of the Import activity:

Working on File: \\localhost\c$\Windows\System32\cmd.exe
Starting task: VMExecutionTask at 6/6/2016 4:22:22 PM

——————-
Replaceable values are:
   AppToolsFolder: %APPDNAVMCONFIG%
   InstallPackageScript: <multiline value not written to log>
   App:InstallCommand: “\\localhost\c$\Windows\System32\cmd.exe”
   App:InstallDriveLetter:
   App:InstallWrkDir:
   App:Manufacturer:
   App:Name:
   App:Version:
   Capture:ImportInputFile: False
   Capture:InputFile: \\localhost\c$\Windows\System32\cmd.exe
   Capture:Mode: InstallCapture
   Capture:OutputDirectory: c:\AppDNA\d6883484-1aba-4c2c-bd8a-a23a058dd6ba
   Capture:OutputFile: c:\AppDNA\d6883484-1aba-4c2c-bd8a-a23a058dd6ba\cmd.exe__2016_06_06 10_52_22__i0001.msi
   LaunchParams:
   UseAutoClick: –use-autoclick
——————-

Waiting for another virtual Legacy Snapshot to complete: 4:22:22 PM
Preparing the virtual machine: 4:22:22 PM
Reverting the virtual machine: 4:22:23 PM
Starting the virtual machine: 4:22:30 PM
Launching the remote admin object on the virtual machine: 4:22:35 PM
Retrying the connection to RemoteAdmin in the VM (it may just be slow starting up).
Retrying the connection to RemoteAdmin in the VM (it may just be slow starting up).
Retrying the connection to RemoteAdmin in the VM (it may just be slow starting up).
Retrying the connection to RemoteAdmin in the VM (it may just be slow starting up).
Retrying the connection to RemoteAdmin in the VM (it may just be slow starting up).
Retrying the connection to RemoteAdmin in the VM (it may just be slow starting up).
Retrying the connection to RemoteAdmin in the VM (it may just be slow starting up).
Starting the execution profile: 4:27:38 PM
Ensuring the output folder exists: E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi: 4:27:38 PM

Launching action: Before Snapshot
Launching command: “%APPDNAVMCONFIG%\ossnapshot.exe” -cfg:”%APPDNAVMCONFIG%\cfg.xml” -out:”%WINDIR%\temp\before.snap” -diff
Working Directory:
The command returned exit code 0

Launching action: Launch Screen Capture Utility
Launching command: “%APPDNAVMCONFIG%\scrncap.exe” “c:\AppDNA\d6883484-1aba-4c2c-bd8a-a23a058dd6ba”
Working Directory:

Launching action: Launch Command
Launching command: “%APPDNAVMCONFIG%\jobwait.exe” –use-autoclick — “\\localhost\c$\Windows\System32\cmd.exe”
Working Directory:
————-Process Output——————
——————————-
The command returned exit code 0

Launching action: Write EditCommand Script
Launching command: cmd /c echo “%temp%\ossnapshot.vbs”
Working Directory:

Launching action: After Snapshot
Launching command: cscript “%temp%\ossnapshot.vbs” “*%APPDNAVMCONFIG%\ossnapshot.exe*” “-cfg:*%APPDNAVMCONFIG%\cfg.xml*” “-before:*%WINDIR%\temp\before.snap*” “-out:*%WINDIR%\temp\after.snap*” -diff “-out_msi:*c:\AppDNA\d6883484-1aba-4c2c-bd8a-a23a058dd6ba\cmd.exe__2016_06_06 10_52_22__i0001.msi*”
Working Directory:
The command returned exit code 0
Finished with the VM. Saving its state.: 4:37:00 PM
Using output file specified in import manifest: E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi\cmd.exe__2016_06_06 10_52_22__i0001.msi
Using ImportInputFile value from manifest: False

Completed task: VMExecutionTask at 6/6/2016 4:37:00 PM
Working on File: E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi\cmd.exe__2016_06_06 10_52_22__i0001.msi
Starting task: AppVToMSITask at 6/6/2016 4:37:00 PM

 

Completed task: AppVToMSITask at 6/6/2016 4:37:00 PM
Working on File: E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi\cmd.exe__2016_06_06 10_52_22__i0001.msi
Starting task: ASMSFTToMSITask at 6/6/2016 4:37:00 PM

 

Completed task: ASMSFTToMSITask at 6/6/2016 4:37:00 PM
Working on File: E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi\cmd.exe__2016_06_06 10_52_22__i0001.msi
Starting task: ASMFileSystemToMSITask at 6/6/2016 4:37:00 PM

Determined that the file E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi\cmd.exe__2016_06_06 10_52_22__i0001.msi is not to be processed by the ASMFileSystemToMSITask

Completed task: ASMFileSystemToMSITask at 6/6/2016 4:37:00 PM
Working on File: E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi\cmd.exe__2016_06_06 10_52_22__i0001.msi
Starting task: MsiDetailExtractorTask at 6/6/2016 4:37:00 PM

Retrieving the SPA configuration from the server: http://xddemo:8199/AppDNA/ASMFileAnalysis.asmx
Analysing file: E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi\cmd.exe__2016_06_06 10_52_22__i0001.msi
Extracting the files from the msi
Analysing the extracted files
Loading data to server
The load task on the server completed successfully: Completed loading file details

Completed task: MsiDetailExtractorTask at 6/6/2016 4:37:49 PM
Working on File: E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi\cmd.exe__2016_06_06 10_52_22__i0001.msi
Starting task: ASMSFTRenameTask at 6/6/2016 4:37:49 PM

Found import manifest
No SFT rename required (SFTRenameLevel < 1)

Completed task: ASMSFTRenameTask at 6/6/2016 4:37:49 PM
Working on File: E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi\cmd.exe__2016_06_06 10_52_22__i0001.msi
Starting task: ASMMsiLoaderTask at 6/6/2016 4:37:49 PM

Importing file: E:\AppDNA-Output\cmd.exe__2016_06_06 10_52_22__i0001.msi\cmd.exe__2016_06_06 10_52_22__i0001.msi
Found import manifest
The load task on the server completed successfully: Completed loading application. Id: -2146483634

Completed task: ASMMsiLoaderTask at 6/6/2016 4:38:55 PM

 

ANALYZING THE APPLICATION:

  • Select the imported cmd.exe application and Click on Analyze button
  • Select SBC Manager > XenApp Hosted /TS options and leave the default Licensing options to “Auto-unlock now” and then Click Nextimage
  • image
  • image
  • image

REPORT GENERATION:

Once you are on the AppDNA Report page, you can choose various reports among

  • Estate View,
  • Application Issues,
  • Application Actions,
  • Issues View,
  • Action View

and can have these reports exported into various of formats including Excel, PDF, MHT, Print, HTML, Word, etc.,

 

ISSUES you may Encounter:

ISSUE#1

image

Failed to connect to the RemoteAdmin agent within the VM.
Please confirm the following:
● The VM network address has been specified correctly:
    WIN2K801
● The “AppDNA VM Configuration.msi” has been installed within the VM.
● The RemoteAdmin.exe process is running within the VM
     (this should be run on login).
● The VM firewall is permitting incoming TCP connections on port 54593.
● The RemoteAdmin.exe agent is listening on port 54593 within the VM.
No connection could be made because the target machine actively refused it 172.22.1.66:54593

——- Stack Trace ——-
   at AppDNA.ASM.Common.WMIWrapper.TCPTransport..ctor(String machine_name, Int32 port, CancelCallback cancel_callback)
   at TaskManager.Tasks.VMConfigWizard.VMConnectionPage.Test(IFunctionArgs e)
   at TaskManager.Tasks.VMConfigWizard.VMConnectionPage.Test(IFunctionArgs e)
   at AppDNA.ASM.Common.Controls.TaskForm.worker_DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

FIX: Copy over “E:\Program Files (x86)\Citrix\AppDNA\Tools\Citrix AppDNA VM Configuration.msi” to the Newly created VM and install it there.

 

ISSUE#2

image

Failed to connect to the RemoteAdmin agent
Unable to connect to RemoteAdmin within the VM action timeout period

——- Stack Trace ——-
   at TaskManager.Tasks.VMExecutionTask.VMTest.ConnectRemoteAdmin(IFunctionArgs e)
   at TaskManager.Tasks.VMExecutionTask.VMTest.Test(IFunctionArgs e)
   at TaskManager.Tasks.VMExecutionTask.VMTest.Test(IFunctionArgs e)
   at AppDNA.ASM.Common.Controls.TaskForm.worker_DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

FIX: During this error, you’ll find the VM is in PAUSED state as shown below.  This happens if your VMs C: drive is low on disk space. Increase and ensure that VM is running at 60GB of disk space at minimum.

image

ISSUE#3

image

 

ISSUE#4:

image

There was a problem running the current task. Item has a lock on it: The item Application: Unknown with id -2146483634 has been locked (Generating report data) by component BOL on product instance  at 06/06/2016 11:33:58 until 06/06/2016 23:33:58.??AppDNA.ASM.Common.Exceptions.AccessDenied: Item has a lock on it: The item Application: Unknown with id -2146483634 has been locked (Generating report data) by component BOL on product instance  at 06/06/2016 11:33:58 until 06/06/2016 23:33:58.??   at AppDNA.ASM.BusinessLogic.ProcessAplications.LockApplicati

FIX: Run the AppDNA through “Run as Administrator”

 

References: