Purchasing a Cloud Phone Server
If you want to experience more CPH functions (such as APIs) or deploy real services after learning about the CPH advantages and application scenarios, purchase a cloud phone server. Figure 1 shows how to buy a cloud phone.
Process |
Description |
---|---|
|
|
Cloud phones are automatically created by the system after you purchase a server. Parameters such as cloud phone specifications and OS can be set during the server purchase process. |
|
Use ADB to access the cloud phone with a few clicks. |
|
After accessing the cloud phone, use a tool to obtain the cloud phone screens. Airtest is recommended. |
Making Preparations
Register with Huawei Cloud and complete real-name authentication. Create a key pair for authentication. Create a key pair, which is required for authentication when you set up an SSH tunnel to access the cloud phone.
- Register with Huawei Cloud and complete real-name authentication.
- Visit https://www.huaweicloud.com/intl/en-us/ and click Register.
- Complete the registration as prompted.For details, see Registering with Huawei Cloud.
After the registration, the system automatically redirects you to your personal information page.
- Complete individual or enterprise real-name authentication. For details, see Individual Real-Name Authentication or Enterprise Real-Name Authentication.
- Create a key pair.
If you plan to purchase servers in multiple regions, create a key pair in each region. For more information about regions, see Regions and AZs. The following describes how to create a key pair in the CN-Hong Kong region.
- Log in to the management console.
- Under Computing, select Elastic Cloud Server.
- In the navigation pane on the left, choose Key Pair.
- On the right side of the page, click Create Key Pair.
- Enter the key pair name and click OK.
An automatically allocated key pair name consists of KeyPair- and a 4-character random number. Change it to an easy-to-remember one, for example, KeyPair-xxxx_cph.
Figure 2 Create Key Pair
- Download the private key pair file. The file name is the specified key pair name with a suffix of .pem. Store the private key file in a secure path. In the displayed Information dialog box, click OK.
The private key file can be downloaded only once, so keep it secure. When purchasing a server, select the key pair. When establishing an SSH tunnel to the cloud phone, provide the complete path for storing the private key.
Purchasing a Cloud Phone Server
Purchase a cloud phone server. The system automatically creates cloud phones on the server.
- In the upper left corner of the CPH console, select the closest region to your location to reduce likelihood of latency issues.
- In the navigation pane on the left, choose Servers. In the upper right corner, click Buy Server.
- In the Configure Basic Settings step, select the server type, instance specifications, and phone image based on the site requirements, and click Next: Configure Network.
Not all parameters are covered here. For details about all the parameters, see Buying a Cloud Phone (with Detailed Parameter Description).
In the Instance Specifications area, Quantity indicates the number of cloud phones that can be virtualized from a server. For example, if Quantity is set to 15, 15 cloud phones can be virtualized from the server.
- In the Configure Network step, retain the default value Dedicated for Bandwidth Type and click Next: Configure Advanced Settings.
Figure 3 Configure Network
- In the Configure Advanced Settings step, select the key pair created in Making Preparations and set the user-defined network and application port as required.
Figure 4 Advanced Settings
- Key Pair: used for authentication when you establish an SSH tunnel to the cloud phone.
If no key pair has been created, you can click Create Key Pair to create a key pair.
- User-defined Network: To customize the network segment where the server is located, select User-defined Network for Advanced Settings, and enter the VPC subnet and the CIDR block.
- Application Port: By default, only the ADB port is accessible on the Internet. Configure a maximum of five additional ports to be accessible on the Internet.
- Key Pair: used for authentication when you establish an SSH tunnel to the cloud phone.
- Click Next: Confirm. After confirming the configuration, set the required duration and quantity, select I have read and agree to the OBT Trial Use Agreement, and click Buy Now.
- Wait until the server is created successfully.
Accessing a Cloud Phone
You can use ADB to quickly access your cloud phone on the CPH console.
- On the Instances page, locate the target cloud phone, and choose More > Access Through ADB in the Operation column.
The right pane is displayed.
Figure 5 Access Through ADB
- Specify the following parameters:
- Key File Path: Enter the local path for storing the private key file of the server, for example, C:\Users\Administrator\Downloads\KeyPair-a49c.pem.
- platform-tools: Click Download ADB and decompress the tool package to the selected directory, for example, C:\Users\Administrator\Downloads\platform-tools.
- Local Available Port: Enter a local idle port.
Run the netstat -an command to check whether the port is idle.
As shown in the following figure, port 6667 is occupied (displayed as Listening) by another program, and port 1234 is idle.
After you set the three parameters, the command is automatically filled in the blank area in the lower part of the right panel. You only need to perform operations as prompted to access the cloud phone.
For details about the parameters in the command for establishing an SSH tunnel, see ADB (Internet).
For details about how to troubleshoot SSH tunnel establishment faults, visit the following websites:
- What Can I Do If the SSH Tunnel Fails to Be Established When I Access the Cloud Phone over the Public Network?
- What Can I Do If Message "too open" Is Displayed When I Am Establishing the SSH Tunnel?
- What Can I Do If Message "Permission denied" Is Displayed When I Am Establishing the SSH Tunnel?
- What Can I Do If Message "no match mac found" Is Displayed When I Am Establishing the SSH Tunnel?
- How Do I Keep an SSH Session Uninterrupted?
For details about how to troubleshoot the ADB connection faults, visit the following websites:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot