連線至 Azure Stack HubConnect to Azure Stack Hub

若要管理資源,您必須連線到「Azure Stack 開發套件」。To manage resources, you must connect to the Azure Stack Development Kit. 此文將詳細說明連線到開發套件所需的步驟。This article details the steps required to connect to the development kit. 您可以使用下列其中一個連線選項:You can use either of the following connection options:

  • 遠端桌面:可讓單一並行使用者從開發套件快速連線。Remote Desktop: lets a single concurrent user quickly connect from the development kit.
  • 虛擬私人網路 (VPN):可讓多個並行使用者從 Azure Stack Hub 基礎結構外部的用戶端連線 (需要設定)。Virtual Private Network (VPN): lets multiple concurrent users connect from clients outside of the Azure Stack Hub infrastructure (requires configuration).

使用遠端桌面來連線到 Azure Stack HubConnect to Azure Stack Hub with Remote Desktop

使用遠端桌面連線時,單一並行使用者可以使用入口網站來管理資源。With a Remote Desktop Connection, a single concurrent user can work with the portal to manage resources.

  1. 開啟一個「遠端桌面連線」並連線到開發套件。Open a Remote Desktop Connection and connect to the development kit. 輸入 AzureStack\AzureStackAdmin 作為使用者名稱,並輸入您在 Azure Stack Hub 設定期間所提供的系統管理密碼。Enter AzureStack\AzureStackAdmin as the username, and the administrative password that you provided during Azure Stack Hub setup.

  2. 從開發套件電腦開啟 [伺服器管理員],按一下 [本機伺服器]、關閉 [Internet Explorer 增強式安全性],然後關閉 [伺服器管理員]。From the development kit computer, open Server Manager, click Local Server, turn off Internet Explorer Enhanced Security, and then close Server Manager.

  3. 若要開啟入口網站,請移至 https://portal.local.azurestack.external/,並使用使用者認證來登入。To open the portal, go to https://portal.local.azurestack.external/ and sign in using user credentials.

使用 VPN 來連線到 Azure Stack HubConnect to Azure Stack Hub with VPN

您可以建立一個連線至「Azure Stack 開發套件」的分割通道 VPN 連線。You can establish a split tunnel VPN connection to an Azure Stack Development Kit. 透過 VPN 連線,您可以存取系統管理員入口網站、使用者入口網站及安裝在本機的工具 (例如 Visual Studio 和 PowerShell),以管理 Azure Stack Hub 資源。Through the VPN connection you can access the administrator portal, user portal, and locally installed tools such as Visual Studio and PowerShell to manage Azure Stack Hub resources. Azure Active Directory (Azure AD) 和 Active Directory 同盟服務 (AD FS) 型部署都支援 VPN 連線。VPN connectivity is supported in both Azure Active Directory (Azure AD) and Active Directory Federation Services (AD FS)-based deployments. VPN 連線可讓多個用戶端同時連線到 Azure Stack Hub。VPN connections let multiple clients connect to Azure Stack Hub at the same time.

注意

此 VPN 連線無法連線到 Azure Stack Hub 基礎結構 VM。This VPN connection doesn't provide connectivity to Azure Stack Hub infrastructure VMs.

必要條件Prerequisites

設定 VPN 連線Configure VPN connectivity

若要建立連至開發套件的 VPN 連線,請從您的本機 Windows 型電腦開啟已提高權限的 PowerShell 工作階段,然後執行下列指令碼 (請務必針對您的環境更新 IP 位址和密碼值):To create a VPN connection to the development kit, open an elevated PowerShell session from your local Windows-based computer and run the following script (make sure to update the IP address and password values for your environment):

# Configure winrm if it's not already configured
winrm quickconfig  

Set-ExecutionPolicy RemoteSigned

# Import the Connect module
Import-Module .\Connect\AzureStack.Connect.psm1 

# Add the development kit computer's host IP address & certificate authority (CA) to the list of trusted hosts. Make sure to update the IP address and password values for your environment. 

$hostIP = "<Azure Stack Hub host IP address>"

$Password = ConvertTo-SecureString `
  "<Administrator password provided when deploying Azure Stack Hub>" `
  -AsPlainText `
  -Force

Set-Item wsman:\localhost\Client\TrustedHosts `
  -Value $hostIP `
  -Concatenate

# Create a VPN connection entry for the local user
Add-AzsVpnConnection `
  -ServerAddress $hostIP `
  -Password $Password

如果設定成功,您將會在您的 VPN 連線清單中看到 azurestackIf the setup succeeds, you'll see azurestack in your list of VPN connections.

網路連線

連線至 Azure Stack HubConnect to Azure Stack Hub

請使用下列兩種方法之一來連線到 Azure Stack Hub 執行個體:Connect to the Azure Stack Hub instance by using either of the following two methods:

  • 透過使用 Connect-AzsVpn 命令:By using the Connect-AzsVpn command:

    Connect-AzsVpn `
      -Password $Password
    

    出現提示時,請信任 Azure Stack Hub 主機,然後將來自 AzureStackCertificateAuthority 的憑證安裝到您本機電腦的憑證存放區中。When prompted, trust the Azure Stack Hub host and install the certificate from AzureStackCertificateAuthority onto your local computer's certificate store. 提示可能會出現在 PowerShell 工作階段視窗後面。The prompt might appear behind the PowerShell session window.

  • 在您的本機電腦上,移至 [網路設定] > [VPN] > 選取 azurestack > [連線]。On your local computer, go to Network Settings > VPN > select azurestack > connect. 出現登入提示時,輸入使用者名稱 (AzureStack\AzureStackAdmin) 和密碼。At the sign-in prompt, enter the username (AzureStack\AzureStackAdmin) and the password.

測試 VPN 連線Test the VPN connectivity

若要測試入口網站連線,請開啟瀏覽器並移至使用者入口網站 https://portal.local.azurestack.external/,然後登入並建立資源。To test the portal connection, open a browser and go to the user portal https://portal.local.azurestack.external/, sign in, and then create resources.

後續步驟Next steps