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

适用于:Azure Stack 集成系统和 Azure Stack 开发工具包Applies to: Azure Stack integrated systems and Azure Stack Development Kit

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

Note

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

如果尚未安装存储资源管理器,请下载存储资源管理器并安装它。If you haven't installed storage explorer yet, download storage explorer and install it.

连接到 Azure Stack 订阅或存储帐户后,可以使用 Azure 存储资源管理器文章处理 Azure Stack 数据。After you connect to an Azure Stack subscription or a storage account, you can use the Azure storage explorer articles to work with your Azure Stack data.

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

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

对于 Azure Stack 开发工具包 (ASDK),需要导出 Azure Stack 颁发机构根证书。For the Azure Stack Development Kit (ASDK), you need to export the Azure Stack authority root certificate.

Note

对于 ASDK,如果要通过 VPN 连接到 ASDK,请不要使用在 VPN 设置过程中创建的根证书 (CA.cer)。For the ASDK, if you are 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 订阅。This is a DER-encoded certificate, and will not allow Storage Explorer to retrieve your Azure Stack subscriptions. 请按照以下步骤导出 Base-64 编码证书,以用于存储资源管理器。Follow the steps below to export a Base-64 encoded certificate to use with Storage Explorer.

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

导出然后导入 ASDK 的 Azure Stack 证书。Export and then import Azure Stack certificate for the ASDK. 对于集成系统,证书是公开签名的。For integrated system, the certificate is publicly signed. 因此,在设置存储资源管理器与 Azure Stack 集成系统的连接时,不需要执行此步骤。So, this step isn't necessary while setting up Storage Explorer connection to Azure Stack integrated system.

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

  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 下。Under Console Root\Certificated (Local Computer)\Trusted Root Certification Authorities\Certificates. 找到 AzureStackSelfSignedRootCertFind AzureStackSelfSignedRootCert.

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

  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. 启动存储资源管理器,如果看到“连接到 Azure 存储” 对话框,请将其取消。Start storage explorer, and if you see the Connect to Azure Storage dialog box, cancel it.

  7. 在“编辑”菜单上,指向“SSL 证书”,然后选择“导入证书”。 On the Edit menu, point to 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 API”。 After storage explorer restarts, select the Edit menu, and check to see if Target Azure Stack APIs is selected. 如果没有,请选择“目标 Azure Stack”,然后重启存储资源管理器,使更改生效。 If it isn't, select Target Azure Stack, and then restart storage explorer for the change to take effect. 此配置是必需的,否则无法与 Azure Stack 环境兼容。This configuration is required for compatibility with your Azure Stack environment.

    确保选中“目标 Azure Stack”

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

使用以下步骤将存储资源管理器连接到属于 Azure Active Directory (Azure AD) 帐户的 Azure Stack 订阅。Use the following steps to connect storage explorer to an Azure Stack 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 订阅,请选择“添加帐户” 。To connect to the Azure Stack subscription, select Add an account.

    添加 Azure Stack 帐户

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

    连接到 Azure 存储

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

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

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

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

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

Note

Azure 联合身份验证服务 (AD FS) 登录体验支持存储资源管理器 1.2.0,或装有 Azure Stack 1804 或更高更新版的更高存储资源管理器版本。The Azure Federated Service (AD FS) sign-in experience supports Storage Explorer 1.2.0 or newer versions with Azure Stack 1804 or newer update. 使用以下步骤将存储资源管理器连接到属于 AD FS 帐户的 Azure Stack 订阅。Use the following steps to connect storage explorer to an Azure Stack 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 订阅 。Select Add an account to connect to the Azure Stack 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 自定义环境的所需信息。Enter the required information of Azure Stack 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 集成系统且不知道管理终结点,请与运营商联系。If you are working on Azure Stack integrated system and don't know your management endpoint, contact your operator.

    添加帐户

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

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

    帐户管理

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

    关联的订阅列表

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

还可以使用存储帐户名称和密钥对连接到 Azure Stack 存储帐户。You can also connect to an Azure Stack 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 in are displayed.

    添加帐户

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

    添加帐户

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

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

    Azure Stack 终结点包含两个部分:区域的名称和 Azure Stack 域。An Azure Stack endpoint includes two parts: the name of a region and the Azure Stack domain. 在 Azure Stack 开发工具包中,默认终结点是 local.azurestack.externalIn the Azure Stack Development Kit, the default endpoint is local.azurestack.external. 如果不确定你的终结点,请与云管理员联系。Contact your cloud administrator 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