# Alibaba

# Setting up an instance

  1. Go to Alibaba Cloud Marketplace.
  2. Select the version of Genymotion Cloud corresponding to the Android version of virtual devices you wish to run. You can run Genymotion virtual devices based on Lollipop (Android 5.1), Marshmallow (Android 6.0), Nougat (Android 7.0), Oreo (Android 8.0) or Pie (Android 9.0).
  3. Click Choose your plan.
  4. Configure your virtual device:
    Alibaba Step 1
    1. In Elastic Compute Service (ECS) keep the Custom selection.

    2. In Billing Method, select Pay-As-You-Go.

    3. In Region, select your geographical area. The zone determines what computing resources are available and where your data is stored and used.

    4. In Instance type, select the specifications of your machine. You can set the number of vCPU and Memory size to shorten the following available configurations. You can also set Architecture and Category preferences. Then select the desired instance type.
      Alibaba Step 2

    5. From the Image section, select Marketplace Image.

    6. From the Storage section, select the System Disk type and size. Minimum is 40GiB. Storage space is less expensive with Ultra Cloud Disk. SSD Cloud Disk is better for random IOPS or streaming throughput with low latency. It is unnecessary to add a Data Disk, because it won't be used in the instance. Then click Next: Networking.
      Alibaba Step 3

    7. From the Networking section, select the VPC linked to your Custom Security Group (see Part 9) and refresh with the double arrow circle icon to make sure it is selected.

    8. In Network Billing Method, check Assign public IP. You don't have to change the PayByTraffic value.

    9. In Security Group, select the custom Security Group you want to use.
      The default Security Group is incomplete and won't work. If you don't already have a custom Security Group, click on Create a Security Group. In the new tab, click on Create Security Group.
      In the new window, select Web Server Linux, Enter a name in Security Group Name and enter a description in Description. In Network type select VPC, then in VPC select the available VPC and click OK. When prompted, click on Set the rules immediately, then click Add Security Group Rules. Create 3 rules containing the following information:

      Rule 1
      Protocol Type: Custom TCP
      Port Range: 51000/51100
      Authorization Type: 0.0.0.0/0
      Description: webrtc
      
      Rule 2
      Protocol Type: Custom UDP
      Port Range: 51000/51100
      Authorization Type: 0.0.0.0/0
      Description: webrtc
      
      Rule 3
      Protocol Type: Custom TCP
      Port Range: 5555/5555
      Authorization Type: 0.0.0.0/0
      Description: adb
      
    10. Then click Next: System Configurations.
      Alibaba Step 4
      In System Configurations, section Log on Credentials, select Key Pair and select one if available. If you don't have a Key Pair, click Create Key Pair and follow the instructions. Then enter an Instance Name and a Description.

    11. Then click Next: Grouping. In Grouping, you may add Tags at your convenience.
      Alibaba Step 5

    12. Then click Next: Preview.
      Alibaba Step 6

  5. In Configurations Selected you may save the selected configuration as launch template : click Save as launch template, then add a name and a description. Click Save. In Terms of Service check the ECS Service Terms, then click Create Instance.
    Alibaba Step 7
  6. In the Activated pop-up click Console.

# Accessing a virtual device from Web

  1. Once the initial setup is done, the instance automatically starts. It can take up to two minutes before the instance can be accessed through the web browser.
  2. From the management console, in Instances, select the instance you want to access.
  3. From the IP address column copy the Internet IP address and paste it to your web browser.
    A connection warning pops up:
    Certificate error
    This happens because the certificate is auto-signed. Click on Advanced and proceed to connect.
    To avoid this security warning, you must install a trusted certificate, as explained in section Installing a valid certificate.
  4. By default, the username is genymotion and the password is the Instance ID of the instance you can retrieve from column Instance ID/Name:
    Alibaba Step 8