

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 解锁 Snowball Edge
<a name="unlockdevice"></a>

本节介绍如何使用 Snowball Edge 客户端解锁 Snowball Edge 设备。要使用 AWS OpsHub适用于 Snowball Edge 的图形用户界面 (GUI) 工具解锁设备，请参阅[解锁设备](https://docs.aws.amazon.com/snowball/latest/developer-guide/connect-unlock-device.html)设备。

在使用 Snowball Edge 设备传输数据或执行边缘计算任务之前，您需要解锁该设备。解锁设备时，您可以通过提供两种形式的凭证来验证您的访问权限：29 位数的解锁代码和清单文件。解锁设备后，您可以进一步配置设备、将数据移入或移出设备、设置和使用 EC2与 Amazon 兼容的实例等。

在解锁设备之前，必须将设备接通电源和网络、开机并分配 IP 地址。请参阅 [将 Snowball Edge 连接到您的本地网络](getting-started.md#getting-started-connect) 你需要以下有关 Snowball Edge 设备的信息：
+ 下载并安装 Snowball Edge 客户端 有关更多信息，请参阅 [下载并安装 Snowball Edge 客户端](using-client-commands.md#download-the-client)。
+ 从 AWS Snow 系列管理控制台获取凭证。对于一台或多台独立设备，每台 Snowball Edge 的解锁码和清单文件。对于 Snowball Edge 设备的集群，需要集群的一个解锁代码和一个清单文件。有关下载凭证的更多信息，请参阅[获取访问 Snowball Edge 的凭证](getting-started.md#get-credentials)。
+ 打开每台设备的电源，然后将其连接到您的网络。有关更多信息，请参阅 [将 Snowball Edge 连接到您的本地网络](getting-started.md#getting-started-connect)。

**使用 Snowball Edge 客户端解锁独立设备**

1. 在 AWS Snowball Edge 设备的 LCD 显示屏上的 “**连接**” 选项卡下找到 AWS Snowball Edge 设备的 IP 地址。记下该 IP 地址。

1. 使用`unlock-device`命令使用 Snowball Edge 的 IP 地址和您的凭据来验证您对 Snowball Edge 的访问权限，如下所示。

   ```
     snowballEdge unlock-device --endpoint https://{{ip-address-of-device}} --manifest-file {{/Path/to/manifest/file.bin}} --unlock-code {{29-character-unlock-code}}
   ```

   设备指明是否已成功解锁，并显示以下消息。

   ```
   Your Snowball Edge device is unlocking. You may determine the unlock state of your device using the describe-device command. Your Snowball Edge device will be available for use when it is in the UNLOCKED state.                        
   ```

   如果命令返回 `connection refused`，请参阅[解锁 Snowball Edge 疑难解锁](#troubleshooting-unlocking)。  
**Example `unlock-device` 命令的**  

   在此示例中，设备的 IP 地址为 `192.0.2.0`，清单文件名为 `JID2EXAMPLE-0c40-49a7-9f53-916aEXAMPLE81-manifest.bin`，29 个字符的解锁代码为 `12345-abcde-12345-ABCDE-12345`。

   ```
     snowballEdge unlock-device --endpoint https://192.0.2.0 --manifest-file /Downloads/JID2EXAMPLE-0c40-49a7-9f53-916aEXAMPLE81-manifest.bin /
       --unlock-code 12345-abcde-12345-ABCDE-12345
   ```

**使用 Snowball Edge 客户端解锁 Snowball Edge 设备的集群。**

1. 在每台 AWS Snowball Edge 设备的 LCD 显示屏上的**连接**选项卡下面找到集群中每台设备的 IP 地址。记下 IP 地址。

1. 使用`snowballEdge unlock-cluster`命令使用集群中其中一台 AWS Snowball Edge 设备的 IP 地址、您的凭据以及集群中所有设备的 IP 地址来验证您对设备集群的访问权限，如下所示。

   ```
   snowballEdge unlock-cluster --endpoint https://{{ip-address-of-device}} --manifest-file {{Path/to/manifest/file.bin}} --unlock-code {{29-character-unlock-code}} --device-ip-addresses {{ip-address-of-cluster-device-1}} {{ip-address-of-cluster-device-2}} {{ip-address-of-cluster-device-3}}            
   ```

   设备集群指明是否已成功解锁，并显示以下消息。

   ```
   Your Snowball Edge Cluster is unlocking. You may determine the unlock state of your cluster using the describe-cluster command. Your Snowball Edge Cluster will be available for use when your Snowball Edge devices are in the UNLOCKED state.            
   ```

   如果命令返回 `connection refused`，请参阅[解锁 Snowball Edge 疑难解锁](#troubleshooting-unlocking)。  
**Example `unlock-cluster` 命令的**  

   在这个由五台设备组成的集群示例中，集群中其中一台设备的 IP 地址为 `192.0.2.0`，清单文件名为 `JID2EXAMPLE-0c40-49a7-9f53-916aEXAMPLE81-manifest.bin`，29 个字符的解锁代码为 `12345-abcde-12345-ABCDE-12345`。

   ```
   snowballEdge unlock-cluster --endpoint https://192.0.2.0 --manifest-file /Downloads/JID2EXAMPLE-0c40-49a7-9f53-916aEXAMPLE81-manifest.bin /
   
     --unlock-code 12345-abcde-12345-ABCDE-12345 --device-ip-addresses 192.0.2.0 192.0.2.1 192.0.2.2 192.0.2.3 192.0.2.4
   ```

## 解锁 Snowball Edge 疑难解锁
<a name="troubleshooting-unlocking"></a>

如果 `unlock-device` 命令返回 `connection refused`，则可能是您输入了错误的命令语法，或者您的计算机或网络的配置可能阻止该命令传递到 Snow 设备。采取以下措施来解决问题：

1. 确保正确输入了命令。

   1. 使用设备上的 LCD 屏幕来验证命令中使用的 IP 地址是否正确。

   1. 确保命令中使用的清单文件的路径（包括文件名）正确。

   1. 使用 [AWS Snowball Edge 管理控制台](https://console.aws.amazon.com/importexport/home?region=us-west-2)验证命令中使用的解锁码是否正确。

1. 确保您使用的计算机与 Snow 设备位于同一个网络和子网。

1. 确保您使用的计算机和网络已配置为允许访问 Snow 设备。使用适用于您操作系统的 `ping` 命令来确定计算机是否可以通过网络连接到 Snow 设备。检查防病毒软件的配置、防火墙配置、虚拟专用网络（VPN）或计算机和网络的其他配置。

现在你可以开始使用 Snowball Edge 了。

**下一步：**[在 Snowball Edge 上设置本地用户](getting-started.md#setup-local-iam)