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
On this page

Creating an Image from an ISO File

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

Scenarios

An ISO file is a disk image of an optical disc. A large number of data files can be compressed into a single ISO file. Likewise, to access the files stored in an ISO, the ISO file needs to be decompressed. For example, you can use a virtual CD-ROM to open an ISO file, or burn the ISO file to a CD or DVD and then use the CD-ROM to read the image.

This section describes how to use APIs to create a private image from an ISO file.

Involved APIs

If you use a token for authentication, you must obtain the token and add X-Auth-Token to the request header of the IMS API when making an API call.

  • IAM API used to obtain the token

    URI format: POST https://IAM endpoint/v3/auth/tokens

  • IMS API used to create a private image using an image file uploaded to the OBS bucket

    URI format: POST https://IMS endpoint/v2/cloudimages/action

  • ECS API used to create an ECS

    URI format: POST https://ECS endpoint/v1/project_id/cloudservers

  • IMS API used to create a system disk image from a data disk

    URI format: POST https://IMS endpoint/v2/cloudimages/action

Procedure

  1. Obtain the token by referring to Authentication.
  2. Create a private image using an ISO image file uploaded to the OBS bucket.
    1. Send POST https://IMS endpoint/v2/cloudimages/action.
    2. Add X-Auth-Token to the request header.
    3. Set the following parameters in the request body:

      For details about the parameters, see Creating an Image.

      {
          "name": "ims_test_file",  //Image name (mandatory, string)
          "description": "Image creation using an image file uploaded to the OBS bucket",  //Image description (optional, string)
          "image_url": "ims-image:centos70.iso",  //Image file address in an OBS bucket (mandatory, string)
          "os_type": "Linux", //OS type (optional, string)
          "os_version": "CentOS 7.0 64bit",  //OS version (mandatory, string)
          "type": "IsoImage", //Image type (mandatory, string)
          "min_disk": 40,  //Minimum system disk space (mandatory, integer)
          "image_tags": [{"key":"key2","value":"value2"},{"key":"key1","value":"value1"}]  //Image tags (optional, array of objects)
      }
    4. Obtain the image ID by querying job details based on the returned job_id. For details, see Querying the Status of an Asynchronous Job.
  3. Create a temporary ECS from the ISO image.
    NOTE:
    • You can select only a general-computing flavor with 2 vCPUs, 4 GB or more memory, and KVM virtualization type.
    • You need to create a system disk and a data disk for the ECS. The OS will be installed on the data disk by default.
    1. Send POST https://ECS endpoint/v1/project_id/cloudservers.
    2. Add X-Auth-Token to the request header.
    3. Set the following parameters in the request body:

      The following parameters are all mandatory. For details about the parameters, see "Creating an ECS" in Elastic Cloud Server API Reference.

      {
          "server": {
              "imageRef": "fac42d61-ea1e-4271-94ba-6543a852d2c6", //Image ID
              "flavorRef": "rc6.large.2_manage",
              "name": "instance-test",
              "vpcid": "18ec99f0-7159-4d7b-ad27-f32315d5af61",
              "nics": [{
                  "subnet_id": "81a4ecb0-0451-4c60-8373-8b923238ec40"
              }],
              "root_volume": {
                  "volumetype": "SATA",
                  "size": "40"
              },
              "data_volumes": [{
                  "volumetype": "SATA",
                  "size": "40"
              }],
              "availability_zone": "az-1a",
              "metadata": {
                  "virtual_env_type": "IsoImage"
              },
              "extendparam": {
                  "diskPrior": "true"
              }
          }
      }
    4. Obtain the ECS ID by querying job details based on the returned job_id. For details, see "Querying Task Execution Status" in Elastic Cloud Server API Reference.
    5. Query ECS details based on the ECS ID to obtain the data disk ID (volume_id) required in 4. For details, see "Querying Details About an ECS" in Elastic Cloud Server API Reference.
  4. Use the temporary ECS to create a standard private image.
    1. Send POST https://IMS endpoint/v2/cloudimages/action.
    2. Add X-Auth-Token to the request header.
    3. Set the following parameters in the request body:

      For details about the parameters, see Creating an Image.

      {
          "name": "ims_test",  //Image name (a mandatory string)
          "description": "Creating a system disk image from a data disk", //Image description (optional, string)
          "volume_id": "877a2cda-ba63-4e1e-b95f-e67e48b6129a", //Data disk ID (mandatory, string)
          "type": "ECS", //Image type (mandatory, string)
          "os_version": "CentOS 7.0 64bit",  //OS version (mandatory, string)
          "image_tags": [{"key":"key2","value":"value2"},{"key":"key1","value":"value1"}]  //Image tags (optional, array of objects)
      }
    4. Obtain the image ID by querying job details based on the returned job_id. For details, see Querying the Status of an Asynchronous Job.

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