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
OneAccess
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
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 Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
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
Intelligent EdgeCloud
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

Creating a Full-ECS Image

Updated on 2024-04-17 GMT+08:00

Function

This API is used to create a full-ECS image from an ECS or a CBR backup. The API is an asynchronous one. If it is successfully called, the cloud system receives the request to create a full-ECS image. However, you need to use the asynchronous job query API to query the image creation status. For details, see Querying the Status of an Asynchronous Job.

Constraints (Creating a Full-ECS Image Using an ECS)

  • When creating a full-ECS image from an ECS, ensure that the ECS has been properly configured, or the image creation may fail.
  • A Windows ECS used to create a full-ECS image cannot have a spanned volume, or data may be lost when ECSs are created from that image.
  • A Linux ECS used to create a full-ECS image cannot have a disk group or logical disk that contains multiple physical disks, or data may be lost when ECSs are created from that image.
  • A full-ECS image cannot be replicated within a region or be exported.
  • When creating a full-ECS image from a Windows ECS, you need to change the SAN policy of the ECS to OnlineAll. Otherwise, EVS disks attached to the ECSs created from the image may be offline.

    Windows has three types of SAN policies: OnlineAll, OfflineShared, and OfflineInternal.

    Table 1 SAN policies in Windows

    Type

    Description

    OnlineAll

    All newly detected disks are automatically brought online.

    OfflineShared

    All disks on sharable buses, such as iSCSI and FC, are left offline by default, while disks on non-sharable buses are kept online.

    OfflineInternal

    All newly detected disks are left offline.

    1. Execute cmd.exe and run the following command to query the current SAN policy of the ECS:

      diskpart

    2. Run the following command to view the SAN policy of 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 3.
    3. Run the following command to change the SAN policy of the ECS to OnlineAll:

      san policy=onlineall

Constraints (Creating a Full-ECS Image Using a CBR Backup)

  • When creating a full-ECS image from a CBR backup, ensure that the source ECS of the CBR backup has been properly configured, or the image creation may fail.
  • A CBR backup can be used to create only one full-ECS image.
  • If an ECS is in Stopped state, do not start it when you are using it to create a full-ECS image.
  • A full-ECS image created from a CBR backup can be shared with other tenants. However, if it is a shared CBR backup, the full-ECS image created from it cannot be shared.
  • A full-ECS image cannot be replicated within a region or be exported.

URI

POST /v1/cloudimages/wholeimages/action

Request

  • Parameters for creating a full-ECS image using an ECS

    Parameter

    Mandatory

    Type

    Description

    name

    Yes

    String

    Specifies the image name. For detailed description, see Image Attributes.

    description

    No

    String

    Provides supplementary information about the image. For detailed description, see Image Attributes.

    tags

    No

    Array of strings

    Lists the image tags. This parameter is left blank by default.

    Use either tags or image_tags.

    image_tags

    No

    Array of objects

    Lists the image tags. This parameter is left blank by default.

    Use either tags or image_tags.

    instance_id

    Yes

    String

    Specifies the ECS ID. This parameter is required when an ECS is used to create a full-ECS image.

    To obtain the ECS ID, perform the following operations:

    1. Log in to management console.
    2. Under Computing, click Elastic Cloud Server.
    3. In the ECS list, click the name of the ECS and view its ID.

    max_ram

    No

    Integer

    Specifies the maximum memory of the image in the unit of MB. This parameter is not configured by default.

    min_ram

    No

    Integer

    Specifies the minimum memory of the image in the unit of MB. The default value is 0.

    vault_id

    Yes

    String

    Specifies the ID of the vault to which an ECS is to be added or has been added.

    You can obtain the vault ID from the CBR console or section "Querying the Vault List" in Cloud Backup and Recovery API Reference.

  • Parameters in the request body when a CBR backup is used to create a full-ECS image

    Parameter

    Mandatory

    Type

    Description

    name

    Yes

    String

    Specifies the image name. For detailed description, see Image Attributes.

    description

    No

    String

    Provides supplementary information about the image. For detailed description, see Image Attributes.

    tags

    No

    Array of strings

    Lists the image tags. This parameter is left blank by default.

    Use either tags or image_tags.

    image_tags

    No

    Array of objects

    Lists the image tags. This parameter is left blank by default.

    Use either tags or image_tags.

    backup_id

    Yes

    String

    Specifies the CBR backup ID.

    To obtain the CBR backup ID, perform the following operations:
    1. Log in to the management console.
    2. Under Storage, click Cloud Backup and Recovery.
    3. On the displayed Cloud Server Backup page, click the Backups tab and obtain the backup ID from the backup list.

    max_ram

    No

    Integer

    Specifies the maximum memory of the image in the unit of MB. This parameter is not configured by default.

    min_ram

    No

    Integer

    Specifies the minimum memory of the image in the unit of MB. The default value is 0, indicating that the memory is not restricted.

    whole_image_type

    Yes

    String

    Specifies the method of creating the full-ECS image. The value must be CBR.

Example Request

  • Creating a full-ECS image with parameter tags using an ECS (ID: 877a2cda-ba63-4e1e-b95f-e67e48b6129a)
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    POST https://{Endpoint}/v1/cloudimages/wholeimages/action
    {
           "name": "instance_whole_image",
           "description": "creating an image from an ECS",
           "instance_id": "877a2cda-ba63-4e1e-b95f-e67e48b6129a",
           "vault_id": "de9fcf45-11b2-432c-8562-5c5428574600",
           "tags": [
               "aaa.111",
               "bbb.333",
               "ccc.444"
           ]
    }
    
  • Creating a full-ECS image with parameter image_tags using an ECS (ID: 877a2cda-ba63-4e1e-b95f-e67e48b6129a)
    1
    2
    3
    4
    5
    6
    7
    8
    POST https://{Endpoint}/v1/cloudimages/wholeimages/action
    {
           "name": "instance_whole_image",
           "description": "creating an image from an ECS",
           "instance_id": "877a2cda-ba63-4e1e-b95f-e67e48b6129a",
           "vault_id": "de9fcf45-11b2-432c-8562-5c5428574600",
           "image_tags": [{"key":"key2","value":"value2"},{"key":"key1","value":"value1"}]
    } 
    
  • Creating a full-ECS image with parameter image_tags using a (ID: 9b27efab-4a17-4c06-bfa2-3e0cf021d3c3)
    1
    2
    3
    4
    5
    6
    7
    POST https://{Endpoint}/v1/cloudimages/wholeimages/action
    {
         "name": "backup_whole_image",
         "description": "Creating a full-ECS image from a ",
         "backup_id": "9b27efab-4a17-4c06-bfa2-3e0cf021d3c3",
         "image_tags": [{"key":"key2","value":"value2"},{"key":"key1","value":"value1"}]
    }
    
  • Creating a full-ECS image with parameter tags using a CBR backup (ID: 9b27efab-4a17-4c06-bfa2-3e0cf021d3c3)
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    POST https://{Endpoint}/v1/cloudimages/wholeimages/action
    {
         "name": "backup_whole_image",
         "description": "Creating a full-ECS image using a CBR backup",
         "backup_id": "9b27efab-4a17-4c06-bfa2-3e0cf021d3c3",
         "whole_image_type": "CBR",
         "tags": [
               "aaa.111",
               "bbb.333",
               "ccc.444"
           ]
    }
    
  • Creating a full-ECS image with parameter image_tags using a CBR backup (ID: 9b27efab-4a17-4c06-bfa2-3e0cf021d3c3)
    1
    2
    3
    4
    5
    6
    7
    8
    POST https://{Endpoint}/v1/cloudimages/wholeimages/action
    {
         "name": "backup_whole_image",
         "description": "Creating a full-ECS image using a CBR backup",
         "backup_id": "9b27efab-4a17-4c06-bfa2-3e0cf021d3c3",
         "whole_image_type": "CBR",
         "image_tags": [{"key":"key2","value":"value2"},{"key":"key1","value":"value1"}]
    }
    

Response

  • Response parameters

    Parameter

    Type

    Description

    job_id

    String

    Specifies the asynchronous job ID.

    For details, see Querying the Status of an Asynchronous Job.

  • Example response
    STATUS CODE 200
    1
    2
    3
    {
        "job_id": "4010a32b5f909853015f90aaa24b0015"
    }
    

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error. For details about the returned error code, see Error Codes.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    You do not have the rights to perform the operation.

    404 Not Found

    The requested resource was not found.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    The service is unavailable.

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