Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Scalable File Service Turbo
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Cloud-Init Installation FAQ

Updated on 2024-10-31 GMT+08:00

You are advised to install Cloud-Init on the ECS that will be used to create a private image so that new ECSs created from the private image support custom configurations (for example, changing the ECS login password).

For details about how to install Cloud-Init, see Installing Cloud-Init.

For details about how to configure Cloud-Init, see Configuring Cloud-Init.

The following describes common problems you may encounter when installing Cloud-Init and their solutions.

Ubuntu 16.04/CentOS 7: Failed to Set Cloud-Init Automatic Start

  • Symptom

    After Cloud-Init is installed, you run the following command to configure Cloud-Init automatic start:

    systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

    Information similar to the following is displayed:

    Figure 1 Failed to enable Cloud-Init to start automatically
  • Solution
    1. Run the following command to roll back the configuration:

      systemctl unmask cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

    2. Run the following command to configure automatic start again:

      systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

    3. Run the following command to check the Cloud-Init status:

      systemctl status cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

      As shown in the following figures, failed is displayed and all services are in the inactive state.

      Figure 2 Checking Cloud-Init status (1)
      Figure 3 Checking Cloud-Init status (2)

      This is because the address that the system uses to access Cloud-Init is redirected to /usr/bin/, but the actual installation path is /usr/local/bin.

    4. Run the following command to copy Cloud-Init to the usr/bin directory:

      cp /usr/local/cloud-init /usr/bin/

    5. Run the following command to restart Cloud-Init:

      systemctl restart cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

      Figure 4 Restarting Cloud-Init
    6. Run the following command to check the Cloud-Init status:

      systemctl status cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

Ubuntu 14.04: chkconfig and systemctl Not Installed

  • Symptom

    chkconfig is not installed.

  • Solution

    Run the following commands to install chkconfig:

    apt-get update

    apt-get install sysv-rc-conf

    cp /usr/sbin/sysv-rc-conf /usr/sbin/chkconfig

    Run the following command to query the Cloud-Init version:

    cloud-init -v

    Information similar to the following is displayed:

    -bash:/usr/bin/cloud-init:not found this command

    Run the following command to copy Cloud-Init to the usr/bin directory:

    cp /usr/local/bin/cloud-init /usr/bin/

Debian 9.5: Failed to Query the Cloud-Init Version and Configure Automatic Start

  1. Run the following command to query the Cloud-Init version:

    cloud-init -v

    Information similar to the following is displayed:

    -bash:/usr/bin/cloud-init:not found this command

    Run the cp /usr/local/bin/cloud-init /usr/bin/ command to copy Cloud-Init to the usr/bin directory.

  2. Run the cloud-init init --local command.

    Information similar to the following is displayed:

    Figure 5 Information returned when Cloud-Init automatic start successfully set

    The compilation fails because GCC is not installed.

    To solve this issue:

    Run the following command to install GCC. Then, install Cloud-Init again.

    yum -y install gcc

  3. After Cloud-Init is installed, run the following command to configure Cloud-Init automatic start:

    systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

    Information similar to the following is displayed.

    Figure 6 Prompt indicating the failure to configure Cloud-Init automatic start

    To solve this issue:

    1. Run the following command to roll back the configuration:

      systemctl unmask cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

    2. Run the following command to set automatic start again:

      systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

    3. Run the following command to restart Cloud-Init:

      systemctl restart cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

      Run the systemctl status command to check the Cloud-Init status. Information similar to the following is displayed:

      Figure 7 Verifying the service status

CentOS 7/Fedora 28: Required C Compiler Not Installed

  • Symptom

    After Cloud-Init is successfully installed, you run the following command:

    cloud-init init --local

    The following information is displayed:

    /usr/lib/python2.5/site-packages/Cheetah/Compiler.py:1532: UserWarning: 
    You don't have the C version of NameMapper installed! I'm disabling Cheetah's useStackFrames option as it is painfully slow with the Python version of NameMapper. You should get a copy of Cheetah with the compiled C version of NameMapper.
      "\nYou don't have the C version of NameMapper installed!
  • Cause analysis

    This alarm is generated because C version of NameMapper needs to be compiled when Cloud-Init is installed. However, GCC is not installed in the system, and the compilation cannot be performed. As a result, NameMapper is missing.

  • Solution

    Run the following command to install GCC:

    yum -y install gcc

    Reinstall Cloud-Init.

CentOS 7/Fedora: Failed to Use the New Password to Log In to an ECS Created from an Image

  • Symptom

    You cannot use a new password to log in to an ECS created from an image with Cloud-Init installed. After logging in to the ECS using the old password, you find that NICs of the ECS are not started.

    Figure 8 NIC not started
  • Solution

    Log in to the ECS used to create that image, open the DHCP configuration file /etc/sysconfig/network-scripts/ifcfg-ethX, and comment out HWADDR.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback