• UID63
  • Fans5
  • Follows1
  • Posts59

How to Test Cloud Server-part 2

More Posted time:Dec 11, 2015 16:50 PM
How to Test Cloud Server-Part 2

by Mr. Tian Jiu, from AliCloud

view part 1 of this article, pls click: How to Test Cloud Server-Part I

5  5-Minute Course for Perfkit for AliCloud

5.1  Environment Preparation

5.1.1   Preparing an AliCloud Account:

5.1.2   Installing Python 2.7 and pip on the Testing Server
a)  Installing Python 2.7 and pip
If you are running on Windows, get the latest version of Python 2.7 here. This should have pip bundled with it. Make sure your PATH environment variable is set so that you can use both python and pip on the command line (you can have the installer do it for you if you select the correct option).
Most Linux distributions and recent Mac OS X version already have Python 2.7 installed. If Python is not installed, you can likely install
it using your distribution's package manager, or see the
Python Download page. If you need to install pip, see these instructions.

b)   Installing python development tools:
   Debian or Ubuntu:
         $ sudo apt-get install -y python-dev
          $ sudo yum install python-devel

5.1.3   Installing aliyuncli Tools and ECS python sdk
    Install aliyuncli:
          $ sudo pip install aliyuncli
    Install python ecs SDK:
          $ sudo pip install aliyun-python-sdk-ecs
    Check whether the tool is successfully installed:
          $ aliyuncli ecs help
    If there is a usage prompt but no esc help, you need to run:
         $sudo cp -r/usr/local/lib/python2.7/dist-packages/aliyun*/usr/lib/python2.7/dist-packages/

5.1.4   Configuring Aliyuncli Authentication
You can create a new Access Key or use an existing Access Key for authentication of aliyuncli.  The detailed steps are as follows:

>  Sign in with your AliCloud account.
>  Click "AccessKeys" in the upper right corner.
>  If you haven't created any Accesskeys, please click "Create Access Key", copy "Access Key ID" and "Access Key Secret" and store them at a safe place. If you already have AccessKeys, just copy it.
>  Use the Access Key ID and Access Key Secret for configuration:
     $ aliyuncli configure

5.1.5   Downloading PerfkitBenchmarker Source Code
Github address:
$ git clone

5.2  Starting the Testing
> First, you need to know the testing environment. Please visit the official AliCloud Website, and click [Management Console]->[ECS]->[Create Instance]->[Pay As You Go], as shown in the following figure:

To query the region, run the command: aliyuncli ecs DescribeRegions. Jot down your [RegionId].
To query the zone, run the command:aliyuncli ecs DescribeZones --RegionId [RegionId]
Jot down your ZoneId.

>  For example, to test the network by using ping and mesh_network, and test I/O performance of SSD cloud disk by using fio, run the following command:
$ ./
--cloud=AliCloud --benchmarks=ping,mesh_network,fio --zone=us-west-1b
--ali_user_name=ubuntu --machine_type=ecs.s2.large --ali_io_optimized=optimized
--ali_system_disk_type=cloud_efficiency --scratch_disk_type=remote_ssd
$ ./
--cloud=AliCloud --benchmarks=ping,mesh_network,fio --zone=us-west-1b
--ali_io_optimized=optimized --ali_system_disk_type=cloud_efficiency

> To get help, run the following command:
$ ./ --help

Important Tips:

> ali_user_name (default ubuntu)
     The root account is not recommended as some benchmark tools require additional settings for the root account.
> ali_system_disk_type:
    General cloud disk (default):cloud
    Efficient cloud disk:cloud_efficiency
    SSD cloud disk:cloud_ssd
    Local SSD:ephemeral_ssd
>  scratch_disk_type:
    General cloud disk (default):standard
    SSD cloud disk:remote_ssd
    Efficient cloud disk:piops
    local SSD:  ephemeral_ssd
5.3   FAQs
In case of any problem, you can check ERROR information in the log. The following lists some common problems:

5.3.1   Problems related to aliyuncli
For details, go to Documentation Center aliyuncli.

5.3.2   Failed to apply for an instance
Cause 1: Incorrect parameter setting:
The console will display the help information
Cause 2: Instances are insufficient, purchase in the region is limited, or the inventory is not open to api.
    "Message": "The specified
region is in resource control, please try later.",
Cause 3: The instance cannot be created:
    "Message": "The resource is
out of usage.",
    "HostId": "",

5.3.3   Failed to apply for a VPC
Cause 1: Insufficient vpc quota
    "Message": "VPC quota
Please ensure that there is at least one available VPC quota.
Cause 2: VPCs are not supported in the zone.
ERROR   Got exception running Create: 'VpcId'
Set --ali_use_vpc=False

5.3.4   Insufficient account balance
Please chec your account balance
[Cloudy edited the post at Dec 15, 2015 14:28 PM]

  • UID1040
  • Fans0
  • Follows0
  • Posts3
1st Reply#
Posted time:Dec 28, 2016 4:37 AM
AliCloud - Perfect test
Hello Mr. Tian,

We tried your documentation for Alicloud/Perfkit but it didn't work.

We would like to connect to you and discuss about the error. Could you please suggest us the best way to contact you?

Team RBCPhileas.

Forum Moderator
Forum Moderator
  • UID105
  • Fans3
  • Follows0
  • Posts210
2nd Reply#
Posted time:Dec 28, 2016 12:25 PM
1. You can use the pip list to check the aliyuncli version:
bash-3.2# pip list
alicloudcli (1.0.1)
aliyun-python-sdk-cdn (2.2.8)
aliyun-python-sdk-core (2.1.2)
aliyun-python-sdk-ecs (2.1.1)

2. About the Error, you can check it in the console, if you can select in the console, you also can create in the aliyuncli,  if you can not select  parameter in the console , you also can not create ECS with the console , aliyuncli only used for create ECS  with "pay as you go"  type

3. Waht is your uid or account?

4. Example

 aliyuncli ecs CreateInstance --RegionId cn-shanghai --ImageId m-117fzr2j1 --InstanceType ecs.n1.3xlarge --SecurityGroupId sg-11ufwp5m4 --InstanceName SHA-CDH-MGMT01 --HostName SHA-CDH-MGMT01 --Password "*****" --IoOptimized optimized --SystemDisk.Category cloud_efficiency --VSwitchId vsw-jphhvqoq1 --InstanceChargeType PostPaid