Install Cloud Connectors from the command line
You can install the Citrix Cloud Connector™ software interactively or using silent or automated installation.
During installation, the Cloud Connector requires access to the cloud to register the Cloud Connector with your Citrix Cloud Government account, and to download and configure the Cloud Connector services and the Microsoft .NET runtimes that they need. The installation occurs with the privileges of the user who initiates the install.
Important:
Using the same installer for repeated installations over a period isn't recommended. Download a new Cloud Connector from the Resource Locations page in the Citrix Cloud™ Government console.
Requirements
The following requirements and parameters apply when you install with a service principal. To install with a registration code instead, see Install from the command line with a registration code.
To use the command-line installation with Citrix Cloud Government, you need to supply the following information:
-
The customer ID of the Citrix Cloud Government account for which you're installing the Cloud Connector. This ID appears at the top of the API access tab in Identity and access management.
-
The client ID and secret of the secure API client you want to use to install the Cloud Connector. To acquire these values, you must first create a service principal.
-
The client ID and secret ensures that your access to the Citrix Cloud API is secured appropriately. When you create a service principal, the client operates as much with administrator permissions that you have.
-
-
To install a Cloud Connector, you must use a service principal with a Full Access administrator also a full access permission.
-
The resource location ID for the resource location that you want to associate with the Cloud Connector. To retrieve this value, select the ID button located beneath the resource location name on the Resource Locations page. If you don't supply this value, Citrix Cloud Government uses the ID of the default resource location.
Create a service principal
When creating a service principal, Citrix Cloud Government generates a unique client ID and secret. You must supply these values when API calls through the command line.
-
From the Citrix Cloud Government menu, select Identity and access management and then select API access.
-
From the service principals tab, enter a name for your client and select Create Client. Citrix Cloud Government generates and displays a client ID and secret for the service principal.
-
Select Download to download the client ID and secret as a CSV file and store it in a secure location. You can also select Copy to manually acquire each value. When finished, select Close to return to the console.
Supported parameters
Make sure the security of the service principal details, a JSON configuration file must be provided to the installer. This file must be deleted after the installation has completed. Supported values for the configuration file are:
-
customerName Required. The customer ID shown on the API Access page in the Citrix Cloud Government console.
-
clientId Required. The service principal ID that an administrator can create, available on the API Access page.
-
clientSecret Required. The service principal secret that can be downloaded after the service principal is created. Available on the API Access page.
-
resourceLocationId Recommended. The unique identifier for an existing resource location. Select the ID button to retrieve the resource location ID on the Resource Locations page in the Citrix Cloud console. If no value is specified, Citrix Cloud uses the ID of the first resource location in the account.
-
acceptTermsOfService Required. Must be set to true.
A sample configuration file:
{
"customerName": "CustomerID",
"clientId": "ClientID",
"clientSecret": "ClientSecret",
"resourceLocationId": "ResourceLocationId",
"acceptTermsOfService": "true"
}
A sample command line that installs using the parameter file:
CWCConnector.exe /q /ParametersFilePath:c:\cwcconnector_install_params.json
Use Start /Wait CWCConnector.exe /ParametersFilePath:value to examine a potential error code if there's a failure. You can use the standard mechanism of running echo %ErrorLevel% after the installation completes.
Install from the command line with a registration code
-
On the machine where you want to install the Cloud Connector, open a Command Prompt as administrator.
-
Run this command:
start /wait CWCConnector.exe /q /UseKrs:true /AcceptTermsOfService:true -
The installer gets a registration code and writes it to its log file. Open the newest
CWCConnector_<date and time>.logfile in%LOCALAPPDATA%\Temp\CitrixLogs\CloudServicesSetupand find the line that starts withKRS device code:. The 8 characters after it are the registration code. -
In Citrix Cloud Government, open the Add Cloud Connector wizard for the resource location you want. Enter the code under 2. Install, select Next, and then select Add.
-
The installer continues by itself after the code is accepted. Wait for the command to finish.
If a code expires before you enter it, the installer gets a new one automatically, up to three times. Each new code is written to the same log file.
The command uses these parameters:
-
/UseKrs:true Required. Installs with a registration code.
-
/AcceptTermsOfService:true Required if your account hasn't yet accepted the latest Citrix Cloud Government terms of service.
-
/KrsTimeout:seconds Optional. How long the installer waits in total for the code to be entered. The default is 2700 (45 minutes). The maximum is 3600 (60 minutes).
Don't use
customerName, clientId or clientSecret with a registration code. The Cloud Connector registers with the Citrix Cloud Government account in which the code is entered.
If the code isn't entered in time, or the registration fails, the installer stops before it installs the Cloud Connector and returns exit code 1603.
Troubleshooting
Installation Logs
Installation logs are available at %LOCALAPPDATA%\\Temp\\CitrixLogs\\CloudServicesSetup.
Also, logs are added to %ProgramData%\\Citrix\\WorkspaceCloud\\InstallLogs after installation.
In
%LOCALAPPDATA%\Temp\CitrixLogs\CloudServicesSetup, the log file CWCConnector_<date and time>.log also records the download and installation of the Microsoft .NET runtimes. Look for lines that contain .NET 10.
Exit codes
-
1603 - An unexpected error occurred.
-
2 - A prerequisite check failed.
-
0 - Installation completed successfully.
Considerations for cloned machines
Each machine hosting the Cloud Connector must have a unique SID and connector ID so that Citrix Cloud Government can communicate reliably with the machines in your resource location. Installing the Cloud Connector on a machine template (before cloning) is not supported. If you clone a machine with the Cloud Connector installed, the Cloud Connector services don't run and the machine cannot connect to Citrix Cloud Government.
If you intend to host the Cloud Connector on multiple machines in your resource location and you want to use cloned machines, perform the following steps:
-
Prepare the machine template according to the requirements for your environment.
-
Provision the number of machines that you intend to use as Cloud Connectors.
-
Install the Cloud Connector on each machine, either manually or using the silent installation mode.