Connection to Azure Local
Create and manage connections and resources describes the wizards that create a connection. The following information covers details specific to Azure Local environments.
Create a host connection
You can create a host connection using:
Use Studio
-
In Studio UI, navigate to the Hosting node and create a fresh new hosting connection using Microsoft® Azure™ Arc as the connection type.
-
Enter connection details following the guidance in the wizard. If you use an existing SPN, make sure that the SPN has been granted the contributor role of the subscription.
-
Browse the cluster through Region > Resource Group.
-
Complete the settings on the following pages.
Use PowerShell
Header of the script
Make sure that you provide the correct parameter values defined in the header of the script.
$azureSubscription = "" # Azure Subscription ID
$azureTenantId = "" # Azure AD Tenant ID
$appClientId = "" # Client ID of an Azure AD application which is grant with sufficient permissions
$appClientSecret = "" # Client secret of above client ID
$appClientSecretExpirationDateTimestamp = "" # Client secret expiration date in epoch timestamp format
$region = "" # Azure region of your Azure Local cluster
$resourceGroupName = "" # Azure resource group of your Azure Local cluster
$zoneUid = "" # Zone UID of your resource location
$hostingConnectionName = "" # Name of the created hosting connection
Create a host connection
asnp Citrix.Host.Admin.V2
[SecureString]$appClientSecretSecureString = $appClientSecret | ConvertTo-SecureString -AsPlainText -Force
$conn = New-Item -ConnectionType "Custom" -CustomProperties "<CustomProperties xmlns=`"http://schemas.citrix.com/2014/xd/machinecreation`" xmlns:xsi=`"http://www.w3.org/2001/XMLSchema-instance`"><Property xsi:type=`"StringProperty`" Name=`"SubscriptionId`" Value=`"$azureSubscription`" /><Property xsi:type=`"StringProperty`" Name=`"ManagementEndpoint`" Value=`"https://management.azure.com/`" /><Property xsi:type=`"StringProperty`" Name=`"AuthenticationAuthority`" Value=`"https://login.microsoftonline.com/`" /><Property xsi:type=`"StringProperty`" Name=`"TenantId`" Value=`"$azureTenantId`" /></CustomProperties>" -HypervisorAddress @("https://management.azure.com/") -Path @("XDHyp:\Connections\$hostingConnectionName") -Persist -PluginId "AzureArcFactory" -Scope @() -SecurePassword $appClientSecretSecureString -UserName $appClientId -ZoneUid $zoneUid
New-BrokerHypervisorConnection -HypHypervisorConnectionUid $conn.HypervisorConnectionUid
Set-HypHypervisorConnectionMetadata -HypervisorConnectionUid $conn.HypervisorConnectionUid -Name Citrix_Orchestration_Hypervisor_Secret_Allow_Edit -Value true
Set-HypHypervisorConnectionMetadata -HypervisorConnectionUid $conn.HypervisorConnectionUid -Name Citrix_Orchestration_Hypervisor_Secret_Expiration_Date -Value $appClientSecretExpirationDateTimestamp
Where to go next
-
For creating an Azure Local machine catalog, see Create an Azure Local machine catalog.