Changing the Remote Admin Port
Aug 14, 2017
Remote Admin is an AppDNA agent that runs within the virtual machine during Install Capture. Remote Admin is automatically installed within the virtual machine when you install the Citrix AppDNA VM Configuration MSI. The MSI configures Remote Admin to start automatically when the virtual machine powers up and to listen for connections from the AppDNA client on port 54593.
The port can be changed by launching RemoteAdmin.exe from the command line in the virtual machine and including the following parameter:
Where port is the new port.
This needs to be done each time Remote Admin is launched. What this means in practice depends on the state of the virtual machine to which Install Capture reverts the virtual machine at the start of each Install Capture. This state is determined by the state of the virtual machine when you create the snapshot that Install Capture uses. To help you understand how this works, some background information follows.
For each Install Capture, AppDNA does the following:
- Connects with the virtual machine provider and reverts the virtual machine to the snapshot specified in the virtual machine configuration. The state of the virtual machine when the snapshot was taken controls the state to which AppDNA reverts the virtual machine.
- Uses Remote Admin to run the capture tasks within the virtual machine.
- Suspends the virtual machine (or shuts it down or leaves it running). (Suspension is the default action. To change this, use the VM Cleanup Action option in the Virtual Machine Configuration Dialog Box.)
How Remote Admin is launched depends on the state of the virtual machine when AppDNA reverts to it in step 1:
- Running – If the guest OS is running and the user logged on, Remote Admin is already running and it is not launched again.
- Powered off – If the virtual machine is powered off, once the virtual machine powers on Remote Admin is started up using the command stored in the following registry key in the virtual machine: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
Therefore how you configure Remote Admin to use a different port depends on the state of the virtual machine when the Install Capture snapshot is taken. Step-by-step instructions are provided below for each option.
How you create a snapshot depends on the virtualization technology you are using. However, for all of the technologies, the final step in the Virtual Machine Configuration Wizard provides options to create a snapshot in either a suspended or powered off state. You can therefore perform the following steps in the virtual machine as you work through the wizard.
To change the Remote Admin port for a suspended state snapshot
Follow these instructions before you suspend the virtual machine and create the snapshot to which Install Capture will revert the virtual machine.
On the virtual machine open the Windows Task Manager.
On the Applications tab in Task Manager, click RemoteAdmin and then click End Task.
Open a command prompt and type the following:
pre codeblock "location\RemoteAdmin.exe" -tcp_port=port
Where location is the location of RemoteAdmin.exe. By default this is C:\Program Files\Citrix\AppDNA\VM Configuration on a 32-bit virtual machine (C:\Program Files (x86)\Citrix\AppDNA\VM Configuration on a 64-bit virtual machine) and port is the new port number.
This starts Remote Admin and configures it to use the new port number. You can now suspend the virtual machine and create the snapshot.
To change the Remote Admin port for a powered off state snapshot
Follow these instructions before you power off the virtual machine and create the snapshot to which Install Capture will revert the virtual machine.
On the virtual machine, click Start > Run.
Type Regedit, and then click OK.
In the Registry Editor, browse to the following location:
pre codeblock HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
In the right pane, double-click RemoteAdmin.exe.
In the Edit String dialog box, add the following after the existing value:
pre codeblock -tcp_port=port
Where port is the new port number. (Ensure there is a space before -tcp_port.)
Click OK and then close the Registry Editor.
This configures the virtual machine to use the new port number when Remote Admin starts up. You can now power off the virtual machine and create the snapshot.