将存储资源管理器连接到 Azure Stack Hub 订阅或存储帐户Connect Storage Explorer to an Azure Stack Hub subscription or a storage account

本文介绍如何使用 Azure 存储资源管理器连接到 Azure Stack Hub 订阅和存储帐户。In this article, you'll learn how to connect to your Azure Stack Hub subscriptions and storage accounts using Azure Storage Explorer. 存储资源管理器是一款独立应用,可用于在 Windows、macOS 和 Linux 上轻松处理 Azure Stack Hub 存储数据。Storage Explorer is a standalone app that enables you to easily work with Azure Stack Hub storage data on Windows, macOS, and Linux.

备注

有几个工具可用于将数据移进/移出 Azure Stack Hub 存储。There are several tools available to move data to and from Azure Stack Hub storage. 有关详细信息,请参阅适用于 Azure Stack Hub 存储的数据传输工具For more information, see Data transfer tools for Azure Stack Hub storage.

如果尚未安装,请下载存储资源管理器并安装它。If not yet installed, download Storage Explorer and install it.

连接到 Azure Stack Hub 订阅或存储帐户后,可以按照 Azure 存储资源管理器文章的说明处理 Azure Stack Hub 数据。After you connect to an Azure Stack Hub subscription or storage account, you can use the Azure Storage Explorer articles to work with your Azure Stack Hub data.

为连接到 Azure Stack Hub 做准备Prepare for connecting to Azure Stack Hub

需要可以直接访问 Azure Stack Hub 或 VPN 连接,存储资源管理器才能访问 Azure Stack Hub 订阅。You need direct access to Azure Stack Hub or a VPN connection for Storage Explorer to access the Azure Stack Hub subscription. 若要了解如何设置到 Azure Stack Hub 的 VPN 连接,请参阅使用 VPN 连接到 Azure Stack HubTo learn how to set up a VPN connection to Azure Stack Hub, see Connect to Azure Stack Hub with VPN.

备注

对于 ASDK,如果要通过 VPN 连接到 ASDK,请不要使用在 VPN 设置过程中创建的根证书 (CA.cer)。For the ASDK, if you're connecting to your ASDK via VPN, don't use the root certificate (CA.cer) that was created during the VPN setup process. 这是 DER 编码的证书,不允许存储资源管理器检索 Azure Stack Hub 订阅。This is a DER-encoded certificate and it won't allow Storage Explorer to retrieve your Azure Stack Hub subscriptions. 请按照以下步骤导出 Base-64 编码证书,以用于存储资源管理器。Use the following steps to export a Base-64 encoded certificate to use with Storage Explorer.

对于断开连接的集成系统和 ASDK,建议使用内部企业证书颁发机构以 Base-64 格式导出根证书,然后将其导入 Azure 存储资源管理器。For integrated systems that are disconnected and for the ASDK, the recommendation is to use an internal enterprise Certificate Authority to export the root certificate in a Base-64 format and then import it into Azure Storage Explorer.

导出然后导入 Azure Stack Hub 证书Export and then import the Azure Stack Hub certificate

为断开连接的集成系统和 ASDK 导出然后导入 Azure Stack Hub 证书。Export and then import Azure Stack Hub certificate for disconnected integrated systems and for the ASDK. 对于已连接的集成系统,证书是公开签名的,不需要执行此步骤。For connected integrated systems, the certificate is publicly signed and this step isn't necessary.

  1. 在 Azure Stack Hub 主机或已与 Azure Stack Hub 建立 VPN 连接的本地计算机上打开 mmc.exeOpen mmc.exe on an Azure Stack Hub host machine, or a local machine with a VPN connection to Azure Stack Hub.

  2. 在“文件”中,选择“添加/删除管理单元” 。In File, select Add/Remove Snap-in. 在“可用的管理单元”中,选择“证书” 。Select Certificates in Available snap-ins.

  3. 选择“计算机帐户”,然后选择“下一步” 。Select Computer account, and then select Next. 选择“本地计算机”,然后选择“完成”。 Select Local computer, and then select Finish.

  4. Console Root\Certificated (Local Computer)\Trusted Root Certification Authorities\Certificates 下查找 AzureStackSelfSignedRootCertUnder Console Root\Certificated (Local Computer)\Trusted Root Certification Authorities\Certificates find AzureStackSelfSignedRootCert.

    通过 mmc.exe 加载 Azure Stack Hub 根证书

  5. 右键单击该证书,选择“所有任务” > “导出”,并按说明导出 Base-64 编码 X.509 (.CER) 证书。Right-click the certificate, select All Tasks > Export, and then follow the instructions to export the certificate with Base-64 encoded X.509 (.CER).

    导出的证书会在下一步使用。The exported certificate will be used in the next step.

  6. 启动存储资源管理器。Start Storage Explorer. 如果看到“连接到 Azure 存储” 对话框,请将其取消。If you see the Connect to Azure Storage dialog box, cancel it.

  7. 在“编辑”菜单上,选择“SSL 证书”,然后选择“导入证书”。 On the Edit menu, select SSL Certificates, and then select Import Certificates. 通过文件选取器对话框找到并打开在上一步导出的证书。Use the file picker dialog box to find and open the certificate that you exported in the previous step.

    导入证书后,系统会提示重新启动存储资源管理器。After importing the certificate, you're prompted to restart Storage Explorer.

    将证书导入到存储资源管理器

  8. 在存储资源管理器重启后,选择“编辑”菜单,并检查是否选择了“目标 Azure Stack Hub API”。 After Storage Explorer restarts, select the Edit menu, and check to see if Target Azure Stack Hub APIs is selected. 如果没有,请选择“目标 Azure Stack Hub”,然后重启存储资源管理器,使更改生效。 If it isn't, select Target Azure Stack Hub, and then restart Storage Explorer for the change to take effect. 此配置是必需的,否则无法与 Azure Stack Hub 环境兼容。This configuration is required for compatibility with your Azure Stack Hub environment.

    确保选中“目标 Azure Stack Hub”

使用 Azure AD 连接到 Azure Stack Hub 订阅Connect to an Azure Stack Hub subscription with Azure AD

使用以下步骤将存储资源管理器连接到属于 Azure Active Directory (Azure AD) 帐户的 Azure Stack Hub 订阅。Use the following steps to connect Storage Explorer to an Azure Stack Hub subscription, which belongs to an Azure Active Directory (Azure AD) account.

  1. 在存储资源管理器的左窗格中,选择“管理帐户” 。In the left pane of Storage Explorer, select Manage Accounts.
    此时会显示你登录的所有 Azure 订阅。All the Azure subscription that you signed in are displayed.

  2. 若要连接到 Azure Stack Hub 订阅,请选择“添加帐户” 。To connect to the Azure Stack Hub subscription, select Add an account.

    添加 Azure Stack Hub 帐户

  3. 在“连接到 Azure 存储”对话框中的“Azure 环境”下,选择“Azure 中国世纪互联”。 In the Connect to Azure Storage dialog box, under Azure environment, select Azure China 21Vianet. 选择“登录”,以便使用与至少一个活动 Azure Stack Hub 订阅关联的 Azure Stack Hub 帐户进行登录。 Select Sign in to sign in with the Azure Stack Hub account associated with at least one active Azure Stack Hub subscription.

    连接到 Azure 存储

  4. 使用 Azure Stack Hub 帐户成功登录后,左侧窗格将填充与该帐户关联的 Azure Stack Hub 订阅。After you successfully sign in with an Azure Stack Hub account, the left pane is populated with the Azure Stack Hub subscriptions associated with that account. 选择要使用的 Azure Stack Hub 订阅,并选择“应用” 。Select the Azure Stack Hub subscriptions that you want to work with, and then select Apply. (选择或清除“所有订阅” 复选框会选择所有列出的 Azure Stack Hub 订阅,或者一个都不选。)(Selecting or clearing the All subscriptions check box toggles selecting all or none of the listed Azure Stack Hub subscriptions.)

    填充“自定义云环境”对话框后,选择 Azure Stack Hub 订阅

    左侧窗格会显示与所选 Azure Stack Hub 订阅关联的存储帐户。The left pane displays the storage accounts associated with the selected Azure Stack Hub subscriptions.

    存储帐户列表,其中包括 Azure Stack Hub 订阅帐户

使用 AD FS 帐户连接到 Azure Stack Hub 订阅Connect to an Azure Stack Hub subscription with AD FS account

备注

Azure 联合身份验证服务 (AD FS) 登录体验支持存储资源管理器 1.2.0,或装有 Azure Stack Hub 1804 或更高更新版的更高存储资源管理器版本。The Azure Federated Service (AD FS) sign-in experience supports Storage Explorer 1.2.0 or newer versions with Azure Stack Hub 1804 or newer update. 使用以下步骤将存储资源管理器连接到属于 AD FS 帐户的 Azure Stack Hub 订阅。Use the following steps to connect Storage Explorer to an Azure Stack Hub subscription which belongs to an AD FS account.

  1. 选择“管理帐户”。 Select Manage Accounts. 资源管理器会列出你登录到的 Azure 订阅。The explorer lists the Azure subscriptions that you signed in to.

  2. 选择“添加帐户”以连接到 Azure Stack Hub 订阅 。Select Add an account to connect to the Azure Stack Hub subscription.

    添加帐户 - 存储资源管理器

  3. 选择“下一页”。Select Next. 在“连接到 Azure 存储”对话框中的“Azure 环境”下,选择“使用自定义环境”,然后单击“下一步”。 In the Connect to Azure Storage dialog box, under Azure environment, select Use Custom Environment, then click Next.

    连接到 Azure 存储

  4. 输入 Azure Stack Hub 自定义环境的所需信息。Enter the required information of Azure Stack Hub custom environment.

    字段Field 说明Notes
    环境名称Environment name 用户可以自定义此字段。The field can be customized by user.
    Azure 资源管理器终结点Azure Resource Manager endpoint Azure Stack 开发工具包的 Azure 资源管理器资源终结点示例。The samples of Azure Resource Manager resource endpoints of Azure Stack Development Kit.
    对于运营商: https://adminmanagement.local.azurestack.externalFor operators: https://adminmanagement.local.azurestack.external
    对于用户: https://management.local.azurestack.externalFor users: https://management.local.azurestack.external

    如果使用 Azure Stack Hub 集成系统且不知道管理终结点,请与运营商联系。If you're working on Azure Stack Hub integrated system and don't know your management endpoint, contact your operator.

    添加帐户 - 自定义环境

  5. 选择“登录”,连接到至少与一个活动 Azure Stack Hub 订阅关联的 Azure Stack Hub 帐户。 Select Sign in to connect to the Azure Stack Hub account that's associated with at least one active Azure Stack Hub subscription.

  6. 选择要使用的 Azure Stack Hub 订阅,然后选择“应用” 。Select the Azure Stack Hub subscriptions that you want to work with, then select Apply.

    帐户管理

    左侧窗格会显示与所选 Azure Stack Hub 订阅关联的存储帐户。The left pane displays the storage accounts associated with the selected Azure Stack Hub subscriptions.

    关联的订阅列表

连接到 Azure Stack Hub 存储帐户Connect to an Azure Stack Hub storage account

还可以使用存储帐户名称和密钥对连接到 Azure Stack Hub 存储帐户。You can also connect to an Azure Stack Hub storage account using storage account name and key pair.

  1. 在存储资源管理器的左窗格中,选择“管理帐户”。In the left pane of Storage Explorer, select Manage Accounts. 此时会显示你登录的所有 Azure 帐户。All the Azure accounts that you signed into are displayed.

    添加帐户 - 存储资源管理器

  2. 若要连接到 Azure Stack Hub 订阅,请选择“添加帐户” 。To connect to the Azure Stack Hub subscription, select Add an account.

    添加帐户 - 连接到 Azure 存储

  3. 在“连接到 Azure 存储”对话框中,选择“使用存储帐户名称和密钥”。 In the Connect to Azure Storage dialog box, select Use a storage account name and key.

  4. 帐户名称中输入帐户名称,并将帐户密钥粘贴到“帐户密钥” 文本框中。Input your account name in the Account name and paste the account key into the Account key text box. 然后,在存储终结点域中选择“其他(在下面输入)”并输入 Azure Stack Hub 终结点。Then, select Other (enter below) in Storage endpoints domain and input the Azure Stack Hub endpoint.

    Azure Stack Hub 终结点包含两个部分:区域的名称和 Azure Stack Hub 域。An Azure Stack Hub endpoint includes two parts: the name of a region and the Azure Stack Hub domain. 在 Azure Stack 开发工具包中,默认终结点是 local.azurestack.externalIn the Azure Stack Development Kit, the default endpoint is local.azurestack.external. 如果不确定你的终结点,请与云管理员联系。Contact your cloud admin if you're not sure about your endpoint.

    附加名称和密钥

  5. 选择“连接” 。Select Connect.

  6. 成功附加存储帐户后,会显示该存储帐户,其名称后面追加了“(外部、其他)” 字样。After the storage account is successfully attached, the storage account is displayed with (External, Other) appended to its name.

    VMWINDISK

后续步骤Next steps