huawei...2017/11/20  · 13. set ecs name. the name can be customized but must comply with the...

245
Elastic Cloud Server User Guide Issue 07 Date 2018-07-30 HUAWEI TECHNOLOGIES CO., LTD.

Upload: others

Post on 30-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Elastic Cloud Server

User Guide

Issue 07

Date 2018-07-30

HUAWEI TECHNOLOGIES CO., LTD.

Page 2: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Copyright © Huawei Technologies Co., Ltd. 2018. All rights reserved.No part of this document may be reproduced or transmitted in any form or by any means without prior writtenconsent of Huawei Technologies Co., Ltd. Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.All other trademarks and trade names mentioned in this document are the property of their respectiveholders. NoticeThe purchased products, services and features are stipulated by the contract made between Huawei and thecustomer. All or part of the products, services and features described in this document may not be within thepurchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,and recommendations in this document are provided "AS IS" without warranties, guarantees orrepresentations of any kind, either express or implied.

The information in this document is subject to change without notice. Every effort has been made in thepreparation of this document to ensure accuracy of the contents, but all statements, information, andrecommendations in this document do not constitute a warranty of any kind, express or implied.

Huawei Technologies Co., Ltd.Address: Huawei Industrial Base

Bantian, LonggangShenzhen 518129People's Republic of China

Website: http://www.huawei.com

Email: [email protected]

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. i

Page 3: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Contents

1 Product Introduction.....................................................................................................................11.1 ECS.................................................................................................................................................................................11.2 Regions and AZs............................................................................................................................................................ 21.3 Storage............................................................................................................................................................................ 21.4 Network.......................................................................................................................................................................... 31.4.1 VPC............................................................................................................................................................................. 31.4.2 Network Bandwidth.....................................................................................................................................................31.5 Security...........................................................................................................................................................................31.5.1 User Encryption...........................................................................................................................................................31.5.2 Cloud-Init.....................................................................................................................................................................51.6 IMS................................................................................................................................................................................. 61.7 Instances and Application Scenarios.............................................................................................................................. 71.7.1 General Computing ECSs............................................................................................................................................81.7.2 Memory-optimized ECSs............................................................................................................................................ 91.7.3 High-Performance Computing ECSs...........................................................................................................................91.8 Accessing and Using ECSs...........................................................................................................................................101.8.1 Accessing ECSs.........................................................................................................................................................101.8.2 ECS Charging Standards........................................................................................................................................... 111.8.3 ECSs and Other Services........................................................................................................................................... 111.8.4 User Permissions....................................................................................................................................................... 13

2 Getting Started............................................................................................................................. 152.1 Registering Yourself on the Public Cloud.................................................................................................................... 152.2 Purchasing and Logging In to a Windows ECS........................................................................................................... 152.3 Purchasing and Logging In to a Linux ECS................................................................................................................. 242.4 Initializing EVS Data Disks......................................................................................................................................... 322.4.1 Initializing a Windows Data Disk (Windows Server 2008)...................................................................................... 342.4.2 Initializing a Windows Data Disk (Windows Server 2016)...................................................................................... 412.4.3 Initializing a Linux Data Disk (fdisk)........................................................................................................................542.4.4 Initializing a Linux Data Disk (parted)......................................................................................................................592.5 (Optional) Installing One-Click Password Reset Plug-ins........................................................................................... 632.6 (Optional) Configuring Mapping Between Hostnames and IP Addresses................................................................... 70

3 ECS Instances............................................................................................................................... 71

Elastic Cloud ServerUser Guide Contents

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. ii

Page 4: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3.1 Logging In to a Linux ECS...........................................................................................................................................713.1.1 Login Using an SSH Key.......................................................................................................................................... 713.1.2 Login Using an SSH Password..................................................................................................................................753.1.3 Login Using VNC......................................................................................................................................................753.2 Logging In to a Windows ECS..................................................................................................................................... 773.2.1 Login Using VNC......................................................................................................................................................783.2.2 Login Using an MSTSC Password............................................................................................................................793.3 Status Management.......................................................................................................................................................803.3.1 Viewing ECS Creation Statuses.................................................................................................................................813.3.2 Viewing Failed Tasks.................................................................................................................................................813.3.3 Viewing ECS Details................................................................................................................................................. 823.3.4 Managing ECS Lifecycle...........................................................................................................................................823.4 Modifying ECS vCPU and Memory Specifications.....................................................................................................853.5 Changing the Initial Password for Logging In to an ECS............................................................................................ 903.6 Resetting the Password for Logging In to an ECS....................................................................................................... 913.6.1 Resetting the ECS Password with a Few Clicks........................................................................................................923.6.2 Changing or Resetting the Password for Logging In to a Windows ECS................................................................. 933.6.3 Changing or Resetting the Password for Logging In to a Linux ECS.......................................................................953.7 Managing OSs.............................................................................................................................................................. 963.7.1 Reinstalling the OS....................................................................................................................................................963.7.2 Changing the OS........................................................................................................................................................983.8 Buying the Same ECS.................................................................................................................................................. 993.9 Changing the Time Zone for an ECS..........................................................................................................................1003.10 Creating an Image.....................................................................................................................................................1033.11 Exporting ECSs.........................................................................................................................................................1033.12 Managing ECS Metadata..........................................................................................................................................1043.13 Creating an ECS Group............................................................................................................................................ 1113.14 Injecting User Data into ECSs.................................................................................................................................. 112

4 Network.......................................................................................................................................1194.1 Configuring Security Group Rules............................................................................................................................. 1194.2 Changing a Security Group........................................................................................................................................ 1204.3 Adding a NIC..............................................................................................................................................................1204.4 Deleting a NIC............................................................................................................................................................1214.5 Managing Virtual IP Addresses..................................................................................................................................1224.6 Having an ECS Without a Public IP Address Access the Internet............................................................................. 122

5 Storage......................................................................................................................................... 1255.1 Expanding the Capacity of an EVS Disk....................................................................................................................1255.2 Expand the Local Disks of a Disk-intensive ECS...................................................................................................... 1255.3 Detaching an EVS Disk from a Running ECS........................................................................................................... 1265.4 Adding a Yearly/Monthly EVS Disk.......................................................................................................................... 1285.5 Attaching a Disk to an ECS........................................................................................................................................1295.6 Backing Up ECS Data................................................................................................................................................ 130

Elastic Cloud ServerUser Guide Contents

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. iii

Page 5: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

6 Security........................................................................................................................................ 1316.1 Creating a Key Pair.....................................................................................................................................................1316.2 Obtaining the Password for Logging In to a Windows ECS...................................................................................... 1356.3 Deleting the Initial Password for Logging In to a Windows ECS..............................................................................136

7 Monitoring.................................................................................................................................. 1377.1 ECS Metrics................................................................................................................................................................1377.2 Setting Alarm Rules....................................................................................................................................................1407.3 Viewing ECS Metrics................................................................................................................................................. 140

8 Cloud Trace Service.................................................................................................................. 1428.1 Supported CTS Operations.........................................................................................................................................1428.2 Viewing Tracing Logs................................................................................................................................................ 143

9 Troubleshooting........................................................................................................................ 1459.1 What Should I Do When an ECS Remains in the Restarting or Stopping State for a Long Time?.........................1459.2 What Should I Do If I Cannot Use MSTSC to Log In to an ECS Running the Windows Server 2012 OS?.............1459.3 Can ECSs Automatically Recover After the Physical Host Accommodating the ECSs Becomes Faulty?............... 1469.4 What Should I Do If a Linux ECS with a SCSI Disk Attached Fails to Restart?...................................................... 1479.5 What Should I Do If a Key Pair Cannot Be Imported?.............................................................................................. 1489.6 Why Was My Login to a Linux ECS with a Key File Unsuccessful?........................................................................1489.7 How Can I Handle the Issue that a Windows 7 ECS Equipped with an Intel 82599 NIC Reports an Error in SR-IOVScenarios?.........................................................................................................................................................................1499.8 What Should I Do If Error "command ´gcc´ failed with exit status 1" Occurs During PIP-based Software Installation.......................................................................................................................................................................................... 1509.9 What Should I Do If Packages Are Downloaded Using PIP or wget at a Low Rate?................................................1519.10 What Should I Do If I Cannot Log In to My ECS Using the Reset Password?....................................................... 1519.11 What Should I Do If a Service Port Is Used by a One-Click Password Reset Plug-in?...........................................1529.12 What Should I Do If a Disk Is Offline?....................................................................................................................1559.13 What Should I Do If a Key Pair Created Using puttygen.exe Cannot Be Imported to the Management Console?.......................................................................................................................................................................................... 1569.14 How Do I Handle Error Messages Displayed on the Management Console?..........................................................1589.15 How Can I Handle Slow ECS Startup?.................................................................................................................... 1619.16 What Should I Do If Starting an ECS Remains in "Waiting for cloudResetPwdAgent" State?...............................1629.17 What Should I Do If Cloud-Init Does Not Work After Python Is Upgraded?......................................................... 163

10 FAQs...........................................................................................................................................16410.1 General FAQs........................................................................................................................................................... 16410.1.1 What Restrictions Are Involved with Using ECSs?..............................................................................................16410.1.2 What Can I Do with ECSs?................................................................................................................................... 16410.1.3 How Long Does It Take to Obtain an ECS?..........................................................................................................16410.1.4 What Functions Does the Delete Button Provide?................................................................................................16410.1.5 What Is a Deleted ECS?........................................................................................................................................ 16510.1.6 Can a Deleted ECS Be Provisioned Again?.......................................................................................................... 16510.1.7 Why Does the Task Status Area Show an ECS Creation Failure But the ECS List Displays the Created ECS?.......................................................................................................................................................................................... 165

Elastic Cloud ServerUser Guide Contents

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. iv

Page 6: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.2 Management FAQs................................................................................................................................................... 16510.2.1 Can I Transfer ECS Ownership Between Accounts?............................................................................................ 16510.2.2 What Is the cloudbase-init Account in Windows ECSs?..................................................................................... 16510.2.3 When Does an ECS Become Provisioned?........................................................................................................... 16610.2.4 Why Cannot I View the ECSs Being Created Immediately After I Pay for Them?..............................................16610.2.5 How Can a Changed Static Hostname Take Effect Permanently?........................................................................ 16610.2.6 Is the ECS Hostname with Suffix novalocal Normal?.......................................................................................... 16710.2.7 How Can I Modify Specifications of ECSs Charged in Yearly/Monthly Mode?..................................................16810.2.8 How Can I Modify Specifications of ECSs Charged in Pay-Per-Use Mode?....................................................... 16810.3 Login FAQs.............................................................................................................................................................. 16810.3.1 What Should I Do If I Cannot Remotely Log In to a Windows ECS?.................................................................. 16810.3.2 What Should I Do If I Cannot Log In to an ECS with Cloud-Init Enabled?.........................................................17010.3.3 What Should I Do If an MSTSC-based Remote Desktop Connection Failed to Set Up?.....................................17010.3.4 What Should I Do If the System Displays Error Code 0x112f When I Log In to a Windows ECS?....................17210.3.5 What Browser Version Is Required to Remotely Log In to an ECS?....................................................................17310.3.6 What Should I Do After I Log In to an ECS Using VNC and Perform an Operation But the Page Does notRespond for a Long Time?............................................................................................................................................... 17310.3.7 What Should I Do If I Cannot View Data After Logging In to an ECS Using VNC?.......................................... 17310.3.8 Why Does a Blank Screen Appear While the System Displays a Message Indicating Successful AuthenticationAfter I Attempted to Log In to an ECS Using VNC?.......................................................................................................17410.3.9 How Can I Log In to an ECS After Its System Disk Is Exchanged with That Attached to Another ECS Runningthe Same OS? ...................................................................................................................................................................17410.3.10 Why Does the System Display a Message Indicating that the Password for Logging In to a Windows ECSCannot Be Viewed?.......................................................................................................................................................... 17610.3.11 What Should I Do If My Password Is Lost?........................................................................................................17710.4 Charging FAQs......................................................................................................................................................... 17710.4.1 What Are the Charging Standards of ECSs?......................................................................................................... 17710.4.2 What Is the Metered Charging Mode for ECSs?................................................................................................... 17710.4.3 Is a Pay-per-Use ECS Charged After Being Stopped?.......................................................................................... 17710.4.4 How Can ECS Charging Be Stopped?...................................................................................................................17810.4.5 What Is the Deduction Cycle for ECSs Charged in Metered Mode?.................................................................... 17810.4.6 Is Refund Supported?............................................................................................................................................ 17810.4.7 Can I Receive a Reminder If My Account Balance Is Insufficient?..................................................................... 17810.4.8 Can I Receive a Reminder of Account Balance Changes?....................................................................................17910.4.9 How Can I Renew ECSs?......................................................................................................................................17910.5 Regional FAQs..........................................................................................................................................................17910.5.1 How Can I Select a Region?..................................................................................................................................17910.5.2 Are Products Different in Different Regions?....................................................................................................... 17910.5.3 Is Application Disaster Recovery Available in Different Regions?...................................................................... 17910.5.4 Does the Public Cloud Provide the Application DR Service?...............................................................................17910.5.5 Can Components Contained in an Application Be Distributed to Different Regions?......................................... 17910.5.6 Does ELB Take Effect on the ECSs Deployed in Different Regions?.................................................................. 18010.5.7 Can I Change the Region for a Purchased ECS?...................................................................................................180

Elastic Cloud ServerUser Guide Contents

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. v

Page 7: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.5.8 Are ECS Prices Different in Different Regions?................................................................................................... 18010.5.9 What Is AZ and How Can I Select One?...............................................................................................................18010.5.10 Is Data Transmission Between AZs Charged?.................................................................................................... 18010.6 Key Pair.................................................................................................................................................................... 18010.6.1 How Can I Obtain the Key Pair Used by an ECS?................................................................................................18010.7 EIP FAQs.................................................................................................................................................................. 18110.7.1 Can Multiple EIPs Be Bound to an ECS?............................................................................................................. 18110.7.2 Will NICs Added to an ECS Start Automatically?................................................................................................18210.7.3 Can an ECS Without an EIP Access the Internet?.................................................................................................18210.7.4 Why Can I Remotely Access an ECS But Cannot Ping It?...................................................................................18210.8 Network.................................................................................................................................................................... 18210.8.1 Can the ECSs of Different Accounts Communicate over the Intranet?................................................................ 18210.8.2 Are ECSs I Purchased Deployed in the Same Subnet?......................................................................................... 18310.8.3 How Can I Change the MTU of a Linux ECS NIC?............................................................................................. 18310.8.4 How Can I Change the MTU of a Windows ECS NIC?....................................................................................... 18410.8.5 How Can I Check Whether the Network Communication Between Two ECSs Equipped with an InfiniBand NICDriver Is Normal?.............................................................................................................................................................18810.8.6 How Can I Manually Configure an IP Address for an InfiniBand NIC?.............................................................. 18910.8.7 How Can I View and Modify Kernel Parameters of a Linux ECS?...................................................................... 19010.8.8 How Can I Test Network Performance?................................................................................................................19410.9 Security.....................................................................................................................................................................20210.9.1 How Does an ECS Defend Against DDoS Attacks?.............................................................................................20210.10 Disk FAQs.............................................................................................................................................................. 20210.10.1 Can Multiple Disks Be Attached to an ECS?...................................................................................................... 20210.10.2 Which ECSs Can Be Attached with SCSI EVS Disks?...................................................................................... 20310.10.3 What Are the Restrictions for Attaching an EVS Disk to an ECS?.................................................................... 20310.10.4 How Can I Adjust System Disk Partitions?.........................................................................................................20310.10.5 How Can I Add the Empty Partition of an Expanded System Disk to the End Root Partition Online?............. 20910.10.6 How Can I Add the Empty Partition of an Expanded System Disk to the Non-end Root Partition Online?......21010.10.7 How Can I Obtain the Mapping Between Disk Partitions and Disk Devices on a Windows ECS?................... 21210.10.8 How Can I Obtain the Mapping Between Disk Partitions and Disk Devices on a Linux ECS?.........................21510.10.9 What Is the Mapping Between Device Names and Disks?................................................................................. 21710.10.10 Who Can Use the Encryption Feature?............................................................................................................. 21910.11 OS FAQs................................................................................................................................................................. 22110.11.1 Are OSs Charged?............................................................................................................................................... 22110.11.2 Can I Install or Upgrade the OS by Myself?....................................................................................................... 22110.11.3 What Is the Username to Log In to an ECS?.......................................................................................................22110.11.4 Can the OS of an ECS Be Changed?................................................................................................................... 22110.11.5 Is a GUI Provided for OSs?................................................................................................................................. 22110.11.6 Is the FTP Upload Tool Included in the OS?.......................................................................................................22110.11.7 Does OS Changing Incur Fees?........................................................................................................................... 22110.11.8 Does OS Reinstallation Incur Fees?.................................................................................................................... 22210.11.9 Can I Select Other OSs During ECS OS Reinstallation?.................................................................................... 222

Elastic Cloud ServerUser Guide Contents

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. vi

Page 8: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.11.10 How Can I Obtain Data Disk Information If Tools Are Deleted?..................................................................... 22210.11.11 How Can I Upgrade the Kernel of a Linux ECS?..............................................................................................22310.11.12 How Can I Set the Validity Period of the Image Password?............................................................................. 22510.11.13 Why Is the Memory of an ECS Obtained by Running the free Command Inconsistent with the ActualMemory?...........................................................................................................................................................................22610.11.14 How Can I Enable Virtual Memory on a Windows ECS?.................................................................................22710.12 Image Source FAQs................................................................................................................................................22910.12.1 How Can I Use the Automatic Tool to Configure an HUAWEI CLOUD Image Source?..................................22910.12.2 How Can I Use an openSUSE Image Source Provided by HUAWEI CLOUD?................................................ 23010.12.3 How Can I Use a CentOS Image Source Provided by HUAWEI CLOUD?....................................................... 23110.12.4 How Can I Use a Ubuntu Image Source Provided by HUAWEI CLOUD?........................................................23210.12.5 How Can I Use a EulerOS Image Source Provided by HUAWEI CLOUD?......................................................23310.13 Database FAQs....................................................................................................................................................... 23410.13.1 Can a Database Be Deployed on an ECS?.......................................................................................................... 23410.13.2 Does an ECS Support Oracle Databases?............................................................................................................234

A Change History......................................................................................................................... 235

Elastic Cloud ServerUser Guide Contents

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. vii

Page 9: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

1 Product Introduction

1.1 ECSAn ECS is a computing server consisting of vCPUs, memory, images, and Elastic VolumeService (EVS) disks that allow on-demand allocation and elastic scaling. ECSs integrateVirtual Private Cloud (VPC), virtual firewalls, and multi-data-copy capabilities to create anefficient, reliable, and secure computing environment. This ensures stable and uninterruptedoperation of services. After creating an ECS, you can use it like using your local computer orphysical server.

ECSs support self-service creation, modification, and operation. You can create ECSs byspecifying the vCPU, memory, image specifications, and login authentication. After creatingan ECS, you can modify its specifications as required.

System ArchitectureECS works with other public cloud products and services to provide computing, storage,network, and image installation functions.

l ECSs are deployed in multiple availability zones (AZs) connected with each otherthrough an internal network. If an AZ becomes faulty, other AZs in the same region willnot be affected.

l With the Virtual Private Cloud (VPC) service, you can build a dedicated network, set thesubnet and security group, and allow the VPC to communicate with the external networkthrough an EIP (bandwidth support required).

l With the Image Management Service (IMS), you can install images on ECSs, or createECSs using private images and deploy services quickly.

l The Elastic Volume Service (EVS) provides storage and Volume Backup Service (VBS)provides data backup and recovery functions.

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 1

Page 10: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 1-1 ECS architecture

1.2 Regions and AZsA region is a geographic area where resources used by your ECSs are located.

ECSs in the same region can communicate with each other over an intranet, but ECSs indifferent regions cannot.

Public cloud data centers are deployed worldwide in places, such as North America, Europe,and Asia. Creating ECSs in different regions can better suit certain user requirements. Forexample, applications can be designed to meet user requirements in specific regions orcomply with local laws or regulations. ECS pricing also changes based on region.

Each region contains many AZs where power and networks are physically isolated. AZs in thesame region can communicate with each other over an intranet. Each AZ provides cost-effective and low-latency network connections that are unaffected by faults that may occur inother AZs.

1.3 Storage

EVS Disk Types

ECSs support the following types of EVS disks for storing data:

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 2

Page 11: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l Common I/O: EVS disks of this type deliver a maximum of 2,200 IOPS. This disk typeis suitable for application scenarios that require large capacity, a medium read/write rate,and fewer transactions, such as enterprises' office applications and small-scale testing.

l High I/O: EVS disks of this type deliver a maximum of 5,000 IOPS and a minimum of 1ms read/write latency. This disk type is designed to meet the needs of mainstream high-performance, high-reliability application scenarios, such as enterprise applications, large-scale development and testing, and web server logs.

l Ultra-high I/O: EVS disks of this type deliver a maximum of 33,000 IOPS and aminimum of 1 ms read/write latency. This disk type is excellent for ultra-high I/O, ultra-high bandwidth, and read/write-intensive application scenarios. For example, thedistributed file systems in the HPC scenarios or NoSQL and relational databases in I/O-intensive scenarios.

EVS disks with different I/O capacities provide different features at different prices. ChooseEVS disks based on your requirements. For more information about EVS disk specificationsand performance, see Elastic Volume Service User Guide.

1.4 Network

1.4.1 VPCVPC allows you to create customized virtual networks in your logically isolated AZ on thepublic cloud. Such networks are dedicated zones that are logically isolated for your ECSs.You can define security groups, virtual private networks (VPNs), IP address segments, andbandwidth for a VPC. This facilitates internal network configuration and management as wellas secure and convenient network modification. You can also customize the ECS access ruleswithin a security group and between security groups to strengthen ECS security protection.For more information, see Virtual Private Cloud User Guide.

1.4.2 Network BandwidthThe intranet bandwidth and PPS of an ECS are determined based on ECS specifications.l Assured intranet bandwidth: indicates the assured ECS bandwidth.l Maximum intranet bandwidth: indicates the maximum ECS bandwidth.l Maximum intranet PPS: indicates the maximum ECS capabilities in transmitting and

receiving packets.

1.5 Security

1.5.1 User EncryptionUser encryption allows you to use the encryption feature provided on the public cloudplatform to encrypt ECS resources, improving data security. User encryption includes imageencryption and EVS disk encryption.

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 3

Page 12: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Image Encryption

Key encryption supports encrypting private images. When creating an ECS, if you select anencrypted image, the system disk of the created ECS automatically has encryption enabled,implementing system disk encryption and improving data security.

Use either of the following methods to create an encrypted image:

l Create an encrypted image using an existing encrypted ECS.

l Create an encrypted image using an external image file.

For more information about image encryption, see Image Management Service User Guide.

EVS Disk Encryption

EVS disk encryption supports system disk encryption and data disk encryption.

l When creating an ECS, you can encrypt added data disks.

l System disk encryption relies on the image. When creating an ECS, if you select anencrypted image, the system disk of the created ECS automatically has encryptionenabled, and the encryption mode complies with the image encryption mode.

For more information about EVS disk encryption, see Elastic Volume Service User Guide.

Impact on AS

If you use an encrypted ECS to create an Auto Scaling (AS) configuration, the encryptionmode of the created AS configuration complies with the ECS encryption mode.

About Keys

The key required for encryption relies on Data Encryption Workshop (DEW). DEW uses adata encryption key (DEK) to encrypt data and a customer master key (CMK) to encrypt theDEK.

Figure 1-2 Data encryption process

Table 1-1 describes the keys involved in the data encryption process.

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 4

Page 13: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Table 1-1 Keys

Name Description Function

DEK An encryption key that is used for encryptingdata.

Encrypts specific data.

CMK An encrypted key that is created using KMS.A CMK encrypts and protects DEKs.A CMK can encrypt multiple DEKs.

Supports CMK disablingand scheduled deletion.

Default CMK A type of CMK with suffix /default. Thedefault CMK is automatically generated bythe system when you use KMS forencryption for the first time.For example, evs/default

l Supports viewingdetails of the defaultCMK on the KMSconsole.

l Does not supportCMK disabling orscheduled deletion.

NOTE

After disabling a CMK or scheduling the deletion of a CMK takes effect, the EVS disk encrypted usingthis CMK can still be used until the disk is detached from and then attached to an ECS again. Duringthis process, the disk fails to be attached to the ECS because the CMK cannot be obtained. Therefore,the EVS disk becomes unavailable.

For details about DEW, see Data Encryption Workshop User Guide.

1.5.2 Cloud-InitCloud-Init is an open-source cloud initialization program, which initializes specifiedcustomized configurations, such as the hostname, key pair, and user data, of a newly createdECS.

Using Cloud-Init to initialize your ECSs will affect your ECS, IMS, and AS services.

Impact on IMS

To ensure that ECSs created using private images support customized configurations, youmust install Cloud-Init or Cloudbase-Init before creating private images.

l For Windows OSs, download and install Cloudbase-Init.l For Linux OSs, download and install Cloud-Init.

After Cloud-Init or Cloudbase-Init is installed in an image, Cloud-Init or Cloudbase-Initautomatically configures initial ECS attributes when the ECS is created. For instructionsabout how to install Cloud-Init or Cloudbase-Init, see Image Management Service UserGuide.

Impact on ECSl When creating an ECS, if the selected image supports Cloud-Init, you can use user data

injection to inject customized configuration, such as ECS login password, forinitializing.

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 5

Page 14: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l After Cloud-Init is supported, you can view and use metadata to configure and managerunning ECSs.

Impact on ASl When creating an AS configuration, you can use user data injection to specify ECS

configurations for initialization. If the AS configuration has taken effect in an AS group,the ECSs newly created in the AS group will automatically initialize their configurations.

l For an existing AS configuration, if its private image does not have Cloud-Init orCloudbase-Init installed, the login mode of the ECSs created in the AS group where theAS configuration takes effect will be affected. To resolve this issue, see section "HowDoes Cloud-Init Influence the AS Service?" in Auto Scaling User Guide.

For more information about AS, see Auto Scaling User Guide.

Notesl When using Cloud-Init, enable DHCP in the VPC to which the ECS belongs.l When using Cloud-Init, ensure that security group rules in the outbound direction meet

the following requirements:– Protocol: TCP– Port Range: 80– Remote End: 169.254.0.0/16

NOTE

If you use the default security group rules in the outbound direction, the preceding requirementsare met, and the metadata can be accessed. Default security group rules in the outbound directionare as follows:

l Protocol: ANYl Port Range: ANYl Remote End: 0.0.0.0/16

1.6 IMS

IntroductionIMS allows you to create ECSs using images. An image is an ECS template that contains anOS and may also contain proprietary software and application software, such as databasesoftware.

Images can be public, private, or shared. Public images are provided by the system by default,private images are manually created, and shared images are private images that are shared byanother user. You can use any type of image to create an ECS. You can also create a privateimage using an existing ECS. This provides you with a simple way to create ECSs thatcomply with your service requirements. For example, if you use web services, your image cancontain a web server, static configurations, and dynamic page code. When you use this imageto create an ECS, your web server and applications will be available for use immediately.

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 6

Page 15: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Image Types

Table 1-2 Image types

ImageType

Description

Public image A standard, widely used image. It contains an OS, comes with preinstalledpublic applications, and is available to all users.

Privateimage

An image that is available only to the user who created it based on an ECSor EVS backup (system disk backup). Such a private image contains an OS,preinstalled public applications, and the user's private applications.

Sharedimage

A private image shared by another user.

Conversion Between Images and ECSs

You can use images to create ECSs and you can convert ECS configurations into images.

1.7 Instances and Application ScenariosThe public cloud provides various ECS types for different application scenarios.

l General computingl Memory-optimizedl High-performance computing

ECS Flavor Naming Rules

ECS flavors are named using the format "AB.C.D".

The format is defined as follows:

l A specifies the ECS type. For example, s indicates a general-purpose ECS, c acomputing ECS, and m a memory-optimized ECS.

l B specifies the type ID. For example, the 1 in s1 indicates a general-purpose first-generation ECS, and the 2 in s2 indicates a general-purpose second-generation ECS.

l C can be any of the following options:– medium– large– xlarge

l D specifies the ratio of memory to vCPUs expressed in a digit. For example, value 4indicates that the ratio of memory to vCPUs is 4.

Network Bandwidth

The intranet bandwidth and PPS of an ECS are determined based on ECS specifications.

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 7

Page 16: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l Assured intranet bandwidth: indicates the assured ECS bandwidth.l Maximum intranet bandwidth: indicates the maximum ECS bandwidth.l Maximum intranet PPS: indicates the maximum ECS capabilities in transmitting and

receiving packets.

1.7.1 General Computing ECSs

Overview

General computing ECSs provide basic vCPU performance and a balance of computing,memory, and network resources. These ECSs are suitable for many applications, such as webservers, enterprise R&D, and small-scale databases.

Specifications

Table 1-3 General computing ECS specifications

ECS Type vCPUs Memory (GB) Flavor VirtualizationType

Generalcomputing

1 1 s2.small.1 KVM

1 2 s2.medium.2 KVM

2 4 s2.large.2 KVM

4 8 s2.xlarge.2 KVM

8 16 s2.2xlarge.2 KVM

16 32 s2.4xlarge.2 KVM

32 64 s2.8xlarge.2 KVM

1 4 s2.medium.4 KVM

2 8 s2.large.4 KVM

4 16 s2.xlarge.4 KVM

8 32 s2.2xlarge.4 KVM

16 64 s2.4xlarge.4 KVM

32 128 s2.8xlarge.4 KVM

Scenariosl Applications

General computing ECSs are suitable for applications that have no special requirementson CPU performance, memory, disk capacity, or bandwidth, but have high requirementson security and reliability. They feature low initial investment and maintenance costs.

l Application scenarios

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 8

Page 17: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Enterprise website deployment, enterprise office environment setup, enterprise R&D andtesting activities, Web servers, R&D and testing environments for developers, and small-scale databases

1.7.2 Memory-optimized ECSs

OverviewMemory-optimized ECSs have a large memory size and provide high memory performance.They are designed for memory-intensive applications that process a large amount of data,such as precision advertising, e-commerce big data analysis, and IoV big data analysis.

Specifications

Table 1-4 Memory-optimized ECS specifications

ECS Type vCPUs Memory (GB) Flavor VirtualizationType

Memory-optimized 2 16 m2.large.8 KVM

4 32 m2.xlarge.8 KVM

8 64 m2.2xlarge.8 KVM

16 128 m2.4xlarge.8 KVM

32 256 m2.8xlarge.8 KVM

Scenariosl Applications

Memory-optimized ECSs are suitable for applications that process large volumes of dataand require a large amount of memory, rapid data switching and processing, and low-latency storage resources.

l Application scenariosBig data analysis, precision advertising, e-commerce big data analysis, IoV big dataanalysis, relational databases, NoSQL databases, and memory data analysis

1.7.3 High-Performance Computing ECSs

OverviewThe processor and memory ratio of an HC2 ECS is 1:2 or 1:4. Each vCPU corresponds to thehyperthreading of an Intel Xeon processor core. HC2 ECSs can be used for high-performancecomputing services. They provide a large number of parallel computing resources and high-performance infrastructure services to meet the requirements of high-performance computingand massive storage and ensure rendering efficiency. HC2 ECSs are frequently used in thefollowing scenarios:l Computing and storage systems for genetic engineering, games, animations,

biopharmaceuticals, and scientific computing

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 9

Page 18: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l Public rendering platforms for renderfarms and animation and film bases; otherrendering platforms for movies and videos

l High-performance frontend clusters, web servers, high-performance science andengineering applications, advertisements, video coding, and distributed analysis

Specifications

Table 1-5 HC2 ECS specifications

Flavor vCPUs Memory(GB)

Maximum/AssuredBandwidth (Gbit/s)

MaximumPPS(10,000)

NICMulti-Queue

Virtualization Type

hc2.large.2

2 4 1.5/0.5 10 1 KVM

hc2.xlarge.2

4 8 3/1 15 1 KVM

hc2.2xlarge.2

8 16 5/2 30 2 KVM

hc2.4xlarge.2

16 32 8/4 40 4 KVM

hc2.8xlarge.2

32 64 13/8 60 8 KVM

hc2.large.4

2 8 1.5/0.5 10 1 KVM

hc2.xlarge.4

4 16 3/1 15 1 KVM

hc2.2xlarge.4

8 32 5/2 30 2 KVM

hc2.4xlarge.4

16 64 8/4 40 4 KVM

hc2.8xlarge.4

32 128 13/8 60 8 KVM

1.8 Accessing and Using ECSs

1.8.1 Accessing ECSsThe public cloud provides a web-based service management platform. You can access ECSsthrough HTTPS-compliant application programming interfaces (APIs) or the managementconsole. These two access modes differ as follows:

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 10

Page 19: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l Accessing ECSs through APIsUse this mode if you are required to integrate the ECSs on the public cloud into a third-party system for secondary development. For detailed operations, see Elastic CloudServer API Reference.

l Accessing ECSs through the management consoleUse this mode if you are not required to integrate ECSs with a third-party system. Afterregistering on the public cloud, log in to the management console and click ElasticCloud Server under Computing on the homepage.

1.8.2 ECS Charging StandardsECSs can be charged in Yearly/Monthly or Metered mode. You can choose one chargingmode based on your requirements.

1.8.3 ECSs and Other ServicesFigure 1-3 shows the relationships between ECS and other services.

Figure 1-3 Relationships between ECS and other services

l Auto Scaling (AS)Automatically adjusts ECS service resources based on the configured AS policies. Thisimproves resource usage and reduces resource costs.

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 11

Page 20: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l Elastic Load Balancing (ELB)

Automatically distributes traffic to multiple ECSs. This enhances system service andfault tolerance capabilities.

l Elastic Volume Service (EVS)

Enables you to attach EVS disks to an ECS and expand their capacity.

l Virtual Private Cloud (VPC)

Enables you to configure internal networks and change network configurations bycustomizing security groups, VPNs, IP address segments, and bandwidth. This simplifiesnetwork management. You can also customize the ECS access rules within a securitygroup and between security groups to strengthen ECS security protection.

l Image Management Service (IMS)

Enables you to create ECSs using images. This improves the efficiency of ECS creation.

l Dedicated Computing Cluster (DCC)

To physically isolate your ECS, apply for a DCC before creating the ECS. After youobtain the DCC and set a region for it, your ECS is automatically allocated to the DCC.

l Cloud Eye

Allows you to check the status of monitored service objects after you have obtained anECS. This can be done without requiring additional plug-ins be installed. Table 1-6 liststhe ECS metrics supported by Cloud Eye.

Table 1-6 ECS metrics

Metric Description Formula Remarks

CPU Usage Indicates the vCPU usage(%) of an ECS.

vCPU usage of anECS/Number ofvCPUs in the ECS

N/A

MemoryUsage

Indicates the memoryusage (%) of an ECS.

Used memory of anECS/Total memoryof the ECS

This metric isunavailable ifthe image hasno vmtoolsinstalled.

Disk Usage Indicates the disk usage(%) of an ECS.

Used capacity of anECS disk/Totalcapacity of the ECSdisk

This metric isunavailable ifthe image hasno vmtoolsinstalled.

Disks ReadRate

Indicates the number ofbytes read from an ECSper second.

Total number ofbytes read from anECS disk/Monitoringperiod

byte_out =(rd_bytes -last_rd_bytes)/Timedifference

Disks WriteRate

Indicates the number ofbytes written to an ECSper second.

Total number ofbytes written to anECS disk/Monitoringperiod

N/A

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 12

Page 21: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Metric Description Formula Remarks

Disks ReadRequests

Indicates the number ofread requests sent to anECS per second.

Total number of readrequests sent to anECS disk/Monitoringperiod

req_out =(rd_req -last_rd_req)/Timedifference

Disks WriteRequests

Indicates the number ofwrite requests sent to anECS per second.

Total number ofwrite requests sent toan ECS disk/Monitoring period

req_in =(wr_req -last_wr_req)/Timedifference

InbandIncoming Rate

Indicates the number ofincoming bytes on an ECSper second.

Total number ofinband incomingbytes on an ECS/Monitoring period

N/A

InbandOutgoing Rate

Indicates the number ofoutgoing bytes on an ECSper second.

Total number ofinband outgoingbytes on an ECS/Monitoring period

N/A

OutbandIncoming Rate

Indicates the number ofincoming bytes on an ECSper second on thehypervisor.

Total number ofoutband incomingbytes on an ECS/Monitoring period

This metric isunavailable ifSR-IOV isenabled.

OutbandOutgoing Rate

Indicates the number ofoutgoing bytes on an ECSper second on thehypervisor.

Total number ofoutband outgoingbytes on an ECS/Monitoring period

This metric isunavailable ifSR-IOV isenabled.

l Data Encryption Workshop (DEW)

The encryption feature relies on DEW. You can use an encrypted image or EVS diskswhen creating an ECS. In such a case, you are required to use the key provided by DEWto improve data security.

l Cloud Trace Service (CTS)Allows you to record ECS-related operations for later query, audit, and backtrack.

l Cloud Server Backup Service (CSBS)Protects ECS backups. CSBS backs up all EVS disks of an ECS, including the systemdisk and data disks, and uses the backup to restore the ECS.

1.8.4 User PermissionsTwo types of permissions are provided by default: user management and resourcemanagement.

l User management refers to the management of users, user groups, and user group rights.l Resource management refers to the control operations that can be performed by users on

cloud service resources.

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 13

Page 22: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

For further details, see Permission Description.

Elastic Cloud ServerUser Guide 1 Product Introduction

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 14

Page 23: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

2 Getting Started

2.1 Registering Yourself on the Public CloudIf you have registered on the public cloud, you can log in to the management console andaccess your ECSs. If you have not registered, register yourself on the public cloud. Fordetailed operations, see this section. After the registration, your account can be used to accessall public cloud services, including your ECSs.

Procedure1. Log in to the HUAWEI CLOUD website https://intl.huaweicloud.com/.2. Click Register.

The registration page is displayed. Enter required information according to the promptsto register an account. After the registration, the system automatically redirects you toyour personal information page.

2.2 Purchasing and Logging In to a Windows ECS

Scenarios

ECSs are more cost-effective than physical servers. Within minutes, you can obtain ECSresources from the public cloud. ECS resources are flexible and on-demand. This sectiondescribes how to purchase an ECS.

Step 1: Purchase an ECS

Step 2: Log In to the ECS

Notes

Dedicated physical resources

To run an ECS on isolated physical hardware, apply for a Dedicated Computing Cluster(DCC) before creating the ECS.

For details about DCC, see Dedicated Computing Cluster User Guide.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 15

Page 24: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Step 1: Purchase an ECS1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Click Buy ECS.

The ECS purchasing page is displayed.4. Select a billing mode, Yearly/Monthly or Pay-per-use.

– In Yearly/Monthly billing mode, purchase an ECS configuration and set ValidityPeriod. Then, the system deducts the fees incurred at one time from your accountbased on the service price.

NOTE

The ECSs paid in monthly/yearly mode cannot be deleted. They support only resourceunsubscription. If an ECS is no longer used, switch to the Elastic Cloud Server page, clickMore in the Operation column of this ECS, and select Unsubscribe to unsubscribe it.

– In Pay-per-use billing mode, after purchasing an ECS configuration, you do notneed to set Validity Period. Then, the system deducts the fees incurred from youraccount based on the service duration.

5. Confirm the region.

If the region is incorrect, click in the upper left corner of the page for correction.6. Select an AZ.

An AZ is a physical region where power and networks are physically isolated. AZs in thesame region can communicate with each other over an intranet.– To enhance application availability, create ECSs in different AZs.– To shorten network latency, create ECSs in the same AZ.

7. Set Specifications.The public cloud provides various ECS types for different application scenarios. You canview released ECS types and specifications in the list. Alternatively, you can enter aflavor (such as c3) or specify vCPUs and memory size to search for the desired flavor.

NOTE

l Before selecting an ECS type, learn the introduction and notes on each type of ECSs. Fordetails, see section 1.7 Instances and Application Scenarios.

l When purchasing an ECS, you are not allowed to select sold-out CPU and memory resources.

8. Click Image.– Public image

A public image is a standard, widely used image. It contains an OS and preinstalledpublic applications and is available to all users. You can configure the applicationsor software in the public image as needed.

– Private imageA private image is an image available only to the user who creates it. It contains anOS, preinstalled public applications, and the user's private applications. Using aprivate image to create ECSs removes the need to configure multiple ECSsrepeatedly.You can also select an encrypted image. For details, see Image Management ServiceUser Guide.If you have used a CSBS backup to create a private image (full-ECS image), youcan use the full-ECS image. However, the EVS disk in the image does not support

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 16

Page 25: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

disk creation using a data disk image, and disk attributes (such as SCSI/VBD anddata encryption) cannot be modified. For more details about how to use CSBSbackups to create images, see section "Using Backups to Create Images" in CloudServer Backup Service User Guide and section "Creating a Full-ECS Image Using aCSBS Backup" in Image Management Service User Guide.

– Shared imageA shared image is a private image shared by another user.

9. Set Disk.A disk can be a system disk or a data disk. You can create multiple data disks for an ECSand customize their disk sizes.– System Disk

If the image based on which an ECS is created is not encrypted, the system disk ofthe ECS is not encrypted. In addition, Unencrypted is displayed for the system diskon the page. If the image based on which an ECS is created is encrypted, the systemdisk of the ECS is automatically encrypted. For details, see section (Optional)Encryption-related parameters.

– Data DiskYou can create multiple data disks for an ECS and configure sharing and encryptionfor each data disk.n SCSI: indicates that the device type of the data disk is SCSI. For more

information about SCSI disks and the ECSs that can be attached with SCSIdisks, see section 1.3 Storage.

n Share: indicates that the EVS disk is shared. Such an EVS disk can beattached to multiple ECSs.

n Encryption: indicates that the data disk is encrypted. For details, see section(Optional) Encryption-related parameters.

– (Optional) Encryption-related parametersTo enable encryption, click Create Xrole to grant KMS access rights to EVS. Ifyou have rights granting permission, grant the KMS access rights to EVS. If you donot have the permission, contact the user having the security administrator rights togrant the KMS access rights.n Encrypted: indicates that the EVS disk has been encrypted.n Create Xrole: grants KMS access rights to EVS to obtain KMS keys. After

the rights are granted, follow-up operations do not require granting rightsagain.

n KMS Key Name: specifies the name of the key used by the encrypted EVSdisk. By default, the name is evs/default.

n Xrole Name: EVSAccessKMS: specifies that rights have been granted toEVS to obtain KMS keys for encrypting or decrypting EVS disks.

n KMS Key ID: specifies the ID of the key used by the encrypted data disk.For details about the disk types supported by the ECS, see section 1.3 Storage. For moreinformation about EVS disks, see Elastic Volume Service User Guide.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 17

Page 26: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

If you detach the system disk purchased when you buy a yearly/monthly ECS and want tocontinue using it as a system disk, you can only attach it to the original ECS. If you want to use itas a data disk, you can attach it to any ECS.

If you detach the non-shared data disk purchased when you buy a yearly/monthly ECS and want toattach it again, you can only attach it to the original ECS as a data disk.

The data disk purchased when you buy a yearly/monthly ECS does not support separate renewal,unsubscription, automatic service renewal, conversion to pay-per-use payment, and release.

10. Set network parameters, including VPC, Security Group, NIC, and EIP.When you use VPC for the first time, the system automatically creates a VPC for you,including the security group and NIC.

Table 2-1 Parameter descriptions

Parameter Description

VPC Provides a network, including subnet and security group, for anECS.You can select an existing VPC, or click View VPC and create adesired one.For more information about VPC, see Virtual Private Cloud UserGuide.NOTE

Ensure that DHCP is enabled in the VPC to which the ECS belongs.

Security Group Controls ECS access within or between security groups by definingaccess rules. This enhances ECS security.When creating an ECS, you can select multiple (recommended notmore than five) security groups. In such a case, the access rules ofall the selected security groups apply on the ECS.NOTE

Before initializing an ECS, ensure that the security group rule in theoutbound direction meets the following requirements:

l Protocol: TCPl Port Range: 80l Remote End: 169.254.0.0/16If you use the default security group rule in the outbound direction, thepreceding requirements are met, and the ECS can be initialized. The defaultsecurity group rule in the outbound direction is as follows:

l Protocol: ANYl Port Range: ANYl Remote End: 0.0.0.0/16

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 18

Page 27: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Parameter Description

NIC Includes primary and extension NICs. You can add multipleexpansion NICs to an ECS and specify IP addresses for them(including primary NICs).NOTE

If you specify an IP address when creating multiple ECSs in a batch:

l This IP address serves as the start IP address.

l Ensure that the IP addresses required by the ECSs are within the subnet,consecutive, and available.

l This subnet cannot duplicate a subnet with a specified start IP address.

MTU Settings: optionalIf your ECS is of M2, large-memory, H1, or D1 type, you can clickMTU Settings to configure the maximum transmission unit (MTU)for a to-be-added extension NIC for improving networkperformance.An MTU can only be a number, ranging from 1280 to 8888.

EIP A static public IP address bound to an ECS in a VPC. Using the EIP,the ECS provides services externally.The following options are provided:l Do not use

Without an EIP, the ECS cannot access the Internet and is usedonly in the private network or cluster.

l Automatically assignThe system automatically assigns an EIP for the ECS. The EIPprovides exclusive bandwidth that is configurable.

l SpecifyAn existing EIP is assigned for the ECS. When using an existingEIP, you cannot create ECSs in batches.

NOTEFor a yearly/monthly ECS, Automatically assign is unavailable to EIP. If anEIP is required, bind an existing EIP to the ECS. Alternatively, purchase anEIP that is charged in pay-per-use mode and then bind the EIP to the ECS.

Specifications l When changes occur on a network using static BGP, networkconfigurations cannot be promptly adjusted to ensure optimaluser experience.

l When changes occur on a network using dynamic BGP, networkconfigurations can be promptly adjusted using the specifiedrouting protocol, ensuring network stability and optimal userexperience.

Billing Mode This parameter is mandatory if your ECS is charged in pay-per-usemode and EIP is set to Automatically assign.Bandwidth: The EIP bandwidth is charged based on the actualtraffic you have used.Traffic: You are charged based on the actual traffic you have used.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 19

Page 28: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

11. Set Login Mode.

Key pair is recommended because it features higher security than Password. If youselect Password, ensure that the password meets complexity requirements listed inTable 2-2 to prevent malicious attacks.

– Key pair

A key pair is used for ECS login authentication. You can select an existing key pair,or click View Key Pair and create a desired one.

NOTE

If you use an existing key pair, make sure that you have saved the key file locally.Otherwise, logging in to the ECS will fail.

– Password

A username and its initial password are used for ECS login authentication.

The initial password of user root is used for authentication in Linux, while that ofuser Administrator is used for authentication in Windows. The passwords mustmeet the requirements described in Table 2-2.

Table 2-2 Password complexity requirements

Parameter Requirement ExampleValue

Password l Consists of 8 characters to 26 characters.l Contains at least three of the following character

types:– Uppercase letters– Lowercase letters– Numerals– Special characters:

$!@%-_=+[]:./^,{}?

l Cannot contain the username or the username inreverse.

l Cannot contain more than two characters in thesame sequence as they appear in the username.(This requirement applies only to WindowsECSs.)

Test12!@

NOTE

The system does not automatically change the password for logging in to an ECS on aregular basis. It is recommended that you change your password regularly for security.

12. Configure Advanced Settings.

To use functions listed in Advanced Settings, click Configure now. Otherwise, click Donot configure.

– User Data Injection

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 20

Page 29: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Enables the ECS to automatically inject user data when the ECS starts for the firsttime. This configuration is optional.For example, if you activate user root permission using script data injection, youcan log in to the ECS as user root.For detailed operations, see section 3.14 Injecting User Data into ECSs.

– ECS GroupAn ECS group applies the anti-affinity policy to the ECSs in it so that the ECSs canbe distributed on different hosts. This configuration is optional. For instructionsabout how to create an ECS group, see section 3.13 Creating an ECS Group.

– Throughput OptimizationEnabling throughput optimization increases the data I/O bandwidth between ECSsand EVS disks, improving storage performance.

– Agency NameThis configuration is optional. An agency is created by the tenant administrator inIAM and provides a temporary credential for an ECS to access cloud services. Ifyou have created an agency in IAM, you can select the agency name from the drop-down list and obtain specified operation permissions.

13. Set ECS Name.The name can be customized but must comply with the following naming rules: Cancontain only letters, digits, underscores (_), hyphens (-), and periods (.).If you want to purchase multiple ECSs at a time, the system automatically sequencesthese ECSs.If multiple ECSs are purchased at the same time, the system automatically adds a hyphenfollowed by a four-digit incremental number to the end of each ECS name. For example,if you enter ecs, the ECSs will be named ecs-0001, ecs-0002, .... If you purchase multipleECSs again, the values in the new ECS names increase from the existing maximumvalue. For example, the existing ECS with the maximum number in name is ecs-0010. Ifyou enter ecs, the names of the new ECSs will be ecs-0011, ecs-0012, .... When the valuereaches 9999, it will start from 0001.Allow duplicate ECS names: allows ECS names to be duplicate. If you select Allowduplicate ECS names and create multiple ECSs in a batch, the created ECSs will havethe same name.

14. Configure the number of ECSs to be purchased.– Usage Duration: sets the service duration if you select the Yearly/Monthly billing

mode. The usage duration ranges from one month to three years.– Quantity: sets the number of ECSs to be purchased.

The maximum number of ECSs you are allowed to purchase is displayed. To ensureeffective resource usage, an upper limit is set on the ECSs to be purchased. If thenumber of ECSs you need exceeds the maximum number of ECSs you are allowedto purchase, click Increase Quota to obtain a higher quota. You can purchase theECSs you need after the request is approved.

– ECS Price: shows the ECS configuration fee.For details, click Price details.

15. Click Buy Now.– If you select Pay-per-use, click Buy Now.– If you have any question about the price, click Price Details.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 21

Page 30: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

If you want to purchase ECSs of other specifications in the current billing mode, you can clickAdd to List to add them to the shopping list.

16. On the page for you to confirm ECS specifications, you can view details about theapplication and submit the application.– In Yearly/Monthly billing mode, after confirming the specifications and price of

the order, agree to the service agreement and click Submit Order. If you do notwant to pay the order now, click Confirm Order and Pay Later on the right ofSubmit Application. The system reserves your order. You can choose Order >Unpaid Orders on the page showing your personal information to locate yourunpaid order and click Pay Now or Cancel Order.

– In Pay-per-use billing mode, after confirming the specifications and price of theorder, agree to the service agreement and click Submit Application.

17. Select a payment mode, and click OK.

NOTE

This operation applies only to the Yearly/Monthly billing mode.

– The system provides four payment methods: Pay by balance, Pay by platform,Pay by online banking, and Pay by transfer and remittance.

– If you select Pay by balance, recharge your account in time to ensure that youraccount has sufficient balance to pay your order.

– If you select Pay by platform and Pay by online banking, perform operations asprompted to pay your order.

– If you select Pay by transfer and remittance, transfer money to a specifiedaccount based on information provided on the displayed page and submit a workorder.

18. The system performs different operations for different billing modes.– Yearly/monthly: Pay for the ECS as prompted by the system. After the payment

succeeds, the system automatically creates the ECS. You can view the ECS creationprogress on the Elastic Cloud Server page.

– Pay-per-use: After you apply for an ECS, if the account balance is sufficient, thesystem automatically creates the ECS. You can view the ECS creation progress onthe Elastic Cloud Server page.

19. Click Buy Now.

NOTE

Creating an ECS takes several minutes. You can check the creation progress by viewing the ECScreation status. For details, see section 3.3.1 Viewing ECS Creation Statuses.

Step 2: Log In to the ECSYou can log in to a Windows ECS using either VNC or MSTSC provided on the public cloud.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 22

Page 31: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-1 Windows ECS login modes

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Select the target ECS for login.4. (Optional) Obtain the password.

To log in to a key-authenticated ECS, use the password obtaining function provided bythe management console to decrypt the key file for obtaining a password.For details, see section 6.2 Obtaining the Password for Logging In to a WindowsECS.

5. Select a login mode as required to log in to the ECS.– VNC

For details, see section Logging In to an ECS Using VNC.– MSTSC

For details, see section 3.2.2 Login Using an MSTSC Password.

Follow-up Procedurel After an ECS with automatic recovery enabled is created, you can check whether this

function has been enabled by viewing Failed Tasks. For details, see section ECSInstances > Status Management > Viewing Failed Tasks in Elastic Cloud ServerUser Guide.

l If you have added a data disk during ECS creation, you must initialize the data disk afterlogging in to the ECS.For details, see section 2.4 Initializing EVS Data Disks.

l After creating an ECS and logging in to it, you are advised to install password reset plug-ins. If your ECS password is lost or has expired, you can use the plug-ins to reset thepassword with a few clicks. For instructions about how to install the password resetplug-ins, see section 2.5 (Optional) Installing One-Click Password Reset Plug-ins.

l Certain ECSs require the installation of a driver after you log in to them. For detailsabout available ECS types as well as their functions and usage, see section "Notes" insection 1.7 Instances and Application Scenarios.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 23

Page 32: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

2.3 Purchasing and Logging In to a Linux ECS

Scenarios

ECSs are more cost-effective than physical servers. Within minutes, you can obtain ECSresources from the public cloud. ECS resources are flexible and on-demand. This sectiondescribes how to purchase an ECS.

Step 1: Purchase an ECS

Step 2: Log In to the ECS

Notes

Dedicated physical resources

To run an ECS on isolated physical hardware, apply for a Dedicated Computing Cluster(DCC) before creating the ECS.

For details about DCC, see Dedicated Computing Cluster User Guide.

Step 1: Purchase an ECS1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Click Buy ECS.

The ECS purchasing page is displayed.4. Select a billing mode, Yearly/Monthly or Pay-per-use.

– In Yearly/Monthly billing mode, purchase an ECS configuration and set ValidityPeriod. Then, the system deducts the fees incurred at one time from your accountbased on the service price.

NOTE

The ECSs paid in monthly/yearly mode cannot be deleted. They support only resourceunsubscription. If an ECS is no longer used, switch to the Elastic Cloud Server page, clickMore in the Operation column of this ECS, and select Unsubscribe to unsubscribe it.

– In Pay-per-use billing mode, after purchasing an ECS configuration, you do notneed to set Validity Period. Then, the system deducts the fees incurred from youraccount based on the service duration.

5. Confirm the region.

If the region is incorrect, click in the upper left corner of the page for correction.6. Select an AZ.

An AZ is a physical region where power and networks are physically isolated. AZs in thesame region can communicate with each other over an intranet.– To enhance application availability, create ECSs in different AZs.– To shorten network latency, create ECSs in the same AZ.

7. Set Specifications.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 24

Page 33: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

The public cloud provides various ECS types for different application scenarios. You canview released ECS types and specifications in the list. Alternatively, you can enter aflavor (such as c3) or specify vCPUs and memory size to search for the desired flavor.

NOTE

l Before selecting an ECS type, learn the introduction and notes on each type of ECSs. Fordetails, see section 1.7 Instances and Application Scenarios.

l When purchasing an ECS, you are not allowed to select sold-out CPU and memory resources.

8. Click Image.– Public image

A public image is a standard, widely used image. It contains an OS and preinstalledpublic applications and is available to all users. You can configure the applicationsor software in the public image as needed.

– Private imageA private image is an image available only to the user who creates it. It contains anOS, preinstalled public applications, and the user's private applications. Using aprivate image to create ECSs removes the need to configure multiple ECSsrepeatedly.You can also select an encrypted image. For details, see Image Management ServiceUser Guide.If you have used a CSBS backup to create a private image (full-ECS image), youcan use the full-ECS image. However, the EVS disk in the image does not supportdisk creation using a data disk image, and disk attributes (such as SCSI/VBD anddata encryption) cannot be modified. For more details about how to use CSBSbackups to create images, see section "Using Backups to Create Images" in CloudServer Backup Service User Guide and section "Creating a Full-ECS Image Using aCSBS Backup" in Image Management Service User Guide.

– Shared imageA shared image is a private image shared by another user.

9. Set Disk.A disk can be a system disk or a data disk. You can create multiple data disks for an ECSand customize their disk sizes.– System Disk

If the image based on which an ECS is created is not encrypted, the system disk ofthe ECS is not encrypted. In addition, Unencrypted is displayed for the system diskon the page. If the image based on which an ECS is created is encrypted, the systemdisk of the ECS is automatically encrypted. For details, see section (Optional)Encryption-related parameters.

– Data DiskYou can create multiple data disks for an ECS and configure sharing and encryptionfor each data disk.n SCSI: indicates that the device type of the data disk is SCSI. For more

information about SCSI disks and the ECSs that can be attached with SCSIdisks, see section 1.3 Storage.

n Share: indicates that the EVS disk is shared. Such an EVS disk can beattached to multiple ECSs.

n Encryption: indicates that the data disk is encrypted. For details, see section(Optional) Encryption-related parameters.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 25

Page 34: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

– (Optional) Encryption-related parametersTo enable encryption, click Create Xrole to grant KMS access rights to EVS. Ifyou have rights granting permission, grant the KMS access rights to EVS. If you donot have the permission, contact the user having the security administrator rights togrant the KMS access rights.n Encrypted: indicates that the EVS disk has been encrypted.n Create Xrole: grants KMS access rights to EVS to obtain KMS keys. After

the rights are granted, follow-up operations do not require granting rightsagain.

n KMS Key Name: specifies the name of the key used by the encrypted EVSdisk. By default, the name is evs/default.

n Xrole Name: EVSAccessKMS: specifies that rights have been granted toEVS to obtain KMS keys for encrypting or decrypting EVS disks.

n KMS Key ID: specifies the ID of the key used by the encrypted data disk.For details about the disk types supported by the ECS, see section 1.3 Storage. For moreinformation about EVS disks, see Elastic Volume Service User Guide.

NOTE

If you detach the system disk purchased when you buy a yearly/monthly ECS and want tocontinue using it as a system disk, you can only attach it to the original ECS. If you want to use itas a data disk, you can attach it to any ECS.

If you detach the non-shared data disk purchased when you buy a yearly/monthly ECS and want toattach it again, you can only attach it to the original ECS as a data disk.

The data disk purchased when you buy a yearly/monthly ECS does not support separate renewal,unsubscription, automatic service renewal, conversion to pay-per-use payment, and release.

10. Set network parameters, including VPC, Security Group, NIC, and EIP.When you use VPC for the first time, the system automatically creates a VPC for you,including the security group and NIC.

Table 2-3 Parameter descriptions

Parameter Description

VPC Provides a network, including subnet and security group, for anECS.You can select an existing VPC, or click View VPC and create adesired one.For more information about VPC, see Virtual Private Cloud UserGuide.NOTE

Ensure that DHCP is enabled in the VPC to which the ECS belongs.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 26

Page 35: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Parameter Description

Security Group Controls ECS access within or between security groups by definingaccess rules. This enhances ECS security.When creating an ECS, you can select multiple (recommended notmore than five) security groups. In such a case, the access rules ofall the selected security groups apply on the ECS.NOTE

Before initializing an ECS, ensure that the security group rule in theoutbound direction meets the following requirements:

l Protocol: TCPl Port Range: 80l Remote End: 169.254.0.0/16If you use the default security group rule in the outbound direction, thepreceding requirements are met, and the ECS can be initialized. The defaultsecurity group rule in the outbound direction is as follows:

l Protocol: ANYl Port Range: ANYl Remote End: 0.0.0.0/16

NIC Includes primary and extension NICs. You can add multipleexpansion NICs to an ECS and specify IP addresses for them(including primary NICs).NOTE

If you specify an IP address when creating multiple ECSs in a batch:

l This IP address serves as the start IP address.

l Ensure that the IP addresses required by the ECSs are within the subnet,consecutive, and available.

l This subnet cannot duplicate a subnet with a specified start IP address.

MTU Settings: optionalIf your ECS is of M2, large-memory, H1, or D1 type, you can clickMTU Settings to configure the maximum transmission unit (MTU)for a to-be-added extension NIC for improving networkperformance.An MTU can only be a number, ranging from 1280 to 8888.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 27

Page 36: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Parameter Description

EIP A static public IP address bound to an ECS in a VPC. Using the EIP,the ECS provides services externally.The following options are provided:l Do not use

Without an EIP, the ECS cannot access the Internet and is usedonly in the private network or cluster.

l Automatically assignThe system automatically assigns an EIP for the ECS. The EIPprovides exclusive bandwidth that is configurable.

l SpecifyAn existing EIP is assigned for the ECS. When using an existingEIP, you cannot create ECSs in batches.

NOTEFor a yearly/monthly ECS, Automatically assign is unavailable to EIP. If anEIP is required, bind an existing EIP to the ECS. Alternatively, purchase anEIP that is charged in pay-per-use mode and then bind the EIP to the ECS.

Specifications l When changes occur on a network using static BGP, networkconfigurations cannot be promptly adjusted to ensure optimaluser experience.

l When changes occur on a network using dynamic BGP, networkconfigurations can be promptly adjusted using the specifiedrouting protocol, ensuring network stability and optimal userexperience.

Billing Mode This parameter is mandatory if your ECS is charged in pay-per-usemode and EIP is set to Automatically assign.Bandwidth: The EIP bandwidth is charged based on the actualtraffic you have used.Traffic: You are charged based on the actual traffic you have used.

11. Set Login Mode.

Key pair is recommended because it features higher security than Password. If youselect Password, ensure that the password meets complexity requirements listed inTable 2-4 to prevent malicious attacks.– Key pair

A key pair is used for ECS login authentication. You can select an existing key pair,or click View Key Pair and create a desired one.

NOTE

If you use an existing key pair, make sure that you have saved the key file locally.Otherwise, logging in to the ECS will fail.

– PasswordA username and its initial password are used for ECS login authentication.The initial password of user root is used for authentication in Linux, while that ofuser Administrator is used for authentication in Windows. The passwords mustmeet the requirements described in Table 2-4.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 28

Page 37: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Table 2-4 Password complexity requirements

Parameter Requirement ExampleValue

Password l Consists of 8 characters to 26 characters.l Contains at least three of the following character

types:– Uppercase letters– Lowercase letters– Numerals– Special characters:

$!@%-_=+[]:./^,{}?

l Cannot contain the username or the username inreverse.

l Cannot contain more than two characters in thesame sequence as they appear in the username.(This requirement applies only to WindowsECSs.)

Test12!@

NOTE

The system does not automatically change the password for logging in to an ECS on aregular basis. It is recommended that you change your password regularly for security.

12. Configure Advanced Settings.To use functions listed in Advanced Settings, click Configure now. Otherwise, click Donot configure.– User Data Injection

Enables the ECS to automatically inject user data when the ECS starts for the firsttime. This configuration is optional.For example, if you activate user root permission using script data injection, youcan log in to the ECS as user root.For detailed operations, see section 3.14 Injecting User Data into ECSs.

– ECS GroupAn ECS group applies the anti-affinity policy to the ECSs in it so that the ECSs canbe distributed on different hosts. This configuration is optional. For instructionsabout how to create an ECS group, see section 3.13 Creating an ECS Group.

– Throughput OptimizationEnabling throughput optimization increases the data I/O bandwidth between ECSsand EVS disks, improving storage performance.

– Agency NameThis configuration is optional. An agency is created by the tenant administrator inIAM and provides a temporary credential for an ECS to access cloud services. Ifyou have created an agency in IAM, you can select the agency name from the drop-down list and obtain specified operation permissions.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 29

Page 38: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

13. Set ECS Name.The name can be customized but must comply with the following naming rules: Cancontain only letters, digits, underscores (_), hyphens (-), and periods (.).If you want to purchase multiple ECSs at a time, the system automatically sequencesthese ECSs.If multiple ECSs are purchased at the same time, the system automatically adds a hyphenfollowed by a four-digit incremental number to the end of each ECS name. For example,if you enter ecs, the ECSs will be named ecs-0001, ecs-0002, .... If you purchase multipleECSs again, the values in the new ECS names increase from the existing maximumvalue. For example, the existing ECS with the maximum number in name is ecs-0010. Ifyou enter ecs, the names of the new ECSs will be ecs-0011, ecs-0012, .... When the valuereaches 9999, it will start from 0001.Allow duplicate ECS names: allows ECS names to be duplicate. If you select Allowduplicate ECS names and create multiple ECSs in a batch, the created ECSs will havethe same name.

14. Configure the number of ECSs to be purchased.– Usage Duration: sets the service duration if you select the Yearly/Monthly billing

mode. The usage duration ranges from one month to three years.– Quantity: sets the number of ECSs to be purchased.

The maximum number of ECSs you are allowed to purchase is displayed. To ensureeffective resource usage, an upper limit is set on the ECSs to be purchased. If thenumber of ECSs you need exceeds the maximum number of ECSs you are allowedto purchase, click Increase Quota to obtain a higher quota. You can purchase theECSs you need after the request is approved.

– ECS Price: shows the ECS configuration fee.For details, click Price details.

15. Click Buy Now.– If you select Pay-per-use, click Buy Now.– If you have any question about the price, click Price Details.

NOTE

If you want to purchase ECSs of other specifications in the current billing mode, you can clickAdd to List to add them to the shopping list.

16. On the page for you to confirm ECS specifications, you can view details about theapplication and submit the application.– In Yearly/Monthly billing mode, after confirming the specifications and price of

the order, agree to the service agreement and click Submit Order. If you do notwant to pay the order now, click Confirm Order and Pay Later on the right ofSubmit Application. The system reserves your order. You can choose Order >Unpaid Orders on the page showing your personal information to locate yourunpaid order and click Pay Now or Cancel Order.

– In Pay-per-use billing mode, after confirming the specifications and price of theorder, agree to the service agreement and click Submit Application.

17. Select a payment mode, and click OK.

NOTE

This operation applies only to the Yearly/Monthly billing mode.

– The system provides four payment methods: Pay by balance, Pay by platform,Pay by online banking, and Pay by transfer and remittance.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 30

Page 39: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

– If you select Pay by balance, recharge your account in time to ensure that youraccount has sufficient balance to pay your order.

– If you select Pay by platform and Pay by online banking, perform operations asprompted to pay your order.

– If you select Pay by transfer and remittance, transfer money to a specifiedaccount based on information provided on the displayed page and submit a workorder.

18. The system performs different operations for different billing modes.

– Yearly/monthly: Pay for the ECS as prompted by the system. After the paymentsucceeds, the system automatically creates the ECS. You can view the ECS creationprogress on the Elastic Cloud Server page.

– Pay-per-use: After you apply for an ECS, if the account balance is sufficient, thesystem automatically creates the ECS. You can view the ECS creation progress onthe Elastic Cloud Server page.

19. Click Buy Now.

NOTE

Creating an ECS takes several minutes. You can check the creation progress by viewing the ECScreation status. For details, see section 3.3.1 Viewing ECS Creation Statuses.

Step 2: Log In to the ECS

The method of logging in to an ECS varies depending on the login authentication configuredduring ECS purchasing.

Figure 2-2 Linux ECS login modes

l To log in to a key-authenticated ECS for the first time, use a tool, such as PuTTY orXShell, and the desired SSH key as user root. Ensure that the ECS has an EIP bound.

For instructions about how to log in to a Linux ECS using an SSH key, see section 3.1.1Login Using an SSH Key.

NOTE

If you want to log in to an ECS using VNC provided on the management console, log in to theECS using an SSH key, configure the login password, and use the password for login.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 31

Page 40: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l To log in to a password-authenticated ECS for the first time, use either VNC or an SSHpassword as user root. When you log in to the ECS using an SSH password, ensure thatthe ECS has an EIP bound.For details about how to log in to the ECS using VNC, see section 3.1.3 Login UsingVNC.For details about how to log in to the ECS using the SSH password, see section 3.1.2Login Using an SSH Password.

Follow-up Procedurel After an ECS with automatic recovery enabled is created, you can check whether this

function has been enabled by viewing Failed Tasks. For details, see section ECSInstances > Status Management > Viewing Failed Tasks in Elastic Cloud ServerUser Guide.

l If you have added a data disk during ECS creation, you must initialize the data disk afterlogging in to the ECS.For details, see section 2.4 Initializing EVS Data Disks.

l After creating an ECS and logging in to it, you are advised to install password reset plug-ins. If your ECS password is lost or has expired, you can use the plug-ins to reset thepassword with a few clicks. For instructions about how to install the password resetplug-ins, see section 2.5 (Optional) Installing One-Click Password Reset Plug-ins.

l Certain ECSs require the installation of a driver after you log in to them. For detailsabout available ECS types as well as their functions and usage, see section "Notes" insection 1.7 Instances and Application Scenarios.

2.4 Initializing EVS Data DisksIf you have added a data disk during ECS creation, you must initialize the data disk afterlogging in to the ECS.

ScenariosAfter an EVS disk is attached to a server, you need to log in to the server to initialize the disk,that is, format the disk. The disk can be used after being initialized.l System disk

A system disk does not need to be initialized because it is automatically created andinitialized upon the server creation. The default disk partition style is master boot record(MBR).

l Data disk– If a data disk is created upon the creation of a server, the data disk will be

automatically attached to the server.– If a data disk is created explicitly, you need to manually attach the data disk to a

server.In both cases, the data disk can only be used after being initialized. Choose a proper diskpartition style base on your service plans.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 32

Page 41: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Disk Partition Style

Table 2-5 lists the common disk partition styles. For Linux OSs, different disk partition stylesrequire different partitioning tools.

Table 2-5 Disk partition styles

Disk PartitionStyle

MaximumDisk CapacitySupported

Maximum Number ofPartitions Supported

LinuxPartitioningTool

Master Boot Record(MBR)

2 TB l 4 primary partitionsl 3 primary partitions

and 1 extendedpartition

NOTEWith the MBR partitionstyle, primary partitions andan extended partition can beincluded, where the extendedpartition can contain severallogical partitions.

For example, if 6 partitionsneed to be created, you cancreate the partitions in thefollowing two ways:

l 3 primary partitions and1 extended partition,with the extendedpartition containing 3logical partitions

l 1 primary partition and 1extended partition, withthe extended partitioncontaining 5 logicalpartitions

l fdiskl parted

Guid Partition Table(GPT)

18 EBNOTE

1 EB = 1048576TB

UnlimitedNOTE

Disk partitions allocatedusing GPT are notcategorized.

parted

NOTICEThe maximum disk capacity supported by MBR is 2 TB, and that supported by GPT is 18 EB.Currently, an EVS data disk supports up to 32 TB. Therefore, use the GPT partition style ifyour disk capacity is greater than 2 TB.

If you change the disk partition style after the disk has been used, the original data on the diskwill be cleared. Therefore, select a proper disk partition style when initializing the disk.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 33

Page 42: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

2.4.1 Initializing a Windows Data Disk (Windows Server 2008)

ScenariosThis section uses Windows Server 2008 R2 Enterprise 64bit to describe how to initialize adata disk attached to a server running Windows.

The maximum disk capacity supported by MBR is 2 TB, and that supported by GPT is 18 EB.Therefore, use the GPT partition style if your disk capacity is greater than 2 TB. For detailsabout disk partition styles, see section 2.4 Initializing EVS Data Disks.

The method for initializing an EVS disk varies depending on the OS running on the server.This document is used for reference only. For the detailed operations and differences, see theproduct documents of the OSs running on the corresponding servers.

NOTICEWhen using an EVS disk for the first time, if you have not initialized the disk, includingcreating partitions and file systems, the additional capacity added to the disk in a laterexpansion operation may not be normally used.

Prerequisitesl You have logged in to the server.l A data disk has been attached to the server and has not been initialized.

Procedure

Step 1 On the desktop of the server, right-click Computer and choose Manage from the shortcutmenu.

The Server Manager window is displayed.

Step 2 In the navigation tree, choose Storage > Disk Management.

The Disk Management window is displayed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 34

Page 43: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-3 Disk Management

Step 3 Disks are listed in the right pane. In the Disk 1 area, right-click Offline and choose Onlinefrom the shortcut menu to online the disk.

Figure 2-4 Online the disk

NOTE

If the disk is offline, you need to online the disk before initializing it.

Step 4 After making the disk online, the disk status changes from Offline to Not Initialized. Right-click the disk status and choose Initialize Disk from the shortcut menu, as shown in Figure2-5.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 35

Page 44: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-5 Initialize Disk

Step 5 In the Initialize Disk dialog box, select the target disk, click MBR (Master Boot Record),and click OK, as shown in Figure 2-6.

Figure 2-6 Unallocated disk space

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 36

Page 45: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTICEThe maximum disk capacity supported by MBR is 2 TB, and that supported by GPT is 18 EB.Currently, an EVS data disk supports up to 32 TB. Therefore, use the GPT partition style ifyour disk capacity is greater than 2 TB.If you change the disk partition style after the disk has been used, the original data on the diskwill be cleared. Therefore, select a proper disk partition style when initializing the disk.

Step 6 Right-click at the unallocated disk space and choose New Simple Volume from the shortcutmenu, as shown in Figure 2-7.

Figure 2-7 Creating a simple volume

Step 7 On the displayed New Simple Volume Wizard window, click Next.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 37

Page 46: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-8 New Simple Volume Wizard

Step 8 Specify the simple volume size as required (the default value is the maximum) and clickNext.

Figure 2-9 Specify Volume Size

Step 9 Assign the driver letter and click Next.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 38

Page 47: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-10 Assigning Driver Letter or Path

Step 10 Select Format this volume with the following settings, set parameters based on the actualrequirements, and select Perform a quick format. Then click Next.

Figure 2-11 Format Partition

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 39

Page 48: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-12 Completing the partition creation

NOTICEThe partition sizes supported by file systems vary. Therefore, you are advised to choose anappropriate file system based on your service requirements.

Step 11 Click Finish to complete the wizard. Wait for the initialization to complete. When the volumestatus changes to Healthy, the initialization has finished successfully, as shown in Figure2-13.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 40

Page 49: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-13 Disk initialization succeeded

----End

2.4.2 Initializing a Windows Data Disk (Windows Server 2016)

Scenarios

This section uses Windows Server 2016 Standard 64bit to describe how to initialize a datadisk attached to a server running Windows.

The maximum disk capacity supported by MBR is 2 TB, and that supported by GPT is 18 EB.Therefore, use the GPT partition style if your disk capacity is greater than 2 TB. For detailsabout disk partition styles, see section 2.4 Initializing EVS Data Disks.

The method for initializing an EVS disk varies depending on the OS running on the server.This document is used for reference only. For the detailed operations and differences, see theproduct documents of the OSs running on the corresponding servers.

NOTICEWhen using an EVS disk for the first time, if you have not initialized the disk, includingcreating partitions and file systems, the additional capacity added to the disk in a laterexpansion operation may not be normally used.

Prerequisitesl You have logged in to the server.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 41

Page 50: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l A data disk has been attached to the server and has not been initialized.

Procedure

Step 1 On the desktop of the server, click .

The Windows Server window is displayed.

Figure 2-14 Windows Server

Step 2 Click Server Manager.

The Server Manager window is displayed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 42

Page 51: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-15 Server Manager

Step 3 In the navigation tree on the left, choose File and Storage Services.

The Servers page is displayed.

Figure 2-16 Servers

Step 4 In the navigation tree on the left, choose Disks.

The Disks page is displayed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 43

Page 52: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-17 Disks

Step 5 Disks are listed in the right pane. If the new disk is in the offline state, bring it online beforeinitialize it.

1. Right-click the new disk and choose Bring Online from the shortcut menu.The Bring Disk Online dialog box is displayed.

Figure 2-18 Bring Disk Online

2. Click Yes to confirm the operation.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 44

Page 53: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3. Click in the upper area of the page to refresh the disk information.When the disk status changes from Offline to Online, the disk has been brought online.

Figure 2-19 Bring online succeeded

Step 6 After the disk has been brought online, initialize the disk.

1. Right-click the new disk and choose Initialize from the shortcut menu.The Initialize Disk dialog box is displayed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 45

Page 54: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-20 Initialize Disk

2. Click Yes to confirm the operation.

3. Click in the upper area of the page to refresh the disk information.When the disk partition changes from Unknown to GPT, the initialization is complete.

Figure 2-21 Completing initialization

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 46

Page 55: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Step 7 In the lower left area of the page, click To create a volume, start the New Volume Wizard.to create a new volume.

The New Volume Wizard window is displayed.

Figure 2-22 New Volume Wizard

Step 8 Follow the prompts and click Next.

The Select the server and disk page is displayed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 47

Page 56: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-23 Select the server and disk

Step 9 Select the server and disk, and then click Next. The system selects the server attached withthe disk by default. You can specify the server based on your requirements. In this example,the default setting is used.

The Specify the size of the volume page is displayed.

Figure 2-24 Specify the size of the volume

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 48

Page 57: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Step 10 Specify the volume size and click Next. The system selects the maximum volume size bydefault. You can specify the volume size as required. In this example, the default setting isused.

The Assign to a drive letter or folder page is displayed.

Figure 2-25 Assign to a drive letter or folder

Step 11 Assign the volume to a drive letter or folder and click Next. The system assigns the volume todrive letter D by default. In this example, the default setting is used.

The Select file system settings page is displayed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 49

Page 58: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-26 Select file system settings

Step 12 Specify file system settings and click Next. The system selects the NTFS file system bydefault. You can specify the file system type based on the actual condition. In this example,the default setting is used.

NOTICEThe partition sizes supported by file systems vary. Therefore, you are advised to choose anappropriate file system based on your service requirements.

The Confirm selections page is displayed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 50

Page 59: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-27 Confirm selections

Step 13 Confirm the volume location, volume properties, and file system settings. Then click Createto create a volume.

If the page shown in Figure 2-28 is displayed, the volume is successfully created.

Figure 2-28 Completion

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 51

Page 60: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Step 14 After the volume is created, click and check whether a new volume appears in FileExplorer. In this example, New Volume (D:) is the new volume.l If New Volume (D:) appears, the disk is successfully initialized and no further action is

required.

Figure 2-29 File Explorer

l If New Volume (D:) does not appear, perform the following operations to assign thevolume to another drive letter or folder:

a. Click , enter cmd, and press Enter.The Administrator: Command Prompt window is displayed.

b. Run the diskmgmt command.The Disk Management page is displayed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 52

Page 61: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-30 Disk Management

c. In the right pane of Disk 1, right-click and choose Change Drive Letter andPaths.The Change Drive Letter and Paths for New Volume dialog box is displayed.

Figure 2-31 Change Drive Letter and Paths for New Volume

d. Click Add.The Add Drive Letter or Path dialog box is displayed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 53

Page 62: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-32 Add Drive Letter or Path

e. Select Assign the following drive letter to re-assign the volume to a drive letter.Then, click OK. Drive letter D is used in this example.

After assigning the drive letter, you can view New Volume (D:) in File Explorer.

NOTE

The drive letter selected here must be the same as that set in Step 11.

----End

2.4.3 Initializing a Linux Data Disk (fdisk)

Scenarios

This section uses CentOS 7.0 64bit to describe how to initialize a data disk attached to aserver running Linux and use fdisk to partition the data disk.

The maximum disk capacity supported by MBR is 2 TB, and that supported by GPT is 18 EB.Therefore, use the GPT partition style if your disk capacity is greater than 2 TB. In LinuxOSs, if the GPT partition style is used, the fdisk partitioning tool cannot be used. The partedpartitioning tool must be used. For details about disk partition styles, see section 2.4Initializing EVS Data Disks.

The method for initializing an EVS disk varies depending on the OS running on the server.This document is used for reference only. For the detailed operations and differences, see theproduct documents of the OSs running on the corresponding servers.

NOTICEWhen using an EVS disk for the first time, if you have not initialized the disk, includingcreating partitions and file systems, the additional capacity added to the disk in a laterexpansion operation may not be normally used.

Prerequisitesl You have logged in to the server as user root.

l A data disk has been attached to a server and has not been initialized.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 54

Page 63: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Creating Partitions and Mounting a Disk

The following example shows you how a new primary partition can be created on a new datadisk that has been attached to a server. The primary partition will be created using fdisk, andMBR is the default partition style. Furthermore, the partition will be formatted using the ext4file system, mounted on /mnt/sdc, and configured automatic mounting upon system start.

Step 1 Run the following command to query information about the added data disk:

fdisk -l

Information similar to the following is displayed:

[root@ecs-b656 test]# fdisk -l

Disk /dev/xvda: 42.9 GB, 42949672960 bytes, 83886080 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x000cc4ad

Device Boot Start End Blocks Id System/dev/xvda1 * 2048 2050047 1024000 83 Linux/dev/xvda2 2050048 22530047 10240000 83 Linux/dev/xvda3 22530048 24578047 1024000 83 Linux/dev/xvda4 24578048 83886079 29654016 5 Extended/dev/xvda5 24580096 26628095 1024000 82 Linux swap / Solaris

Disk /dev/xvdb: 10.7 GB, 10737418240 bytes, 20971520 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes

In the command output, the server contains two disks. /dev/xvda is the system disk, and /dev/xvdb is the added data disk.

Step 2 Run the following command to enter fdisk to partition the added data:

fdisk Newly added data disk

In this example, /dev/xvdb is the newly added data disk.

fdisk /dev/xvdb

Information similar to the following is displayed:

[root@ecs-b656 test]# fdisk /dev/xvdbWelcome to fdisk (util-linux 2.23.2).Changes will remain in memory only, until you decide to write them.Be careful before using the write command.Device does not contain a recognized partition tableBuilding a new DOS disklabel with disk identifier 0xb00005bd.Command (m for help):

Step 3 Enter n and press Enter to create a new partition.

Information similar to the following is displayed:

Command (m for help): nPartition type: p primary (0 primary, 0 extended, 4 free) e extended

There are two types of disk partitions:

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 55

Page 64: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l Choosing p creates a primary partition.l Choosing e creates an extended partition.

Step 4 Enter p and press Enter to create a primary partition.

Information similar to the following is displayed:

Select (default p): pPartition number (1-4, default 1):

Partition number indicates the serial number of the primary partition. The value can be 1 to4.

Step 5 Enter the serial number of the primary partition and press Enter. Primary partition number 1is used in this example. One usually starts with partition number 1 when partitioning an emptydisk.

Information similar to the following is displayed:

Partition number (1-4, default 1): 1First sector (2048-20971519, default 2048):

First sector indicates the first sector. The value can be 2048 to 20971519, and the defaultvalue is 2048.

Step 6 Select the default first sector 2048 and press Enter.

Information similar to the following is displayed:

First sector (2048-20971519, default 2048):Using default value 2048Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519):

Last sector indicates the last sector. The value can be 2048 to 20971519, and the defaultvalue is 20971519.

Step 7 Select the default last sector 20971519 and press Enter.

Information similar to the following is displayed:

Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519):Using default value 20971519Partition 1 of type Linux and of size 10 GiB is setCommand (m for help):

A primary partition has been created for a 10-GB data disk.

Step 8 Enter p and press Enter to view the details about the created partition.

Information similar to the following is displayed:

Command (m for help): p

Disk /dev/xvdb: 10.7 GB, 10737418240 bytes, 20971520 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0xb00005bd

Device Boot Start End Blocks Id System/dev/xvdb1 2048 20971519 10484736 83 Linux

Command (m for help):

Details about the /dev/xvdb1 partition are displayed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 56

Page 65: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Step 9 Enter w and press Enter to write the changes into the partition table.

Information similar to the following is displayed:

Command (m for help): wThe partition table has been altered!

Calling ioctl() to re-read partition table.Syncing disks.

The partition is successfully created.

NOTE

In case that you want to discard the changes made before, you can exit fdisk by entering q.

Step 10 Run the following command to synchronize the new partition table to the OS:

partprobe

Step 11 Run the following command to set the format for the file system of the newly createdpartition:

mkfs -t File system format /dev/xvdb1

For example, run the following command to set the ext4 file system for the /dev/xvdb1partition:

mkfs -t ext4 /dev/xvdb1

Information similar to the following is displayed:

[root@ecs-b656 test]# mkfs -t ext4 /dev/xvdb1mke2fs 1.42.9 (28-Dec-2013)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks655360 inodes, 2621184 blocks131059 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=215167795280 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: doneWriting inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: done

The formatting takes a period of time. Observe the system running status and do not exit.

NOTICEThe partition sizes supported by file systems vary. Therefore, you are advised to choose anappropriate file system based on your service requirements.

Step 12 Run the following command to create a mount point:

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 57

Page 66: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

mkdir Mount point

For example, run the following command to create the /mnt/sdc mount point:

mkdir /mnt/sdc

Step 13 Run the following command to mount the new partition on the created mount point:

mount /dev/xvdb1 Mount point

For example, run the following command to mount the newly created partition on /mnt/sdc:

mount /dev/xvdb1 /mnt/sdc

Step 14 Run the following command to view the mount result:

df -TH

Information similar to the following is displayed:

[root@ecs-b656 test]# df -THFilesystem Type Size Used Avail Use% Mounted on/dev/xvda2 xfs 11G 7.4G 3.2G 71% /devtmpfs devtmpfs 4.1G 0 4.1G 0% /devtmpfs tmpfs 4.1G 82k 4.1G 1% /dev/shmtmpfs tmpfs 4.1G 9.2M 4.1G 1% /runtmpfs tmpfs 4.1G 0 4.1G 0% /sys/fs/cgroup/dev/xvda3 xfs 1.1G 39M 1.1G 4% /home/dev/xvda1 xfs 1.1G 131M 915M 13% /boot/dev/xvdb1 ext4 11G 38M 9.9G 1% /mnt/sdc

The newly created /dev/xvdb1 is mounted on /mnt/sdc.

----End

Setting Automatic Disk Mounting at System Start

To automatically mount a disk when a server starts, you should not specify its partition, forexample /dev/xvdb1, in /etc/fstab. Because the sequence of cloud devices, and therefore theirnames may change during the server stop and start. You are advised to use the universallyunique identifier (UUID) in /etc/fstab to automatically mount a disk at system start.

NOTE

The UUID is the unique character string for disk partitions in a Linux system.

Step 1 Run the following command to query the partition UUID:

blkid Disk partition

For example, run the following command to query the UUID of /dev/xvdb1:

blkid /dev/xvdb1

Information similar to the following is displayed:

[root@ecs-b656 test]# blkid /dev/xvdb1/dev/xvdb1: UUID="1851e23f-1c57-40ab-86bb-5fc5fc606ffa" TYPE="ext4"

The UUID of /dev/xvdb1 is displayed.

Step 2 Run the following command to open the fstab file using the vi editor:

vi /etc/fstab

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 58

Page 67: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Step 3 Press i to enter the editing mode.

Step 4 Move the cursor to the end of the file and press Enter. Then add the following information:UUID=1851e23f-1c57-40ab-86bb-5fc5fc606ffa /mnt/sdc ext4 defaults 0 2

Step 5 Press Esc, enter :wq, and press Enter.

The system saves the configurations and exits the vi editor.

----End

2.4.4 Initializing a Linux Data Disk (parted)

ScenariosThis section uses CentOS 7.0 64bit to describe how to initialize a data disk attached to aserver running Linux and use parted to partition the data disk.

The maximum disk capacity supported by MBR is 2 TB, and that supported by GPT is 18 EB.Therefore, use the GPT partition style if your disk capacity is greater than 2 TB. In LinuxOSs, if the GPT partition style is used, the fdisk partitioning tool cannot be used. The partedpartitioning tool must be used. For details about disk partition styles, see section 2.4Initializing EVS Data Disks.

The method for initializing an EVS disk varies depending on the OS running on the server.This document is used for reference only. For the detailed operations and differences, see theproduct documents of the OSs running on the corresponding servers.

NOTICEWhen using an EVS disk for the first time, if you have not initialized the disk, includingcreating partitions and file systems, the additional capacity added to the disk in a laterexpansion operation may not be normally used.

Prerequisitesl You have logged in to the server as user root.l A data disk has been attached to a server and has not been initialized.

Creating Partitions and Mounting a DiskThe following example shows you how new partitions can be created on a new data disk thathas been attached to a server. The partitions will be created using parted, and GPT is used asthe partition style. Furthermore, the partitions will be formatted using the ext4 file system,mounted on /mnt/sdc, and configured automatic mounting at system start.

Step 1 Run the following command to query information about the added data disk:

lsblk

Information similar to the following is displayed:

[root@ecs-centos-70 linux]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 59

Page 68: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

xvda 202:0 0 40G 0 disk ├─xvda1 202:1 0 4G 0 part [SWAP]└─xvda2 202:2 0 36G 0 part /xvdb 202:16 0 10G 0 disk

In the command output, the server contains two disks. /dev/xvda is the system disk, and /dev/xvdb is the added data disk.

Step 2 Run the following command to enter parted to partition the added data disk:

parted Added data disk

In this example, /dev/xvdb is the newly added data disk.

parted /dev/xvdb

Information similar to the following is displayed:

[root@ecs-centos-70 linux]# parted /dev/xvdbGNU Parted 3.1Using /dev/xvdbWelcome to GNU Parted! Type 'help' to view a list of commands.

Step 3 Enter p and press Enter to view the current disk partition style.

Information similar to the following is displayed:

(parted) pError: /dev/xvdb: unrecognised disk labelModel: Xen Virtual Block Device (xvd) Disk /dev/xvdb: 10.7GBSector size (logical/physical): 512B/512BPartition Table: unknownDisk Flags:

In the command output, the Partition Table value is unknown, indicating that the diskpartition style is unknown.

Step 4 Run the following command to set the disk partition style:

mklabel Disk partition style

For example, run the following command to set the partition style to GPT: (Disk partitionstyles include MBR and GPT.)

mklabel gpt

NOTICEThe maximum disk capacity supported by MBR is 2 TB, and that supported by GPT is 18 EB.Currently, an EVS data disk supports up to 32 TB. Therefore, use the GPT partition style ifyour disk capacity is greater than 2 TB.If you change the disk partition style after the disk has been used, the original data on the diskwill be cleared. Therefore, select a proper disk partition style when initializing the disk.

Step 5 Enter p and press Enter to view the disk partition style.

Information similar to the following is displayed:

(parted) mklabel gpt (parted) p

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 60

Page 69: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Model: Xen Virtual Block Device (xvd)Disk /dev/xvdb: 20971520sSector size (logical/physical): 512B/512BPartition Table: gptDisk Flags:

Number Start End Size File system Name Flags

Step 6 Enter unit s and press Enter to set the measurement unit of the disk to sector numbers.

Step 7 Enter mkpart opt 2048s 100% and press Enter.

In this example, one partition is created for the added data disk. Variable 2048s indicates thedisk start capacity, and variable 100% indicates the disk end capacity. The two values are usedfor reference only. You can determine the number of partitions and the partition capacitybased on your service requirements.

Information similar to the following is displayed:(parted) mkpart opt 2048s 100%Warning: The resulting partition is not properly aligned for best performance.Ignore/Cancel? Cancel

If the preceding warning message is displayed, enter Cancel to stop the partitioning. Then,find the first sector with the best disk performance and use that value to partition the disk. Inthis example, the first sector with the best disk performance is 2048s. Therefore, the systemdoes not display the warning message.

Step 8 Enter p and press Enter to view the details about the created partition.

Information similar to the following is displayed:

(parted) p Model: Xen Virtual Block Device (xvd)Disk /dev/xvdb: 20971520sSector size (logical/physical): 512B/512BPartition Table: gptDisk Flags:

Number Start End Size File system Name Flags 1 2048s 20969471s 20967424s opt

Details about the /dev/xvdb1 partition are displayed.

Step 9 Enter q and press Enter to exit parted.

Step 10 Run the following command to view the disk partition information:

lsblk

Information similar to the following is displayed:

[root@ecs-centos-70 linux]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTxvda 202:0 0 40G 0 disk ├─xvda1 202:1 0 4G 0 part [SWAP]└─xvda2 202:2 0 36G 0 part /xvdb 202:16 0 100G 0 disk └─xvdb1 202:17 0 100G 0 part

In the command output, /dev/xvdb1 is the partition you created.

Step 11 Run the following command to set the format for the file system of the newly createdpartition:

mkfs -t File system format /dev/xvdb1

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 61

Page 70: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

For example, run the following command to set the ext4 file system for the /dev/xvdb1partition:

mkfs -t ext4 /dev/xvdb1

Information similar to the following is displayed:

[root@ecs-centos-70 linux]# mkfs -t ext4 /dev/xvdb1mke2fs 1.42.9 (28-Dec-2013)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks655360 inodes, 2620928 blocks131046 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=215167792580 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: done

The formatting takes a period of time. Observe the system running status and do not exit.

NOTICEThe partition sizes supported by file systems vary. Therefore, you are advised to choose anappropriate file system based on your service requirements.

Step 12 Run the following command to create a mount point:

mkdir Mount point

For example, run the following command to create the /mnt/sdc mount point:

mkdir /mnt/sdc

Step 13 Run the following command to mount the new partition on the created mount point:

mount /dev/xvdb1 Mount point

For example, run the following command to mount the newly created partition on /mnt/sdc:

mount /dev/xvdb1 /mnt/sdc

Step 14 Run the following command to view the mount result:

df -TH

Information similar to the following is displayed:

[root@ecs-centos-70 linux]# df -THFilesystem Type Size Used Avail Use% Mounted on/dev/xvda2 xfs 39G 4.0G 35G 11% /devtmpfs devtmpfs 946M 0 946M 0% /dev

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 62

Page 71: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

tmpfs tmpfs 954M 0 954M 0% /dev/shmtmpfs tmpfs 954M 9.1M 945M 1% /runtmpfs tmpfs 954M 0 954M 0% /sys/fs/cgroup/dev/xvdb1 ext4 11G 38M 101G 1% /mnt/sdc

The newly created /dev/xvdb1 is mounted on /mnt/sdc.

----End

Setting Automatic Disk Mounting at System Start

To automatically mount a disk when a server starts, you should not specify its partition, forexample /dev/xvdb1, in /etc/fstab. Because the sequence of cloud devices, and therefore theirnames may change during the server stop and start. You are advised to use the universallyunique identifier (UUID) in /etc/fstab to automatically mount a disk at system start.

NOTE

The UUID is the unique character string for disk partitions in a Linux system.

Step 1 Run the following command to query the partition UUID:

blkid Disk partition

For example, run the following command to query the UUID of /dev/xvdb1:

blkid /dev/xvdb1

Information similar to the following is displayed:

[root@ecs-b656 test]# blkid /dev/xvdb1/dev/xvdb1: UUID="1851e23f-1c57-40ab-86bb-5fc5fc606ffa" TYPE="ext4"

The UUID of /dev/xvdb1 is displayed.

Step 2 Run the following command to open the fstab file using the vi editor:

vi /etc/fstab

Step 3 Press i to enter the editing mode.

Step 4 Move the cursor to the end of the file and press Enter. Then add the following information:UUID=1851e23f-1c57-40ab-86bb-5fc5fc606ffa /mnt/sdc ext4 defaults 0 2

Step 5 Press Esc, enter :wq, and press Enter.

The system saves the configurations and exits the vi editor.

----End

2.5 (Optional) Installing One-Click Password Reset Plug-ins

The public cloud platform provides the password reset function. If the password of your ECSis lost or expires and your ECS has password reset plug-ins installed, you can reset thepassword with a few clicks.

This method is convenient and efficient. After you have created an ECS, you are advised tolog in to it and install the password reset plug-ins.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 63

Page 72: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

l By default, one-click password reset plug-ins have been installed on the ECSs created using publicimages. To check the plug-ins installation, see Step 1.

Notes1. The one-click password reset plug-ins can only be used on ECSs and do not support Bare

Metal Servers (BMSs). For instructions about how to reset the password of a BMS, seeBare Metal Server User Guide.

2. You can determine whether to install the password reset plug-ins.

3. After the installation, do not uninstall the plug-ins by yourself. Otherwise, the ECSpassword cannot be reset.

4. After you reinstall or change the OS of an ECS, the one-click password reset functionwill become invalid. If you want to continue using this function, reinstall password resetplug-ins.

5. After you replace the system disk of an ECS, the one-click password reset function willbecome invalid. If you want to continue using this function, reinstall password resetplug-ins.

6. Password reset plug-ins cannot be installed on a CoreOS ECS.

7. If one-click password reset plug-ins have not been installed before the ECS password islost or expired, the plug-ins cannot be used to reset the ECS password.

8. One-click password reset plug-ins can automatically update only after an EIP is bound tothe ECS.

9. One-click password reset plug-ins have been open-sourced in the GitHub open-sourceplatform according to GNU General Public License v2.0.

Prerequisitesl The available space in drive C of a Windows ECS is greater than 300 MB, and data can

be written to it.

The available space in root directory of a Linux ECS is greater than 300 MB, and datacan be written to it.

l ECSs created using SUSE 11 SP4 must have 4 GB or a larger memory.

l Ensure that DHCP is enabled in the VPC to which the ECS belongs.

l The ECS network connectivity is normal.

l The ECS security group rule in the outbound direction meets the following requirements:

– Protocol: TCP– Port Range: 80– Remote End: 169.254.0.0/16If you use the default outbound security group rule, the preceding requirements are met,and the ECS can be initialized. Default security group rules in the outbound direction areas follows:

– Protocol: ANY– Port Range: ANY– Remote End: 0.0.0.0/16

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 64

Page 73: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Installing Password Reset Plug-ins on a Linux ECS

Step 1 Use either of the following methods to check whether the password reset plug-ins have beeninstalled on the ECS:

Method 1: Use the management console for query.

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Locate the row containing the target ECS, click More in the Operation column, and

select Reset Password from the drop-down list.– If the dialog box shown in Figure 2-33 is displayed, the password reset plug-ins

have been installed. No further action is required.

Figure 2-33 Information displayed if the password reset plug-ins have beeninstalled

– If the dialog box shown in Figure 2-34 is displayed, the password reset plug-inshave not been installed. Then, install them.

Figure 2-34 Information displayed if the password reset plug-ins have not beeninstalled

Method 2: Use the ECS for query.

1. Log in to the ECS as user root.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 65

Page 74: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

2. Run the following command to check whether CloudResetPwdAgent andCloudResetPwdUpdateAgent have been installed:ls -lh /Cloud*

Figure 2-35 Checking whether the plug-ins have been installed

Check whether the obtained information is similar to that shown in Figure 2-35.– If yes, the plug-ins have been installed.– If no, the plug-ins have not been installed. Then, install them.

Step 2 Download the one-click password reset plug-in CloudResetPwdAgent.zip according to yourOS, 32bit or 64bit.

There is no special requirement for the directory that stores CloudResetPwdAgent.zip.Customize the directory.

l For the 32bit OS, run the following command:wget http://ap-southeast-1-cloud-reset-pwd.obs.myhwclouds.com/linux/32/reset_pwd_agent/CloudResetPwdAgent.zipDownload path: http://ap-southeast-1-cloud-reset-pwd.obs.myhwclouds.com/linux/32/reset_pwd_agent/CloudResetPwdAgent.zip

l For the 64bit OS, run the following command:wget http://ap-southeast-1-cloud-reset-pwd.obs.myhwclouds.com/linux/64/reset_pwd_agent/CloudResetPwdAgent.zipDownload path: http://ap-southeast-1-cloud-reset-pwd.obs.myhwclouds.com/linux/64/reset_pwd_agent/CloudResetPwdAgent.zip

Step 3 Run the following command to decompress CloudResetPwdAgent.zip:

There is no special requirement for the directory that stores the decompressedCloudResetPwdAgent.zip. Customize the directory.

unzip -o -d Decompressed directory CloudResetPwdAgent.zip

An example is provided as follows:

If the decompressed directory is /home/linux/test, run the following command:

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 66

Page 75: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

unzip -o -d /home/linux/test CloudResetPwdAgent.zip

Step 4 Install the one-click password reset plug-ins.

1. Run the following command to open the CloudResetPwdUpdateAgent.Linux file:cd CloudResetPwdAgent/CloudResetPwdUpdateAgent.Linux

2. Run the following command to add the execute permission for the setup.sh file:chmod +x setup.sh

3. Run the following command to install the plug-ins:sudo sh setup.sh

4. Run the following commands to check whether the installation is successful:service cloudResetPwdAgent statusservice cloudResetPwdUpdateAgent statusIf the status of CloudResetPwdAgent and CoudResetPwdUpdateAgent is notunrecognized service, the installation is successful. Otherwise, the installation failed.

NOTE

– You can also check whether the password reset plug-ins have been installed using the methodsprovided in Step 1.

– If the installation failed, check whether the installation environment meets requirements andinstall the plug-ins again.

----End

Installing Password Reset Plug-ins on a Windows ECS

Step 1 Log in to the ECS.

Step 2 Check whether password reset plug-ins CloudResetPwdAgent andCloudResetPwdUpdateAgent have been installed on the ECS. To check this, perform thefollowing operations:

Start the Task Manager and check whether cloudResetPwdAgent andcloudResetPwdUpdateAgent are displayed on the Services tab.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 67

Page 76: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 2-36 Windows Task Manager

l If yes, no further action is required.

l If no, go to Step 3.

Step 3 Download package CloudResetPwdAgent.zip.

There is no special requirement for the directory that stores CloudResetPwdAgent.zip.Customize the directory.

Download path: http://ap-southeast-1-cloud-reset-pwd.obs.myhwclouds.com/windows/reset_pwd_agent/CloudResetPwdAgent.zip

Step 4 Decompress CloudResetPwdAgent.zip.

There is no special requirement for the directory that stores the decompressedCloudResetPwdAgent.zip. Customize the directory.

Step 5 Install the plug-ins.

1. Double-click setup.bat in both CloudResetPwdAgent.Windows andCloudResetPwdUpdateAgent.Windows.

The password reset plug-ins start to be installed.

2. View the Task Manager and check whether the installation is successful.

If cloudResetPwdAgent and cloudResetPwdUpdateAgent are displayed in the TaskManager, as shown in Figure 2-36, the installation is successful. Otherwise, theinstallation failed.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 68

Page 77: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

If the installation failed, check whether the installation environment meets requirements and installthe plug-ins again.

----End

Follow-up Procedurel After the one-click password reset plug-ins are installed, you can add them to the startup

items if they cannot automatically start upon ECS startup. For details, see What Can IDo If the One-Click Password Reset Plug-ins Failed to Start?

l After installing the one-click password reset plug-ins, do not delete theCloudResetPwdAgent or CloudResetPwdUpdateAgent process. Otherwise, one-clickpassword reset will not be available.

l One-click password reset plug-ins have been upgraded. New ECSs work in PIPE modeby default, preventing the plug-ins from using service ports. Existing ECSs still work inAUTO mode. In this mode, a plug-in automatically uses an idle service port with thesmallest port number ranging from 31000 to 32999. If the used port conflicts with theservice port, see 9.11 What Should I Do If a Service Port Is Used by a One-ClickPassword Reset Plug-in? for troubleshooting.

Updating the Plug-ins

You do not need to pay special attention to the plug-in updating because the system willautomatically update them.

Uninstalling the Plug-ins

If you do not need the password reset function any more, perform the following operations touninstall the plug-ins:

l For Linux ECSs:

a. Log in to the ECS.b. Run the following commands to open the bin file and delete cloudResetPwdAgent:

cd /CloudrResetPwdAgent/binsudo ./cloudResetPwdAgent.script remove

c. Run the following commands to open the bin file and deletecloudResetPwdUpdateAgent:cd /CloudResetPwdUpdateAgent/binsudo ./cloudResetPwdUpdateAgent.script remove

d. Run the following commands to delete the plug-ins:sudo rm -rf /CloudrResetPwdAgentsudo rm -rf /CloudResetPwdUpdateAgent

l For Windows ECSs:

a. Switch to the C:\CloudResetPwdUpdateAgent\bin directory.b. Double-click UninstallApp-NT.bat.c. Delete the file in C:\CloudResetPwdUpdateAgent.d. Switch to the C:\CloudResetPwdAgent\bin directory.

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 69

Page 78: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

e. Double-click UninstallApp-NT.bat.f. Delete the file in C:\CloudResetPwdAgent.

2.6 (Optional) Configuring Mapping Between Hostnamesand IP Addresses

After creating a Linux ECS, you can configure the mapping between the ECS hostname andIP address. After the configuration, you can use the hostname to access the ECS.

Procedure

Step 1 Obtain the private IP address of the ECS.

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. On the Elastic Cloud Server page, obtain the private IP address in the IP Address

column.

Step 2 Obtain the ECS hostname.

1. Log in to the ECS.2. Run the following command to view the ECS hostname:

sudo hostname

Step 3 Set up the mapping between the ECS hostname and IP address.

1. Run the following command to switch to user root:sudo su -

2. Run the following commands to edit the hosts configuration file:vi /etc/hosts

3. Press i to enter editing mode.4. Add the following statement in the following format to set up the mapping:

Private IP address hostnameAn example is provided as follows:If the ECS hostname is hostname and the private IP address of the ECS is 192.168.0.1,add the following statement:192.168.0.1 hostname

5. Press Esc to exit editing mode.6. Run the following command to save the configuration and exit:

:wq

----End

Elastic Cloud ServerUser Guide 2 Getting Started

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 70

Page 79: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3 ECS Instances

3.1 Logging In to a Linux ECS

OverviewYou can only log in to a running ECS.

A Linux ECS can be logged in using either VNC or SSH.

l Logging in to an ECS using VNCIf no EIP is bound to an ECS, you can remotely log in to the ECS on the managementconsole.

l Logging in to an ECS using SSHThis method applies only to Linux ECSs. You can use a remote login tool, such asPuTTY, to log in to the ECS. Ensure that the ECS has an EIP bound.

NOTE

Both an SSH key and an SSH password can be used for logins.

3.1.1 Login Using an SSH Key

Prerequisitesl You have obtained the private key file used during ECS purchasing.l You have bound an EIP to the ECS. For details, see section 3.3.3 Viewing ECS Details.

l You have configured the inbound rules of the security group. For details, see section 4.1Configuring Security Group Rules.

l The network connection between the login tool (PuTTY) and the target ECS is normal.For example, the default port 22 is not blocked by the firewall.

Logging In to the Linux ECS from a Windows ComputerTo log in to the Linux ECS from a Windows computer, perform the operations described inthis section.

Method 1: Use PuTTY to log in to the ECS.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 71

Page 80: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

The following procedure uses PuTTY as an example. Before logging in to the ECS usingPuTTY, make sure that the private key file has been converted to .ppk format.

1. Check whether the private key file has been converted to .ppk format.– If yes, go to step 7.– If no, go to step 2.

2. Visit the following website and download PuTTY and PuTTYgen:http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

NOTE

PuTTYgen is a private key generator, which is used to create a key pair that consists of a publickey and a private key for PuTTY.

3. Run PuTTYgen.4. In the Actions area, click Load and import the private key file that you stored during

ECS purchasing.Ensure that the private key file is in the format of All files (*.*).

5. Click Save private key.6. Save the converted private key, for example, kp-123.ppk, to the local computer.7. Double-click PUTTY.EXE. The PuTTY Configuration page is displayed.8. Choose Connection > Data. Enter the image username in Auto-login username.

NOTE

If an ECS is logged in using an SSH key pair,

l The image username is core for a CoreOS public image.

l The image username is root for a non-CoreOS public image.

9. Choose Connection > SSH > Auth. In the last configuration item Private key file forauthentication, click Browse and select the private key converted in step 6.

10. Choose Session and enter the EIP of the ECS under Host Name (or IP address).

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 72

Page 81: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 3-1 Configuring the EIP

11. Click Open.Log in to the ECS.

Method 2: Use Xshell to log in to the ECS.

1. Start the Xshell tool.2. Run the following command using the EIP to remotely log in to the ECS through SSH:

ssh Username@EIPAn example is provided as follows:ssh [email protected]

3. (Optional) If the system displays the SSH Security Warning dialog box, click Accept& Save.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 73

Page 82: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

4. Select Public Key and click Browse beside the user key text box.5. In the user key dialog box, click Import.6. Select the locally stored key file and click Open.7. Click OK to log in to the ECS.

Logging In to the Linux ECS from a Linux ComputerTo log in to the Linux ECS from a Linux computer, perform the operations described in thissection. The following procedure uses private key file kp-123.pem as an example to log in tothe ECS. The name of your private key file may differ.

1. On the Linux CLI, run the following command to change operation permissions:chmod 400 /path/kp-123

NOTE

In the preceding command, path refers to the path where the key file is saved.

2. Run the following command to log in to the ECS:ssh -i /path/kp-123 Default username@EIPFor example, if the default username is linux, run the following command:ssh -i /path/kp-123 linux@EIP

NOTE

In the preceding command:

l path is the path where the key file is saved.

l EIP is the EIP bound to the ECS.

Follow-up Procedurel After logging in to an ECS using an SSH key, you can set the login password for the

ECS. In follow-up operations, you can log in to the Linux ECS using VNC.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 74

Page 83: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3.1.2 Login Using an SSH Password

Prerequisitesl You have bound an EIP to the ECS. For details, see section 3.3.3 Viewing ECS Details.l You have configured the inbound rules of the security group. For details, see section 4.1

Configuring Security Group Rules.l The network connection between the login tool (PuTTY) and the target ECS is normal.

For example, the default port 22 is not blocked by the firewall.

Login Operationsl Windows

To log in to the Linux ECS from a Windows computer, perform the operations describedin this section.The following procedure uses PuTTY as an example to log in to the ECS.

a. Run PuTTY.b. Choose Session and enter the EIP of the ECS under Host Name (or IP address).c. Click Window. Then, select UTF-8 for Received data assumed to be in which

character set: in Translation.d. Click Open.e. Enter username and the password you set during ECS purchasing.

NOTE

The username and password for the first login to a public image (including CoreOS) are asfollows:l Username: rootl Password: the one you set when you bought the ECS.

l LinuxTo log in to the Linux ECS from a Linux computer, run the following command:ssh EIP bound to the ECS

3.1.3 Login Using VNCThis section describes how to use VNC provided on the management console to log in to anECS.

For instructions about how to copy and paste data on VNC pages after the ECS login, seesection Follow-up Procedure.

NOTE

For a Linux ECS authenticated using a key pair:l For the first login, use the SSH key pair. For details, see section 3.1.1 Login Using an SSH Key.l For a non-first login, if you want to use the remote login function (VNC) provided by the

management console, log in to the ECS using the SSH key and set the password.

Restrictions and Limitationsl The remote login function is implemented using customized ports. Therefore, before

attempting to log in remotely, ensure that the port to be used is not blocked by the

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 75

Page 84: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

firewall. For example, if the remote login link is xxx:8002, ensure that port 8002 is notblocked by the firewall.

l If the client OS uses a local proxy and the firewall port cannot be configured on the localproxy, disable the proxy mode and then try logging in remotely.

Prerequisitesl You have used an SSH key to log in to the Linux ECS authenticated using a key pair and

set a login password.l An EIP has been bound to the ECS.

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. In the search box above the upper right corner of the ECS list, enter the ECS name, IP

address, or ID, and click .4. Locate the row containing the ECS and click Remote Login in the Operation column.5. (Optional) If the system displays "Press CTRL+ALT+DELETE to log on", click Send

CtrlAltDel in the upper right corner of the remote login page to log in to the ECS.

Figure 3-2 Send CtrlAltDel

NOTE

Do not press CTRL+ALT+DELETE on the physical keyboard because this operation does nottake effect.

6. Enter the ECS password as prompted.

Follow-up ProcedureCommands can be copied from a local directory to the ECS. This function is unidirectional.The method is as follows:

1. Log in to the ECS using VNC.2. Click Input Commands in the upper right corner of the page.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 76

Page 85: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 3-3 Input Commands

3. Press Ctrl+C to copy data from the local computer.

4. Press Ctrl+V to paste the local data to the Copy Commands window.

5. Click Send.

Send the copied data to the CLI.

NOTE

When you use the VNC command input function on GUI-based Linux ECSs, there is a low probabilitythat data is lost. The cause is that the number of ECS vCPUs is smaller than the number of vCPUsrequired by GUI. In such a case, you are advised to send a maximum of 5 characters at a time or switchfrom GUI to CLI (also called text interface), and then use the command input function.

3.2 Logging In to a Windows ECS

Overview

You can only log in to a running ECS.

You can log in to a Windows ECS using either of the following methods: VNC or MSTSC.

l Login using VNC

If no EIP is bound to an ECS, you can remotely log in to the ECS on the managementconsole.

l Login using MSTSC

This option applies only to ECSs running Windows. You can run the mstsc command ona local computer to log in to an ECS. Ensure that the ECS has an EIP bound.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 77

Page 86: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

If you log in to a GPU-accelerated ECS using MSTSC, GPU acceleration will fail. This is becauseMSTSC replaces the WDDM GPU driver with a non-accelerated remote desktop display driver.

In such an event, you must use other methods to log in to the ECS, such as VNC. If the remotelogin function available on the management console fails to meet your service requirements, youmust install a suitable remote login tool on the ECS, such as tight VNC.

To download the tight VNC, log in at http://www.tightvnc.com/download.php.

3.2.1 Login Using VNCThis section describes how to use VNC provided on the management console to log in to anECS.

Restrictions and Limitationsl The remote login function is implemented using customized ports. Therefore, before

attempting to log in remotely, ensure that the port to be used is not blocked by thefirewall. For example, if the remote login link is xxx:8002, ensure that port 8002 is notblocked by the firewall.

l If the client OS uses a local proxy and the firewall port cannot be configured on the localproxy, disable the proxy mode and then try logging in remotely.

Logging In to a Windows ECS1. Log in to the management console.

2. Under Computing, click Elastic Cloud Server.

3. Obtain the password for logging in to the ECS.

Before logging in to the ECS, you must have the login password.

– If your ECS uses password authentication, log in to the ECS using the passwordconfigured when you created this ECS.

– If your ECS uses key authentication, obtain the password by following theinstructions provided in section 6.2 Obtaining the Password for Logging In to aWindows ECS.

4. In the search box above the upper right corner of the ECS list, enter the ECS name, IP

address, or ID, and click .

5. Locate the row containing the ECS and click Remote Login in the Operation column.

6. (Optional) If the system displays "Press CTRL+ALT+DELETE to log on", click SendCtrlAltDel in the upper right corner of the remote login page to log in to the ECS.

Figure 3-4 Send CtrlAltDel

7. Enter the ECS password as prompted.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 78

Page 87: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3.2.2 Login Using an MSTSC PasswordThis section describes how to use the remote login tool MSTSC to log in to a Windows ECSfrom a local computer.

Prerequisitesl If your ECS uses key authentication, you have obtained the password for logging in to

the Windows ECS. For details, see section 6.2 Obtaining the Password for Logging Into a Windows ECS.

l You have bound an EIP to the ECS. For details, see section 3.3.3 Viewing ECS Details.l You have configured the inbound rules of the security group. For details, see section 4.1

Configuring Security Group Rules.l The network connection between the login tool and the target ECS is normal. For

example, the default port 3389 is not blocked by the firewall.

ProcedureRemote Desktop Protocol (RDP) is disabled on Windows ECSs by default. Before usingMSTSC to log in to a Windows ECS for the first time, use VNC to log in to it and enableRDP.

Step 1 Check whether RDP is enabled on the Windows ECS.

1. Log in to the Windows ECS using VNC.For details, see section 3.2.1 Login Using VNC.

2. Click Start in the task bar and choose Control Panel > System and Security > System> Remote settings.The System Properties dialog box is displayed.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 79

Page 88: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 3-5 System Properties

3. Click the Remote tab and select Allow connections from computers running anyversion of Remote Desktop (less secure).

4. Click OK.

Step 2 On your local computer, use MSTSC to log in to the Windows ECS.

1. Click Start in the task bar.

2. In the Search programs and files box, enter mstsc.

3. Log in to the ECS according to the prompts.

To ensure system security, change the login password after you log in to the ECS for thefirst time.

Step 3 (Optional) After logging in to the ECS using RDP, handle the issue that local files larger than2 GB cannot be copied to a remote Windows ECS.

Perform this step only when you need to use RDP clipboard. This issue occurs due toWindows OS limitations. For details about the handling method, see https://support.microsoft.com/en-us/help/2258090/copying-files-larger-than-2-gb-over-a-remote-desktop-services-or-terminal-services-session-by-using-clipboard-redirection-copy-and-paste-fails-silently.

----End

3.3 Status Management

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 80

Page 89: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3.3.1 Viewing ECS Creation Statuses

Scenarios

After clicking Submit to apply for creating an ECS, you can view the task status in the TaskStatus area. A task involves several sub-tasks, such as creating ECS resources, binding anEIP, and attaching an EVS disk.

The task status may be either Creating or Failed:

l Creating: The system is processing the task.

l Failed: The system failed to process the task. For a failed task, the system rolls back anddisplays an error code, for example, Ecs.0013Insufficient EIP quota. For details abouthow to handle the failure, see section 9.14 How Do I Handle Error MessagesDisplayed on the Management Console?

This section describes how to view an ECS creation status and the information displayed inthe Task Status area.

Procedure1. Log in to the management console.

2. Under Computing, click Elastic Cloud Server.

3. The Task Status is displayed on the right side of common operations, such as Start,Stop, Restart, and Delete. After you purchase an ECS, the Task Status area will showthe task creation status.

4. Click the number displayed in the Task Status area and view details about the tasks inCreating and Failed statuses.

NOTE

If you find that the Task Status area shows an ECS creation failure but the ECS list displays thecreated ECS, see section 10.1.7 Why Does the Task Status Area Show an ECS CreationFailure But the ECS List Displays the Created ECS?

3.3.2 Viewing Failed Tasks

Scenarios

The Error area records the tasks that failed to process due to an error, including the taskname/ID, the time when an operation was performed, and detailed task information. TheError information is displayed on the management console in one of the following scenarios:

l Modifying ECS specifications

When modifying the specifications of an ECS failed, this operation is recorded in Error.

l Enabling automatic recovery during ECS creation

If automatic recovery that is enabled during ECS creation fails to take effect, thisoperation is recorded in Error.

This section describes how to view an error.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 81

Page 90: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. View errors on the right side of common operations, such as Start, Stop, Restart, and

Delete.

NOTE

If Error is not displayed on the management console, the following tasks have been successfullyexecuted:l The ECS specifications are modified.l Automatic recovery is enabled during ECS creation.

4. Click the number in Error to view the tasks that failed to be processed, including thetime when operations were performed, error codes, and error source.– If Create an ECS is displayed in the Task column, enabling automatic recovery

failed when the ECS was created.– If Modify Specifications is displayed in the Task column, modifying the

specifications failed.

3.3.3 Viewing ECS Details

ScenariosAfter purchasing ECSs, you can view and manage them on the management console. Thissection describes how to view detailed ECS configurations, including its name, image, systemdisk, data disks, VPC, NIC, security group, and EIP.

To view the private IP address of an ECS, view it on the Elastic Cloud Server page.

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.

The Elastic Cloud Server page is displayed. On this page, you can view your ECSs andthe basic information about the ECSs, such as their private IP addresses.

3. In the search box above the upper right corner of the ECS list, enter the ECS name, IP

address, or ID, and click .4. Click the name of the target ECS.

The page providing details about the ECS is displayed.5. View the ECS details.

You can modify ECS configurations, for example, change its security group, add a NICto it, or bind an EIP to it, by clicking corresponding links or buttons.

3.3.4 Managing ECS LifecycleECS lifecycle management includes starting, stopping, restarting, and deleting ECSs.

l Starting or stopping a large number of ECSs increases host workload. If you want to startor stop a large number of ECSs, perform the operation in batches to prevent adverseimpact on services running on other ECSs.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 82

Page 91: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l You can forcibly restart or stop an ECS that remains in the Restarting or Stopping statefor a long time at any time. In such a case, any unsaved data on the ECS will be lost.Therefore, exercise caution when forcibly restarting or stopping an ECS.

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. In the search box above the upper right corner of the ECS list, enter the ECS name, IP

address, or ID, and click .4. Select the ECS and click Start, Stop, Restart, or Delete in the upper left corner of the

ECS list.5. Confirm the displayed information. Table 3-1 describes the ECS statuses.

Table 3-1 ECS statuses

Status StatusAttribute

Description API Status

Creating Intermediate The ECS has been created but isnot running.

BUILD orBUILDING

Starting Intermediate The ECS is between theStopped and Running states.

SHUTOFF

Running Stable The ECS is running properly.An ECS in this state can provideservices.

ACTIVE

Stopping Intermediate The ECS is between theRunning and Stopped states.

ACTIVE

Stopped Stable The ECS has been properlystopped.An ECS in this state cannotprovide services.

SHUTOFF

Restarting Intermediate The ECS is being restarted. REBOOT

Resizing Intermediate The ECS has received a resizingrequest and has started to resize.

RESIZE

Verifyingresizing

Intermediate The ECS is verifying themodified configuration.

VERIFY_RESIZE

Deleting Intermediate The ECS is being deleted.If the ECS remains in this statefor a long time, exceptions mayhave occurred. In such an event,contact the administrator.

ACTIVE,SHUTOFF,REBOOT,RESIZE,VERIFR_RESIZE,HARD_REBOOT,REVERT_RESIZE,or ERROR

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 83

Page 92: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Status StatusAttribute

Description API Status

Deleted Intermediate The ECS has been deleted. AnECS in this state cannot provideservices and will be promptlycleared from the system.

DELETED

Faulty Stable An exception has occurred onthe ECS.An ECS in this state cannotprovide services. Contact theadministrator.

ERROR

ReinstallingOS

Intermediate The ECS has received a requestto reinstall the OS and has begunthe reinstallation.

SHUTOFF

ReinstallingOS failed

Stable The ECS received a request toreinstall the OS, but due toexceptions, the reinstallationfailed.An ECS in this state cannotprovide services. Contact theadministrator.

SHUTOFF

ChangingOS

Intermediate The ECS received a request tochange the OS and has begunimplementing the changes.

SHUTOFF

OS Changefailed

Stable The ECS has received a requestto change the OS, but due toexceptions, the changes failed tobe implemented.An ECS in this state cannotprovide services. Contactcustomer service.

SHUTOFF

Forciblyrestarting

Intermediate The ECS is being forciblyrestarted.

HARD_REBOOT

Rollingbackresizing

Intermediate The ECS is rolling backresizing.

REVERT_RESIZE

Freezing aproduct

Stable If your ECS has expired oroverdue, the systemadministrator will stop the ECS.An ECS in this state cannotprovide services. After sometime, if you do not recharge it, itwill be automatically deleted.

SHUTOFF

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 84

Page 93: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

If an ECS remains in an intermediate state for over 30 minutes, exceptions may have occurred. Inthis event, contact the administrator.

3.4 Modifying ECS vCPU and Memory Specifications

Scenarios

If the ECS specifications do not meet service requirements, you can modify the ECSspecifications, including vCPUs and memory. Certain ECSs allow you to change their typeswhen you modify their specifications.

Notesl When modifying the specifications of an ECS, you are not allowed to select sold-out

CPU and memory resources.l If ECS specifications are downgraded, the ECS performance is deteriorated.l Certain ECSs do not support specifications modification currently. For details about

available ECS types as well as their functions and usage, see section "Notes" in 1.7Instances and Application Scenarios.

Step 1: Modify Specifications1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. On the Elastic Cloud Server page, view the status of the target ECS.

If the ECS is not in Stopped state, click More in the Operation column and select Stop.4. Click More in the Operation column and select Modify Specifications.

The Modify ECS Specifications page is displayed.5. Select the new ECS type, vCPUs, and memory as prompted.6. Click OK.7. Confirm the modified configuration. Read and select the service agreement, and then

click Submit.8. Check whether the specifications have been modified.

After modifying the specifications, you can check whether the specifications have beenmodified in Error.

a. Check whether Error is displayed on the management console. For details, seesection 3.3.2 Viewing Failed Tasks.n If yes, go to step 8.b.n If no, the specifications have been modified.

b. Click the error and check whether the target specifications modification task isincluded by ECS name/ID, operation time, or task.n If yes, the specifications modification failed. See section Follow-up

Procedure for failure causes.n If no, the specifications have been modified.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 85

Page 94: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Step 2: Check Disk AttachmentAfter specifications are modified, disk attachment may fail. Therefore, check disk attachmentafter specifications modification. If disks are properly attached, the specificationsmodification is successful.

l Windows ECSs

a. Check whether the number of disks displayed on the Computer page afterspecifications modification is the same as that before specifications modifications.n If yes, the disks are properly attached. No further action is required.n If no, an error has occurred in disk attachment. In such a case, go to b.An example is provided as follows:Before the specifications modification, there is one system disk and two data disksattached to an ECS running Windows Server 2008.

Figure 3-6 Disk attachment before specifications modification

After the specifications are modified, check disk attachment.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 86

Page 95: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 3-7 Disk attachment after specifications modification

Only one system disk is displayed. Data disks failed to attach after thespecifications modification.

b. Set the affected disks to be online.i. Click Start in the task bar. In the displayed Start menu, right-click Computer

and choose Manage from the shortcut menu.The Server Manager page is displayed.

ii. In the navigation pane on the left, choose Storage > Disk Management.The Disk Management pane is displayed.

iii. In the left pane, the disk list is displayed. Right-click the affected disk andchoose Online from the shortcut menu to make it online.

Figure 3-8 Making the disk online

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 87

Page 96: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

c. On the Computer page, check whether the number of disks is the same as thatbefore the specifications modification.n If yes, no further action is required.n If no, contact customer service.

Figure 3-9 Disk attachment after disk online

l Linux ECSs

a. Log in to the ECS as user root.b. Run the following command to view the disks attached before specifications

modification:fdisk -l | grep 'Disk /dev/'

Figure 3-10 Viewing disks attached before specifications modification

As shown in Figure 3-10, the ECS has three disks attached, /dev/vda, /dev/vdb,and /dev/vdc.

c. Run the following command to view disks attached after specificationsmodification:df -h| grep '/dev/'

Figure 3-11 Viewing disks attached after specifications modification

As shown in Figure 3-11, the ECS has only one disk attached, /dev/vda.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 88

Page 97: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

d. Check whether the number of disks obtained in b is the same as that obtained in c.n If yes, the specifications have been modified. No further action is required.n If no, the disk attachment failed. In such a case, go to e.

e. Run the mount command to attach the affected disks.An example is provided as follows:mount /dev/vbd1 /mnt/vbd1In the preceding command, /dev/vbd1 is the disk to be attached, and /mnt/vbd1 isthe path for disk attachment.

NOTICEEnsure that /mnt/vbd1 is empty. Otherwise, the attachment will fail.

f. Run the following commands to check whether the numbers of disks before andafter specifications modification are the same:fdisk -l | grep 'Disk /dev/'df -h| grep '/dev/'n If yes, no further action is required.n If no, contact customer service.

Figure 3-12 Checking the number of disks attached

As shown in Figure 3-12, the disks attached to the ECS after specificationsmodification are /dev/vda, /dev/vdb, /dev/vdc, which are the same as those beforespecifications modification.

Follow-up Procedure

Perform the following operations in the event of a specifications modification failure:

1. Log in to the management console.2. Under Management & Deployment, click Cloud Trace Service.3. In the navigation pane on the left, choose Cloud Trace Service > Trace List.4. In the Trace Name column, locate the resizeServer event by resource ID.

The resource ID is the ID of the ECS on which the specifications modification failed.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 89

Page 98: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

5. Click View Trace in the Operation column to view the failure cause.If the fault cannot be rectified based on logs, contact technical support.

3.5 Changing the Initial Password for Logging In to anECS

Scenarios

After logging in an ECS for the first time, you are suggested to change the initial password.This section describes how to change the password.

Prerequisites

You can log in to the target ECS. If not, see section 3.6 Resetting the Password for LoggingIn to an ECS for troubleshooting.

Background

Table 3-2 shows the ECS password complexity requirements.

Table 3-2 Password complexity requirements

Parameter Requirement ExampleValue

Password l Consists of 8 characters to 26 characters.l Contains at least three of the following character types:

– Uppercase letters– Lowercase letters– Numerals– Special characters:

$!@%-_=+[]:./^,{}?

l Cannot contain the username or the username inreverse.

l Cannot contain more than two characters in the samesequence as they appear in the username. (Thisrequirement applies only to Windows ECSs.)

Test12!@

Windows ECSs1. Log in to the Windows ECS remotely. For details, see section 3.2 Logging In to a

Windows ECS.2. Press Win+R to start the Open dialog box.3. Enter cmd to open the command-line interface (CLI) window.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 90

Page 99: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

4. Run the following command to change the password (the new password must meet therequirements described in Table 3-3):net user Administrator New password

Linux ECSs1. Use the existing key file to log in to the Linux ECS as user root through SSH.

For more details, see section 3.1.1 Login Using an SSH Key.2. Run the following command to reset the password of user root:

passwdTo reset the passwords of other users, replace passwd with passwd username.

3. Enter the new password as prompted. Ensure that the new password meets therequirements described in Table 3-3.New password:Retype new password:If the following information is displayed, the password has been changed:passwd: password updated successfully

3.6 Resetting the Password for Logging In to an ECSReset the password for logging in to an ECS if:

l The password is lost.l The password has expired.

To resolve the issue, use either of the following methods:l If the ECS has had password reset plug-ins installed, see section 3.6.1 Resetting the

ECS Password with a Few Clicks.l If the ECS has not had password reset plug-ins installed, see section 3.6.2 Changing or

Resetting the Password for Logging In to a Windows ECS or 3.6.3 Changing orResetting the Password for Logging In to a Linux ECS.

BackgroundTable 3-3 shows the ECS password complexity requirements.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 91

Page 100: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Table 3-3 Password complexity requirements

Parameter Requirement ExampleValue

Password l Consists of 8 characters to 26 characters.l Contains at least three of the following character types:

– Uppercase letters– Lowercase letters– Numerals– Special characters:

$!@%-_=+[]:./^,{}?

l Cannot contain the username or the username inreverse.

l Cannot contain more than two characters in the samesequence as they appear in the username. (Thisrequirement applies only to Windows ECSs.)

Test12!@

3.6.1 Resetting the ECS Password with a Few ClicksIf the password of your ECS is lost or expires and your ECS has password reset plug-insinstalled, you can reset the password with a few clicks.

NOTE

l Do not delete the CloudResetPwdAgent or CloudResetPwdUpdateAgent process. Otherwise, one-click password reset will not be available.

Prerequisitesl You have installed password reset plug-ins before your ECS password is lost or expires.

For details, see section 2.5 (Optional) Installing One-Click Password Reset Plug-ins.l ECSs created using SUSE 11 SP4 must have 4 GB or a larger memory.l DHCP is enabled in the VPC to which the ECS belongs.l The ECS network connectivity is normal.l The ECS has had an EIP bound.

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Locate the row containing the target ECS, click More in the Operation column, and

select Reset Password from the drop-down list.4. Set and confirm a new password as prompted.

The new password must meet the complexity rules in Table 3-3.5. Click OK.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 92

Page 101: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

It takes about 10 minutes for the system to reset the password. Do not repeatedly performthis operation. During the process, the ECS will be restarted automatically.

Related Linksl 9.10 What Should I Do If I Cannot Log In to My ECS Using the Reset Password?l 9.11 What Should I Do If a Service Port Is Used by a One-Click Password Reset

Plug-in?

3.6.2 Changing or Resetting the Password for Logging In to aWindows ECS

Prerequisitesl A temporary Linux ECS which runs Ubuntu 14.04 or later and locates in the same AZ as

the target ECS is available.l You have bound an EIP to the temporary ECS and configured the apt-get source.l You have used either of the following methods to install ntfs-3g and chntpw software

packages on the temporary ECS:Method 1:Run the following command to install the ntfs-3g and chntpw software packages:sudo apt-get install ntfs-3g chntpwMethod 2:Download the desired ntfs-3g and chntpw software packages according to the temporaryECS OS. For detailed installation and use guide, see the NTFS official website andchntpw official website.Log in at www.tuxera.com/community/open-source-ntfs-3g/ to obtain the ntfs-3gsoftware package.Log in at https://pkgs.org/download/chntpw to obtain the chntpw software package.

Procedure1. Stop the original ECS, detach the system disk from it, and attach the system disk to the

temporary ECS.

a. Log in to the management console.b. Under Computing, click Elastic Cloud Server.c. Stop the original Windows ECS, switch to the page providing details about the

ECS, and click the Disks tab.

NOTE

Do not forcibly stop the Windows ECS. Otherwise, password reset may fail.

d. Locate the row containing the system disk and click Detach to detach the systemdisk from the ECS.

e. On the page providing details about the temporary ECS, click the Disks tab.f. Click Attach Disk. In the displayed dialog box, select the system disk detached in

step 1.d and attach it to the temporary ECS.2. Log in to the temporary ECS remotely and attach the system disk.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 93

Page 102: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

a. Run the following command to view the directory of the system disk detached fromthe original Windows ECS now attached to the temporary ECS:fdisk -l

b. Run the following command to mount the file system of the detached system disk tothe temporary ECS:mount -t ntfs-3g /dev/Result obtained in step 2.a/mnt/For example, if the query result obtained in step 2.a is xvde2, run the followingcommand:mount -t ntfs-3g /dev/xvde2 /mnt/

3. Change the password and clear the original password.

a. Run the following command to back up the SAM file:cp /mnt/Windows/System32/config/SAM /mnt/Windows/System32/config/SAM.bak

b. Run the following command to change the password of a specified user:chntpw -u Administrator /mnt/Windows/System32/config/SAM

c. Enter 1 and y as prompted, and press EnterThe password has been reset if the following information is displayed:Select: [q] > 1Password cleared!

Hives that have changed:#Name0<SAM>Write hive files? (y/n) [n] : y0<SAM> - OK

4. Stop the temporary ECS, detach the system disk, and attach the system disk to theoriginal Windows ECS.

a. Stop the temporary ECS, switch to the page providing details about the ECS, andclick the Disks tab.

b. Click Detach to detach the data disk temporarily attached in step 1.f.c. On the page providing details about the original Windows ECS, click the Disks tab.d. Click Attach Disk. In the displayed dialog box, select the data disk detached in step

4.b and device name /dev/sda.5. Start the original Windows ECS and set a new login password.

a. Click Start to start the original Windows ECS. After the status becomes Running,click Remote Login in the Operation column.

b. Click Start. Enter CMD in the search box and press Enter.c. Run the following command to change the password (the new password must meet

the requirements described in Table 3-3):net user Administrator New password

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 94

Page 103: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3.6.3 Changing or Resetting the Password for Logging In to aLinux ECS

Prerequisitesl A temporary Linux ECS which locates in the same AZ as the target ECS is available.l You have bound an EIP to the temporary ECS.

Procedure1. Download the script for resetting the password and upload the script to the temporary

ECS.

a. Log in to the management console and click Elastic Cloud Server underComputing.

b. Locate the row containing the target ECS, click More in the Operation column,and select Reset Password.The Reset Password dialog box is displayed. Click the text in the red box shown inFigure 3-13 to download the script.

Figure 3-13 Password reset script

You can view the downloaded password reset script in the lower left corner of thedesktop.

c. Use a connection tool, such as WinSCP, to upload the obtained changepasswd.shscript to the temporary ECS.To download WinSCP, log in at http://winscp.net/.

2. Stop the original Linux ECS, detach the system disk, and attach the system disk to thetemporary ECS.

a. Stop the original Linux ECS, switch to the page providing details about the ECS,and click the Disks tab.

NOTE

Do not forcibly stop the original ECS. Otherwise, password reset may fail.

b. Locate the row containing the system disk to be detached and click Detach todetach the system disk from the ECS.

c. On the page providing details about the temporary ECS, click the Disks tab.d. Click Attach Disk. In the displayed dialog box, select the system disk detached in

step 2.b and attach it to the temporary ECS.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 95

Page 104: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3. Log in to the temporary ECS remotely and reset the password.

a. Locate the row containing the temporary ECS and click Remote Login in theOperation column.

b. Run the following command to view the directory of the system disk detached fromthe original Linux ECS now attached to the temporary ECS:

fdisk -l

c. Run the following commands in the directory where the script is stored to run thescript for resetting the password:

chmod +x changepasswd.sh

./changepasswd.sh

When you run the password reset script, if the system displays a message indicatingthat there is no command related to logical volume manager (LVM), such as themessage "no lvs command", install an LVM tool on the temporary ECS. The LVM2tool is recommended, which can be installed by running the yum install lvm2command.

NOTICEIf the original ECS and the temporary ECS both run CentOS 7, a mount failure mayoccur during script execution. To resolve this issue, replace mount $dev$mountPath with mount -o nouuid $dev $mountPath in the script.

d. Enter the new password and the directory obtained in step 3.b as prompted.

If the following information is displayed, the password has been changed:set password success.

4. Stop the temporary ECS, detach the system disk, attach the system disk to the originalLinux ECS, and restart the original Linux ECS.

a. Stop the temporary ECS, switch to the page providing details about the ECS, andclick the Disks tab.

b. Click Detach to detach the data disk attached in step 2.

c. On the page providing details about the original Linux ECS, click the Disks tab.

d. Click Attach Disk. In the displayed dialog box, select the data disk detached in step4.b and device name /dev/sda.

e. Restart the original Linux ECS.

3.7 Managing OSs

3.7.1 Reinstalling the OS

Scenarios

If the OS of an ECS fails to start or requires optimization, reinstall the OS.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 96

Page 105: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Restrictions and Limitationsl The EVS disk quota must be greater than 0.

l If the target ECS is created using a private image, ensure that the private image isavailable.

l If the target ECS is charged on demand, ensure that your account has sufficient balance.

l H2 ECSs do not support OS reinstallation.

Prerequisitesl The target ECS is in the Stopped or Reinstallation failed state.

l The target ECS has a system disk attached.

l Necessary data has been backed up. (Reinstalling the OS clears the data in all partitionsof the EVS system disk, including the system partition.)

Procedure1. Log in to the management console.

2. Under Computing, click Elastic Cloud Server.

3. Locate the row containing the target ECS. Click More in the Operation column andselect Reinstall OS.

If the ECS is not in the Stopped or Reinstallation failed state, stop the ECS beforeproceeding with reinstallation.

4. Configure the login mode.

If the target ECS uses key authentication, you can replace the original key pair.

5. Configure user data injection.

– If you select User Data Injection and enter data in the text box, the user dataimported to the ECS will be updated to the data entered in the text box.

– If you select User Data Injection but leave the text box blank, the user dataimported to the ECS will be cleared.

– If you do not select User Data Injection, the user data imported to the ECS will notbe updated.

NOTE

If Linux is reinstalled on an ECS and the ECS uses password authentication, the ECS does notsupport user data injection.

6. Click OK.

7. On the ECS OS Reinstallation page, confirm the specifications, select I have read andagreed to the agreement, and click Submit.

After the request is submitted, the ECS status changes to Reinstalling. The reinstallationhas been completed when the ECS status changes to Running.

NOTE

A temporary ECS is created during the reinstallation process. After reinstallation, this ECS willautomatically be deleted. Do not perform any operation on the temporary ECS during thereinstallation process.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 97

Page 106: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Follow-up Procedure

If the reinstallation is unsuccessful, perform steps 2 to 7 again to retry reinstalling the OSagain.

If the second reinstallation attempt is unsuccessful, contact customer service for manualrecovery at the backend.

3.7.2 Changing the OS

Scenarios

If the OS running on an ECS cannot meet service requirements, change the ECS OS.

The public cloud supports changing between image types (public images, private images, andshared images) and between OSs (between Windows versions, between Windows and Linux,or between Linux versions).

Notesl After the OS is changed, the original OS is not retained, and the original system disk is

deleted.l After the OS of a pay-per-use ECS is changed, its fees may be different because the

system disk capacity specified by the image of the changed OS may increase.l After the OS of a yearly/monthly ECS is changed, the system disk capacity may be

insufficient because the image of the change OS may be different. In this case, uninstallthe system disk for capacity expansion and then change the OS.

l After the OS of a yearly/monthly ECS is changed, the ECS does not support Marketplaceimages due to cost reasons.

Restrictions and Limitationsl The EVS disk quota must be greater than 0.l The ECSs created using a Marketplace image or yearly/monthly ECSs do not support

changing their OSs.l The free OS of a yearly/monthly ECS can only be changed to another free OS.l H2 ECSs do not support OS change.

Prerequisitesl The target ECS is stopped, or changing/reinstalling OS on the ECS failed.l The target ECS has a system disk attached.l Necessary data has been backed up. (Changing the OS clears the data in all partitions of

the EVS system disk, including the system partition.)

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Locate the row containing the target ECS. Click More in the Operation column and

select Change OS.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 98

Page 107: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

The Change OS page is displayed.

4. Modify related ECS parameters, such as Image Type and Image, based on servicerequirements.

NOTE

For a yearly/monthly ECS, if the system disk capacity is less than the size of your image, you mustdetach the system disk, expand its capacity, and attach it to the original ECS before changing theOS.

For instructions about how to expand the system disk, see section Management > Expanding theCapacity of an EVS Disk > Expanding an EVS Disk Online in the Elastic Volume Service UserGuide.

5. Configure the login mode.

If the target ECS uses key authentication, you can replace the original key pair.

6. Configure user data injection.

– If you select User Data Injection and enter data in the text box, the user dataimported to the ECS will be updated to the data entered in the text box.

– If you select User Data Injection but leave the text box blank, the user dataimported to the ECS will be cleared.

– If you do not select User Data Injection, the user data imported to the ECS will notbe updated.

NOTE

If the changed OS of an ECS is Linux and the ECS uses password authentication, the ECSdoes not support user data injection.

7. Click OK.

8. On the Change ECS OS page, confirm the specifications, select I have read andagreed to the agreement, and click Submit.

After the application is submitted, the ECS status changes to Changing OS. The OSchanging has been completed when Changing OS disappears.

NOTE

A temporary ECS is created during the OS changing process. After the process is complete, thisECS will automatically be deleted.

Follow-up Procedure

If the OS change is unsuccessful, perform steps 2 to 8 again to retry changing the OS again.

If the second OS change attempt is unsuccessful, contact customer service for manualrecovery at the backend.

3.8 Buying the Same ECS

Scenarios

If you have bought an ECS and want to buy new ones with the same configuration, you areadvised to use "Buy Same ECS" provided on the public cloud platform to rapidly buy the newECSs.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 99

Page 108: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Notes

Large-memory ECSs and the ECSs bought using full-ECS images do not support "Buy SameECS".

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Select the target ECS, click More in the Operation column, and select Buy Same ECS.

Figure 3-14 Buy Same ECS

4. The system switches to the Buy ECS page and automatically copies the parametersettings of the selected ECS. Adjust the parameter settings of the new ECSs as required,confirm the configuration, and click Submit.

NOTE

For security purposes, you must manually configure the new ECSs in the following scenarios:

l Add the remaining quantity of data disks if the quantity of desired data disks exceeds 10.

l Add the remaining quantity of NICs if the quantity of desired NICs exceeds 5.

l Add the remaining quantity of security groups if the quantity of desired security groupsexceeds 5.

l Select a new data disk image if the disks of the source ECS are created using a data diskimage.

l Select Encryption if the disks of the source ECS have been encrypted.

l Configure the functions in Advanced Settings.

l Configure EIP if required because it is set to Not required by default.

3.9 Changing the Time Zone for an ECS

Scenarios

The default time zone for an ECS is the one you selected when creating the image that wasused to create the ECS. This section describes how to change the time zone for an ECS to thelocal one or to another time zone in your network.

After you log in to your ECS, if you find that the time on the ECS is different from the localtime, change the time zone for the ECS so that the time on the ECS is the same as the localtime.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 100

Page 109: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

For LinuxThe process of changing the time zone for a Linux ECS depends on the OS. In this section,the CentOS 6.x 64bit OS is used to demonstrate how to change the time zone for a LinuxECS.

1. Log in to the ECS.2. Run the following command to switch to user root:

su - root3. Run the following command to obtain the time zones supported by the ECS:

ls /usr/share/zoneinfo/In the terminal display, the /user/share/zoneinfo directory contains a hierarchy of timezone data files. Use the directory structure shown in Figure 3-15 to obtain your desiredtime zone file.

Figure 3-15 Time zones supported by the ECS

The directory structure shown in Figure 3-15 includes both time zones and directories.The directories contain time zone files for specific cities. Locate the time zone for thecity in which the ECS is located.For example:– If you are to use the time zone for Hong Kong, the directory in which the time zone

file is stored is /usr/share/zoneinfo/Hongkong.– If you are to use the time zone for Paris, France, run the ls /usr/share/zoneinfo/

Europe command to obtain the directory /usr/share/zoneinfo/Europe/Paris.4. Set the target time zone.

a. Run the following command to open the /etc/sysconfig/clock file:vim /etc/sysconfig/clock

b. Locate the ZONE entry and change its value to the name of the desired time zonefile.For example:n If the target time zone is for Hong Kong, change the ZONE entry value to

Hongkong:ZONE="Hongkong"

n If the target time zone is for Paris, change the ZONE entry value to Paris:ZONE="Europe/Paris"

5. Press Esc. Then, run the following command to save and exit the /etc/sysconfig/clockfile::wq

6. Run the following command to check whether the /etc/localtime file is available on theECS:

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 101

Page 110: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

ls /etc/localtime– If the file is available, go to step 7.– If the file is not available, go to step 8.

7. Run the following command to delete the existing /etc/localtime file:rm /etc/localtime

8. Run the following command to create a symbolic link between /etc/localtime and yourtime zone file so that the ECS can find this time zone file when it references the localtime:ln -sf /usr/share/zoneinfo/Hongkong /etc/localtime

9. Run the following command to restart the ECS so that all services and applicationsrunning on the ECS use the new time zone:reboot

10. Log in to the ECS again and run the following command as user root to check whetherthe time zone has been changed:ls -lh /etc/localtime

For Windows1. Log in to the ECS.2. Click the time display on the far right side of the task bar located at the bottom of your

screen. In the dialog box that is displayed, click Change date and time settings.The Date and Time is displayed.

Figure 3-16 Date and Time

3. Click Change time zone.The Time Zone Settings page is displayed.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 102

Page 111: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

4. In the Set the time zone pane, choose the target time zone from the Time zone drop-down list.

5. Click OK.

3.10 Creating an ImageYou can create a private image using an existing ECS. This is an image available only to theuser who created it. It contains an OS, preinstalled public applications, and the user's privateapplications.

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Stop the target ECS.

Select the target ECS which is used to create an image. If the ECS is in the Runningstatus, click More in the Operation column, and select Stop. Wait until the ECS ischanged to the Stopped status.

NOTE

Only the ECSs in South China and Hong Kong regions support the creation of private imageswhen the ECSs are running. This function will be provided in other regions later.

4. Locate the row that contains the ECS, click More in the Operation column, and selectCreate Image.

5. Configure image information as prompted.– Source: Select ECS.– ECS: Retain the default value.– Name: Customize your image name.

6. Click Submit.

3.11 Exporting ECSs

ScenariosThe information of all ECSs under your account can be exported in CSV format to a localdirectory. The file records the IDs, private IP addresses, and EIPs of your ECSs.

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.

3. In the upper right corner of the ECS list, click .The system will automatically export all ECSs in the current region under your accountto a local directory.

NOTE

To export certain ECSs, select them and click in the upper right corner of the page.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 103

Page 112: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

4. In the lower left corner of your local computer desktop, obtain the exported fileservers.csv.

3.12 Managing ECS MetadataECS metadata is used to configure or manage running ECSs. Table 3-4 lists the two sets ofAPIs that ECS metadata supports.

Table 3-4 ECS metadata types

API Type Metadata Type Description Compatibility

OpenStackmetadataAPI

Metadata Displays ECS metadata. Supported

GET Password Displays the password forlogging in to an ECS.

Supported

User Data Displays ECS user data. Supported

POST Password Stores the password forlogging in to an ECS.

Supported

Security Key Obtains temporary AKs andSKs.

Supported

EC2compatibleAPI

ami-id Displays the image ID of anECS.

Supported

ami-launch-index Displays an ECS launchingsequence.

Supported

ami-manifest-path Displays the path where animage list is stored.

Supported

block-device-mapping Displays the block device ofan ECS.

Supported

hostname Displays the name of the hostaccommodating an ECS.

Supported

instance-id Displays an ECS ID. Supported

instance-type Displays an ECS flavor. Supported

local-ipv4 Displays the fixed IP addressof an ECS. If there aremultiple NICs, only the IPaddress of the primary NIC isdisplayed.

Supported

availability-zone Displays the AZaccommodating an ECS.

Supported

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 104

Page 113: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

API Type Metadata Type Description Compatibility

public-ipv4 Displays the floating IPaddress of an ECS. If thereare multiple NICs, only thefloating IP address of theprimary NIC is displayed.

Supported

public-keys Displays the public key of anECS.

Supported

reservation-id Displays an ECS reservationID.

Supported

user-data Displays ECS user data. Supported

instance-action Displays ECS actions. Not supported

kernel-id Displays an ECS kernelimage ID.

Not supported

local-hostname Displays the local name of anECS.

Not supported

public-hostname Displays the external name ofan ECS.

Not supported

ramdisk-id Displays an ECS ramdiskimage ID.

Not supported

security-groups Displays the security group towhich an ECS belongs.

Not supported

The following describes the URI and methods of using the supported ECS metadata.

Prerequisites

Security group rules in the outbound direction meet the following requirements:

l Protocol: TCPl Port Range: 80l Remote End: 169.254.0.0/16

NOTE

If you use the default security group rules in the outbound direction, the preceding requirements are met,and the metadata can be accessed. Default security group rules in the outbound direction are as follows:

l Protocol: ANY

l Port Range: ANY

l Remote End: 0.0.0.0/16

Metadata (OpenStack Metadata API)

Displays ECS metadata.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 105

Page 114: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l URI

/169.254.169.254/openstack/{version}/meta_data.json

l Usage method

Supports GET requests.

l Example

The following section describes how to use the tool cURL to view ECS metadata.

curl http://169.254.169.254/openstack/latest/meta_data.json{ "admin_pass": "sWs9YVAiytTs", "availability_zone": "manage-az", "files": [ { "content_path": "/content/0000", "path": "/etc/litao.ini" } ], "hostname": "lt-test-01.novalocal", "launch_index": 0, "meta": { "test_key": "test_vaule" }, "name": "lt-test-01", "public_keys": { "novakey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCr4Mk6fRqbPRXE3lq9NivYvrysz0/D+gAWCgKCG46lU+x3aLRRtUwpSoX4W7FtRegHAp7EpIhmW40vM+9HrKEZbQsaiyfe0VP/cHZFKJLU9cnDJNMIb0WoIjLWDORnUnsfZL1tFaYyIcAdIl6TuB92sj4Bg8xrYCn3nfNtSSfHHszvHIc0kys7AC+ellL4NWlyeGDSkmsHS0vnIP0mpRgpB2QShmx/ZEIQQ+YxMoL8z+A44+v/V+/R8K7aJK3LbQ8Yu8vwky9M1OLG176s9pQnTmdlrKNWc4dYC8zNRxaFvyuUO9FD71OSEkmoZwkbhYHmIVIw49d0OIr63ok8mMij root@6B1AA2D2-3B57-11DA-8567-000000821800\n" }, "random_seed": "ptvKzBu5SNFrWKAiar62VT7KOGZS38T3VdpEjRDmBOwF0RGKvjNGXasAXZo8KfzBPCq+MupA4Ig9mUyHWJiAcI7IvOQV7EWubJ4pxQn2tNxrwRR7VdSR8WJUqeZV1FjxxgxjJkQtnWmrT57J+SEaqzRP64ONYdikPnBlOIpnsj+gKMXxDmFL3tQ0ljC2vKdZdbjc8QkT84/dnbJpx/DaatkiLWVVTmlGhP72j/0NH1JbAnv5EECS5z51h2YFnRxJOJFlSCwnl5UuFRjsO82T+7usRjK0IXAvDIKcqQlzrV5WWXrWc1e+yejIjjVvAGad5PcjLeaGaEEBNo5eBJ9e4FZHLkkUV7naYGsLiOLjO3qZjvFM1gcaKsrv92/Ys2DbwHFfV0Xo/uNA9Jx7MFIXELdNOfDP8nS4fVp52w6KOUvQ1iEhEBaOlQVKENJ6jfbSYCoYe4JGK/UeGCaVhjZPpe8L9nVjn2QYfe6e/p1TxRk1MFe6LgrpQXR8SzEJ71+X6j+pRvP8Ui8W1M88esq+ZqbjjIpAxR9ISmd/aTM7WGa7OLOXxDsWQDBAH7J/86u4P1Zebs6vFgORM+RUc2PFAOMSEQ2Ak0UlhX9FrqoK9plol7x9m8aQAj0Sd89lMiCDTgVbk8DSZA4qT5lnYzqZYAvg9XWItCLkeM+C05P7748=", "uuid": "32274de3-6efe-45b3-86a8-46c4335ffeb7"}

Password (OpenStack Metadata API)

Configures and displays the password for logging in to an ECS.

l URI

/169.254.169.254/openstack/{version}/password

l Usage method

Supports both GET and POST requests, where

– The GET request is used to obtain the password.

– The POST request is used to store the password. Exercise caution when sending aPOST request.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 106

Page 115: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l Examples– Example 1: View the password for logging in to an ECS.

curl http://169.254.169.254/openstack/latest/passwordv59nTqCebJKtNnDu

– Example 2: Store the password for logging in to an ECS.curl -X POST http://169.254.169.254/openstack/latest/password -d"v59nTqCebJKtNnDu"

User data (OpenStack Metadata API)Displays ECS user data. The value is configured only when you create an ECS. It cannot bechanged after the configuration.

l URI/169.254.169.254/openstack/{version}/user_data

l Usage methodSupports GET requests.

l Examplecurl http://169.254.169.254/openstack/latest/user_dataICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA==

Security Key (OpenStack Metadata API)Obtains temporary AKs and SKs.

NOTE

l If you need to obtain temporary AKs ad SKs on ECSs, authorize the op_svc_ecs account in the IAMservice.

l Temporary AKs and SKs expire an hour later.l When using temporary AKs and SKs, add 'X-Security-Token':securitytoken in the message

header. securitytoken is the value returned when a call is made to the API.

l URI/openstack/{version}/securitykey

l Usage methodSupports GET requests.

l Examplescurl http://169.254.169.254/openstack/{version}/securitykey

User Data (EC2 Compatible API)Displays ECS user data. The value is configured only when you create an ECS. It cannot bechanged after the configuration.

l URI/169.254.169.254/{version}/user-data

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 107

Page 116: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l Usage methodSupports GET requests.

l Examplecurl http://169.254.169.254/latest/user-dataICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA==

Ami ID (EC2 Compatible API)

Displays an ECS image ID.

l URI/169.254.169.254/{version}/meta-data/ami-id

l Usage methodSupports GET requests.

l Examplecurl http://169.254.169.254/latest/meta-data/ami-idami-00000003

Ami Launch Index (EC2 Compatible API)

Displays an ECS launching sequence. The value of the first launched ECS is 0.

l URI/169.254.169.254/{version}/meta-data/ami-launch-index

l Usage methodSupports GET requests.

l Examplecurl http://169.254.169.254/latest/meta-data/ami-launch-index

Ami Manifest Path (EC2 Compatible API)

Displays the path where an image list is stored.

l URI/169.254.169.254/{version}/meta-data/ami-manifest-path

l Usage methodSupports GET requests.

l Examplecurl http://169.254.169.254/latest/meta-data/ami-manifest-pathFIXME

Block Device Mapping (EC2 Compatible API)

Displays the block device of an ECS.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 108

Page 117: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l URI

/169.254.169.254/{version}/meta-data/block-device-mapping/ami

l Usage method

Supports GET requests.

l Example

curl http://169.254.169.254/latest/meta-data/block-device-mapping/amivda

Hostname (EC2 Compatible API)

Displays the name of the host accommodating an ECS. The .novalocal suffix will be addedlater.

l URI

/169.254.169.254/{version}/meta-data/hostname

l Usage method

Supports GET requests.

l Example

curl http://169.254.169.254/latest/meta-data/hostnamevm-test.novalocal

Instance ID (EC2 Compatible API)

Displays an ECS ID.

l URI

/169.254.169.254/{version}/meta-data/instance-id

l Usage method

Supports GET requests.

l Example

curl http://169.254.169.254/latest/meta-data/instance-idi-00000001

Instance Type (EC2 Compatible API)

Displays an ECS flavor.

l URI

/169.254.169.254/{version}/meta-data/instance-type

l Usage method

Supports GET requests.

l Example

curl http://169.254.169.254/latest/meta-data/instance-typeflavor_test

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 109

Page 118: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Local IPv4 (EC2 Compatible API)Displays the fixed IP address of an ECS. If there are multiple NICs, only the IP address of theprimary NIC is displayed.

l URI/169.254.169.254/{version}/meta-data/local-ipv4

l Usage methodSupports GET requests.

l Examplecurl http://169.254.169.254/latest/meta-data/local-ipv4192.1.1.2

Availability Zone (EC2 Compatible API)Displays the AZ accommodating an ECS.

l URI/169.254.169.254/{version}/meta-data/placement/availability-zone

l Usage methodSupports GET requests.

l Examplecurl http://169.254.169.254/latest/meta-data/placement/availability-zoneaz1.dc1

Public IPv4 (EC2 Compatible API)Displays the floating IP address of an ECS. If there are multiple NICs, only the floating IPaddress of the primary NIC is displayed.

l URI/169.254.169.254/{version}/meta-data/public-ipv4

l Usage methodSupports GET requests.

l Examplecurl http://169.254.169.254/latest/meta-data/public-ipv446.1.1.2

Public Keys (EC2 Compatible API)Displays the public key of an ECS.

l URI/169.254.169.254/latest/meta-data/public-keys/0/openssh-key

l Usage methodSupports GET requests.

l Examplecurl http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 110

Page 119: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI5Fw5k8Fgzajn1zJwLoV3+wMP+6CyvsSiIc/hioggSnYu/AD0Yqm8vVO0kWlun1rFbdO+QUZKyVr/OPUjQSw4SRh4qsTKf/+eFoWTjplFvd1WCBZzS/WRenxIwR00KkczHSJro763+wYcwKieb4eKRxaQoQvoFgVjLBULXAjH4eKoKTVNtMXAvPP9aMy2SLgsJNtMb9ArfziAiblQynq7UIfLnN3VclzPeiWrqtzjyOp6CPUXnL0lVPTvbLe8sUteBsJZwlL6K4i+Y0lf3ryqnmQgC21yW4Dzu+kwk8FVT2MgWkCwiZd8gQ/+uJzrJFyMfUOBIklOBfuUENIJUhAB Generated-by-Nova

Reservation ID (EC2 Compatible API)

Displays an ECS reservation ID.

l URI

/169.254.169.254/{version}/meta-data/reservation-id

l Usage method

Supports GET requests.

l Example

curl http://169.254.169.254/latest/meta-data/reservation-idr-kso0e196

3.13 Creating an ECS Group

Scenarios

An ECS group allows you to create ECSs on different hosts, thereby improving servicereliability. This function does not apply to existing ECSs. You cannot add existing ECSs to anECS group.

Precautionsl ECS groups do not associate with each other.

l An existing ECS cannot be added to an ECS group.

Procedure1. Log in to the management console.

2. Under Computing, click Elastic Cloud Server.

3. In the navigation pane on the left, choose ECS Group.

4. On the ECS Group page, click Create ECS Group.

5. Enter the name of the target ECS group.

The Anti-affinity policy is used by default.

6. Click OK.

Follow-up Procedure

To add an ECS to an ECS group when creating the ECS, expand Advanced Settings andselect the target ECS group.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 111

Page 120: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3.14 Injecting User Data into ECSs

Scenarios

Use the user data injection function to inject user data into ECSs to:

l Simplify ECS configuration.l Initialize the ECS OS configuration.l Upload your scripts to ECSs during ECS creation.l Perform other tasks using scripts.

You can also implement these functions using file injection, but user data injection ispreferred.

Use Restrictionsl Linux

– The image that is used to create ECSs must have Cloud-Init installed.– The user data to be injected must be less than or equal to 32 KB.– If user data is uploaded as text, the data can contain only ASCII characters. If user

data is uploaded using a file, the file can contain any characters and the file sizecannot exceed 32 KB.

– The image that is used to create ECSs must be a public image, a private imagecreated based on a public image, or a private image with Cloud-Init installed.

– The format of the customized scripts must comply with user data scriptspecifications.

– DHCP must be enabled on the VPC network, and port 80 must be enabled for thesecurity group in the outbound direction.

– Select the key pair login mode. When the password login mode is selected, the userdata injection function is restricted.

l Windows– The image that is used to create ECSs must have Cloudbase-Init installed.– The user data to be injected must be less than or equal to 32 KB.– User data uploaded as text can contain only ASCII characters. User data uploaded

as a file can contain any characters.– The image that is used to create ECSs must be a public image, a private image

created based on a public image, or a private image with Cloudbase-Init installed.– DHCP must be enabled on the VPC network, and port 80 must be enabled for the

security group in the outbound direction.

Injecting User Data1. Create a user data script, the format of which complies with user data script

specifications. For details, see section Related Links.2. When creating an ECS, set Advanced Settings to Configure now, and paste the content

of the user data script to the User Data Injection text box or upload the user data file.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 112

Page 121: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3. The created ECS automatically runs Cloud-Init/Cloudbase-Init and reads the user datascript upon startup.

User Data Scripts of Linux ECSsCustomized user data scripts of Linux ECSs are based on the open-source Cloud-Initarchitecture. This architecture uses ECS metadata as the data source for automaticallyconfiguring the ECSs. The customized script types are compatible with open-source Cloud-Init. For details about Cloud-Init, see http://cloudinit.readthedocs.io/en/latest/topics/format.html.

l Script execution time: A customized user data script is executed after the time when thestatus of the target ECS changes to Running and before the time when /etc/init isexecuted.

NOTE

By default, the scripts are executed as user root.

l Script type: Both user-data scripts and Cloud-Config data scripts are supported.

Table 3-5 Linux ECS script types

- User-Data Script Cloud-Config Data Script

Description Scripts, such as Shell and Pythonscripts, are used for customconfigurations.

Methods pre-defined in Cloud-Init, such as the Yum source andSSH key, are used forconfiguring certain ECSapplications.

Format A script must be started with #!,for example, #!/bin/bash or#!/usr/bin/env python.When a script is started for the firsttime, it will be executed at therc.local-like level, indicating a lowpriority in the boot sequence.

The first line must be #cloud-config, and no space is allowedin front of it.

Constraint Before Base64 encoding, the sizeof the script, including the firstline, cannot exceed 32 KB.

Before Base64 encoding, the sizeof the script, including the firstline, cannot exceed 32 KB.

Frequency The script is executed only oncewhen the ECS is started for thefirst time.

The execution frequency variesaccording to the applicationsconfigured on the ECS.

l How can I view the customized user data injected into a Linux ECS?

a. Log in to the ECS.b. Run the following command to view the customized user data as user root:

curl http://169.254.169.254/openstack/latest/user_datal Script usage examples:

This section describes how to inject scripts in different formats into Linux ECSs andview script execution results.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 113

Page 122: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Example 1: Inject a user-data script.When creating an ECS, set User Data Injection to Text and enter the customized userdata script.#!/bin/bashecho "Hello, the time is now $(date -R)" | tee /root/output.txtAfter the ECS is created, start it and run the cat [file] command to check the scriptexecution result.[root@XXXXXXXX ~]# cat /root/output.txtHello, the time is now Mon, 16 Jul 2016 16:03:18+0800Example 2: Inject a Cloud-Config data script.When creating an ECS, set User Data Injection to Text and enter the customized userdata script.#cloud-configbootcmd:- echo 192.168.1.130 us.archive.ubuntu.com >> /etc/hostsAfter the ECS is created, start it and run the cat /etc/hosts command to check the scriptexecution result.

User Data Scripts of Windows ECSsCustomized user data scripts of Windows ECSs are based on the open-source Cloudbase-Initarchitecture. This architecture uses ECS metadata as the data source for initializing andautomatically configuring the ECSs. The customized script types are compatible with open-source Cloudbase-Init. For details about Cloudbase-Init, see https://cloudbase-init.readthedocs.io/en/latest/userdata.html.

l Script type: Both batch-processing program scripts and PowerShell scripts are supported.

Table 3-6 Windows ECS script types

- Batch-Processing ProgramScript

PowerShell Script

Format The script must be started with remcmd, which is the first line of thescript. No space is allowed at thebeginning of the first line.

The script must be started with#ps1, which is the first line of thescript. No space is allowed at thebeginning of the first line.

Constraint Before Base64 encoding, the size ofthe script, including the first line,cannot exceed 32 KB.

Before Base64 encoding, the sizeof the script, including the firstline, cannot exceed 32 KB.

l How can I view the customized user data injected into a Windows ECS?

a. Log in to the ECS.b. Access the following URL in the address box of the browser and view the injected

user data:http://169.254.169.254/openstack/latest/user_data

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 114

Page 123: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l Script usage examples:This section describes how to inject scripts in different formats into Windows ECSs andview script execution results.Example 1: Inject a batch-processing program script.When creating an ECS, set User Data Injection to Text and enter the customized userdata script.rem cmdecho "Hello, BAT Test" > C:\1111.txtAfter the ECS is created, start it and check the script execution result. In this example, atext file named 1111 is added to disk C:\.

Figure 3-17 Creating text file 1111

To view the user data injected into the Windows ECS, log in at http://169.254.169.254/openstack/latest/user_data.

Figure 3-18 Viewing user data

Example 2: Inject a PowerShell script.When creating an ECS, set User Data Injection to Text and enter the customized userdata script.#ps1echo "Hello, Powershell Test" > C:\aaaa.txtAfter the ECS is created, start it and check the script execution result. In this example, atext file named aaaa is added to disk C:\.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 115

Page 124: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 3-19 Creating text file aaaa

To view the user data injected into the Windows ECS, log in at http://169.254.169.254/openstack/latest/user_data.

Figure 3-20 Viewing user data

Case 1

This case illustrates how to use the user data injection function to simplify Linux ECSconfiguration.

In this example, vim is configured to enable syntax highlighting, display line numbers, and setthe tab stop to 4. The .vimrc configuration file is created and injected into the /root/.vimrcdirectory during ECS creation. After the ECS is created, vim is automatically configuredbased on your requirements. This improves ECS configuration efficiency, especially in batchECS creation scenarios.

The content of the script file to be injected is as follows:

#cloud-configwrite_files: - path: /root/.vimrc content: | syntax on set tabstop=4 set number

Case 2

This case illustrates how to use the user data injection function to reset the password forlogging in to a Linux ECS.

In this example, the password of user root is reset to ******.

NOTE

The new password must meet the password complexity requirements. Table 3-7 lists the password rules.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 116

Page 125: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Table 3-7 Password complexity requirements

Parameter Requirement ExampleValue

Password l Consists of 8 characters to 26 characters.l Contains at least three of the following character types:

– Uppercase letters– Lowercase letters– Numerals– Special characters:

$!@%-_=+[]:./^,{}?

l Cannot contain the username or the username inreverse.

l Cannot contain more than two characters in the samesequence as they appear in the username. (Thisrequirement applies only to Windows ECSs.)

Test12!@

The content of the script file to be injected is as follows. (Retain the indentation in thefollowing script.)

#cloud-configchpasswd: list: | root:****** expire: False

After the ECS is created, you can use the reset password to log in to it. To ensure systemsecurity, change the password of user root after logging in to the ECS for the first time.

Case 3This case illustrates how to use the user data injection function to create a user on a WindowsECS and configure the password for the user.

In this example, the user's username is abc, its password is ******, and the user is added tothe administrators user group.

NOTE

The new password must meet the password complexity requirements. Table 3-7 lists the password rules.

The content of the script file to be injected is as follows:

rem cmdnet user abc ****** /addnet localgroup administrators abc /add

After the ECS is created, you can use the created username and password to log in to it.

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 117

Page 126: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Case 4This case illustrates how to use the user data injection function to update system softwarepackages for a Linux ECS and enable the HTTPd service. After the user data is injected, youcan use the HTTPd service.

The content of the script file to be injected is as follows:

#!/bin/bashyum update -yservice httpd startchkconfig httpd on

Case 5This case illustrates how to use the user data injection function to assign user root permissionfor remotely logging in to a Linux ECS. After injecting the file, you can log in to the ECS asuser root using SSH key authentication.

The content of the script file to be injected is as follows:

#cloud-configdisable_root: falseruncmd:- sed -i 's/^PermitRootLogin.*$/PermitRootLogin without-password/' /etc/ssh/sshd_config- sed -i '/^KexAlgorithms.*$/d' /etc/ssh/sshd_config- service sshd restart

Related LinksFor more information about user data injection cases, visit the official Cloud-init/Cloudbase-init website:

l https://cloudinit.readthedocs.io/en/latest/

l https://cloudbase-init.readthedocs.io/en/latest/

Elastic Cloud ServerUser Guide 3 ECS Instances

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 118

Page 127: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

4 Network

4.1 Configuring Security Group Rules

Scenarios

If you do not have a VPC configured when creating your first ECS, the system automaticallycreates a default VPC. The security group policy of a default VPC allows data exchange onlywithin the security group. As a result, ECSs in a default security group cannot be accessedfrom an external network. To remotely access an ECS in such a security group, you mustconfigure the inbound rules of the security group.

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. On the Elastic Cloud Server page, click the name of the target ECS.

The page providing details about the ECS is displayed.4. Click the Security Groups tab and view security group rules.5. Click the security group ID.

The system automatically switches to the Security Group page.6. Click Delete in the Operation column of the Inbound tab to delete the inbound rule.7. Click Add Rule to add an inbound rule for the security group.

– To remotely access a Windows ECS, set Protocol/Application to TCP and Port to3389.

– To remotely access a Linux ECS, set Protocol/Application to TCP and Port to 22.– Set Source IP Address to the IP address segment containing the IP addresses that

you want to allow to access the ECS over the Internet.

NOTE

The default source IP address 0.0.0.0/0 indicates that all IP addresses can access ECSs in thesecurity group.

8. Click OK to complete the security rule configuration.

Elastic Cloud ServerUser Guide 4 Network

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 119

Page 128: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

4.2 Changing a Security GroupTo change the security group of an ECS NIC, perform the following operations:

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Locate the row containing the target ECS, click More in the Operation column, and

select Change Security Group.The Change Security Group dialog box is displayed.

4. Select the target NIC and security group as prompted.You can select multiple security groups. In such a case, the access rules of all theselected security groups apply on the ECS. To create a security group, click ManageSecurity Group.

NOTE

Using multiple security groups may deteriorate ECS network performance. You are suggested toselect no more than five security groups.

5. Click OK.

4.3 Adding a NICIf multiple NICs are required by your ECS, you can add them to your ECS. To add a NIC tothe ECS, perform the following operations:

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. In the search box above the upper right corner of the ECS list, enter the ECS name, IP

address, or ID, and click .4. Click the name of the target ECS.

The page providing details about the ECS is displayed.5. Click the NICs tab. Then, click Add NIC.6. Select the subnet and security group to be added.

NOTE

l If you want to add a NIC with a specified IP address, enter an IP address into the Private IPAddress field.

l You can select multiple security groups. In such a case, the access rules of all the selectedsecurity groups apply on the ECS.

7. Click OK.

Follow-up procedure

Some OSs cannot identify newly added NICs. In this case, you must manually activate theNICs. Ubuntu is used as an example in the following NIC activation procedure. Requiredoperations may vary among systems. For additional information, see the documentation foryour OS.

1. Find the target ECS and click Remote Login in the Operation column.

Elastic Cloud ServerUser Guide 4 Network

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 120

Page 129: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Log in to the ECS.2. Run the following command to view the NIC name:

ifconfig -aIn this example, the NIC name is eth2.

3. Run the following command to switch to the target directory:cd /etc/network

4. Run the following command to open the interfaces file:vi interfaces

5. Add the following information to the interfaces file:auto eth2iface eth2 inet dhcp

6. Run the following command to save and exit the interfaces file::wq

7. Run either the ifup eth2 command or the /etc/init.d/networking restart command tomake the newly added NIC take effect.X in the preceding command indicates the NIC name and SN, for example, ifup eth2.

8. Run the ifconfig command to check whether the NIC name obtained in step 2 isdisplayed in the command output.ifconfigFor example, check whether eth2 is displayed in the command output.– If yes, the newly added NIC has been activated, and no further action is required.– If no, the newly added NIC failed to be activated. Go to step 9.

9. Log in to the management console. Find the target ECS, click More in the Operationcolumn, and then click Restart.

10. Run the ifconfig command to check whether the NIC name obtained in step 2 isdisplayed in the command output.– If the password can be obtained, no further action is required.– If no, contact technical support.

4.4 Deleting a NICAn ECS can have up to 12 NICs, including one primary NIC that cannot be deleted. To deletea non-primary NIC, perform the following operations:

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. On the Elastic Cloud Server page, click the name of the target ECS.

The page providing details about the ECS is displayed.4. Click the NICs tab. Then, click Delete in the row of the target NIC.

NOTE

You are not allowed to delete the primary ECS NIC. By default, the primary ECS NIC is the firstNIC displayed in the NIC list.

5. Click OK in the displayed dialog box.

Elastic Cloud ServerUser Guide 4 Network

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 121

Page 130: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

Certain ECSs do not support NIC deletion when they are running. For details about these ECSs,see the GUI display. To delete a NIC from such an ECS, stop the ECS.

4.5 Managing Virtual IP AddressesA virtual IP address provides the second IP address for one or more ECS NICs, improvinghigh availability between the ECSs.

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. On the Elastic Cloud Server page, click the name of the target ECS.

The page providing details about the ECS is displayed.4. Click the NICs tab. Then, click Manage Virtual IP Address.5. In the Manage Virtual IP Address dialog box, select Bind virtual IP address.6. Set the IP address.

This IP address is a virtual one. Multiple ECSs deployed to work in active/standby modecan be bound with the same virtual IP address for disaster recovery.

7. Click OK.

4.6 Having an ECS Without a Public IP Address Access theInternet

Scenarios

To ensure platform security and conserve public IP address resources, public IP addresses areassigned only to specified ECSs. ECSs without public IP addresses cannot access the Internetdirectly. If these ECSs need to access the Internet (to perform a software upgrade or install apatch, for example), you can select an ECS with a public IP address bound to function as anagent ECS, providing an access channel for these ECS.

Prerequisitesl An agent ECS with a public IP address bound is available.

In this example, the agent ECS runs CentOS 6.5.l The IP address of the agent ECS is in the same network segment and same security

group as the ECSs that need to access the Internet.

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. In the search box above the upper right corner of the ECS list, enter the agent ECS name

and click .4. Click the name of the agent ECS. The page providing details about the ECS is displayed.

Elastic Cloud ServerUser Guide 4 Network

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 122

Page 131: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

5. Click the NICs tab and then . Then, disable Source/Destination Check.By default, the source/destination check is enabled, and the system checks whethersource IP addresses contained in the packets sent by ECSs are correct. If the IP addressesare incorrect, the system does not allow the ECSs to send the packets. This mechanismprevents packet spoofing, thereby improving system security. However, this mechanismprevents the packet sender from receiving returned packets. Therefore, disable thesource/destination check.

6. Log in to the agent ECS.For more details, see section 3.1 Logging In to a Linux ECS.

7. Run the following command to check whether the agent ECS can access the Internet:ping www.baidu.comThe agent ECS can access the Internet if information similar to the following isdisplayed:

8. Run the following command to check whether IP forwarding is enabled on the agentECS:cat /proc/sys/net/ipv4/ip_forward– If 0 (disabled) is displayed, go to 9.– If 1 (enabled), go to 15.

9. Run the following command to open the IP forwarding configuration file in the vi editor:vi /etc/sysctl.conf

10. Press i to enter editing mode.11. Set the net.ipv4.ip_forward value to 1.

Set the net.ipv4.ip_forward value to 1.

NOTE

If the sysctl.conf file does not contain the net.ipv4.ip_forward parameter, run the followingcommand to add it:echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf

12. Press Esc, type :wq, and press Enter.The system saves the configurations and exits the vi editor.

13. Run the following command to effect the modification:sysctl -p /etc/sysctl.conf

14. Run the following command to delete the original iptables rule:iptables -F

15. Run the following command to configure source network address translation (SNAT) toenable ECSs in the same network segment to access the Internet through the agent ECS:iptables -t nat -A POSTROUTING -o eth0 -s subnet/netmask-bits -j SNAT --to nat-instance-ipFor example, if the agent ECS is in network segment 192.168.125.0, the subnet mask has24 bits, and the private IP address is 192.168.125.4, run the following command:

Elastic Cloud ServerUser Guide 4 Network

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 123

Page 132: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

iptables -t nat -A POSTROUTING -o eth0 -s 192.168.125.0/24 -j SNAT --to192.168.125.4

16. Run the following command to check whether SNAT has been configured:iptables -t nat --listSNAT has been configured if information similar to Figure 4-1 is displayed.

Figure 4-1 Successful SNAT configuration

17. Add a route.

a. Log in to management console.b. Under Network, click Virtual Private Cloud.c. Select a VPC to which a route is to be added and click Route Tables. On the Route

Tables page, click Add Route.d. Set route information on the displayed page.

n Destination: indicates the destination network segment. The default value is0.0.0.0/0.

n Next Hop: indicates the private IP address of the SNAT ECS.You can obtain the private IP address of the ECS on the Elastic Cloud Serverpage.

Follow-up ProcedureTo delete the added iptables rules, run the following command:

iptables -t nat -D POSTROUTING -o eth0 -s subnet/netmask-bits -j SNAT --to nat-instance-ip

For example, if the agent ECS is in network segment 192.168.125.0, the subnet mask has 24bits, and the private IP address is 192.168.125.4, run the following command:

iptables -t nat -D POSTROUTING -o eth0 -s 192.168.125.0/24 -j SNAT --to 192.168.125.4

Elastic Cloud ServerUser Guide 4 Network

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 124

Page 133: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

5 Storage

5.1 Expanding the Capacity of an EVS DiskWhen the storage space of an EVS disk is insufficient, you can handle the insufficiency ineither of the following ways:l Apply for a new EVS disk and attach it to an ECS.l Expand the capacity of an existing EVS disk. The capacities of both system disks and

data disks can be expanded.

For more details, see section Expanding the Capacity of an EVS Disk in Elastic VolumeService User Guide.

5.2 Expand the Local Disks of a Disk-intensive ECS

ScenariosDisk-intensive ECSs can use both local disks and EVS disks to store data. Local disks aregenerally used to store service data and feature higher throughput than EVS disks.

Disk-intensive ECSs do not support modifying specifications. Therefore, when the idlecapacity of the local disks of such an ECS is insufficient, you must create a new disk-intensive ECS with higher specifications for capacity expansion. In such a case, the datastored in the original ECS can be migrated to the new ECS through an EVS disk.

Procedure1. Create an EVS disk according to the volume of data to be migrated.2. Attach the EVS disk to the disk-intensive ECS.3. Back up the data stored in the local disks to the EVS disk that is newly attached to the

disk-intensive ECS.4. Detach the EVS disk from the ECS.

a. On the Elastic Cloud Server page, select this disk-intensive ECS and ensure that itis Stopped.If the ECS is in the Running state, choose More > Stop to stop it.

Elastic Cloud ServerUser Guide 5 Storage

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 125

Page 134: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

b. Click the name of the disk-intensive ECS. The page providing details about theECS is displayed.

c. Click the Disks tab. Locate the row containing the EVS data disk and click Detachto detach the disk from the ECS.

5. Ensure that a new disk-intensive ECS with higher specifications than the original one isavailable.The idle local disk capacity of the new ECS must meet service requirements.

6. Attach the EVS disk to the new disk-intensive ECS.On the Elastic Cloud Server page, click the name of the ECS described in step 5. Thepage providing details about the ECS is displayed.

7. Click the Disks tab. Then, click Attach Disk.In the displayed dialog box, select the EVS disk detached in step 4 and the device name.

8. Migrate the data from the EVS disk to the local disks of the new disk-intensive ECS.

5.3 Detaching an EVS Disk from a Running ECS

ScenariosAn EVS disk attached to an ECS can function as a system disk or data disk.

l EVS disks mounted to /dev/sda or /dev/vda function as system disks. You can onlydetach system disks offline. Before detaching a system disk from an ECS, you must stopthe ECS.

l EVS disks mounted to other locations function as data disks. In addition to offlinedetachment, data disks can be detached online if the OS running on the ECS supportsthis feature.

This section describes how to detach a disk from a running ECS.

Restrictions and Limitationsl The EVS disk to be detached must be mounted at a location other than /dev/sda or /dev/

vda.EVS disks mounted to /dev/sda or /dev/vda are system disks and cannot be detachedfrom running ECSs.

l Before detaching an EVS disk from a running Windows ECS, make sure that vmtoolshave been installed on the ECS and that the tools are running properly.

l Before detaching an EVS disk from a running Windows ECS, ensure that no program isreading data from or writing data to the disk. Otherwise, data will be lost.

l SCSI EVS disks cannot be detached from running Windows ECSs.l Before detaching an EVS disk from a running Linux ECS, you must log in to the ECS

and run the umount command to cancel the association between the disk and the filesystem. In addition, ensure that no program is reading data from or writing data to thedisk. Otherwise, detaching the disk will fail.

Elastic Cloud ServerUser Guide 5 Storage

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 126

Page 135: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Notesl On a Windows ECS, if the disk is in non-offline state, the system forcibly detaches the

EVS disk. If this occurs, the system may generate a xenvbd alarm. You can ignore thisalarm.

NOTE

To view the status of an EVS disk, perform the following operations:

1. Click Start in the task bar. In the displayed Start menu, right-click Computer and chooseManage from the shortcut menu.

The Server Manager page is displayed.

2. In the navigation pane, choose Storage > Disk Management.The EVS disk list is displayed in the right pane.

3. View the status of each EVS disk.

l Do not detach an EVS disk from an ECS that is being started, stopped, or restarted.l Do not detach an EVS disk from a running ECS whose OS does not support this feature.

OSs supporting EVS disk detachment from a running ECS are listed in OSs SupportingEVS Disk Detachment from a Running ECS.

l For a running Linux ECS, the drive letter may be changed after an EVS disk is detachedfrom it and then attached to it again. This is a normal case due to the drive letterallocation mechanism of the Linux system.

l For a running Linux ECS, the drive letter may be changed after an EVS disk is detachedfrom it and the ECS is restarted. This is a normal case due to the drive letter allocationmechanism of the Linux system.

OSs Supporting EVS Disk Detachment from a Running ECS

OSs supporting EVS disk detachment from a running ECS include two parts:l For the first part, see section External Image File.l Table 5-1 lists the second part of supported OSs.

Table 5-1 OSs supporting EVS disk detachment from a running ECS

OS Version

CentOS 7.3 64bit

7.2 64bit

6.8 64bit

6.7 64bit

Debian 8.6.0 64bit

8.5.0 64bit

Fedora 25 64bit

24 64bit

SUSE SUSE Linux Enterprise Server 12 SP2 64bit

SUSE Linux Enterprise Server 12 SP1 64bit

Elastic Cloud ServerUser Guide 5 Storage

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 127

Page 136: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

OS Version

SUSE Linux Enterprise Server 11 SP4 64bit

SUSE Linux Enterprise Server 12 64bit

OpenSUSE 42.2 64bit

42.1 64bit

Oracle Linux Server release 7.3 64bit

7.2 64bit

6.8 64bit

6.7 64bit

Ubuntu Server 16.04 64bit

14.04 64bit

14.04.4 64bit

Windows Windows Server 2008 R2 Enterprise 64bit

Windows Server 2012 R2 Standard 64bit

Windows Server 2016 R2 Standard 64bit

Red Hat Linux Enterprise 7.3 64bit

6.8 64bit

NOTE

Online detachment is not supported by the ECSs running OSs not listed in the preceding table. For suchECSs, stop the ECSs before detaching disks from them to prevent any possible problems fromoccurring.

Procedure1. On the Elastic Cloud Server page, click the name of the ECS from which the EVS disk

is to be detached. The page providing details about the ECS is displayed.2. Click the Disks tab. Locate the row containing the EVS disk to be detached and click

Detach.

5.4 Adding a Yearly/Monthly EVS DiskYou are allowed to add yearly/monthly EVS disks to a yearly/monthly ECS. The expirationtime of the newly added EVS disks is the same as that of the ECS.

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. In the search box above the upper right corner of the ECS list, enter the ECS name, IP

address, or ID, and click .

Elastic Cloud ServerUser Guide 5 Storage

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 128

Page 137: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

4. Click the name of the target ECS.

The page providing details about the ECS is displayed.

5. Click the Disks tab. Then, click Add Disk.

The system switches to the EVS disk purchase page.

6. Configure parameters for the new EVS disk as prompted.

7. Click Buy Now.

8. Verify that the disk is correctly configured, select the agreement, and click Submit.

The bought EVS disk is automatically attached to the target ECS.

NOTE

If the new disk is detached and attached again, it can only be attached to the original ECS.

5.5 Attaching a Disk to an ECSIf the existing disks of an ECS fail to meet service requirements, for example, due toinsufficient disk space or poor disk performance, you can attach more available EVS disks tothe ECS, or purchase more disks (Storage > Elastic Volume Service) and attach them to theECS.

Prerequisites

EVS disks are available.

For instructions about how to purchase an EVS disk, see section "Purchasing an EVS Disk" inElastic Volume Service User Guide.

Procedure1. Log in to the management console.

2. Under Computing, click Elastic Cloud Server.

3. In the search box above the upper right corner of the ECS list, enter the ECS name, IP

address, or ID, and click .

4. Click the name of the target ECS.

The page providing details about the ECS is displayed.

5. Click the Disks tab. Then, click Attach Disk.

The Attach Disk dialog box is displayed.

6. Select the target disk and set the device name as prompted.

NOTE

l If no EVS disks are available, click Create Disk in the lower part of the list.

l For details about restrictions for attaching a disk, see section 10.10.3 What Are theRestrictions for Attaching an EVS Disk to an ECS?

7. Click OK.

After the disk is attached, you can view the information about it on the Disks tab.

Elastic Cloud ServerUser Guide 5 Storage

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 129

Page 138: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Follow-up Procedure

If the attached disk is newly created, the disk can be used only after it is initialized. Forinstructions about how to initialize a data disk, see section 2.4 Initializing EVS Data Disks.

5.6 Backing Up ECS Data

Scenarios

You can back up ECS data using the VBS service. You can back up the data of one or moreEVS disks (system disk or data disk) on an ECS to ensure data security.

For Windows ECSs, you can install the Windows Server Backup tool provided by theWindows OS to back up full ECS data.

CSBS Backup Procedure1. Log in to the management console.

2. Under Computing, click Elastic Cloud Server.

The Elastic Cloud Server page is displayed.

3. In the navigation pane one the left, choose Cloud Server Backup Service.

4. Click Create CSBS Backup.

5. Back up the ECS data as prompted.

For more information, see Cloud Server Backup Service User Guide.

NOTE

After a CSBS backup is created, you can use it to create an image and use the image to create ECSs in abatch for rapidly restoring the service running environment. To do so, perform the following operations:

1. Create a CSBS backup on the Cloud Server Backup Service page.

2. Use the CSBS backup to create a private image (full-ECS image).

3. Use the full-ECS image to create ECSs in a batch.

For more details about how to use CSBS backups to create images, see section "Using Backups toCreate Images" in Cloud Server Backup Service User Guide and section "Creating a Full-ECS ImageUsing a CSBS Backup" in Image Management Service User Guide.

VBS Backup Procedure1. Log in to the management console.

2. Under Computing, click Elastic Cloud Server.

The Elastic Cloud Server page is displayed.

3. In the navigation pane on the left, choose Volume Backup Service.

4. Click Create Backup.

5. Back up data as prompted.

For more information, see Volume Backup Service User Guide.

Elastic Cloud ServerUser Guide 5 Storage

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 130

Page 139: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

6 Security

6.1 Creating a Key Pair

OverviewTo ensure system security, you are recommended to use key authentication to authorize theuser who attempts to log in to an ECS. Therefore, you must use an existing key pair or createa new one for remote login authentication.

l Creating a key pairIf no key pair is available, create one. You can use either of the following methods:– Create a key pair using the management console. After the creation, the public key

is automatically stored in the system, and the private key is manually stored in alocal directory. For details, see section Creating a Key Pair Using theManagement Console.

– Create a key pair using puttygen.exe. After the creation, both the public key andprivate key are stored locally. For details, see section Creating a Key Pair Usingputtygen.exe.

l Using an existing key pairIf a key pair is available locally, choose Key Pair in the navigation pane and clickImport Key Pair and Select File on the right side of the page to import the key pair tothe system. For details, see section Importing a Key Pair.

NOTE

If the public key of the existing key pair is stored by clicking Save public key of puttygen.exe,the public key cannot be imported to the management console. If this key pair must be used forremote authentication, see 9.13 What Should I Do If a Key Pair Created Using puttygen.exeCannot Be Imported to the Management Console? for troubleshooting.

Restrictions and Limitationsl ECSs support the following encryption algorithms:

– SSH-2 (RSA, 1024)– SSH-2 (RSA, 2048)– SSH-2 (RSA, 4096)

Elastic Cloud ServerUser Guide 6 Security

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 131

Page 140: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l The private key is one of the most important functions for protecting your ECS duringremote login. To ensure ECS security, you are limited to downloading the private keyonly once.

Creating a Key Pair Using the Management Console1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. In the navigation pane, choose Key Pair.4. On the right side of the page, click Create Key Pair.5. Enter the key name.6. Click OK.7. In the displayed dialog box, click OK.

You can view and save the private key according to the prompts. To ensure ECS security,you are limited to downloading the private key only once.

Creating a Key Pair Using puttygen.exe

Step 1 Obtain the public and private keys.

1. Double-click puttygen.exe. The PuTTY Key Generator page is displayed.

Figure 6-1 PuTTY Key Generator

Elastic Cloud ServerUser Guide 6 Security

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 132

Page 141: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

2. Click Generate.The key generator automatically generates a key pair that consists of a public key and aprivate key. The public key is shown in the red box in Figure 6-2.

Figure 6-2 Obtaining the public and private keys

Step 2 Copy the public key content to a .txt file and save the file in a local directory.

NOTE

Do not save the public key by clicking Save public key. Storing a public key by clicking Save publickey of puttygen.exe will change the format of the public key content. Such a key cannot be imported tothe management console.

Step 3 Save the private key.

The format in which to save your private key varies depending on application scenarios:

l Saving the private key in .ppk formatWhen you are required to log in to a Linux ECS using PuTTY, you must use the .ppkprivate key. To save the private key in .ppk format, perform the following operations:

a. On the PuTTY Key Generator page, choose File > Save private key.b. Save the converted private key, for example, kp-123.ppk, in a local directory.

l Saving the private key in .pem formatWhen you are required to log in to a Linux ECS using Xshell or attempt to obtain thepassword for logging in to a Windows ECS, you must use the .pem private key forauthentication. To save the private key in .pem format, perform the following operations:

Elastic Cloud ServerUser Guide 6 Security

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 133

Page 142: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

a. Choose Conversions > Export OpenSSH key.

NOTICEIf you use this private file to obtain the password for logging in to a Windows ECS,when you choose Export OpenSSH key, do not configure Key passphrase.Otherwise, obtaining the password will fail.

b. Save the private key, for example, kp-123.pem, in a local directory.

Step 4 Import the public key to the system. For details, see section "Copying the public key content"in Importing a Key Pair.

----End

Importing a Key PairIf you store a public key by clicking Save public key of puttygen.exe, the format of thepublic key content will change. Such a key cannot be imported to the management console.To resolve this issue, obtain the public key content in correct format and import the content tothe management console. For details, see section 9.13 What Should I Do If a Key PairCreated Using puttygen.exe Cannot Be Imported to the Management Console?

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. In the navigation pane, choose Key Pair.4. On the right side of the page, click Import Key Pair.5. Use either of the following methods to import the key pair:

– Selecting a file

i. On the Import Key Pair page, click Select File and select the locally storedpublic key.

NOTE

When importing a key pair, ensure that the public key is imported. Otherwise,importing the key pair will fail.

ii. Click OK.After the public key is imported, you can change its name.

– Copying the public key content

i. Copy the content of the public key in .txt file into the Public Key Content textbox.

ii. Click OK.

Elastic Cloud ServerUser Guide 6 Security

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 134

Page 143: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

6.2 Obtaining the Password for Logging In to a WindowsECS

Scenarios

Password authentication is required to log in to a Windows ECS. Therefore, you must use thekey file used when you created the ECS to obtain the administrator password generatedduring ECS creation. The administrator user is Administrator or the user configured usingCloudbase-Init. This password is randomly generated, offering high security.

You can obtain the initial password for logging in to a Windows ECS using the managementconsole or APIs. For details, see this section.

Obtaining the Password Using the Management Console1. Obtain the private key file (.pem file) used when you created the ECS.2. Log in to the management console.3. Under Computing, click Elastic Cloud Server.4. On the Elastic Cloud Server page, select the target ECS.5. In the Operation column, click More and select Get Password.

Figure 6-3 Obtaining a password

6. Use either of the following methods to obtain the password through the key file:– Click Select File and upload the key file from a local directory.– Copy the key file content to the text field.

7. Click Get Password to obtain a random password.

Obtaining the Password Using APIs1. Obtain the private key file (.pem file) used when you created the ECS.2. Set up the API calling environment.3. Call APIs. For details, see section "Before You Start" in Elastic Cloud Server API

Reference.4. Obtain the ciphertext password.

Elastic Cloud ServerUser Guide 6 Security

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 135

Page 144: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Call the password obtaining APIs to obtain the ciphertext password of the public keyencrypted using RSA. The API URI is in the format "GET /v2/{tenant_id}/servers/{server_id}/os-server-password".

NOTE

For instructions about how to call the APIs, see section "Retrieving the Password of a WindowsECS (Native OpenStack API)" in Elastic Cloud Server API Reference.

5. Decrypt the ciphertext password.Use the private key file used when you created the ECS to decrypt the ciphertextpassword obtained in step 4.

a. Run the following command to convert the ciphertext password format to ".key -nocrypt" using OpenSSL:openssl pkcs8 -topk8 -inform PEM -outform DER -in rsa_pem.key -outpkcs8_der.key -nocrypt

b. Invoke the Java class libraryorg.bouncycastle.jce.provider.BouncyCastleProvider and use the private key fileto edit the code decryption ciphertext.

6.3 Deleting the Initial Password for Logging In to aWindows ECS

ScenariosAfter obtaining the initial password, you are advised to delete it to ensure system security.

Deleting the initial password does not affect ECS operation or login. Once deleted, thepassword cannot be retrieved. Before deleting a password, you are advised to record it.

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. On the Elastic Cloud Server page, select the target ECS.4. In the Operation column, click More and select Delete Password.

The system displays a message, asking you whether you want to delete the password.5. Click OK to delete the password.

Elastic Cloud ServerUser Guide 6 Security

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 136

Page 145: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

7 Monitoring

Monitoring is the key for ensuring ECS performance, reliability, and availability. Usingmonitored data, you can determine ECS resource usage. The public cloud provides Cloud Eyeto help you obtain the running statuses of your ECSs. You can use Cloud Eye to automaticallymonitor ECSs in real time and manage alarms and notifications to keep track of ECSperformance metrics.

This section covers the following:

l Viewing ECS monitoring metricsl Customizing ECS alarm rulesl Viewing ECS running statuses for routine monitoring

7.1 ECS MetricsECS metrics vary depending on ECS OSs and types. For details, see Table 7-1. √ indicatesthat the metric is supported, and x indicates that the metric is not supported.

Table 7-1 ECS metrics

Metric Windows ECS Linux ECS

None XEN KVM XEN KVM

CPU Usage √ √ √ √

Memory Usage √ √ √ (vmtoolsmust be installedon the image.Otherwise, thismetric isunavailable.)

x (Notsupported)

Elastic Cloud ServerUser Guide 7 Monitoring

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 137

Page 146: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Metric Windows ECS Linux ECS

Disk Usage √ √ √ (vmtoolsmust be installedon the image.Otherwise, thismetric isunavailable.)

x (Notsupported)

Disks Read Rate √ √ √ √

Disks Write Rate √ √ √ √

Disks ReadRequests

√ √ √ √

Disks WriteRequests

√ √ √ √

Inband IncomingRate

√ √ √ (vmtoolsmust be installedon the image.Otherwise, thismetric isunavailable.)

x (Notsupported)

Inband OutgoingRate

√ √ √ (vmtoolsmust be installedon the image.Otherwise, thismetric isunavailable.)

x (Notsupported)

OutbandIncoming Rate

√ √ √ √

OutbandOutgoing Rate

√ √ √ √

NOTE

Certain ECS metrics require the installation of vmtools on the image, based on which the ECS iscreated. For instructions about how to install vmtools, see https://github.com/UVP-Tools/UVP-Tools/.

Table 7-2 describes these ECS metrics.

Table 7-2 ECS metrics

Metric Description Formula Remarks

CPU Usage Indicates the vCPU usage(%) of an ECS.

vCPU usage of anECS/Number ofvCPUs in the ECS

N/A

Elastic Cloud ServerUser Guide 7 Monitoring

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 138

Page 147: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Metric Description Formula Remarks

Memory Usage Indicates the memory usage(%) of an ECS.

Used memory of anECS/Total memory ofthe ECS

This metric isunavailable ifthe image hasno vmtoolsinstalled.

Disk Usage Indicates the disk usage (%)of an ECS.

Used capacity of anECS disk/Totalcapacity of the ECSdisk

This metric isunavailable ifthe image hasno vmtoolsinstalled.

Disks ReadRate

Indicates the number ofbytes read from an ECS persecond.

Total number of bytesread from an ECSdisk/Monitoringperiod

byte_out =(rd_bytes -last_rd_bytes) /Time difference

Disks WriteRate

Indicates the number ofbytes written to an ECS persecond.

Total number of byteswritten to an ECSdisk/Monitoringperiod

N/A

Disks ReadRequests

Indicates the number of readrequests sent to an ECS persecond.

Total number of readrequests sent to anECS disk/Monitoringperiod

req_out =(rd_req -last_rd_req)/Time difference

Disks WriteRequests

Indicates the number ofwrite requests sent to anECS per second.

Total number of writerequests sent to anECS disk/Monitoringperiod

req_in =(wr_req -last_wr_req)/Time difference

InbandIncoming Rate

Indicates the number ofincoming bytes on an ECSper second.

Total number ofinband incoming byteson an ECS/Monitoringperiod

N/A

InbandOutgoing Rate

Indicates the number ofoutgoing bytes on an ECSper second.

Total number ofinband outgoing byteson an ECS/Monitoringperiod

N/A

OutbandIncoming Rate

Indicates the number ofincoming bytes on an ECSper second on thehypervisor.

Total number ofoutband incomingbytes on an ECS/Monitoring period

This metric isunavailable ifSR-IOV isenabled.

OutbandOutgoing Rate

Indicates the number ofoutgoing bytes on an ECSper second on thehypervisor.

Total number ofoutband outgoingbytes on an ECS/Monitoring period

This metric isunavailable ifSR-IOV isenabled.

Elastic Cloud ServerUser Guide 7 Monitoring

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 139

Page 148: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

7.2 Setting Alarm Rules

Scenarios

Setting ECS alarm rules allows you to customize the monitored objects and notificationpolicies and determine the running statuses of your ECSs at any time.

This section describes how to set ECS alarm rules, including alarm rule names, monitoringobjects, monitoring metrics, alarm thresholds, monitoring periods, and notifications.

Procedure1. Log in to the management console.2. Under Management & Deployment, click Cloud Eye.3. In the navigation pane, choose Alarm > Alarm Rule.4. On the Alarm Rule page, click Add Alarm Rule to add an alarm rule, or modify an

existing alarm rule.The following operations use modifying an existing alarm rule as an example.

a. Click the target alarm rule.b. Click Modify in the upper right corner of the page.c. On the Modify Alarm Rule page, set parameters as prompted.d. Click OK.

After an alarm rule is modified, the system automatically notifies you of an alarmwhen the alarm complies with the alarm rule is generated.

NOTE

For more information about ECS alarm rules, see Cloud Eye User Guide.

7.3 Viewing ECS Metrics

Scenarios

The public cloud platform provides Cloud Eye, which monitors the running statuses of yourECSs. You can obtain the monitoring metrics of each ECS on the management console.

Prerequisitesl The ECS is running properly.

Cloud Eye does not display the monitoring data for a stopped, faulty, or deleted ECS.After such an ECS restarts or recovers, the monitoring data is available in Cloud Eye.

NOTE

Cloud Eye discontinues monitoring ECSs that remain in Stopped or Faulty state for 24 hours andremoves them from the monitoring list. However, the alarm rules for such ECSs are notautomatically deleted.

l Alarm rules have been configured in Cloud Eye for the target ECS.

Elastic Cloud ServerUser Guide 7 Monitoring

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 140

Page 149: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

The monitoring data is unavailable for the ECSs without alarm rules configured in CloudEye. For details, see section 7.2 Setting Alarm Rules.

l The target has been properly running for at least 10 minutes.The monitoring data and graphics are available for a new ECS after the ECS runs for atleast 10 minutes.

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. In the search box above the upper right corner of the ECS list, enter the ECS name, IP

address, or ID, and click to search for the ECS.4. Click the name of the target ECS. The page providing details about the ECS is displayed.5. Click the Monitoring tab to view the monitoring data.6. In the monitoring area, specify the monitoring period.

Fixed and customized time ranges are provided.

a. Fixed ranges include:n Last 1 hourn Last 3 hoursn Last 12 hoursn Last 24 hoursn Last 7 daysn Last 30 days

b. A customized time range can be set for up to seven days prior.

Elastic Cloud ServerUser Guide 7 Monitoring

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 141

Page 150: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

8 Cloud Trace Service

8.1 Supported CTS Operations

Scenarios

Cloud Trace Service (CTS) is available on the public cloud platform. It records ECS-relatedoperations for later query, audit, and backtrack operations.

Prerequisites

CTS has been enabled.

Key ECS Operations Recorded by CTS

Table 8-1 ECS operations that can be recorded by CTS

Operation Resource Type Trace Name

Creating an ECS ecs createServer

Deleting an ECS ecs deleteServer

Starting an ECS ecs startServer

Restarting an ECS ecs rebootServer

Stopping an ECS ecs stopServer

Adding NICs to an ECS ecs addNic

Deleting NICs from an ECS ecs deleteNic

Attaching EVS disks to an ECS ecs attachVolume

Attaching EVS disks to an ECS (on theEVS page)

ecs attachVolume2

Detaching EVS disks from an ECS ecs detachVolume

Elastic Cloud ServerUser Guide 8 Cloud Trace Service

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 142

Page 151: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Operation Resource Type Trace Name

Reinstalling the OS ecs reinstallOs

Changing the OS ecs changeOs

Reinstalling the OS ecs reinstallOsV2

Changing the OS ecs changeOsV2

Modifying ECS specifications ecs resizeServer

Adding the automatic recovery tag to aVM

ecs addAutoRecovery

Deleting the automatic recovery tag froma VM

ecs deleteAutoRecovery

Creating a security group ecs createSecurityGroup

8.2 Viewing Tracing Logs

ScenariosCTS records ECS operations immediately after it is enabled. You can view the operationrecords of the last seven days on the management console.

This section describes how to view the operation records.

Procedure1. Log in to the management console.

2. Click in the upper left corner of the management console and select a region andproject.

3. Click Service List. Under Management & Deployment, click Cloud Trace Service.4. In the navigation pane on the left, choose Trace List.5. Specify filters used for obtaining traces. The following four filter criteria are available:

– Trace Source, Resource Type, and Search BySelect a filter criterion from the drop-down list.If you select Trace name for Search By, you need to select a specific trace name.If you select Resource ID for Search By, you need to select or enter a specificresource ID.When you select Resource name for Search By, you need to select or enter aspecific resource name.

– Operator: Select a specific operator (which is a user rather than the tenant).– Trace Status: Available options include All trace statuses, normal, warning, and

incident. You can only select one of them.– Time Range: You can view traces generated during any time range of the last seven

days.

Elastic Cloud ServerUser Guide 8 Cloud Trace Service

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 143

Page 152: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

6. Click on the left of the required trace to expand its details.

Figure 8-1 Expanding trace details

7. Click View Trace. A dialog box is displayed, in which the trace structure details aredisplayed.For more information about CTS, see Cloud Trace Service User Guide.

Elastic Cloud ServerUser Guide 8 Cloud Trace Service

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 144

Page 153: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

9 Troubleshooting

9.1 What Should I Do When an ECS Remains in theRestarting or Stopping State for a Long Time?

If an ECS remains in the Restarting or Stopping state for over 30 minutes after beingrestarted or stopped, you can forcibly restart or stop the ECS as follows:

1. Log in to the management console.

2. Under Computing, click Elastic Cloud Server.

3. Select the target ECS and click Restart or Stop.

A dialog box is displayed to confirm whether you want to restart or stop the ECS.

4. Select Forcibly restart or Forcibly stop.

5. Click OK.

9.2 What Should I Do If I Cannot Use MSTSC to Log In toan ECS Running the Windows Server 2012 OS?

Symptom

An ECS running the Windows Server 2012 OS has password authentication configured duringECS creation. When a user used the initial password and MSTSC to log in to the ECS, thelogin failed and the system displayed the message "You must change your password beforelogging on for the first time. Please update your password or contact your systemadministrator or technical support."

Possible Causes

The local computer used by the user is running the Windows 10 OS.

Due to limitations, the Windows 10 OS does not support remote logins to an ECS running theWindows Server 2012 OS using the initial password.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 145

Page 154: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Solutionsl Solution 1

Use a local computer running the Windows 7 OS to remotely log in to the ECS runningthe Windows Server 2012 OS.

l Solution 2

Retain the original local computer and change the initial login password.

a. Use VNC to log in to the ECS running the Windows Server 2012 OS for the firsttime.

b. Change the login password as prompted.

c. Use the changed password and MSTSC to log in to the ECS again.

l Solution 3:

Retain the original local computer and initial login password.

a. Choose Start. In the Search programs and files text box, enter mstsc and pressEnter.

The Remote Desktop Connection page is displayed.

b. Enter the EIP and click Connect. Then, use username administrator and the loginpassword configured during ECS creation for connection.

The connection fails, and the system displays the message "You must change yourpassword before logging on for the first time. Please update your password orcontact your system administrator or technical support."

c. Click Options in the lower left corner of the Remote Desktop Connection page.

d. On the General tab, click Save As in the Connection settings pane and save theremote desktop file in .rdp format.

e. Use Notepad++ to open the .rdp file.

f. Add the following statement to the last line of the .rdp file and save the file.

enablecredsspsupport:i:0g. Double-click the edited .rdp file to set up the remote desktop connection.

h. Click Connect to connect to the ECS running the Windows Server 2012 OS again.

9.3 Can ECSs Automatically Recover After the PhysicalHost Accommodating the ECSs Becomes Faulty?

Yes.

ECSs run on physical hosts. Although HUAWEI CLOUD offers multiple mechanisms toensure system reliability, error tolerance, and high availability, host hardware might bedamaged or power failure might occur. If physical hosts cannot be powered on or restarteddue to damage, CPU and memory data will lose and live migration cannot be used to recoveryECSs.

HUAWEI CLOUD provides automatic recovery by default to restart ECSs through coldmigration, ensuring high availability and dynamic ECS migration. Once a physical hostaccommodating ECSs breaks down, the ECSs automatically migrate to a functional physicalhost. This minimizes user service interruption. The ECSs will restart during the migration.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 146

Page 155: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

l Automatic recovery does not ensure user data consistency.

l An ECS can be automatically recovered only if the host on which it is deployed becomes faulty. Thisfunction does not take effect if the fault is caused by the ECS itself.

l An ECS can be automatically recovered only once within 12 hours if the host on which it isdeployed becomes faulty.

l ECS automatic recovery may fail in the following scenarios:

l No physical host is available for migration due to a system fault.

l The target physical host does not have sufficient temporary capacity.

l An ECS with any of the following resources cannot be automatically recovered:

l Local disk

l Passthrough FPGA card

l Passthrough InfiniBand NIC

9.4 What Should I Do If a Linux ECS with a SCSI DiskAttached Fails to Restart?

Symptom

For a Linux ECS with a SCSI disk attached, if automatic SCSI disk attaching upon ECSstartup is enabled in /etc/fstab and the disk drive letter (for example, /dev/sdb) is used,restarting the ECS may fail.

Possible Causes

SCSI disk allocation is determined based on the ID of the slot accommodating the disk as wellas the available drive letter in the ECS. Each time when a disk is attached to the ECS, an idledrive letter is automatically allocated in sequence. When the ECS starts, the disks are loadedin slot sequence. Therefore, a slot ID corresponds to a drive letter.

After the SCSI disk is detached from the running ECS, the slot sequence for disks may bechanged, leading to the disk drive letter change after the ECS is restarted. As a result, the slotIDs do not correspond to the drive letters, and restarting the ECS failed.

Solution1. Log in to the ECS as user root.2. Run the following command to obtain the SCSI ID according to the drive letter of the

SCSI disk:ll /dev/disk/by-id/|grep Disk drive letterFor example, if the drive letter of the SCSI disk is /dev/sdb, run the following command:ll /dev/disk/by-id/|grep sdbCNA64_22:/opt/galax/eucalyptus/ecs_scripts # ll /dev/disk/by-id/|grep sdblrwxrwxrwx 1 root root 9 Dec 6 11:26 scsi-3688860300001436b005014f890338280 -> ../../sdblrwxrwxrwx 1 root root 9 Dec 6 11:26 wwn-0x688860300001436b005014f890338280 -> ../../sdb

3. Change the drive letter (for example, /dev/sdb) of the SCSI disk to the correspondingSCSI ID in the /etc/fstab file.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 147

Page 156: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

/dev/disk/by-id/SCSI IDFor example, if the SCSI ID obtained in step 2 isscsi-3688860300001436b005014f890338280, use the following data to replace /dev/sdb:/dev/disk/by-id/scsi-3688860300001436b005014f890338280

9.5 What Should I Do If a Key Pair Cannot Be Imported?If you use Internet Explorer 9 to access the management console, the key pair may fail toimport or the file injection function may become unavailable. In this case, perform thefollowing steps to modify browser settings and then try again:

1. Click in the upper right corner of the browser.2. Select Internet Options.3. Click the Security tab in the displayed dialog box.4. Click Internet.5. If the security level indicates Custom, click Default Level to restore to the default

settings.6. Move the scroll bar to set the security level to Medium and click Apply.7. Click Custom Level.8. Set Initialize and script ActiveX controls not marked as safe for scripting to

Prompt.9. Click Yes.

9.6 Why Was My Login to a Linux ECS with a Key FileUnsuccessful?

Symptom

When the key file for creating a Linux ECS was used to log in to the ECS, the login failed.

Possible Causes

Possible causes vary depending on the image used to create the Linux ECS.

l Cause 1: The image used to create the Linux ECS is a private image, on which Cloud-Init is not installed.

l Cause 2: Cloud-Init is installed on the image, but the key pair was not obtained duringECS creation.

Solutionl If the issue is a result of cause 1, proceed as follows:

If a private image is created without Cloud-Init installed, the ECS configuration cannotbe customized. As a result, you can log in to the ECS only using the original imagepassword or key pair.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 148

Page 157: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

The original image password or key pair is the OS password or key pair configured whenthe private image was created. If the original image password or key pair has been lost,use the password reset function available on the Elastic Cloud Server page to reset thepassword.

l If the issue is a result of cause 2, proceed as follows:

a. Locate the row containing the target ECS, click More in the Operation column,and select Restart.

b. Use the key file to log in to the ECS again and check whether the login issuccessful.n If the login is successful, no further action is required.n If the login fails, contact technical support.

9.7 How Can I Handle the Issue that a Windows 7 ECSEquipped with an Intel 82599 NIC Reports an Error in SR-IOV Scenarios?

Symptom

When the 20.4.1 driver package downloaded at Intel website https://downloadcenter.intel.com/search?keyword=Intel++Ethernet+Connections+CD wasinstalled in a Windows 7 64bit ECS with SR-IOV passthrough enabled, the system displayedthe message "No Intel adapter found".

Cause Analysis

The OS identifies an Intel 82599 passthrough NIC without a driver installed as an Ethernetcontroller. When the 20.4.1 driver package was installed, the OS did not identify the IntelNIC, leading to the error.

Solution

Run Autorun.exe in the folder where the 20.4.1 driver package is stored. Install a driver onthe NIC before installing the driver package so that the NIC can be identified as an Intel82599 virtual function (VF) device by the OS. Use either of the following methods to installthe driver:

l Method 1: Update the version.

a. Download the 18.6 driver package at the Intel website.b. Run Autorun.exe.c. Run Autorun.exe in the folder where the 20.4.1 driver package is stored to update

the driver.l Method 2: Use the device manager.

a. Start the Windows resource manager. Right-click Computer and choose Managefrom the shortcut menu. In the Device Manager window, locate the NIC. When theNIC has no driver installed, the NIC locates in Other devices and is namedEthernet Controller.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 149

Page 158: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

b. Right-click Ethernet Controller and choose Update Driver Software.c. Click Browse, select the path where the driver package is stored, and click Next.d. Locate the NIC in Network Adapter of Device Manager.e. Run Autorun.exe to install the 20.4.1 driver package.

9.8 What Should I Do If Error "command ´gcc´ failed withexit status 1" Occurs During PIP-based SoftwareInstallation

Symptom

When installing the Python library software, you need to configure the PIP source. Take theimage source of University of Science and Technology of China as an example:[root@test home]# cat /root/.pip/pip.conf [global]index-url = https://pypi.mirrors.ustc.edu.cn/simple/trusted-host = pypi.mirrors.ustc.edu.cn

During the installation, the system displays the message "command ´gcc´ failed with exitstatus 1". However, GCC has been installed by running the yum command before the Pythonlibrary software is installed using the PIP.

Figure 9-1 Installation error

Possible Causes

openssl-devel is not supported.

Solution

The following operations use psutil as an example:

1. Run the following command to install openssl-devel:yum install gcc libffi-devel python-devel openssl-devel -y

2. Use PIP to install the Python library software again. The error message is cleared.

Figure 9-2 Successful installation

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 150

Page 159: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

9.9 What Should I Do If Packages Are Downloaded UsingPIP or wget at a Low Rate?

SymptomWhen a user runs the wget command to download software packages, the download rate is farless than the bandwidth.

Figure 9-3 wget-based package downloading

Possible CausesThe official PIP website is accessed using HTTPS. Each time PIP is used to install a third-party Python module, the source code package must be downloaded at the official PIPwebsite. Therefore, openssl packages are required.

SolutionRun the following command to install openssl packages:

yum install openssl openssl-devel

9.10 What Should I Do If I Cannot Log In to My ECSUsing the Reset Password?

This section uses a Linux ECS as an example to describe how to locate the fault.

Step 1 Check whether port 80 in the outbound direction of the security group is bypassed.

1. Log in to management console.2. Click the name of the target ECS to switch to the page providing details about the ECS.3. On the Security Groups tab, check whether port 80 in the outbound direction of the

security group is bypassed.By default, the Protocol and Port Range/ICMP Type values in the outbound directionare both Any, indicating that port 80 is bypassed.

Step 2 Check whether DHCP is enabled in the VPC accommodating the target ECS.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 151

Page 160: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Under Network, click Virtual Private Network. Switch to the page providing details aboutthe target VPC, click Subnets, and enable DHCP.

Step 3 If the fault persists after you verify that both the security group and DHCP are correctlyconfigured, use the original password to log in to the ECS.l If the original password is invalid, enter the single-user mode and reset the password.l If the original password is valid, use it to log in to the ECS and perform the following

operations to locate the fault:

a. Log in to the ECS using the original password.b. Run the curl http://169.254.169.254/openstack/latest/resetpwd_flag command to

check whether the one-click password reset function is available.n If the return value is true, the password can be reset with a few clicks.n If other values are returned, the password cannot be reset or the network

malfunctions.

Step 4 Check whether CloudResetPwdAgent has been installed.

1. Check whether CloudResetPwdAgent is available in the root directory of the ECS.2. Run the following command to check whether CloudResetPwdAgent is in unrecognized

service state:service cloudResetPwdAgent status

If neither of the preceding conditions are met, the one-click password reset plug-ins have notbeen installed on the ECS. For details about how to install the plug-ins, see section 2.5(Optional) Installing One-Click Password Reset Plug-ins.

----End

9.11 What Should I Do If a Service Port Is Used by a One-Click Password Reset Plug-in?

SymptomWhen an application is to run on an ECS, the system displays a message indicating that therequired port is used by a one-click password reset plug-in. What should I do if such an issueoccurs?

Possible CausesIf an ECS works in AUTO mode, when a one-click password reset plug-in is started, the plug-in randomly uses a port, which may be a service port.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 152

Page 161: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

The one-click password reset plug-ins have been upgraded to work in PIPE mode by default.

l Newly created ECSs run in PIPE mode by default, and their one-click password reset plug-ins willnot use service ports.

l Existing ECSs still work in AUTO mode, in which the plug-ins randomly use service port rangingfrom 31000 to 32999. The system will automatically select an idle port with the smallest portnumber.

Method 1 (Recommended): Modifying the wraper Files of the One-ClickPassword Reset Plug-ins for the PIPE Mode

In the wraper files, change from AUTO (SOCKET) to PIPE. After the change, the plug-inswill not use service ports.

1. Open CloudResetPwdAgent configuration files.

– Paths in which the files are stored on Linux ECSs:

/CloudrResetPwdAgent/conf/wrapper.conf and /CloudResetPwdUpdateAgent/conf/wrapper.conf

– Paths in which the files are stored on Windows ECSs:

C:\CloudResetPwdUpdateAgent\conf\wrapper.conf and C:\CloudResetPwdUpdateAgent\conf\wrapper.conf

2. Add the following data to the end of the files:

wrapper.backend.type=PIPE

3. Restart CloudResetPwdUpdateAgent.

– Linux

/CloudResetPwdUpdateAgent/bin/cloudResetPwdUpdateAgent.script restart

– Windows

i. Press Win+R to start the Open text box.

ii. Enter Services.msc and click OK.

Figure 9-4 Run

iii. Right-click cloud reset password update agent and choose Restart from theshortcut menu.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 153

Page 162: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 9-5 Services (Local)

Method 2: Modifying the Configuration to Change the Port Range

Modify the CloudResetPwdAgent configuration to change the default port range for thepassword reset plug-ins so that the service port is out of the port range.

For example, to change the port range for the password reset plug-ins to 40000-42000,perform the following operations:

1. Open CloudResetPwdAgent configuration files.

– Paths in which the files are stored on Linux ECSs:

/CloudrResetPwdAgent/conf/wrapper.conf and /CloudResetPwdUpdateAgent/conf/wrapper.conf

– Paths in which the files are stored on Windows ECSs:

C:\CloudResetPwdUpdateAgent\conf\wrapper.conf and C:\CloudResetPwdUpdateAgent\conf\wrapper.conf

2. Add the following data to the configuration files:

wrapper.port.min=40000

wrapper.port.max=41000

wrapper.jvm.port.min=41001

wrapper.jvm.port.max=42000

Figure 9-6 Modifying the configuration files

3. Restart CloudResetPwdUpdateAgent.

– Linux

/CloudResetPwdUpdateAgent/bin/cloudResetPwdUpdateAgent.script restart

– Windows

i. Press Win+R to start the Open text box.

ii. Enter Services.msc and click OK.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 154

Page 163: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 9-7 Run

iii. Right-click cloud reset password update agent and choose Restart from theshortcut menu.

Figure 9-8 Services (Local)

9.12 What Should I Do If a Disk Is Offline?

Symptom

A disk attached to a Windows ECS is offline, and the system displays the message "The diskis offline because of policy set by an administrator."

Figure 9-9 Offline disk

Possible Causes

Windows has three types of SAN policies: OnlineAll, OfflineShared, and OfflineInternal.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 155

Page 164: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Table 9-1 SAN policies

SAN Policy Description

OnlineAll Indicates that all newly detected disks are automatically broughtonline.

OfflineShared Indicates that all newly detected disks on sharable buses, such asFC or iSCSI, are left offline by default, while disks on non-sharable buses are kept online.

OfflineInternal Indicates that all newly detected disks are left offline.

The SAN policy of certain Windows OSs, such as Windows Server 2008/2012 EnterpriseEdition and Data Center Edition, is OfflineShared by default.

Solution

Use the disk partition management tool DiskPart to obtain and set the SAN policy on the ECSto OnlineAll.

1. Log in to the Windows ECS.

2. Press Win+R to run cmd.exe.

3. Run the following command to access DiskPart:

diskpart

4. Run the following command to view the SAN policy on the ECS:

san

– If the SAN policy is OnlineAll, run the exit command to exit DiskPart.

– If the SAN policy is not OnlineAll, go to step 5.

5. Run the following command to change the SAN policy to OnlineAll:

san policy=onlineall

6. (Optional) Use the ECS with the SAN policy changed to create a private image to makethe configuration take effect permanently. After an ECS is created using this privateimage, the disks attached to the ECS are online by default. You only need to initializethem.

9.13 What Should I Do If a Key Pair Created Usingputtygen.exe Cannot Be Imported to the ManagementConsole?

Symptom

When a key pair created using puttygen.exe was imported to the management console, thesystem displayed a message indicating that importing the public key failed.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 156

Page 165: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Possible CausesThe format of the public key content does not meet system requirements.

Storing a public key by clicking Save public key of puttygen.exe will change the format ofthe public key content. Such a key cannot be imported to the management console.

SolutionUse the locally stored private key and PuTTY Key Generator to restore the format of thepublic key content. Then, import the public key to the management console.

1. Double-click puttygen.exe. The PuTTY Key Generator page is displayed.

Figure 9-10 PuTTY Key Generator

2. Click Load and select the private key.The system automatically loads the private key and restores the format of the public keycontent in PuTTY Key Generator. The content in the red box in Figure 9-11 is thepublic key with the format meeting system requirements.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 157

Page 166: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 9-11 Restoring the format of the public key content

3. Copy the public key content to a .txt file and save the file in a local directory.4. Import the public key to the management console.

a. Log in to the management console.b. Under Computing, click Elastic Cloud Server.c. In the navigation pane, choose Key Pair.d. On the right side of the page, click Import Key Pair.e. Copy the public key content in the .txt file to Public Key Content and click OK.

9.14 How Do I Handle Error Messages Displayed on theManagement Console?

Symptoml An error message was displayed on the management console after you performed ECS-

related operations.l An error code was displayed after you used an ECS-related API.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 158

Page 167: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

BackgroundAfter you perform ECS-related operations on the management console, the system displaysthe request status on the Elastic Cloud Server page. You can determine the request executionstatus based on the information displayed in the request status.

l If the operation request is executed, the system automatically clears the task prompt.l If an error occurs during the request execution, the system displays an error code and its

description in the taskbar.

SolutionIf an error occurs, find the error code and perform the corresponding operations listed inTable 9-2.

Table 9-2 Error codes and solution suggestions

ErrorCode

MessageDisplayed on theManagementConsole

Solution Suggestion forOn-demand ECSs

Solution Suggestionfor PeriodicallyCharged ECSs

Ecs.0000 Request error. Tryagain later orcontact customerservice.

Adjust the request structureas directed in Elastic CloudServer API Reference.

Adjust the requeststructure as directed inElastic Cloud Server APIReference.

Ecs.0001 The maximumnumber of ECSs orEVS disks has beenreached. Contactcustomer serviceand request a quotaincrease.

Contact customer service toapply for an increased ECSquota.NOTE

When applying for increasingyour ECS quota, firstdetermine the number oftarget ECSs, CPU cores(vCPUs), and memorycapacity (RAM) required.

Submit a work order toapply for an increasedECS quota. After thesubmission, contactcustomer service fortroubleshooting.NOTE

When applying forincreasing your ECS quota,first determine the numberof target ECSs, CPU cores(vCPUs), and memorycapacity (RAM) required.

Ecs.0005 System error. Tryagain later orcontact customerservice.

Adjust the request structureas directed in Elastic CloudServer API Reference.

Adjust the requeststructure as directed inElastic Cloud Server APIReference.

Ecs.0006 Invalid parameters. If your selected ECSconfiguration has not beenlaunched, change theconfiguration and create theECS again.

If your selected ECSconfiguration has notbeen launched, changethe configuration andcreate the ECS again.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 159

Page 168: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

ErrorCode

MessageDisplayed on theManagementConsole

Solution Suggestion forOn-demand ECSs

Solution Suggestionfor PeriodicallyCharged ECSs

Ecs.0010 The private IPaddress is in use.Select an availableIP address andcreate the ECSagain.

Use idle IP addresses topurchase your ECSs.

Contact customer serviceto cancel the order anduse an idle IP address topurchase your ECS.

Ecs.0011 Invalid password.Change thepassword to makeit meet thepasswordcomplexityrequirements, andperform therequired operationagain.

Input a password that meetspassword complexityrequirements.

Contact customer serviceto cancel the order, inputa password that meetspassword complexityrequirements, andperform the requestagain.

Ecs.0012 The number of IPaddresses in thesubnet isinsufficient.Release IPaddresses in thesubnet or selectanother subnet, andcreate the ECSagain.

Obtain more idle IPaddresses on the targetsubnet or use a new subnetfor purchasing ECSs.

Obtain more idle IPaddresses on the targetsubnet and contactcustomer service fortroubleshooting.Alternatively, contactcustomer service tocancel the order and use anew subnet forpurchasing ECSs.

Ecs.0013 Insufficient EIPquota. Contactcustomer serviceand request a quotaincrease.

Contact customer service toapply for an increased EIPquota.

Submit a work order toapply for an increasedEIP quota and contactcustomer service fortroubleshooting.

Ecs.0015 This disk type isnot supported bythe ECS.

Select a supported EVSdisk and attach it to theECS.

Select a supported EVSdisk and attach it to theECS.

Ecs.0100 The ECS statusdoes not meetrequirements. Makethe ECS in therequired status andtry again.

Change the ECS status tothe required status and tryagain.

Change the ECS status tothe required status andcontact customer servicefor troubleshooting.

Ecs.0104 Insufficient numberof ECS slots forattaching disks.

Detach an EVS disk fromthe ECS before attaching anew EVS disk.

Detach an EVS disk fromthe ECS before attachinga new EVS disk.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 160

Page 169: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

ErrorCode

MessageDisplayed on theManagementConsole

Solution Suggestion forOn-demand ECSs

Solution Suggestionfor PeriodicallyCharged ECSs

Ecs.0105 No system diskfound.

Reattach the EVS systemdisk to the ECS andperform the desiredoperation again.

Reattach the EVS systemdisk to the ECS andcontact customer servicefor troubleshooting.

Ecs.0107 The number ofshared disks thatcan be attached toan ECS exceeds themaximum limit.

Detach an EVS disk fromthe ECS before attaching anew EVS disk.

Detach an EVS disk fromthe ECS before attachinga new EVS disk.

Ecs.0509 This operation isnot allowed on asystem diskcharged yearly ormonthly. Select asystem diskcharged on demandand perform therequired operationagain.

N/A Change the ECS billingmode to on-demand andperform the desiredoperation again.

Ecs.0510 Periodicallycharged ECSs donot support OSchanging.

N/A Change the ECS billingmode to on-demand andperform the desiredoperation again.

9.15 How Can I Handle Slow ECS Startup?If an ECS requires a long period of time to start, you can change the default timeout to speedup the startup.

1. Log in to the ECS.

2. Run the following command to switch to user root:

sudo su

3. Run the following command to obtain the grub version:

rpm -qa | grep grub

Figure 9-12 Viewing the grub version

4. Change the timeout in the grub file to 0s.

– If the grub version is earlier than 2:

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 161

Page 170: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Open the /boot/grub/grub.cfg or /boot/grub/menu.lst file and change the timeoutvalue to 0.

– If the grub version is 2:Open the /boot/grub2/grub.cfg file and change the timeout value to 0.

9.16 What Should I Do If Starting an ECS Remains in"Waiting for cloudResetPwdAgent" State?Symptom

During ECS startup, it remains in "Waiting for cloudResetPwdAgent" state for 20-30 seconds.

Figure 9-13 Starting cloudResetPwdAgent

Possible CausesThis issue is caused by the intranet DNS and user-defined DNS configurations.

Solution1. Log in to the ECS as user root.2. Run the following command to modify the /etc/cloud/cloud.cfg configuration file:

vi /etc/cloud/cloud.cfg3. Add the following statement to the configuration file:

manage_etc_hosts: true

Figure 9-14 Modifying the configuration file

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 162

Page 171: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

9.17 What Should I Do If Cloud-Init Does Not Work AfterPython Is Upgraded?

SymptomTake an ECS running CentOS 6.8 as an example. After Python was upgraded from 2.6 to 2.7,Cloud-Init did not work. Data, such as the login password, key, and hostname could not beimported to the ECS using Cloud-Init.

After the cloud-init -v command was executed to view the Cloud-Init version, the systemdisplayed errors, as shown in Figure 9-15.

Figure 9-15 Errors in Cloud-Init

Possible CausesThe Python version used by Cloud-Init was incorrect.

SolutionChange the Python version used by Cloud-Init to the source version. To do so, change theenvironment variable value of /usr/bin/cloud-init from the default value #!/usr/bin/pythonto #!/usr/bin/python2.6.

Elastic Cloud ServerUser Guide 9 Troubleshooting

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 163

Page 172: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10 FAQs

10.1 General FAQs

10.1.1 What Restrictions Are Involved with Using ECSs?l You are advised not to upgrade ECS kernel or OS versions. If you want to upgrade the

main OS version, for example, from CentOS 7.2 to Cent OS 7.3, use the OS changingfunction provided by the public cloud platform.

l You are advised not to uninstall the performance optimization software pre-installed onyour ECSs.

l You are advised not to change the MAC addresses of your ECS NICs.

10.1.2 What Can I Do with ECSs?You can use ECSs just like traditional physical servers. On an ECS, you can deploy anyservice application, such as the email system, web system, and Enterprise Resource Planning(ERP) system. After creating an ECS, you can use it like using your local computer orphysical server.

10.1.3 How Long Does It Take to Obtain an ECS?Obtaining an ECS can take as little as a few minutes.

The time it takes to obtain an ECS depends on ECS specifications, available resources (suchas EVS disks and EIPs), and system load.

NOTE

If obtaining an ECS takes a long time, contact customer service for technical support.

10.1.4 What Functions Does the Delete Button Provide?After you click Delete, the selected ECS is deleted. You can choose to delete the EVS diskand EIP of the ECS as well. If you do not delete them, they are reserved. If necessary, you canmanually delete them later.

To delete an ECS, perform the following operations:

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 164

Page 173: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Select the ECS to be deleted.4. In the upper part of the ECS list, click Delete.

10.1.5 What Is a Deleted ECS?Deleted is an intermediate state of the ECS. Deleted indicates that the ECS has been deleted.ECSs in this state can no longer provide services and are soon removed from the system.

10.1.6 Can a Deleted ECS Be Provisioned Again?No. A deleted ECS is retained in the ECS list on the management console for only a shortperiod of time. It is then completely removed from the system and cannot be provisionedagain. You can purchase the ECSs of the same specifications again.

10.1.7 Why Does the Task Status Area Show an ECS CreationFailure But the ECS List Displays the Created ECS?

SymptomAfter you created an ECS bound with an EIP on the management console, the ECS creationwas successful but binding the EIP failed due to insufficient EIPs. Although the Task Statusshowed that the ECS creation failed, the ECS was displayed in the ECS list. The results of theECS creation task were inconsistent.

Root Causel The ECS list displays details about created ECSs.l The Task Status area shows the ECS creation status, including the statuses of subtasks,

such as creating ECS resources and binding an EIP. Only when all subtasks aresuccessful, the ECS is created.

If the ECS is created but EIP binding failed, the task failed. However, the ECS you created istemporarily displayed in the list. After the system rolls back, the ECS is removed from thelist.

10.2 Management FAQs

10.2.1 Can I Transfer ECS Ownership Between Accounts?No. This function is not supported.

10.2.2 What Is the cloudbase-init Account in Windows ECSs?In Windows ECSs, cloudbase-init is the default account of the Cloudbase-Init agent program.It is used to obtain the metadata and execute configurations when the ECS starts.

Do not modify or delete this account or uninstall the Cloudbase-Init agent program.Otherwise, injecting the customized data for initializing the ECS generated using theWindows private image created based on this ECS will fail.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 165

Page 174: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

This account is unavailable on Linux ECSs.

10.2.3 When Does an ECS Become Provisioned?ECSs charged in yearly/monthly mode: After you pay for the ECSs and the systemsuccessfully deducts incurred fees from your account balance, your ECSs are automaticallyprovisioned.

ECSs charged in metered mode: The ECSs are automatically provisioned after they arecreated.

10.2.4 Why Cannot I View the ECSs Being Created ImmediatelyAfter I Pay for Them?

You can view the ECSs being created only after system disks of the ECSs are created. Thisrequires a period of time.

10.2.5 How Can a Changed Static Hostname Take EffectPermanently?

Symptom

The static hostname of a Linux ECS is user defined and injected using Cloud-Init during theECS creation. Although the hostname can be changed by running the hostname command,the changed hostname is restored after the ECS is restarted.

Solution

To make the changed hostname take effect even after the ECS is stopped or restarted, save thechanged name into configuration files.

The changed hostname is assumed to be new_hostname.

Step 1 Modify the /etc/hostname configuration file.

1. Run the following command to edit the configuration file:sudo vim /etc/hostname

2. Change the hostname to the new one.3. Run the following command to save and exit the configuration file:

:wq

Step 2 Modify the /etc/sysconfig/network configuration file.

1. Run the following command to edit the configuration file:sudo vim /etc/sysconfig/network

2. Change the HOSTNAME value to the new hostname.HOSTNAME=Changed hostnameAn example is provided as follows:HOSTNAME=new_hostname

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 166

Page 175: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3. Run the following command to save and exit the configuration file::wq

Step 3 Modify the /etc/cloud/cloud.cfg configuration file.

1. Run the following command to edit the configuration file:sudo vim /etc/cloud/cloud.cfg

2. Use either of the following methods to modify the configuration file:– Method 1: Change the preserve_hostname parameter value or add the

preserve_hostname parameter to the configuration file.If preserve_hostname: false is already available in the /etc/cloud/cloud.cfgconfiguration file, change it to preserve_hostname: true. If preserve_hostname isunavailable in the /etc/cloud/cloud.cfg configuration file, add preserve_hostname:true before cloud_init_modules.If you use method 1, the changed hostname still takes effect after the ECS isstopped or restarted. However, if the ECS is used to create a private image and theimage is used to create a new ECS, the hostname of the new ECS is the hostname(new_hostname) used by the private image, and user-defined hostnames cannot beinjected using Cloud-Init.

– Method 2 (recommended): Delete or comment out - update_hostname.If you use method 2, the changed hostname still takes effect after the ECS isstopped or restarted. If the ECS is used to create a private image and the image isused to create a new ECS, the changed hostname permanently takes effect, anduser-defined hostnames (such as new_new_hostname) can be injected usingCloud-Init.

Step 4 Run the following command to restart the ECS:

sudo reboot

Step 5 Run the following command to check whether the hostname has been changed:

sudo hostname

If the changed hostname is displayed in the command output, the hostname has been changedand the new name permanently takes effect.

----End

10.2.6 Is the ECS Hostname with Suffix novalocal Normal?

SymptomHostnames of some ECSs have the suffix .novalocal.

For example, the hostname is set to abc during ECS creation. Table 10-1 lists the hostnames(obtained by running the hostname command) of ECSs created using different images andthose displayed after the ECSs are restarted.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 167

Page 176: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Table 10-1 Hostnames of ECSs created from different images

Image Hostname Before ECS Restart Hostname After ECS Restart

CentOS 6.8 abc abc.novalocal

CentOS 7.3 abc.novalocal abc.novalocal

Ubuntu 16 abc abc

Hostnames of ECSs created from some types of images have the suffix .novalocal, whileothers do not.

Troubleshooting

This is a normal phenomenon.

The static hostname of a Linux ECS is user defined and injected using Cloud-Init during theECS creation. According to the test results, Cloud-Init adapts to OSs differently. As a result,hostnames of some ECSs have suffix .novalocal, while others do not.

If you do not need suffix .novalocal in obtained host names, change the host names. Fordetails, see section "How Can a Changed Static Host Name Take Effect Permanently?"

10.2.7 How Can I Modify Specifications of ECSs Charged inYearly/Monthly Mode?

You can modify ECS specifications anytime you want. Before modifying ECS specifications,stop the ECS, select target specifications, pay for extra fees, and restart the ECS to make themodification take effect.

10.2.8 How Can I Modify Specifications of ECSs Charged in Pay-Per-Use Mode?

You can modify your ECS specifications at any time without paying for the difference.

Before modifying the specifications, stop the ECS. Then, on the Elastic Cloud Server page,click More in the Operation column and select Modify Specifications. Then, start the ECS.

10.3 Login FAQs

10.3.1 What Should I Do If I Cannot Remotely Log In to aWindows ECS?

1. Check whether the EIP bound to the ECS can be pinged.– If the EIP cannot be pinged, resolve this issue.– If the EIP can be pinged, go to step 2.

2. Check whether port 3389 on the ECS is accessible.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 168

Page 177: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

– If the port is accessible, check whether data is allowed to pass through this port inthe security group.

– If the port is inaccessible, go to step 3.

3. Check whether the RDP process is running properly on the ECS.

a. Log in to another Windows ECS in the same network segment and remotely log into the affected ECS.

b. If the login fails, an error may have occurred in the RDP process. In such an event,log in to the affected ECS using VNC, restart the RDP process, and check whetherthe login from the functional Windows ECS is successful.

To restart the RDP process, perform the following operations:

i. Click Start, select Run, and enter services.msc.

ii. In the service list, select Remote Desktop Services and restart it.

4. Check whether the remote connection port on the ECS has been changed.

5. In HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP Tcp\PortNumber, check whether the port is thedefault one 3389. If not, change the port to the configured one in remote connections.

6. Check whether the number of connections to the ECS is limited.

Check the internal remote desktop configuration of the ECS.

a. Click Start, select Run, and enter gpedit.msc to start the local group policy editor.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 169

Page 178: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

b. Choose Computer Configuration > Administrative Templates > RemoteDesktop Services > Remote Desktop Session Host > Connections. Then, in theLimit number of connections dialog box, check whether the number is limited.

NOTE

If Limit number of connections is set to Enabled, a remote connection to the WindowsECS may fail when the number of connections exceeds the limit. In such an event, disablethe configuration or set a larger maximum number of connections.

10.3.2 What Should I Do If I Cannot Log In to an ECS with Cloud-Init Enabled?

If logging in to an ECS with Cloud-Init enabled failed, perform the following operations tolocate the fault:

1. Ensure that the key pair for logging in to the ECS is correct.2. Ensure that DHCP is enabled in the VPC to which the ECS belongs.3. Ensure that the ECS has an EIP bound.4. View security group rules in the outbound direction and ensure that port 80 port is open.

10.3.3 What Should I Do If an MSTSC-based Remote DesktopConnection Failed to Set Up?

SymptomWhen a local computer running Windows attempts to set up a remote desktop connection to aWindows ECS using RDP, such as MSTSC, an error occurs. The system displays the possiblecause "This could be due to CredSSP encryption oracle remediation."

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 170

Page 179: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 10-1 Failed to set up a remote desktop connection

Possible CausesMicrosoft released a security patch in March 2018, which may affect RDP-based CredSSPconnections. As a result, setting up RDP-based connections to ECSs failed. For details, visitUnable to RDP to Virtual Machine: CredSSP Encryption Oracle Remediation.

SolutionModify the remote desktop connection settings on the Windows ECS. To do so, perform thefollowing operations:

1. Log in to the ECS.2. Click Start in the lower left corner, right-click Computer, and choose Properties from

the shortcut menu.3. In the navigation pane on the left, choose Remote settings.4. Click the Remote tab. In the Remote Desktop pane, select Allow connections from

computers running any version of Remote Desktop (less secure).

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 171

Page 180: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 10-2 Modifying remote desktop connection settings

5. Click OK.

10.3.4 What Should I Do If the System Displays Error Code 0x112fWhen I Log In to a Windows ECS?

Symptom

When I log in to a Windows ECS, the system displays error code 0x112f.

Figure 10-3 0x112f

Possible Causes

The memory size of the ECS is insufficient.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 172

Page 181: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Solutionl Method 1 (recommended)

Modify the ECS specifications to increase the vCPUs and memory size. For instructionsabout how to modify ECS specifications, see section Modifying ECS vCPU andMemory Specifications.

l Method 2

Enable virtual memory on the ECS to obtain its idle memory. For instructions about howto enable virtual memory, see section 10.11.14 How Can I Enable Virtual Memory ona Windows ECS?

NOTE

This method will deteriorate the disk I/O performance. Therefore, use this method only whennecessary.

If neither of the preceding methods take effect, contact customer service for technical support.

10.3.5 What Browser Version Is Required to Remotely Log In toan ECS?

When you use a browser to remotely log in to an ECS, make sure that the browser versionmeets the requirements listed in Table 10-2.

Table 10-2 Browser version requirements

Browser Version

Google Chrome 31.0 or later

Mozilla Firefox 27.0 or later

Internet Explorer 10.0 or later

10.3.6 What Should I Do After I Log In to an ECS Using VNC andPerform an Operation But the Page Does not Respond for a LongTime?

If your computer is running Windows 7 and you logged in to the ECS using Internet Explorer10 or 11, click AltGr twice on the VNC page.

10.3.7 What Should I Do If I Cannot View Data After Logging Into an ECS Using VNC?

After you log in to an ECS using VNC and perform a data viewing operation, such as runningthe cat command to view large files or playing videos, VNC may become unavailable due tothe high memory usage of the browser. In this case, use another browser to log in to the ECSagain.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 173

Page 182: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.3.8 Why Does a Blank Screen Appear While the SystemDisplays a Message Indicating Successful Authentication After IAttempted to Log In to an ECS Using VNC?

Another user has logged in to this ECS using VNC.

Only one user can log in to an ECS using VNC at a time. If multiple users attempt to log in toan ECS at the same time, only the first user can log in to it. For other users, the systemdisplays a message indicating that the user is authenticated, but the screen turns blank. If thisoccurs, wait until the other user logs out of the ECS.

10.3.9 How Can I Log In to an ECS After Its System Disk IsExchanged with That Attached to Another ECS Running theSame OS?

Symptom

Two pay-per-use ECSs run the same OS, for example, both run Windows or Linux. Thesystem disks attached to the two stopped ECSs are exchanged. After the exchanging, the loginpasswords or keys of the ECSs may change. In such a case, how can I log in to the ECSs?

NOTE

Before stopping an ECS for disk detachment, release the IP address assigned to the ECS using DHCP sothat ECS can correctly obtain an IP address later. To do so, perform the following operations:

1. Log in to the Windows ECS.

2. Run the following command to release the IP address:

ipconfig /release

This operation will interrupt network connections and affect the use of the ECS. After the ECS isrestarted, network connections will automatically recover.

Windows

Login methods vary according to the login authentication used on the ECSs. For example,there are three Windows ECSs with parameters configured in Table 10-3.

Table 10-3 Parameter configurations

ECS System Disk LoginAuthentication

Password/Key Pair

ecs_01 vol_01 Password orkey pair

If a password is used for loginauthentication, take Ecs@01 as anexample.If a key pair is used for loginauthentication, take private key fileKeypair_01 as an example.

ecs_02 vol_02 Password Ecs@02

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 174

Page 183: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

ECS System Disk LoginAuthentication

Password/Key Pair

ecs_03 vol_03 Key pair Keypair_03

l Scenario 1: System disk vol_01 is detached from ecs_01 offline and then attached toecs_02 as the system disk. How can I log in to ecs_02?After ecs_02 starts up, use its initial password Ecs@02 to log in to the ECS.

l Scenario 2: System disk vol_01 is detached from ecs_01 offline and then attached toecs_03 as the system disk. How can I log in to ecs_03?The random password for logging in to ecs_03 must be resolved again. The procedure isas follows:

a. Delete the initial password for logging in to ecs_03.Locate the row containing ecs_03, click More in the Operation column, and selectDelete Password from the drop-down list. Then, click OK.

NOTE

ecs_03 must be in Stopped state.

b. Start ecs_03.Locate the row containing ecs_03, click More in the Operation column, and selectStart from the drop-down list. Then, in the Start ECS dialog box, click OK.

c. Obtain the password for logging in to ecs_03.

i. Locate the row containing ecs_03, click More in the Operation column, andselect Get Password from the drop-down list.

ii. Click Select File and upload private key file Keypair_03 of ecs_03.iii. Click Get Password to obtain a new random password.

d. Use the random password obtained in step c to log in to ecs_03 with the system diskreplaced.

Linux

Login methods vary according to the login authentication used on the ECSs. For example,there are three Linux ECSs with parameters configured in Table 10-3.

Table 10-4 Parameter configurations

ECS SystemDisk

LoginAuthentication

Password/Key Pair

ecs_01 vol_01 Password or keypair

If a password is used for loginauthentication, take Ecs@01 as anexample.If a key pair is used for loginauthentication, take private key fileKeypair_01 as an example.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 175

Page 184: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

ECS SystemDisk

LoginAuthentication

Password/Key Pair

ecs_02 vol_02 Password Ecs@02

ecs_03 vol_03 Key pair Keypair_03

l Scenario 1: System disk vol_01 is detached from ecs_01 offline and then attached toecs_02 as the system disk. How can I log in to ecs_02?

Use either of the following methods to log in to ecs_02:

– Use private key file Keypair_01 (if available) of ecs_01.

– Use the original password Ecs@02 of ecs_02.

l Scenario 2: System disk vol_01 is detached from ecs_01 offline and then attached toecs_03 as the system disk. How can I log in to ecs_03?

Use one of the following methods to log in to ecs_03:

– Use the password Ecs@01 (if available) of ecs_01.

– Use private key file Keypair_01 (if available) of ecs_01.

– Use private key file Keypair_03 of ecs_03.

10.3.10 Why Does the System Display a Message Indicating thatthe Password for Logging In to a Windows ECS Cannot BeViewed?

Symptom

Password authentication is required to log in to a Windows ECS. Therefore, a key file isrequired to obtain the initial password for logging in to the ECS. However, after GetPassword is clicked, the system displays a message indicating that the password could not beviewed. ECS login was therefore unsuccessful.

Possible Causes

Possible causes vary depending on the image used to create the Windows ECS.

l Cause 1: The image used to create the Windows ECS is a private image, on whichCloudbase-Init has not been installed.

l Cause 2: Cloudbase-Init has been installed on the image, but the key pair had not beenobtained when the Windows ECS was created.

Solutionl If the issue is a result of cause 1, proceed as follows:

If a private image is created without Cloudbase-Init installed, the ECS configurationcannot be customized. As a result, you can log in to the ECS only using the originalimage password.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 176

Page 185: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

The original image password is the OS password configured when the private image wascreated. If the original image password has been lost, use the password reset functionavailable on the Elastic Cloud Server page to reset the password.

l If the issue is a result of cause 2, proceed as follows:

a. Locate the row containing the target ECS, click More in the Operation column,and select Restart.

b. Choose More > Get Password in the Operation column to check whether thepassword can be obtained.

n If the password can be obtained, no further action is required.

n If the password cannot be obtained, contact technical support.

10.3.11 What Should I Do If My Password Is Lost?If the password for logging in to a password-authenticated ECS is lost, use the password resetfunction to reset the password.

l If the ECS has had password reset plug-ins installed, see section 3.6.1 Resetting theECS Password with a Few Clicks.

l If the ECS has not had password reset plug-ins installed, see section 3.6.2 Changing orResetting the Password for Logging In to a Windows ECS or 3.6.3 Changing orResetting the Password for Logging In to a Linux ECS.

NOTE

Keep your password secure.

10.4 Charging FAQs

10.4.1 What Are the Charging Standards of ECSs?ECSs can be charged in Yearly/Monthly or Metered mode. You can choose one chargingmode based on your requirements.

10.4.2 What Is the Metered Charging Mode for ECSs?In metered mode, ECSs are charged based on usage capacity by hour. If the duration is lessthan one hour, the system charges for the ECSs based on the actual duration.

10.4.3 Is a Pay-per-Use ECS Charged After Being Stopped?After such an ECS is stopped, basic resources including vCPUs, memory, and images are notcharged, but system disks are charged based on the capacity you use. If other service products,such as EVS disks, EIPs, and bandwidths are bound to the ECS, these products are chargedusing their own billing mode (yearly/monthly or pay-per-use).

If the ECS that you use contains local disks (for example, of disk-intensive, H2, P1, or P2type) or FPGAs (for example, of FP1 or FP1c type), the fees are still being charged after theECS is stopped. To stop charging such an ECS, delete it.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 177

Page 186: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.4.4 How Can ECS Charging Be Stopped?l To stop charging a product charged in metered mode, such as an ECS or EVS disk,

delete the product.

l A product charged in yearly/monthly mode, such as an ECS or EVS disk, is paid whenyou purchase it. The charging automatically stops when the payment cycle expires. Ifyou stop using the product before the payment cycle expires, the system does not refund.

This section uses an ECS charged in metered mode to describe the impact on charging afterthe ECS is deleted. Table 10-5 lists the information of the ECS.

Table 10-5 Information of an ECS charged in metered mode

Resources Used by theECS

Description Billing Mode

Basic resources vCPUs, memory, and image Metered

EVS disk System disk Metered

Data disk Metered

EIP N/A Metered

The ECS is charged as follows after being deleted:

l Basic resources: not charged any more

l EVS disk– System disk: not charged any more– Data disk: not charged any more if you select Delete the data disks attached to

the following ECSs when deleting the ECS. Otherwise, the data disk is stillcharged.

l EIP: not charged any more if you select Release the EIPs bound to the following ECSswhen deleting the ECS. Otherwise, the EIP is still charged.

10.4.5 What Is the Deduction Cycle for ECSs Charged in MeteredMode?

Each ECS is charged per hour and postpaid.

10.4.6 Is Refund Supported?Automatic refund is not supported.

10.4.7 Can I Receive a Reminder If My Account Balance IsInsufficient?

You can set the account balance threshold on the recharging page. After the account balance isless than the threshold, the system will send you a reminder.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 178

Page 187: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.4.8 Can I Receive a Reminder of Account Balance Changes?The system sends you a reminder of the account balance changes using emails or shortmessages. The reminder message contains account balance adjustment, online recharging, andsuccessful recharging.

10.4.9 How Can I Renew ECSs?On the Elastic Cloud Server page, click More in the Operation column and select Renew torenew the subscription.

10.5 Regional FAQs

10.5.1 How Can I Select a Region?A region is a geographic area. Huawei has deployed data centers in multiple regions toprovide services nationwide.

It is recommended that you select the nearest region. For example, if you or your customersare located in Beijing, select the northchina region for low network latency and high serviceaccess rate.

10.5.2 Are Products Different in Different Regions?Yes. The products are different currently.

Huawei deploys mature products and services in each region and new products in certainregions for trial release.

10.5.3 Is Application Disaster Recovery Available in DifferentRegions?

Yes.

You can deploy active and standby application nodes in different regions. If the activeapplication node is faulty, the standby application node can still provide services for you.

10.5.4 Does the Public Cloud Provide the Application DR Service?Standard application disaster recovery solution is unavailable now. If you have therequirement, contact us. We will customize an application disaster recovery solution based onyour application scenarios.

10.5.5 Can Components Contained in an Application BeDistributed to Different Regions?

Yes. However, such a deployment mode is not recommended.

You are advised to deploy the components contained in an application in the same region. Inthis manner, these components can communicate with each other over an intranet, reducingbandwidth costs introduced by public networks and ensuring communication quality betweenthe components.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 179

Page 188: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.5.6 Does ELB Take Effect on the ECSs Deployed in DifferentRegions?

No. You are advised to use the dedicated ELB service for the ECSs in each region.

10.5.7 Can I Change the Region for a Purchased ECS?No.

Select the region closest to your service and purchase ECSs.

10.5.8 Are ECS Prices Different in Different Regions?ECS prices in different regions of China are the same now. However, they may differ in thefuture.

10.5.9 What Is AZ and How Can I Select One?

AZAn AZ is a physical region where resources use independent power sources and networks. AnAZ is generally an independent physical equipment room, ensuring independence of the AZ.

Each region contains multiple AZs. If one AZ becomes faulty, the other AZs in the sameregion can still properly provide services.

AZs in the same region can communicate with each other over an intranet.

Selecting an AZYou can purchase ECSs in different AZs as required. The failure of an AZ does not affect therunning of ECSs in other AZs. Follow the rules when selecting AZs:

l If only one AZ is available in a region, there is only one AZ in the region.l The AZ of a purchased ECS cannot be changed.l The AZs in one region can communicate with each other over an intranet.

10.5.10 Is Data Transmission Between AZs Charged?Data transmission between AZs in the same region is free of charge. However, datatransmission between AZs in different regions is charged.

10.6 Key Pair

10.6.1 How Can I Obtain the Key Pair Used by an ECS?

SymptomIf a user has created multiple key pairs on the public cloud platform, the user might not knowwhich is the required one for logging in to the target ECS. This section describes how toquickly identify the target key pair on the management console.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 180

Page 189: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Procedure1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. On the Elastic Cloud Server page, select the target ECS.4. Click the name of the target ECS.

The page providing details about the ECS is displayed.5. Obtain the Key Pair value.

The value is the key pair used by the ECS.

10.7 EIP FAQs

10.7.1 Can Multiple EIPs Be Bound to an ECS?Yes. However, this configuration is not recommended.

To configure multiple EIPs, you must manually configure routing policies. Exercise cautionwhen you perform this operation.

Configuration ExampleTable 10-6 lists ECS configurations.

Table 10-6 ECS configurations

Parameter Configuration

Name ecs_test

Image Red Hat Enterprise Linux 6.5 64bit

EIP 2

Primary NIC eth0

Secondary NIC eth1

Example 1:

If you are required to access public network 11.11.11.0/24 through standby NIC eth1, performthe following operations to configure a routing policy:

1. Log in to the ECS.2. Run the following command to configure a routing policy:

ip route add 11.11.11.0/24 dev eth1 via 192.168.2.1In the preceding command, 192.168.2.1 is the gateway IP address of standby NIC eth1.

Example 2:

Based on example 1, if you are required to enable routing for default public network trafficthrough standby NIC eth1, perform the following operations to configure a routing policy:

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 181

Page 190: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

1. Log in to the ECS.2. Run the following command to delete the default route:

ip route delete default3. Run the following command to configure a new default route:

ip route add 0.0.0.0/0 dev eth1 via 192.168.2.1In the preceding command, 192.168.2.1 is the gateway IP address of standby NIC eth1.

10.7.2 Will NICs Added to an ECS Start Automatically?Based on test results, if the ECS runs CentOS 7.0, NICs added to the ECS cannot startautomatically. You must start the NICs manually.

10.7.3 Can an ECS Without an EIP Access the Internet?Yes.

You can use the NAT Gateway service available on the public cloud platform. This serviceoffers NAT for ECSs in a VPC, allowing these ECSs to access the Internet using an EIP. TheSNAT function provided by the NAT Gateway service allows the ECSs in a VPC to access theInternet without requiring an EIP. Additionally, SNAT supports a large number of concurrentconnections for the applications requiring a large number of requests and connections. Formore information about NAT Gateway, see NAT Gateway User Guide.

10.7.4 Why Can I Remotely Access an ECS But Cannot Ping It?To ping an ECS, enable Internet Control Message Protocol (ICMP) in the security group rulesfor the ECS.

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. On the Elastic Cloud Server page, click the name of the target ECS.

The page providing details about the ECS is displayed.4. Click the Security Groups tab and then the security group name and ECS ID.5. On the Security Groups page, click Add Rule in the Operation column of the target

security group.6. Add an inbound rule for the security group and enable ICMP.

– Direction: Inbound– Protocol: ICMP– Type: Any– Source: IP address 0.0.0.0/0

10.8 Network

10.8.1 Can the ECSs of Different Accounts Communicate over theIntranet?

No. The ECSs of different accounts cannot communicate with each other over the intranet.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 182

Page 191: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.8.2 Are ECSs I Purchased Deployed in the Same Subnet?You can customize your network to deploy the ECSs. Therefore, whether they are in the samesubnet is totally up to you.

10.8.3 How Can I Change the MTU of a Linux ECS NIC?Maximum transmission unit (MTU) specifies the largest packet of data that can be transmittedon a network and ranges from 1,280 to 8,888 in the unit of byte. This section uses disk-intensive Linux ECSs as an example to describe how to change the NIC MTU of ECSsrunning SUSE, CentOS, and Ubuntu OSs, respectively.

SUSE Linux OSs

The following operations use the SUSE Enterprise Linux Server 11 SP3 64bit OS as anexample to describe how to change the MTU:

1. Log in to the ECS as an administrator and run the sudo su root command to switch touser root.

2. Run the ifconfig command to view the NIC that has a bound IP address.3. Run the following command to open the ifcfg-XXX configuration file:

vi /etc/sysconfig/network/ifcfg-XXX

NOTE

The XXX parameter indicates the NIC queried in step 2, for example, eth0.

4. Press i and run the following command to configure the MTU for the NIC:MTU=8888

5. Press Esc and run the :wq! command to save and exit the configuration file.6. Run the following command to restart the network:

service network restart7. Run the ifconfig command to check whether the MTU value has been changed.

CentOS

The following operations use the CentOS 7.2 64bit OS as an example to describe how tochange the MTU:

1. Log in to the ECS as an administrator and run the sudo su root command to switch touser root.

2. Run the ifconfig command to view the NIC that has a bound IP address.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 183

Page 192: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3. Run the following command to open the ifcfg-XXX configuration file:vi /etc/sysconfig/network-scripts/ifcfg-XXX

NOTE

The XXX parameter indicates the NIC queried in step 2, for example, eth0.

4. Press i and run the following command to configure the MTU for the NIC:MTU=8888

5. Press Esc and run the :wq! command to save and exit the configuration file.6. Run the following command to restart the network:

service network restart7. Run the ifconfig command to check whether the MTU value has been changed.

Ubuntu Linux OSs1. Log in to the ECS as an administrator and run the sudo su root command to switch to

user root.2. Run the following command to open the interfaces file:

vi /etc/network/interfaces3. Press i and run the following command to configure the MTU for the NIC:

post-up /sbin/ifconfig/ eth0 mtu 8888

4. Press Esc and run the :wq! command to save and exit the interfaces file.5. Run the following command to restart the network:

/etc/init.d/networking restart6. Run the ifconfig command to check whether the MTU value has been changed.

10.8.4 How Can I Change the MTU of a Windows ECS NIC?Maximum transmission unit (MTU) specifies the largest packet of data that can be transmittedon a network and ranges from 1,280 to 8,888 in the unit of byte. This section uses an ECSrunning the Windows Server 2012 OS as an example to describe how to change the MTU ofthe ECS NIC.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 184

Page 193: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Step 1 Enable Jumbo Packet on the NIC.

1. Click Start in the task bar and choose Control Panel.

Figure 10-4 Control Panel

2. Click View network status and tasks under Network and Internet.

Figure 10-5 Network and Sharing Center

3. In the View your active networks area, select the target NIC. Take the Ethernet 15 NICshown in Figure 10-5 as an example.

Click Ethernet 15.

The page showing the Ethernet 15 NIC status is displayed.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 185

Page 194: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

4. Click Properties.The page showing the Ethernet 15 NIC properties is displayed.

5. Click Configure. In the dialog box that is displayed, click the Advanced tab.

Figure 10-6 Inter(R) 82599 Virtual Function #13 Properties

6. In the Settings area, select Jumbo Packet. In the Value area, select 9014 Bytes.7. Click OK.

Step 2 Change the MTU.1. Press Win+R to open the Run dialog box.

Figure 10-7 Run

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 186

Page 195: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

2. In the Open text box, enter cmd and click OK.3. Run the following command to view the NIC MTU:

netsh interface ipv4 show subinterfaces4. Obtain the result. The MTU of the NIC with Jumbo Packet enabled is 9,000.

Figure 10-8 Obtaining the NIC MTU

5. Run the following command to change the NIC MTU:netsh interface ipv4 set interface "NIC name" mtu=Changed MTU store=persistentFor example, if the MTU of the Ethernet 15 NIC is changed to 8,888, run the followingcommand:netsh interface ipv4 set interface "Ethernet 15" mtu=8888 store=persistent

6. Run the following command to view the changed NIC MTU:netsh interface ipv4 show subinterfaces

Figure 10-9 Obtaining the changed NIC MTU

----End

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 187

Page 196: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.8.5 How Can I Check Whether the Network CommunicationBetween Two ECSs Equipped with an InfiniBand NIC Driver IsNormal?

For high-performance h2 ECSs equipped with an InfiniBand NIC driver (InfiniBand ECSs forshort), perform the following operations to check whether the driver installation is successfuland whether the network communication between the ECSs is normal.

NOTE

During the check, if your ECS has no command tool installed, such as ibstat, obtain the tool from theinstallation package for the InfiniBand NIC driver and install the tool.

Step 1 Check whether the NICs of the InfiniBand ECSs are functional.

1. Log in to an ECS.

2. Run the following command to check whether the NIC is functional:

ibstat

– If yes, go to Step 2.

– If no, contact customer service.

Step 2 Check whether the network communication between two InfiniBand ECSs is normal.

1. Log in to one InfiniBand ECS and run the following command:

ib_write_bw -x 0 --pkey_index 0

2. Log in to the other InfiniBand ECS and run the following command:

ib_write_bw -x 0 --pkey_index 0 ip_addr

In the preceding command, ip_addr is the NIC IP address of the first InfiniBand ECS.

3. Check whether the terminal display is correct.

Figure 10-10 Normal network communication

– If the terminal display is shown in Figure 10-10, the network communicationbetween the two InfiniBand ECSs is normal.

– If the network communication is abnormal, contact customer service.

----End

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 188

Page 197: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.8.6 How Can I Manually Configure an IP Address for anInfiniBand NIC?

IP over InfiniBand (IPoIB) allows IP data transmission over InfiniBand. For SUSE high-performance H2 and HL1 ECSs, if IPoIB is required, you must manually configure an IPaddress for the InfiniBand NIC after installing the InfiniBand NIC driver.

Prerequisites

The InfiniBand NIC driver has been installed on the high-performance H2 or HL1 ECSs.

Background

To prevent IP address conflict of the InfiniBand NICs configured for the ECSs of a tenant,determine the IP address to be configured for an InfiniBand NIC according to the IP addressesavailable in the VPC. The method is as follows:

For example, if the first two eight-bits of the IP address (specified by IPADDR) to beconfigured for the InfiniBand NIC are consistently 169.254, the latter two eight-bits must bethe same as those of the eth0 IP address, and the subnet mask must be the same as that of theeth0 NIC.

An example is provided as follows:

If the IP address of the eth0 NIC is 192.168.0.100/24, the IP address to be configured for theInfiniBand NIC is 169.254.0.100/24.

Procedure1. Log in to the ECS.

2. Run the following command to switch to user root:

sudo su -

3. Run the following command to edit the /etc/sysconfig/network/ifcfg-ib0 file:

vi /etc/sysconfig/network/ifcfg-ib0

4. Enter the following information:

DEVICE=ib0

BOOTPROTO=static

IPADDR=IP address to be configured for the InfiniBand NIC

NETMASK=Subnet mask

STARTMODE=auto

NOTE

For instructions about how to obtain the IP address and subnet mask for an InfiniBand NIC, seeBackground.

5. Run the following command to restart the network for the configuration to take effect:

service network restart

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 189

Page 198: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.8.7 How Can I View and Modify Kernel Parameters of a LinuxECS?

This document describes common Linux kernel parameters and how to view and modifythem. Modify the kernel parameters only if the parameter settings affect your services. If theparameter settings must be modified, ensure that:

l The target parameter settings meet service requirements.l Learn the kernel parameters to be modified, which vary depending on OS versions. For

details about common kernel parameters, see Table 10-7.l Back up key ECS data before modifying kernel parameter settings.

Background

Table 10-7 Common Linux kernel parameters

Parameter Description

net.core.rmem_default Specifies the default size (in bytes) of the window forreceiving TCP data.

net.core.rmem_max Specifies the maximum size (in bytes) of the window forreceiving TCP data.

net.core.wmem_default Specifies the default size (in bytes) of the window fortransmitting TCP data.

net.core.wmem_max Specifies the maximum size (in bytes) of the window fortransmitting TCP data.

net.core.netdev_max_backlog

Specifies the maximum number of packets that can be sentto a queue when the rate at which each network portreceives packets is faster than the rate at which the kernelprocesses these packets.

net.core.somaxconn Defines the maximum length of the listening queue foreach port in the system. This parameter applies globally.

net.core.optmem_max Specifies the maximum size of the buffer allowed by eachsocket.

net.ipv4.tcp_mem Uses the TCP stack to show memory usage in memorypages (4 KB generally).l The first value is the lower limit of memory usage.l The second value is the upper limit of the load added to

the buffer when the memory is overloaded.l The third value is the upper limit of memory usage.

When this value is reached, packets can be discarded toreduce memory usage. For a large BDP, increase theparameter value as needed. The unit of this parameter ismemory page but not byte.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 190

Page 199: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Parameter Description

net.ipv4.tcp_rmem Specifies the memory used by sockets for automaticoptimization.l The first value is the minimum number of bytes

allocated to the socket buffer for receiving data.l The second value is the default value, which is

overwritten by rmem_default. The buffer size canincrease to this value when the system load is not heavy.

l The third value is the maximum number of bytesallocated to the socket buffer for receiving data. Thisvalue is overwritten by rmem_max.

net.ipv4.tcp_wmem Specifies the memory used by sockets for automaticoptimization.l The first value is the minimum number of bytes

allocated to the socket buffer for transmitting data.l The second value is the default value, which is

overwritten by wmem_default. The buffer size canincrease to this value when the system load is not heavy.

l The third value is the maximum number of bytesallocated to the socket buffer for transmitting data. Thisvalue is overwritten by wmem_max.

net.ipv4.tcp_keepalive_time Specifies the interval at which keepalive detectionmessages are sent in seconds for checking TCPconnections.

net.ipv4.tcp_keepalive_intvl Specifies the interval at which keepalive detectionmessages are resent in seconds when no response isreceived.

net.ipv4.tcp_keepalive_probes

Specifies the maximum number of keepalive detectionmessages that are sent to determine a TCP connectionfailure.

net.ipv4.tcp_sack Enables selective acknowledgment (value 1 indicatesenabled). This configuration allows the transmitter toresend only lost packets, thereby improving systemperformance. However, this configuration will increase theCPU usage. You are suggested to enable selectiveacknowledgment for WAN communication.

net.ipv4.tcp_fack Enables forwarding acknowledgment for selectiveacknowledgment (SACK), thereby reducing congestion.You are suggested to enable forwarding acknowledgment.

net.ipv4.tcp_timestamps Specifies a TCP timestamp, which will add 12 bytes in theTCP packet header. This configuration calculates RTTusing RFC1323, a more precise retransmission methodupon timeout than retransmission. You are suggested to usethis configuration for higher system performance.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 191

Page 200: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Parameter Description

net.ipv4.tcp_window_scaling Enables RFC1323-based window scaling by setting theparameter value to 1 if the TCP window is larger than 64KB. The maximum TCP window is 1 GB. This parametertakes effect only when window scaling is enabled on bothends of the TCP connection.

net.ipv4.tcp_syncookies Specifies whether to enable TCP synchronization(syncookie). This configuration prevents socketoverloading when a large number of connections areattempted to set up. CONFIG_SYN_COOKIES must beenabled in the kernel for compilation. The default value is0, indicating that TCP synchronization is disabled.

net.ipv4.tcp_tw_reuse Specifies whether a TIME-WAIT socket (TIME-WAITport) can be used for new TCP connections.

net.ipv4.tcp_tw_recycle Allows fast recycle of TIME-WAIT sockets.

net.ipv4.tcp_fin_timeout Specifies the time (in seconds) during which a socket TCPconnection that is disconnected from the local end retainsin FIN-WAIT-2 state. Process suspension may be causedby the disconnection from the peer end, continuousconnection from the peer end, or unexpected causes.

net.ipv4.ip_local_port_range Specifies local port numbers allowed by TCP/UDP.

net.ipv4.tcp_max_syn_backlog

Specifies the maximum number of connection requests thatare not acknowledged by the peer end and that can bestored in the queue. The default value is 1024. If the serveris frequently overloaded, try to increase the value.

net.ipv4.tcp_low_latency This option should be disabled if the TCP/IP stack is usedfor high throughput, low latency.

net.ipv4.tcp_westwood Enables the congestion control algorithm on the transmitterend to evaluate throughput and improve the overallbandwidth utilization. You are suggested to enable thecongestion control algorithm for WAN communication.

net.ipv4.tcp_bic Enables binary increase congestion for fast long-distancenetworks so that the connections with operations beingperformed at a rate of Gbit/s can be functional. You aresuggested to enable binary increase congestion for WANcommunication.

net.ipv4.tcp_max_tw_buckets

Specifies the number of TIME_WAIT buckets, whichdefaults to 180000. If the number of buckets exceeds thedefault value, extra ones will be cleared.

net.ipv4.tcp_synack_retries Specifies the number of times that SYN+ACK packets areretransmitted in SYN_RECV state.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 192

Page 201: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Parameter Description

net.ipv4.tcp_abort_on_overflow

When this parameter is set to 1, if the system receives alarge number of requests within a short period of time butfails to process them, the system will send reset packets toterminate the connections. It is recommended that youimprove system processing capabilities by optimizing theapplication efficiency but not simply performing resetoperations.Default value: 0

net.ipv4.route.max_size Specifies the maximum number of routes allowed by thekernel.

net.ipv4.ip_forward Forward packets between interfaces.

net.ipv4.ip_default_ttl Specifies the maximum number of hops that a packet canpass through.

net.netfilter.nf_conntrack_tcp_timeout_established

Clears iptables connections that are inactive for a specifiedperiod of time.

net.netfilter.nf_conntrack_max

Specifies the maximum value of hash entries.

Viewing Kernel Parametersl Method 1: Run the cat command in /proc/sys to view file content.

/proc/sys/ is a pseudo directory generated after the Linux kernel is started. The netfolder in this directory stores all kernel parameters that have taken effect in the system.The directory tree structure is determined based on complete parameter names. Forexample, net.ipv4.tcp_tw_recycle corresponds to the /proc/sys/net/ipv4/tcp_tw_recycle file, and the content of the file is the parameter value.

An example is provided as follows:

To view the net.ipv4.tcp_tw_recycle value, run the following command:

cat /proc/sys/net/ipv4/tcp_tw_recycle

l Method 2: Use the /etc/sysctl.conf file.

Run the following command to view all parameters that have taken effect in the system:

/usr/sbin/sysctl –anet.ipv4.tcp_syncookies = 1 net.ipv4.tcp_max_tw_buckets = 4096 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_keepalive_time = 1800 net.ipv4.tcp_fin_timeout = 30 ...... net.ipv4.tcp_keepalive_time = 1200 net.ipv4.ip_local_port_range = 1024 65000 net.ipv4.tcp_max_syn_backlog = 8192 net.ipv4.tcp_rmem = 16384 174760 349520 net.ipv4.tcp_wmem = 16384 131072 262144 net.ipv4.tcp_mem = 262144 524288 1048576 ......

Modifying Kernel Parameter Settingsl Method 1: Run the echo command in /proc/sys to modify the file for the target kernel

parameters.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 193

Page 202: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

The parameter values changed using this method take effect only during the currentrunning and will be reset after the system is restarted. This method is used for temporaryverification. To make the modification take effect permanently, see method 2./proc/sys/ is a pseudo directory generated after the Linux kernel is started. The netfolder in this directory stores all kernel parameters that have taken effect in the system.The directory tree structure is determined based on complete parameter names. Forexample, net.ipv4.tcp_tw_recycle corresponds to the /proc/sys/net/ipv4/tcp_tw_recycle file, and the content of the file is the parameter value.An example is provided as follows:To change the net.ipv4.tcp_tw_recycle value to 0, run the following command:echo "0" > /proc/sys/net/ipv4/tcp_tw_recycle

l Method 2: Use the /etc/sysctl.conf file.The parameter values changed using this method take effect permanently.

a. Run the following command to change the value of a specified parameter:/sbin/sysctl -w kernel.domainname="example.com"An example is provided as follows:sysctl -w net.ipv4.tcp_tw_recycle="0"

b. Run the following command to change the parameter value in the /etc/sysctl.conffile:vi /etc/sysctl.conf

c. Run the following command for the configuration to take effect:/sbin/sysctl -p

10.8.8 How Can I Test Network Performance?This section describes how to use netperf and iperf3 to test network performance betweenECSs. The operations include test preparations, TCP bandwidth test, UDP PPS test, andlatency test.

Backgroundl Tested ECS: indicates an ECS that is tested for network performance. Such an ECS

functions as the client (TX end) or server (RX end) in netperf tests.l Load generator: indicates an ECS that is used to exchange test data with the tested ECS.

The load generator functions as the client (TX end) or server (RX end) in netperf tests.l Table 10-8 and Table 10-9 list common test tool parameters.

Table 10-8 Common netperf parameters

Parameter Description

-p Port number

-H IP address of the RX end

-t Protocol used in packet transmitting, the value of which isTCP_STREAM in bandwidth tests

-l Test duration

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 194

Page 203: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Parameter Description

-m Data packet size, which is suggested to be 1440 in bandwidth tests

Table 10-9 Common iperf3 parameters

Parameter Description

-p Port number

-c IP address of the RX end

-u UDP packets

-b TX bandwidth

-t Test duration

-l Data packet size, which is suggested to be 16 in PPS tests

-A ID of the vCPU used by iperf3In this section, the maximum number of 16 vCPUs is used as anexample for each ECS. If an ECS has 8 vCPUs, the -A value rangesfrom 0 to 7.

Test Preparations

Step 1 Prepare ECSs.

Ensure that both type and specifications of the tested ECS and load generators are the same.In addition, these ECSs are deployed in the same ECS group for anti-affinity.

Table 10-10 Preparations

Category Quantity Image Specifications IP Address

Tested ECS 1 CentOS 7.4 64bit(recommended)

At least eightvCPUs

192.168.2.10

Loadgenerator

8 CentOS 7.4 64bit(recommended)

At least 8 vCPUs 192.168.2.11-192.168.2.18

Step 2 Install the netperf, iperf3, and sar test tools on both the tested ECS and load generators.

Table 10-11 lists the procedures for installing these tools.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 195

Page 204: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Table 10-11 Installing test tools

Tool Procedure

netperf 1. Run the following command to install gcc:yum -y install unzip gcc gcc-c++

2. Run the following command to download the netperf installation package:wget --no-check-certificate https://github.com/HewlettPackard/netperf/archive/netperf-2.7.0.zip -O netperf-2.7.0.zip

3. Run the following commands to decompress the installation package andinstall netperf:unzip netperf-2.7.0.zipcd netperf-netperf-2.7.0/./configure && make && make install

iperf3 1. Run the following command to download the iperf3 installation package:wget --no-check-certificate https://codeload.github.com/esnet/iperf/zip/master -O iperf3.zip

2. Run the following commands to decompress the installation package andinstall iperf3:unzip iperf3.zipcd iperf-master/./configure && make && make install

sar Run the following command to install sar:yum -y install sysstat

Step 3 Enable NIC multi-queue on both tested ECSs and load generators.

1. Run the following command to check the number of queues supported by the ECSs:ethtool -l eth0 | grep -i Pre -A 5 | grep Combined

2. Run the following command to enable NIC multi-queue:ethtool -L eth0 combined XIn the preceding command, X is the number of queues obtained in Step 3.1.

----End

TCP Bandwidth Test (Using netperf)

Step 1 Test the TCP TX bandwidth.

1. Run the following commands on all load generators to start the netserver process:netserver -p 12001netserver -p 12002In the preceding commands, -p specifies the listening port.

2. Start the netperf process on the tested ECS and specify a netserver port on each loadgenerator. For details about common netperf parameters, see Table 10-8.##Load generator 1

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 196

Page 205: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

netperf -H 192.168.2.11 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.11 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &

##Load generator 2netperf -H 192.168.2.12 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.12 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &

##Load generator 3netperf -H 192.168.2.13 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.13 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &

##Load generator 4netperf -H 192.168.2.14 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.14 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &

##Load generator 5netperf -H 192.168.2.15 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.15 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &

##Load generator 6netperf -H 192.168.2.16 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.16 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &

##Load generator 7netperf -H 192.168.2.17 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.17 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &

##Load generator 8netperf -H 192.168.2.18 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.18 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &

Step 2 Test the TCP RX bandwidth.

1. Start the netserver process on the tested ECS.##Load generator 1netserver -p 12001netserver -p 12002

##Load generator 2netserver -p 12003netserver -p 12004

##Load generator 3netserver -p 12005netserver -p 12006

##Load generator 4netserver -p 12007netserver -p 12008

##Load generator 5

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 197

Page 206: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

netserver -p 12009netserver -p 12010

##Load generator 6netserver -p 12011netserver -p 12012

##Load generator 7netserver -p 12013netserver -p 12014

##Load generator 8netserver -p 12015netserver -p 12016

2. Start the netperf process on all load generators.Load generator 1netperf -H 192.168.2.10 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.10 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &

Load generator 2netperf -H 192.168.2.10 -p 12003 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.10 -p 12004 -t TCP_STREAM -l 300 -- -m 1440 &

Load generator 3netperf -H 192.168.2.10 -p 12005 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.10 -p 12006 -t TCP_STREAM -l 300 -- -m 1440 &

Load generator 4netperf -H 192.168.2.10 -p 12007 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.10 -p 12008 -t TCP_STREAM -l 300 -- -m 1440 &

Load generator 5netperf -H 192.168.2.10 -p 12009 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.10 -p 12010 -t TCP_STREAM -l 300 -- -m 1440 &

Load generator 6netperf -H 192.168.2.10 -p 12011 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.10 -p 12012 -t TCP_STREAM -l 300 -- -m 1440 &

Load generator 7netperf -H 192.168.2.10 -p 12013 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.10 -p 12014 -t TCP_STREAM -l 300 -- -m 1440 &

Load generator 8netperf -H 192.168.2.10 -p 12015 -t TCP_STREAM -l 300 -- -m 1440 &netperf -H 192.168.2.10 -p 12016 -t TCP_STREAM -l 300 -- -m 1440 &

Step 3 Analyze the test result.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 198

Page 207: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

After the test is complete, the output of the netperf process on one TX end is shown in Figure10-11. The final result is the sum of the test results of the netperf processes on all TX ends.

Figure 10-11 Output of the netperf process on one TX end

NOTE

There are a large number of netperf processes. To facilitate statistics collection, you are advised to runthe following command to view test data on the tested ECS:

sar -n DEV 1 60

----End

UDP PPS Test (Using iperf3)

Step 1 Test the UDP TX PPS.

1. Run the following commands on all load generators to start the server process:iperf3 -s -p 12001 &iperf3 -s -p 12002 &In the preceding commands, -p specifies the listening port.

2. Start the client process on the tested ECS. For details about common iperf3 parameters,see Table 10-9.##Load generator 1iperf3 -c 192.168.2.11 -p 12001 -u -b 100M -t 300 -l 16 -A 0 &iperf3 -c 192.168.2.11 -p 12002 -u -b 100M -t 300 -l 16 -A 1 &

##Load generator 2iperf3 -c 192.168.2.12 -p 12001 -u -b 100M -t 300 -l 16 -A 2 &iperf3 -c 192.168.2.12 -p 12002 -u -b 100M -t 300 -l 16 -A 3 &

##Load generator 3iperf3 -c 192.168.2.13 -p 12001 -u -b 100M -t 300 -l 16 -A 4 &iperf3 -c 192.168.2.13 -p 12002 -u -b 100M -t 300 -l 16 -A 5 &

##Load generator 4iperf3 -c 192.168.2.14 -p 12001 -u -b 100M -t 300 -l 16 -A 6 &

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 199

Page 208: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

iperf3 -c 192.168.2.14 -p 12002 -u -b 100M -t 300 -l 16 -A 7 &

##Load generator 5iperf3 -c 192.168.2.15 -p 12001 -u -b 100M -t 300 -l 16 -A 8 &iperf3 -c 192.168.2.15 -p 12002 -u -b 100M -t 300 -l 16 -A 9 &

##Load generator 6iperf3 -c 192.168.2.16 -p 12001 -u -b 100M -t 300 -l 16 -A 10 &iperf3 -c 192.168.2.16 -p 12002 -u -b 100M -t 300 -l 16 -A 11 &

##Load generator 7iperf3 -c 192.168.2.17 -p 12001 -u -b 100M -t 300 -l 16 -A 12 &iperf3 -c 192.168.2.17 -p 12002 -u -b 100M -t 300 -l 16 -A 13 &

##Load generator 8iperf3 -c 192.168.2.18 -p 12001 -u -b 100M -t 300 -l 16 -A 14 &iperf3 -c 192.168.2.18 -p 12002 -u -b 100M -t 300 -l 16 -A 15 &

Step 2 Test the UDP RX PPS.

1. Start the server process on the tested ECS. For details about common iperf3 parameters,see Table 10-9.##Load generator 1iperf3 -s -p 12001 -A 0 -i 60 &iperf3 -s -p 12002 -A 1 -i 60 &

##Load generator 2iperf3 -s -p 12003 -A 2 -i 60 &iperf3 -s -p 12004 -A 3 -i 60 &

##Load generator 3iperf3 -s -p 12005 -A 4 -i 60 &iperf3 -s -p 12006 -A 5 -i 60 &

##Load generator 4iperf3 -s -p 12007 -A 6 -i 60 &iperf3 -s -p 12008 -A 7 -i 60 &

##Load generator 5iperf3 -s -p 12009 -A 8 -i 60 &iperf3 -s -p 12010 -A 9 -i 60 &

##Load generator 6iperf3 -s -p 12011 -A 10 -i 60 &iperf3 -s -p 12012 -A 11 -i 60 &

##Load generator 7iperf3 -s -p 12013 -A 12 -i 60 &iperf3 -s -p 12014 -A 13 -i 60 &

##Load generator 8

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 200

Page 209: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

iperf3 -s -p 12015 -A 14 -i 60 &

iperf3 -s -p 12016 -A 15 -i 60 &

2. Start the client process on all load generators. For details about common iperf3parameters, see Table 10-9.

Load generator 1

iperf3 -c 192.168.2.10 -p 12001 -u -b 100M -t 300 -l 16 -A 0 &

iperf3 -c 192.168.2.10 -p 12002 -u -b 100M -t 300 -l 16 -A 1 &

Load generator 2

iperf3 -c 192.168.2.10 -p 12003 -u -b 100M -t 300 -l 16 -A 0 &

iperf3 -c 192.168.2.10 -p 12004 -u -b 100M -t 300 -l 16 -A 1 &

Load generator 3

iperf3 -c 192.168.2.10 -p 12005 -u -b 100M -t 300 -l 16 -A 0 &

iperf3 -c 192.168.2.10 -p 12006 -u -b 100M -t 300 -l 16 -A 1 &

Load generator 4

iperf3 -c 192.168.2.10 -p 12007 -u -b 100M -t 300 -l 16 -A 0 &

iperf3 -c 192.168.2.10 -p 12008 -u -b 100M -t 300 -l 16 -A 1 &

Load generator 5

iperf3 -c 192.168.2.10 -p 12009 -u -b 100M -t 300 -l 16 -A 0 &

iperf3 -c 192.168.2.10 -p 12010 -u -b 100M -t 300 -l 16 -A 1 &

Load generator 6

iperf3 -c 192.168.2.10 -p 12011 -u -b 100M -t 300 -l 16 -A 0 &

iperf3 -c 192.168.2.10 -p 12012 -u -b 100M -t 300 -l 16 -A 1 &

Load generator 7

iperf3 -c 192.168.2.10 -p 12013 -u -b 100M -t 300 -l 16 -A 0 &

iperf3 -c 192.168.2.10 -p 12014 -u -b 100M -t 300 -l 16 -A 1 &

Load generator 8

iperf3 -c 192.168.2.10 -p 12015 -u -b 100M -t 300 -l 16 -A 0 &

iperf3 -c 192.168.2.10 -p 12016 -u -b 100M -t 300 -l 16 -A 1 &

Step 3 Analyze the test result.

Figure 10-12 shows an example of the UDP PPS test result.

Figure 10-12 UDP PPS test result

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 201

Page 210: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

There are a large number of iperf3 processes. To facilitate statistics collection, you are advised to run thefollowing command to view test data on the tested ECS:

sar -n DEV 1 60

----End

Latency Test

Step 1 Run the following command to start the qperf process on the tested ECS:

qperf &

Step 2 Log in to load generator 1 and run the following command to perform a latency test:

qperf 192.168.2.10 -m 64 -t 60 -vu udp_lat

After the test is complete, the lat value in the command output is the latency between ECSs.

----End

10.9 Security

10.9.1 How Does an ECS Defend Against DDoS Attacks?When detecting an exception, the monitoring system automatically enables traffic cleaningand advises you to disable unused ports. In addition, the Anti-DDoS service is provided toprevent your ECSs from being attacked.

10.10 Disk FAQs

10.10.1 Can Multiple Disks Be Attached to an ECS?Yes. Newly created ECSs can be attached with up to 60 disks. For details, see Table 10-12.

Table 10-12 Number of disks that can be attached to a new ECS

ECS Type Maximum VBDDisks

Maximum SCSIDisks

Maximum LocalDisks

Constraint

XEN 60 59 59 VBD disks + SCSI disks + Localdisks ≤ 60

KVM 24 59 59 l VBD disks + SCSI disks + Localdisks ≤ 60

l SCSI disks + Local disks ≤ 59

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 202

Page 211: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

NOTE

l The system disk of an ECS is a VBD disk. Therefore, the number of SCSI disks and local disks isless than or equal to 59.

The maximum number of disks attached to an existing ECS remains unchanged, as shown inTable 10-13.

Table 10-13 Number of disks that can be attached to an existing ECS

ECS Type Maximum VBDDisks

Maximum SCSIDisks

Maximum LocalDisks

Constraint

XEN 60 59 59 VBD disks + SCSI disks + Localdisks ≤ 60

KVM 24 23 59 VBD disks + SCSI disks ≤ 24

10.10.2 Which ECSs Can Be Attached with SCSI EVS Disks?A XEN ECS running one of the following OSs supports the attachment of SCSI EVS disks:l Windowsl SUSE Enterprise Linux Server 11 SP4 64bitl SUSE Enterprise Linux Server 12 64bitl SUSE Enterprise Linux Server 12 SP1 64bitl SUSE Enterprise Linux Server 12 SP2 64bit

All KVM ECSs support the attachment of SCSI EVS disks.

10.10.3 What Are the Restrictions for Attaching an EVS Disk to anECS?

l The EVS disk and the target ECS must be located in the same AZ.l The target ECS must be in Running or Stopped state.l A frozen EVS disk cannot be attached to an ECS.l For yearly/monthly ECSs:

If you detach the system disk purchased when creating an ECS and want to continueusing it as a system disk, you can only attach it to the original ECS. If you want to use itas a data disk, you can attach it to any ECS.If you detach the non-shared data disk purchased when you create an ECS and want toattach it again, you can only attach it to the original ECS as a data disk.

10.10.4 How Can I Adjust System Disk Partitions?

ScenariosIf the capacity of system disk partitions is inconsistent with the actual system disk capacityafter an ECS is created, you can manually adjust the partitions to expand the system disk.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 203

Page 212: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

There are two ways to expand a system disk:

l Take the empty partition as a new partition and attach this partition to a directory in theroot partition after formatting it. You can perform the operations in this section.

l Add the empty partition to the root partition to be expanded. For detailed operations, seethe following:– How can I add the empty partition of a system disk to be expanded to the end root

partition online?– How can I add the empty partition of a system disk to be expanded to the non-end

root partition online?

ProcedureTake an ECS running CentOS 7.3 64bit as an example. The system disk capacity is 60 GBwhen the ECS is created. However, the capacity of system disk partitions is only 40 GB.

To use the 20 GB capacity, performing the following operations to adjust system diskpartitions:

Step 1 View disk partitions.

1. Log in to the ECS as user root.2. Run the following command to view ECS disk details:

fdisk -lIn the following command output, /dev/xvda or /dev/vda indicates the system disk.

3. Run the following command to view disk partitions:parted -l /dev/xvda

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 204

Page 213: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Step 2 Create a partition for the expanded system disk capacity.

1. Run the following command to switch to the fdisk mode (taking /dev/xvda as anexample):fdisk /dev/xvdaInformation similar to the following is displayed:[root@ecs-8d6c ]# fdisk /dev/xvdaWelcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.Be careful before using the write command.

Command (m for help):2. Enter n and press Enter to create a new partition.

Because the system disk has two existing partitions, the system automatically creates thethird one.Information similar to the following is displayed.

3. Enter the new partition's start cylinder number and press Enter.The start cylinder number must be greater than the end cylinder numbers of existingpartitions. In this example, use the default value for the new partition's start cylindernumber and press Enter. Information similar to the following is displayed.

4. Enter the new partition's end cylinder number and press Enter.In this example, use the default value for the new partition's end cylinder number andpress Enter. Information similar to the following is displayed.

5. Enter p and press Enter to view the created partition.Information similar to the following is displayed.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 205

Page 214: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

6. Enter w and press Enter. The system saves and exits the partition.The system automatically writes the partition result into the partition list. Then, thepartition is created.Information similar to the following is displayed.

7. Run the following command to view disk partitions:parted -l /dev/xvda

Step 3 Run the following command to synchronize the modifications in the partition list with the OS:

partprobe

Step 4 Configure the type of the new partition file system.

1. Run the following command to view the type of the file system:df -TH

2. Run the following command to format the partition (taking the ext4 type as an example):mkfs -t ext4 /dev/xvda3

NOTE

Formatting the partition requires a period of time. During this time, observe the system runningstatus and do not exit the system.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 206

Page 215: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Information similar to the following is displayed:[root@ecs-86dc ]# mkfs -t ext4 /dev/xvda3mke2fs 1.42.9 (28-Dec-2013)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks1790544 inodes, 7156992 blocks357849 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=2155872256219 block groups32768 blocks per group, 32768 fragments per group8176 inodes per groupSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000

Allocating group tables: doneWriting inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: done

Step 5 Mount the new partition to the target directory.

If the new partition is mounted to a directory that is not empty, the subdirectories and files inthe directory will be hidden. Therefore, you are advised to mount the new partition to anempty directory or a newly created directory. If the new partition must be mounted to adirectory that is not empty, move the subdirectories and files in the directory to anotherdirectory temporarily. After the partition is mounted, move the subdirectories and files back.

Take the newly created directory /root/new as an example.

1. Run the following command to create the /root/new directory:mkdir /root/new

2. Run the following command to mount the new partition to the /root/new directory:mount /dev/xvda3 /root/newInformation similar to the following is displayed:[root@ecs-86dc ]# mount /dev/xvda3 /root/new[root@ecs-86dc ]#

3. Run the following command to view the mounted file systems:df -THInformation similar to the following is displayed:

Step 6 Determine whether to set automatic mounting upon system startup for the new disk.

If you do not set automatic mounting upon system startup, you must mount the new partitionto the specified directory again after the ECS is restarted.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 207

Page 216: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

l If automatic mounting is required, go to Step 7.

l If automatic mounting is not required, no further action is required.

Step 7 Set automatic mounting upon system startup for the new disk.

NOTICEDo not set automatic mounting upon system startup for unformatted disks, which will causeECS startup failures.

1. Run the following command to obtain the file system type and UUID:

blkid

According to the preceding figure, the UUID of the new partition is 96e5e028-b0fb-4547-a82a-35ace1086c4f.

2. Run the following command to open the fstab file using the vi editor:

vi /etc/fstab

3. Press i to enter editing mode.

4. Move the cursor to the end of the file and press Enter. Then add the followinginformation:

UUID=96e5e028-b0fb-4547-a82a-35ace1086c4f /root/new ext4 defaults 0 0

5. Press Esc, run the following command, and press Enter. The system saves theconfigurations and exits the vi editor.

:wq

NOTE

If a new disk for which automatic mounting upon system startup has been set must be detached, youmust delete the automatic mounting configuration before detaching the disk. Otherwise, starting the ECSwill fail after the disk is detached. To delete the automatic mounting configuration, perform thefollowing operations:

1. Run the following command to open the fstab file using the vi editor:

vi /etc/fstab

2. Press i to enter editing mode.

3. Delete the following statement:

UUID=96e5e028-b0fb-4547-a82a-35ace1086c4f /root/new ext4 defaults 0 0

4. Press Esc, run the following command, and press Enter. The system saves the configurations andexits the vi editor.

:wq

----End

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 208

Page 217: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.10.5 How Can I Add the Empty Partition of an ExpandedSystem Disk to the End Root Partition Online?

Scenarios

If the capacity of system disk partitions is inconsistent with the actual system disk capacityafter an ECS is created, you can add the empty partition to the root partition of the systemdisk.

This section describes how to add the empty partition to the end root partition online.

Procedure

In the following operations, the ECS that runs CentOS 6.5 64bit and has a 50 GB system diskis used as an example. The system disk has two partitions, /dev/xvda1: swap and /dev/xvda2:root, and the root partition is the end partition.

1. Run the following command to view disk partitions:parted -l /dev/xvda[root@sluo-ecs-5e7d ~]# parted -l /dev/xvdaModel: Xen Virtual Block Device (xvd)Disk /dev/xvda: 53.7GBSector size (logical/physical): 512B/512BPartition Table: msdos

Number Start End Size Type File system Flags 1 1049kB 4296MB 4295MB primary linux-swap(v1) 2 4296MB 42.9GB 38.7GB primary ext4 boot

2. Run the following command to obtain the file system type and UUID:blkid/dev/xvda1: UUID="25ec3bdb-ba24-4561-bcdc-802edf42b85f" TYPE="swap" /dev/xvda2: UUID="1a1ce4de-e56a-4e1f-864d-31b7d9dfb547" TYPE="ext4"

3. Run the following command to install the growpart tool:This tool may be integrated in the cloud-utils-growpart/cloud-utils/cloud-initramfs-tools/cloud-init package. Run the yum install cloud-* command to ensure it isavailable.yum install cloud-utils-growpart

4. Run the following command to expand the root partition (the second partition) usinggrowpart:growpart /dev/xvda 2[root@sluo-ecs-5e7d ~]# growpart /dev/xvda 2CHANGED: partition=2 start=8390656 old: size=75495424 end=83886080 new: size=96465599,end=104856255

5. Run the following command to verify that online capacity expansion is successful:parted -l /dev/xvda[root@sluo-ecs-5e7d ~]# parted -l /dev/xvdaModel: Xen Virtual Block Device (xvd)Disk /dev/xvda: 53.7GBSector size (logical/physical): 512B/512BPartition Table: msdos

Number Start End Size Type File system Flags 1 1049kB 4296MB 4295MB primary linux-swap(v1) 2 4296MB 53.7GB 49.4GB primary ext4 boot

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 209

Page 218: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

6. Run the following command to expand the capacity of the file system:resize2fs -f $Partition nameSuppose the partition name is /dev/xvda2, run the following command:[root@sluo-ecs-a611 ~]# resize2fs -f /dev/xvda2resize2fs 1.42.9 (28-Dec-2013)Filesystem at /dev/xvda2 is mounted on /; on-line resizing requiredold_desc_blocks = 3, new_desc_blocks = 3....[root@sluo-ecs-a611 ~] # df -hT //Check file system capacity expansion

10.10.6 How Can I Add the Empty Partition of an ExpandedSystem Disk to the Non-end Root Partition Online?

ScenariosIf the capacity of system disk partitions is inconsistent with the actual system disk capacityafter an ECS is created, you can add the empty partition to the root partition of the systemdisk.

This section describes how to add the empty partition to the non-end root partition online.

ProcedureIn the following operations, the ECS that runs CentOS 6.5 64bit and has a 100 GB systemdisk is used as an example. The system disk has two partitions, /dev/xvda1: root and /dev/xvda2: swap, and the root partition is not the end partition.

1. Run the following command to view disk partitions:parted -l /dev/xvda[root@sluo-ecs-a611 ~]# parted -l /dev/xvdaModel: Xen Virtual Block Device (xvd)Disk /dev/xvda: 107GBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags:

Number Start End Size Type File system Flags 1 1049kB 41.0GB 40.9GB primary ext4 boot 2 41.0GB 42.9GB 2000MB primary linux-swap(v1)The first is the root partition, and the second is the swap partition.

2. View and edit the fstab partition table to delete the swap partition attaching information.

a. Run the following command to view the fstab partition table:tail -n 3 /etc/fstab[root@sluo-ecs-a611 ~]# tail -n 3 /etc/fstab #UUID=7c4fce5d-f8f7-4ed6-8463-f2bd22d0ddea / ext4 defaults 1 1UUID=5de3cf2c-30c6-4fb2-9e63-830439d4e674 swap swap defaults 0 0

b. Run the following command to edit the fstab partition table and delete the swappartition attaching information.vi /etc/fstabtail -n 3 /etc/fstab[root@sluo-ecs-a611 ~]# vi /etc/fstab [root@sluo-ecs-a611 ~]# tail -n 3 /etc/fstab

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 210

Page 219: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

#UUID=7c4fce5d-f8f7-4ed6-8463-f2bd22d0ddea / ext4 defaults 1 1

3. Run the following command to disable the swap partition:swapoff -a

4. Delete the swap partition.

a. Run the following command to view the partition:parted /dev/xvda[root@sluo-ecs-a611 ~]# parted /dev/xvdaGNU Parted 3.1Using /dev/xvdaWelcome to GNU Parted! Type ´help´ to view a list of commands.(parted) help align-check TYPE N check partition N for TYPE(min|opt) alignment help [COMMAND] print general help, or help on COMMAND mklabel,mktable LABEL-TYPE create a new disklabel (partition table) mkpart PART-TYPE [FS-TYPE] START END make a partition name NUMBER NAME name partition NUMBER as NAME print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition quit exit program rescue START END rescue a lost partition near START and END rm NUMBER delete partition NUMBER select DEVICE choose the device to edit disk_set FLAG STATE change the FLAG on selected device disk_toggle [FLAG] toggle the state of FLAG on selected device set NUMBER FLAG STATE change the FLAG on partition NUMBER toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER unit UNIT set the default unit to UNIT version display the version number and copyright information of GNU Parted(parted)

b. Press p.Model: Xen Virtual Block Device (xvd)Disk /dev/xvda: 107GBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags:

Number Start End Size Type File system Flags 1 1049kB 41.0GB 40.9GB primary ext4 boot 2 41.0GB 42.9GB 2000MB primary linux-swap(v1)

c. Run the following command to delete the partition:rm 2(parted) rm2

d. Press p.(parted) p Model: Xen Virtual Block Device (xvd)Disk /dev/xvda: 107GBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags:

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 211

Page 220: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Number Start End Size Type File system Flags 1 1049kB 41.0GB 40.9GB primary ext4 boot

e. Run the following command to edit the fstab partition table:

quit(parted) quit Information: You may need to update /etc/fstab.

5. Run the following command to view partition after the swap partition is deleted:

parted -l /dev/xvda[root@sluo-ecs-a611 ~]# parted -l /dev/xvdaModel: Xen Virtual Block Device (xvd)Disk /dev/xvda: 107GBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags:

Number Start End Size Type File system Flags 1 1049kB 41.0GB 40.9GB primary ext4 boot

6. Run the following command to install the growpart tool:

This tool may be integrated in the cloud-utils-growpart/cloud-utils/cloud-initramfs-tools/cloud-init package. Run the yum install cloud-* command to ensure it isavailable.

yum install cloud-utils-growpart7. Run the following command to expand the root partition (the first partition) using

growpart:

growpart /dev/xvda 1[root@sluo-ecs-a611 ~]# growpart /dev/xvda 1CHANGED: partition=1 start=2048 old: size=79978496 end=79980544 new: size=209710462,end=209712510

8. Run the following command to verify that online capacity expansion is successful:[root@sluo-ecs-a611 ~]# parted -l /dev/xvdaModel: Xen Virtual Block Device (xvd)Disk /dev/xvda: 107GBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags:

Number Start End Size Type File system Flags 1 1049kB 107GB 107GB primary ext4 boot

9. Run the following command to expand the capacity of the file system:

resize2fs -f $Partition nameSuppose the partition name is /dev/xvda1, run the following command:[root@sluo-ecs-a611 ~]# resize2fs -f /dev/xvda1resize2fs 1.42.9 (28-Dec-2013)Filesystem at /dev/xvda1 is mounted on /; on-line resizing requiredold_desc_blocks = 3, new_desc_blocks = 3....[root@sluo-ecs-a611 ~] # df -hT //Check file system capacity expansion

10.10.7 How Can I Obtain the Mapping Between Disk Partitionsand Disk Devices on a Windows ECS?

This section uses an ECS running Windows Server 2008 R2 64bit as an example to describehow to obtain the mapping between disk partitions and disk devices.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 212

Page 221: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

1. Log in to the Windows ECS.2. Click Start in the lower left corner of the desktop.3. Choose Control Panel > Administrative Tools > Computer Management.4. In the navigation pane on the left, choose Storage > Disk Management.

Figure 10-13 Disk Management

5. Taking disk 1 marked in Figure 10-13 as an example, view the disk device for disk 1.

a. Right-click the gray area where disk 1 is located, as shown in the red box in Figure10-13.

b. Click Properties.The SCSI Disk Device Properties dialog box is displayed, as shown in Figure10-14.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 213

Page 222: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 10-14 Disk properties

c. Click the Details tab and set Property to Parent.

Figure 10-15 Disk device details

d. Record the digits following & in the parameter value, for example, 51776, which isthe master and slave device number corresponding to the disk partition.

e. Obtain the disk device according to the information listed in Table 10-14.The disk device corresponding to 51776 is xvde. The disk device used by disk 1 isxvde.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 214

Page 223: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Table 10-14 Mapping between disk partitions and disk devices

Master and Slave Device Numberfor a Disk Partition

Disk Device

51712 xvda

51728 xvdb

51744 xvdc

51760 xvdd

51776 xvde

51792 xvdf

51808 xvdg

51824 xvdh

51840 xvdi

51856 xvdj

51872 xvdk

51888 xvdl

51904 xvdm

51920 xvdn

51936 xvdo

51952 xvdp

268439552 xvdq

268439808 xvdr

268440064 xvds

268440320 xvdt

268440576 xvdu

268440832 xvdv

268441088 xvdw

268441344 xvdx

10.10.8 How Can I Obtain the Mapping Between Disk Partitionsand Disk Devices on a Linux ECS?

For a Linux ECS, its disk partitions correspond to disk devices. This section uses a LinuxECS running Red Hat Enterprise Linux 7 as an example to describe how to obtain themapping between disk partitions and disk devices.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 215

Page 224: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

1. Log in to the Linux ECS as user root.2. Right-click in the blank area of the desktop and choose Open Terminal from the

shortcut menu.

3. Run the following command to view disk partitions and disk devices:fdisk -l

Table 10-15 lists the mapping between disk partitions and disk devices.

Table 10-15 Mapping between disk partitions and disk devices

Disk Partition Disk Device

xvda xvda

xvdb xvdb

xvdc xvdc

xvdd xvdd

xvde xvde

xvdf xvdf

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 216

Page 225: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Disk Partition Disk Device

xvdg xvdg

xvdh xvdh

xvdi xvdi

xvdj xvdj

xvdk xvdk

xvdl xvdl

xvdm xvdm

xvdn xvdn

xvdo xvdo

xvdp xvdp

xvdq xvdq

xvdr xvdr

xvds xvds

xvdt xvdt

xvdu xvdu

xvdv xvdv

xvdw xvdw

xvdx xvdx

10.10.9 What Is the Mapping Between Device Names and Disks?After users logged in to a Linux ECS and viewed disk information, they found that the diskdevice names were different from those displayed on the management console and could notidentify the ECS to which a specified disk was attached. This section describes how to obtainthe device name used on an ECS according to the disk information displayed on themanagement console.

Background

Disk information displayed varies according to the ECS virtualization type. For the sake ofconvenience, KVM ECSs are called KVM instances, and XEN ECSs are called XENinstances.

Obtaining the Disk Device Name of a KVM Instance

Step 1 Obtain the disk information displayed on the management console.

1. Log in to the management console.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 217

Page 226: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

2. Under Computing, click Elastic Cloud Server.3. Click the target ECS name in the ECS list.

The page providing details about the ECS is displayed.

4. Click the Disks tab and then to expand the disk information.5. Check the device type and ID of the disk.

– If the device type is VBD, go to Step 2.– If the device name is SCSI, go to Step 3.

NOTE

If Device Identifier is not displayed on the web page, stop the ECS and restart it.

Step 2 Check the device name of a VBD disk on the ECS.

1. Obtain the disk device ID by referring to Step 1.The device ID of the VBD disk shows the PCI address of the disk on the ECS. Theaddress is in the format of "domain:bus:slot.function".

2. Log in to the ECS as user root.3. In /sys/bus/pci/devices/DOMIN:BUS:SLOT.FUNCTION/virtio*/block, view the

device name.For example, if the device ID of the VBD disk is 0000:00:05.0, the device name isshown as follows:A90CF6C6-BEC0-0C44-8082-8C8610755B61:/sys/bus/pci/devices/0000:00:05.0/virtiol/block # ll /sys/bus/pci/devices/0000:00:05.0/virtio1/block total 0drwxr-xr-x 10 root root 0 May 22 11:01 vdaThe displayed information is the disk device name, /dev/vda in the preceding figure.

Step 3 Check the device name of a SCSI disk on the ECS.

1. Obtain the disk device ID by referring to Step 1.The device ID of the SCSI disk displays the disk WWN on the ECS.

2. Log in to the ECS as user root.3. Run the following command to view the disk device name:

ll /dev/disk/by-id |grep WWN|grep scsi-3[root@host-192-168-133-148 block]# ll /dev/disk/by-id/ |grep 6888603000008b32fa16688d09368506 |grep scsi-3lrwxrwxrwx 1 root root 9 May 21 20:22 scsi-36888603000008b32fa16688d09368506 -> ../../sda

----End

Obtaining the Disk Device Name of a XEN Instance

Step 1 Obtain the disk information displayed on the management console.

1. Log in to the management console.2. Under Computing, click Elastic Cloud Server.3. Click the target ECS name in the ECS list.

The page providing details about the ECS is displayed.

4. Click the Disks tab and then to expand the disk information.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 218

Page 227: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

5. Check the device name, type, and ID of the disk.– If the device type is VBD, go to Step 2.– If the device name is SCSI, go to Step 3.

NOTE

If Device Identifier is not displayed on the web page, stop the ECS and restart it.

Step 2 Check the device name of a VBD disk on the ECS.

For a VBD disk, the device name displayed on the management console corresponds to thedisk device name viewed on the ECS. For details, see Table 10-16.

Table 10-16 Mapping between disk device names displayed on the management console andthose obtained on the ECS

Device Name (Management Console) Device Name (ECS)

/dev/sd*** /dev/xvd***

/dev/vd*** /dev/xvd***

/dev/xvd*** /dev/xvd***

An example is provided as follows:

If the device name displayed on the management console is /dev/sdb, the device name of thedevice attached to the ECS is /dev/xvdb.

Step 3 Check the device name of a SCSI disk on the ECS.

1. Obtain the disk device ID.The device ID of the SCSI disk displays the disk WWN on the ECS.

2. Log in to the ECS as user root.3. Run the following command to view the disk device name:

ll /dev/disk/by-id |grep WWN|grep scsi-3[root@host-192-168-133-148 block]# ll /dev/disk/by-id/ |grep 6888603000008b32fa16688d09368506 |grep scsi-3lrwxrwxrwx 1 root root 9 May 21 20:22 scsi-36888603000008b32fa16688d09368506 -> ../../sda

----End

10.10.10 Who Can Use the Encryption Feature?The rights of users in a user group to use the encryption feature are as follows:

l The user having security administrator rights can grant KMS access rights to EVS forusing the encryption feature.

l When a common user who does not have security administrator rights attempts to use theencryption feature, the condition varies depending on whether the user is the first one inthe user group to use this feature.– If the common user is the first one in the user group to use the encryption feature,

the user must contact the user having security administrator rights for rightsgranting. Then, the common user can use the encryption feature.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 219

Page 228: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

– If the common user is not the first one in the user group to use the encryptionfeature, the user has permission to use the encryption feature.

The following section uses a user group as an example to describe how to grant KMS accessrights to EVS for using the encryption feature.

For example, a user group shown in Figure 10-16 consists of four users, user 1 to user 4. User1 has security administrator rights. Users 2, 3, and 4 are common users who do not havesecurity administrator rights.

Figure 10-16 User group

Scenario 1: User 1 Uses the Encryption FeatureIn this user group, if user 1 uses the encryption feature for the first time, the procedure is asfollows:

1. User 1 creates Xrole to grant KMS access rights to EVS.After rights granting, the system automatically creates CMK evs/default for encryptingEVS disks.

NOTE

Encrypting EVS disks relies on KMS. When user 1 uses the encryption feature for the first time,the user must grant the KMS access rights to EVS. Then, all users in the user group can use theencryption feature, without requiring the rights granting any more.

2. User 1 selects a key.One of the following keys can be used:– Default CMK, evs/default– CMK, the key that you have created before using the EVS disk encryption feature– Newly created key (For instructions about how to create a key, see section

"Creating a Key" in Data Encryption Workshop User Guide.)

After user 1 uses the encryption feature, all other users in the user group can use this feature,without requiring to contact user 1 for rights granting.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 220

Page 229: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Scenario 2: Common User Uses the Encryption Feature

In this user group, if user 3 uses the encryption feature for the first time, the procedure is asfollows:

1. When user 3 uses the encryption feature, the system displays a message indicating thatthe user has no rights.

2. User 3 asks user 1 to create Xrole to grant KMS access rights to EVS.

After the rights are granted, user 3 and all other users in the user group can use the encryptionfeature, without requiring to contact user 1 for rights granting.

10.11 OS FAQs

10.11.1 Are OSs Charged?The Linux and Windows OSs provided by the public cloud are free of charge.

10.11.2 Can I Install or Upgrade the OS by Myself?ECSs must use the provided OSs or the OSs developed based on the provided OSs. You canpatch the OS but you are not allowed to upgrade it or add more OSs.

NOTE

If you are required to upgrade the major OS version, for example, from CentOS 7.2 to CentOS 7.3, usethe OS switchover function provided by the public cloud platform.

10.11.3 What Is the Username to Log In to an ECS?For a Linux ECS, the login username is root. For a Windows ECS, the login username isAdministrator. The login password is the one you set during ECS creation.

10.11.4 Can the OS of an ECS Be Changed?Yes. An ECS OS can be changed.

For instructions about how to change an ECS OS, see section Changing an ECS OS.

10.11.5 Is a GUI Provided for OSs?Windows ECSs are managed through a GUI but Linux ECSs are managed through the CLI.You can configure a GUI if required.

10.11.6 Is the FTP Upload Tool Included in the OS?No. The FTP upload tool must be installed and configured by the user.

10.11.7 Does OS Changing Incur Fees?No. The OS changing on the public cloud is free of charge. After the OS changing, the systemwill re-charge you according to your select product.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 221

Page 230: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.11.8 Does OS Reinstallation Incur Fees?Reinstalling an OS for an ECS allows you to use the original image to reinstall the ECS anddoes not incur fees.

10.11.9 Can I Select Other OSs During ECS OS Reinstallation?No. You can use only the original image of the ECS to reinstall the OS. To use a new systemimage, see section Changing the OS.

10.11.10 How Can I Obtain Data Disk Information If Tools AreDeleted?

If Tools are uninstalled from a Linux ECS in a non-PVOPS system, data disks cannot beidentified. In such a case, you can obtain information about these data disks by creating a newECS and attaching the data disks of the original ECS to the new ECS. The procedure is asfollows:

1. Log in to the management console and create a new ECS.

NOTE

The new ECS must be located in the same AZ and have the same parameter settings as the originalECS.

2. (Optional) On the Elastic Cloud Server page, locate the row containing the originalECS, click More in the Operation column, and select Stop. On the Stop ECS page,select Forcibly stop and Yes and click OK to forcibly stop the original ECS.Manually refresh the Elastic Cloud Server page. The original ECS is stopped once theStatus changes to Stopped.

NOTE

The ECSs running certain OSs support online data disk detaching. If your OS supports this feature,you can detach data disks from the running ECS.

3. Click to view information about the data disks attached to the original ECS.

NOTE

If the original ECS has multiple data disks attached, repeat steps 4 to 6 multiple times to attacheach data disk to the new ECS.

4. Click a data disk.The Elastic Volume Service page is displayed.

5. Select the data disk to be detached and click Detach in the Operation column. On theDetach Disk page, select the original ECS and click OK to detach the data disk from theoriginal ECS.Manually refresh the Elastic Volume Service page. The data disk is detached from theoriginal ECS once the Status changes to Available.

6. Select the detached data disk and click Attach in the Operation column. On the AttachDisk page, click the new ECS, select a mount point in the Select Mount Point column,and click Attach to attach the data disk to the new ECS.Manually refresh the EVS list. The data disk is attached to the new ECS once the Statusvalue changes to In-use. You can then log in to the management console and viewinformation about the data disk of the new ECS.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 222

Page 231: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

10.11.11 How Can I Upgrade the Kernel of a Linux ECS?

Upgrade NotesIf tools have been installed on the Linux ECS, you must uninstall the tools before upgradingthe ECS kernel. Otherwise, the following issues may occur after the kernel is upgraded:

l The Linux ECS cannot identify the NIC, leading to network access failure.l The Linux ECS cannot identify data disks. As a result, starting system mount points

fails, and the ECS cannot start.

BackgroundPVOPS and Tools:

l PVOPS is the Xen driver provided by Linux distributions.l Tools is a Xen driver modified by Huawei.

Procedure1. Log in to the ECS.2. Check whether the tools have been installed on the Linux ECS, taking the SUSE Linux

Enterprise Server 11 SP1 as an example.

a. Run the following command on any directory to query the ECS driver:lsmod | grep xen

Figure 10-17 Querying the ECS driver

b. Run the following command to query the driver path, taking a disk driver as anexample:modinfo xen_vbd

Figure 10-18 Querying the driver path

c. Check whether pvdriver is contained in the driver path.n If so, the tools have been installed in the ECS. Then, go to step 3.n If no, go to step 4.

3. Uninstall the tools.

a. Run the following command to switch to user root:su root

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 223

Page 232: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

b. Run the following command to uninstall the tools in the root directory:/etc/.uvp-monitor/uninstall

NOTE

After Tools is uninstalled, ECS monitoring metrics may be lost and monitoring data cannot becollected. To resolve this issue, you can compile and install the UVP Tools. For details, seehttps://github.com/UVP-Tools/UVP-Tools/.

4. Upgrade the kernel using the method determined by yourself.5. Check whether the Linux ECS driver supports PVOPS. Use any one of the following

methods:– Method 1:

Determine based on the ECS OS.n All Linux distribution OSs are delivered with a XEN open-source driver,

which supports PVOPS.n The SUSE Linux Enterprise Server 11 SP3 provided by the OS competence

center is not delivered with any XEN open-source driver and does not supportPVOPS.

– Method 2:Check whether the ECS driver has a XEN driver module. If so, the ECS driversupports PVOPS. To query, run the following command in any directory:lsmod | grep xen

Figure 10-19 Querying the ECS driver

NOTE

The name of a XEN driver module varies depending on the Linux distribution OS. You onlyneed to check whether the driver has a driver module with the XEN field.

– Method 3:Run the cat /boot/config* | grep -i xen command in any directory and checkwhether the XEN field is contained in the command output. If so, the ECS driversupports PVOPS.

Figure 10-20 Querying the XEN field

6. Upgrade the kernel based on the result obtained in step 5.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 224

Page 233: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

– If the Linux ECS driver supports PVOPS, go to step 8.– If the Linux ECS driver does not support PVOPS, go to step 7.

7. Install the open-source component xen-kmp so that the ECS driver supports PVOPS. Forhow to use PVOPS, see descriptions of the SUSE Linux Enterprise Server 11 SP3 64-bitin section "Installing a Linux VM (Without Using Cloud-Init)" in the Public ImageCreation and Registration Guide.To obtain this document, do as follows:Log in at http://support.huawei.com/carrier/ and choose Support > Product Support> Carrier IT > Cloud Computing > Carrier Public Cloud > Public Cloud Solution >Public Cloud Solution V100 > Public Cloud Solution V100R001 > Public CloudSolution 2.0.1.

8. (Optional) Configure required parameters based on the defect list for certain Linuxdistribution OSs.To obtain the defect list, go to following URL:https://github.com/UVP-Tools/UVP-Tools/tree/master/docs

10.11.12 How Can I Set the Validity Period of the ImagePassword?

If an ECS cannot be logged in because of expired image password, you can contact theadministrator for handling.

If the ECS can still be logged in, you can perform the following operations to set thepassword validity period.

ProcedureThe following operations use EulerOS 2.2 as an example.

1. Log in to the ECS.2. Run the following command to check the password validity period:

vi /etc/login.defsThe value of parameter PASS_MAX_DAYS is the password validity period.

3. Run the following command to change the value of parameter PASS_MAX_DAYS:chage -M 99999 user_name99999 is the password validity period, and user_name is the system user, for example,user root.

NOTE

You are advised to configure the password validity period as needed and change it at a regularbasis.

4. Run command vi /etc/login.defs to verify that the configuration has taken effect.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 225

Page 234: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 10-21 Configuration verification

10.11.13 Why Is the Memory of an ECS Obtained by Running thefree Command Inconsistent with the Actual Memory?

SymptomAfter an ECS is created, run the free -m command to view the ECS memory. The query resultis less than the memory configured during ECS creation.

An example is provided as follows:

For example, you set memory to 4,194,304 KB (4096 MB) when creating the ECS. After theECS is created, run the free -m command to view its memory. The command output is asfollows:

[root@localhost ~]# free -mtotal used free shared buff/cache availableMem: 3790 167 3474 8 147 3414Swap: 1022 0 1022

The memory in the command output is 3790 MB, which is less than the configured 4096 MB.

Run the dmidecode -t memory command to check the actual memory configured for theECS. The command output is as follows:

[root@localhost ~]# dmidecode -t memory# dmidecode 3.0Getting SMBIOS data from sysfs.SMBIOS 2.8 present.

Handle 0x1000, DMI type 16, 23 bytesPhysical Memory ArrayLocation: OtherUse: System MemoryError Correction Type: Multi-bit ECCMaximum Capacity: 4 GBError Information Handle: Not ProvidedNumber Of Devices: 1

Handle 0x1100, DMI type 17, 40 bytesMemory DeviceArray Handle: 0x1000Error Information Handle: Not ProvidedTotal Width: UnknownData Width: UnknownSize: 4096 MBForm Factor: DIMMSet: NoneLocator: DIMM 0Bank Locator: Not SpecifiedType: RAMType Detail: OtherSpeed: Unknown

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 226

Page 235: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Manufacturer: QEMUSerial Number: Not SpecifiedAsset Tag: Not SpecifiedPart Number: Not SpecifiedRank: UnknownConfigured Clock Speed: UnknownMinimum Voltage: UnknownMaximum Voltage: UnknownConfigured Voltage: Unknown

The memory in the command output is the same as that configured during ECS creation.

Possible CausesWhen the OS is started, related devices are initialized, which occupies memory. In addition,when the kernel is started, it also occupies memory. The memory occupied by kdump can beset. Unless otherwise specified, do not change the memory size occupied by kdump.

The command output of free -m shows the available memory of the ECS, and that ofdmidecode -t memory shows the hardware memory.

Therefore, the memory obtained by running the free -m command is less than the memoryconfigured for the ECS. This is a normal phenomenon.

NOTE

Physical servers also have this issue.

10.11.14 How Can I Enable Virtual Memory on a Windows ECS?Enabling ECS virtual memory will deteriorate disk I/O performance. Therefore, the WindowsECSs provided by the public cloud platform do not have virtual memory enabled by default.If the memory size of an ECS is insufficient, you are advised to increase its memory size bymodifying the ECS specifications. Perform the operations described in this section to enablevirtual memory if required.

NOTE

If the memory usage is excessively high and the I/O performance is not as good as expected, you are notsuggested to enable virtual memory. The reason is as follows: The excessively high memory usage limitsthe system performance improvement. Furthermore, frequent memory switching requires massiveadditional I/O operations, which will further deteriorate the I/O performance and the overall systemperformance.

The operations described in this section are provided for the ECSs running Windows Server2008 or later.

1. Right-click Computer and choose Properties from the shortcut menu.2. In the navigation pane on the left, choose Advanced system settings.

The System Properties dialog box is displayed.3. Click the Advanced tab and then Settings in the Performance pane.

The Performance Options dialog box is displayed.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 227

Page 236: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 10-22 Performance Options

4. Click the Advanced tab and then Background Services in the Processor schedulingpane.

5. Click Change in the Virtual memory pane.The Virtual Memory dialog box is displayed.

6. Configure virtual memory based on service requirements.– Automatically manage paging file size for all drives: Deselect the check box.– Drive: Select the drive where the virtual memory file is stored.

You are advised not to select the system disk to store the virtual memory.– Custom size: Select Custom size and set Initial size and Maximum size.

Considering Memory.dmp caused by blue screen of death (BSOD), you areadvised to set Initial size to 16 and Maximum size to 4096.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 228

Page 237: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Figure 10-23 Virtual Memory

7. Click Set and then OK to complete the configuration.8. Restart the ECS for the configuration to take effect.

10.12 Image Source FAQs

10.12.1 How Can I Use the Automatic Tool to Configure anHUAWEI CLOUD Image Source?

ScenariosWhen you are required to update the OS or software of an ECS, you can access the ECS to theInternet and use an external image source. However, if your ECS cannot access the Internet,or the external image source cannot provide services stably, you can use the one-click scriptconfiguration function provided by HUAWEI CLOUD to configure and update the imagesource.

Restrictions and Limitationsl This section applies only to users in North, South, and East China and Hong Kong.l Make sure that the intranet DNS server provided by HUAWEI CLOUD has been

configured. To obtain the IP address of the HUAWEI CLOUD intranet DNS server, seehttps://support.huaweicloud.com/dns_faq/dns_faq_002.html.

l Only the following OSs are supported: EulerOS, CentOS, Debian, Ubuntu, andopenSUSE.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 229

Page 238: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Procedure

1. Log in to the ECS.2. Run the following command to configure the image source with a few clicks:

wget http://mirrors.myhuaweicloud.com/repo/mirrors_source.sh && shmirrors_source.sh

NOTE

If executing the command failed, manually configure the image source by following theinstructions provided in the configuration guide for other HUAWEI CLOUD image sources orcontact customer service.

10.12.2 How Can I Use an openSUSE Image Source Provided byHUAWEI CLOUD?

ScenariosWhen you are required to update the OS or software of an ECS, you can access the ECS to theInternet and use an external openSUSE image source. However, if your ECS cannot accessthe Internet, or the external openSUSE image source cannot provide services stably, you canuse the openSUSE image source provided by HUAWEI CLOUD.

Restrictions and Limitationsl This section applies only to users in North, South, and East China and Hong Kong.l Make sure that the intranet DNS server provided by HUAWEI CLOUD has been

configured. To obtain the IP address of the HUAWEI CLOUD intranet DNS server, seehttps://support.huaweicloud.com/dns_faq/dns_faq_002.html.

l HUAWEI CLOUD does not provide the image source of the SUSE Linux EnterpriseServer (SLES) enterprise edition.

Procedure1. Log in to the ECS.2. Run the following commands to back up the .repo file:

mkdir /etc/zypp/repos.d/repo_bakmv /etc/zypp/repos.d/*.repo /etc/zypp/repos.d/repo_bak/

3. Run the command listed in Table 10-17 to configure the zypper source for the targetOpenSUSE version.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 230

Page 239: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Table 10-17 Configuring the zypper source

Version Command

OpenSUSE13.2

zypper addrepo -fcg http://mirrors.myhuaweicloud.com/opensuse/distribution/openSUSE-stable/repo/oss/openSUSE-13.2-Osszypper addrepo -fcg http://mirrors.myhuaweicloud.com/opensuse/distribution/openSUSE-stable/repo/non-oss/openSUSE-13.2-Non-Osszypper addrepo -fcg http://mirrors.myhuaweicloud.com/opensuse/update/openSUSE-stable/ openSUSE-13.2-Update-Osszypper addrepo -fcg http://mirrors.myhuaweicloud.com/opensuse/update/openSUSE-non-oss-current/ openSUSE-13.2-Update-Non-Oss

OpenSUSE42.2

sudo zypper ar -fcg http://mirrors.myhuaweicloud.com/opensuse/distribution/leap/42.2/repo/oss HWCloud:42.2:OSSsudo zypper ar -fcg http://mirrors.myhuaweicloud.com/opensuse/distribution/leap/42.2/repo/non-oss HWCloud:42.3:NON-OSSsudo zypper ar -fcg http://mirrors.myhuaweicloud.com/opensuse/update/leap/42.2/oss HWCloud:42.2:UPDATE-OSSsudo zypper ar -fcg http://mirrors.myhuaweicloud.com/opensuse/update/leap/42.2/non-oss HWCloud:42.2:UPDATE-NON-OS

NOTE

HUAWEI CLOUD supports openSUSE 13.2 and openSUSE 42.2 image sources.

10.12.3 How Can I Use a CentOS Image Source Provided byHUAWEI CLOUD?

Scenarios

When you are required to update the OS or software of an ECS, you can access the ECS to theInternet and use an external CentOS image source. However, if your ECS cannot access theInternet, or the external CentOS image source cannot provide services stably, you can use theCentOS image source provided by HUAWEI CLOUD.

Restrictions and Limitationsl This section applies only to users in North, South, and East China and Hong Kong.l Make sure that the intranet DNS server provided by HUAWEI CLOUD has been

configured. To obtain the IP address of the HUAWEI CLOUD intranet DNS server, seehttps://support.huaweicloud.com/dns_faq/dns_faq_002.html.

Procedure1. Log in to the ECS as user root.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 231

Page 240: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

2. Run the following command to back up the CentOS-Base.repo file:mkdir -p /etc/yum.repos.d/repo_bak/mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo_bak/

3. Select a suitable curl command according to the CentOS image source version, run thecommand to download the CentOS-Base.repo file, and save the file into /etc/yum.repos.d/:The curl commands for the CentOS image sources supported by HUAWEI CLOUD areas follows:– CentOS 6

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.myhuaweicloud.com/repo/CentOS-Base-6.repo

– CentOS 7curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.myhuaweicloud.com/repo/CentOS-Base-7.repo

4. Run the following command to generate a cache:yum makecache

NOTE

l After the command is executed, if the system displays the message "Another app is currentlyholding the yum lock", run the rm -rf /var/run/yum.pid command to delete the yum.pid file.Then, run the yum makecache command again to generate the cache.

l If the system displays the message "Error: Cannot retrieve metalink for repository: epel. Pleaseverify its path and try again" after you run the yum makecache command, you must run theyum --disablerepo=epel -y update ca-certificates command to update the certificate fortemporarily disabling the epel source.

10.12.4 How Can I Use a Ubuntu Image Source Provided byHUAWEI CLOUD?

ScenariosWhen you are required to update the OS or software of an ECS, you can access the ECS to theInternet and use an external Ubuntu image source. However, if your ECS cannot access theInternet, or the external Ubuntu image source cannot provide services stably, you can use theUbuntu image source provided by HUAWEI CLOUD.

Restrictions and Limitationsl This section applies only to users in North, South, and East China and Hong Kong.l Make sure that the intranet DNS server provided by HUAWEI CLOUD has been

configured. To obtain the IP address of the HUAWEI CLOUD intranet DNS server, seehttps://support.huaweicloud.com/dns_faq/dns_faq_002.html.

Procedure1. Log in to the ECS.2. Run the following command to back up the sources.list file:

mv /etc/apt/sources.list /etc/apt/sources.list.bak3. Select a suitable wget command according to the Ubuntu image source version, run the

command to download the sources.list file, and save the file into /etc/apt/:

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 232

Page 241: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Table 10-18 lists the mapping between Ubuntu versions and version names.

Table 10-18 Mapping between Ubuntu versions and version names

Version Version Name apt Source Configuration File

Ubuntu 18.04 (Bionic Beaver) sources.list.bionic

Ubuntu 17.10 (Artful Aardvark) sources.list.artful

Ubuntu 17.04 (Zesty Zapus) sources.list.zesty

Ubuntu16.10 (YakketyYak) sources.list.yakkety

Ubuntu 16.04 LTS (Xenial Xerus) sources.list.xenial

Ubuntu 14.04 LTS (Trusty Tahr) sources.list.trusty

Ubuntu 12.04 LTS (Precise Pangolin) sources.list.precise

Take Ubuntu 14.04 as an example. Its apt source configuration file is sources.list.trusty.The configurations are as follows:wget -O /etc/apt/sources.list http://mirrors.myhuaweicloud.com/repo/sources.list.trusty

4. Run the following command to update the software list:apt-get update

10.12.5 How Can I Use a EulerOS Image Source Provided byHUAWEI CLOUD?

Scenarios

When you are required to update the OS or software of an ECS, you can access the ECS to theInternet and use an external EulerOS image source. However, if your ECS cannot access theInternet, or the external EulerOS image source cannot provide services stably, you can use theEulerOS image source provided by HUAWEI CLOUD.

Restrictions and Limitationsl This section applies only to users in North, South, and East China and Hong Kong.l Make sure that the intranet DNS server provided by HUAWEI CLOUD has been

configured. To obtain the IP address of the HUAWEI CLOUD intranet DNS server, seehttps://support.huaweicloud.com/dns_faq/dns_faq_002.html.

Procedure1. Log in to the ECS.2. Run the following commands to back up the Euler repo file:

mkdir -p /etc/yum.repos.d/repo_bak/mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo_bak/

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 233

Page 242: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

3. Select a suitable curl command to download the Euler-Base.repo file of the desiredversion and save the file into /etc/yum.repos.d/.The curl command for the EulerOS image source versions supported by HUAWEICLOUD is as follows:curl -o /etc/yum.repos.d/EulerOS-base.repo http://mirrors.myhuaweicloud.com/repo/EulerOS_2_2_base.repo

4. Run the following command to generate a cache:yum makecache

NOTE

After the command is executed, if the system displays the message "Another app is currentlyholding the yum lock", run the rm -rf /var/run/yum.pid command to delete the yum.pid file.Then, run the yum makecache command again to generate the cache.

10.13 Database FAQs

10.13.1 Can a Database Be Deployed on an ECS?Yes. There is no limitation on this operation. You can deploy a database of any type on anECS.

10.13.2 Does an ECS Support Oracle Databases?Yes. You are advised to perform a performance test beforehand to ensure that the Oracledatabase can meet your requirements.

Elastic Cloud ServerUser Guide 10 FAQs

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 234

Page 243: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

A Change History

Released On Description

2018-07-30 This issue is the seventh official release, which incorporates thefollowing changes:Added the following content:l 3.5 Changing the Initial Password for Logging In to an ECSl

l 9.17 What Should I Do If Cloud-Init Does Not Work AfterPython Is Upgraded?

l 10.3.4 What Should I Do If the System Displays Error Code0x112f When I Log In to a Windows ECS?

l 10.11.14 How Can I Enable Virtual Memory on a Windows ECS?Modified the following content:l 10.10.1 Can Multiple Disks Be Attached to an ECS?l 2.5 (Optional) Installing One-Click Password Reset Plug-insl 3.6 Resetting the Password for Logging In to an ECSl 9.11 What Should I Do If a Service Port Is Used by a One-Click

Password Reset Plug-in?l Modified section 4.2 Changing a Security Group, allowing you to

change the security group in the Operation column.

2018-06-30 This issue is the sixth official release, which incorporates the followingchanges:Added the following content:l 8 Cloud Trace ServiceModified the following content:l Allowed to export certain ECSs in section 3.11 Exporting ECSs.l Modified prerequisites in section 3.7.2 Changing the OS, allowing

you to change the OS of an ECS on which reinstalling the OS failed.

Elastic Cloud ServerUser Guide A Change History

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 235

Page 244: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Released On Description

2018-05-30 This issue is the fifth official release, which incorporates the followingchanges:Added the following content:l 9.12 What Should I Do If a Disk Is Offline?l 9.15 How Can I Handle Slow ECS Startup?l 9.16 What Should I Do If Starting an ECS Remains in "Waiting

for cloudResetPwdAgent" State?l 10.8.8 How Can I Test Network Performance?l 10.3.3 What Should I Do If an MSTSC-based Remote Desktop

Connection Failed to Set Up?Modified the following content:l Changed the term EIP in Chinese.l Modified description in sections 2.2 Purchasing and Logging In to

a Windows ECS and 2.3 Purchasing and Logging In to a LinuxECS, allowing you to specify NIC IP addresses when creatingmultiple ECSs in a batch.

l Modified ECS naming rules in sections 2.2 Purchasing and LoggingIn to a Windows ECS and 2.3 Purchasing and Logging In to aLinux ECS.

l Changed the method of selecting ECS specifications in sections 2.2Purchasing and Logging In to a Windows ECS and 2.3Purchasing and Logging In to a Linux ECS.

l Modified the description of local-ipv4 and public-ipv4 in section3.12 Managing ECS Metadata.

l Released the monitoring metric "System Status Check Failed" insection 7.1 ECS Metrics.

l Added introduction to user data scripts in section 3.14 Injecting UserData into ECSs.

Elastic Cloud ServerUser Guide A Change History

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 236

Page 245: Huawei...2017/11/20  · 13. Set ECS Name. The name can be customized but must comply with the following naming rules: Can contain only letters, digits, underscores (_), hyphens (-),

Released On Description

2018-04-30 This issue is the fourth official release, which incorporates the followingchanges:Added the following content:l 10.3.9 How Can I Log In to an ECS After Its System Disk Is

Exchanged with That Attached to Another ECS Running theSame OS?

l 3.10 Creating an Imagel 3.3.2 Viewing Failed Tasksl 9.8 What Should I Do If Error "command ´gcc´ failed with exit

status 1" Occurs During PIP-based Software Installationl 9.9 What Should I Do If Packages Are Downloaded Using PIP or

wget at a Low Rate?l 10.8.7 How Can I View and Modify Kernel Parameters of a Linux

ECS?Modified the following content:l Added the description that data can be copied and pasted on VNC

pages in section 3.1.3 Login Using VNC.

2018-01-30 This issue is the third official release, which incorporates the followingchanges:Modified the following content:l 10.10.1 Can Multiple Disks Be Attached to an ECS?l Modified the method of selecting the ECS type in sections 2.2

Purchasing and Logging In to a Windows ECS and 2.3Purchasing and Logging In to a Linux ECS.

l Added "Follow-up Procedure" in section 3.4 Modifying ECS vCPUand Memory Specifications.

2018-01-04 This issue is the second official release, which incorporates the followingchanges:Added the following content:l Added password reset with a few clicks in section 2.5 (Optional)

Installing One-Click Password Reset Plug-ins.l 3.6.1 Resetting the ECS Password with a Few Clicks

2017-12-31 This issue is the first official release.

Elastic Cloud ServerUser Guide A Change History

Issue 07 (2018-07-30) Copyright © Huawei Technologies Co., Ltd. 237