- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Using IAM to Grant Access to IMS
-
Creating a Private Image
- Introduction
- Creating a System Disk Image from a Windows ECS
- Creating a System Disk Image from a Linux ECS
- Creating a Windows System Disk Image from an External Image File
- Creating a Linux System Disk Image from an External Image File
- Creating a BMS System Disk Image
- Creating a Data Disk Image from an ECS
- Creating a Data Disk Image from an External Image File
- Creating a Full-ECS Image from an ECS
- Creating a Full-ECS Image from a CSBS Backup
- Creating a Full-ECS Image from a CBR Backup
- Creating a Windows System Disk Image from an ISO File
- Creating a Linux System Disk Image from an ISO File
- Importing an Image
- Fast Import of an Image File
-
Managing Private Images
- Creating an ECS from an Image
- Modifying an Image
- Exporting an Image
- Exporting Image List
- Checking the Disk Capacity of an Image
- Deleting Images
-
Sharing Images
- Overview
- Obtaining the Project ID, Account ID, and Organization URN
- Sharing Specified Images
- Accepting or Rejecting Shared Images
- Rejecting Accepted Images
- Accepting Rejected Images
- Stopping Sharing Images
- Adding Tenants Who Can Use Shared Images
- Deleting Image Recipients Who Can Use Shared Images
- Replicating a Shared Image
- Replicating Images Within a Region
- Replicating Images Across Regions
- Optimizing a Windows Private Image
-
Optimizing a Linux Private Image
- Optimization Process
- Checking Whether a Private Image Needs to be Optimized
- Using a Script to Optimize a Xen Private Image
- Uninstalling PV Drivers from a Linux ECS
- Changing Disk Identifiers in the GRUB File to UUID
- Changing Disk Identifiers in the fstab File to UUID
- Installing Native Xen and KVM Drivers
- Installing Native KVM Drivers
- Clearing System Logs
- Encrypting Images
- Windows Operations
- Linux Operations
- Managing Public Images
- Managing Tags
- Managing Quotas
- Auditing Key Operations
-
Best Practices
- Overview
- Creating a Windows Image Using VirtualBox and an ISO File
- Creating a Linux Image Using VirtualBox and an ISO File
- Cleaning Up the Disk Space of a Windows ECS
- Converting the Image Format
- Creating a Private Image Using Packer
- Configuring an ISO File as a Local Image Source
- Migrating ECSs Across Accounts and Regions
- Migrating Service Data Across Accounts (Data Disks)
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- Getting Started
- IMS APIs
- Native OpenStack APIs
- Examples
- Permission Policies and Supported Actions
- Common Parameters
-
Historical APIs
-
Image (Native OpenStack APIs)
- Querying Images (Native OpenStack API V2, Discarded)
- Querying Image Details (Native OpenStack API V2, Discarded)
- Modifying an Image (Native OpenStack API V2, Discarded)
- Uploading an Image (Native OpenStack API V2, Discarded)
- Deleting an Image (Native OpenStack API V1.1, Discarded)
- Querying Image Metadata (Native OpenStack API V1, Discarded)
- Querying Image Details (Native OpenStack API V1.1, Discarded)
- Image Tagging (Native OpenStack APIs)
- Image Sharing (Native OpenStack APIs)
-
Image (Native OpenStack APIs)
- Status Codes
- Error Codes
- SDK Reference
-
FAQs
-
Image Consulting
- How Do I Select an Image?
- What Do I Do If I Cannot Find a Desired Image?
- Are There Any Public Images Already Containing Certain Applications, Such as OpenVPN or PyTorch?
- What Are the Differences Between Images and Backups?
- Can I Tailor an Image?
- How Do I Migrate an ECS to a Different Region of Another Account?
- How Can I Back Up the Current Status of an ECS for Restoration in the Case of a System Fault?
- How Can I Apply a Private Image to an Existing ECS?
- Can I Import Data from a Data Disk Image to a Data Disk?
- Can I Use Private Images of Other Accounts?
- End-of-Support for OSs
-
Image Creation
- General Creation FAQ
- Full-ECS Image FAQ
- How Can I Use a Backup to Create an EVS Disk or ECS?
- Is There Any Difference Between the Image Created from a CSBS/CBR Backup and That Created from an ECS?
- Why Can't I Find an ISO Image When I Want to Use It to Create an ECS or Change the OS of an ECS?
- How Do I Create a Full-ECS Image Using an ECS That Has a Spanned Volume?
- Why Is Sysprep Required for Creating a Private Image from a Windows ECS?
- How Do I Handle the Startup Failure of a Windows ECS Created from a Windows Image Generalized by Sysprep?
- What Do I Do If I Cannot Create an Image in ZVHD2 Format Using an API?
- Image Sharing
-
OS
- How Do I Select an OS?
- How Is BIOS Different from UEFI?
- What Do I Do If I Cannot Change the Resolution of a Windows OS Booted in UEFI Mode?
- How Do I Delete Redundant Network Connections from a Windows ECS?
- What Do I Do If an ECS Starts Slowly?
- What Do I Do If the One-Click Password Resetting Plug-In Failed to Start?
- Why Can't I Find My Private Image When I Want to Use It to Create an ECS or Change the OS of an ECS?
-
Image Import
- Can I Use Images in Formats not Described in This Document?
- What Are the Impacts If I Do Not Pre-configure an ECS Used to Create a Private Image?
- How Do I Import an OVF or OVA File to the Cloud Platform?
- What Do I Do If I Chose the Wrong OS or System Disk Capacity When Registering a Private Image?
- Why Did My VHD Upload Fail? Why Does the System Say the System Disk in the VHD Image File Is Larger Than What I Specified on the Management Console?
- How Do I Import Existing Huawei Cloud Private Images to a Specified Region?
-
Image Export
- Can I Download My Private Images to a Local PC?
- Can I Use the System Disk Image of an ECS on a BMS After I Export It from the Cloud Platform?
- Why Is the Image Size in an OBS Bucket Different from That Displayed in IMS?
- Can I Download a Public Image to My PC?
- What Are the Differences Between Import/Export and Fast Import/Export?
- Why the Export Option Is Unavailable for My Image?
-
Image Optimization
- Must I Install Guest OS Drivers on an ECS?
- Why Do I Need to Install and Update VirtIO Drivers for Windows?
- What Will the System Do to an Image File When I Use the File to Register a Private Image?
- How Do I Configure an ECS, a BMS, or an Image File Before I Use It to Create an Image?
- What Do I Do If a Windows Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- What Do I Do If a Linux Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- How Do I Optimize an Image?
- How Do I Use a Private Image Created from a First-Generation ECS to Create a Second-Generation ECS?
- How Do I Enable NIC Multi-Queue for an Image?
- How Do I Configure an ECS to Use DHCPv6?
- How Do I Make a System Disk Image Support Fast ECS Creation?
- Why Did I Fail to Install Guest OS Drivers on a Windows ECS?
- How Do I Install Native Xen and KVM Drivers?
- Image Replication
- Image Deletion
- Image Encryption
- KooGallery Images
- Accounts and Permissions
- Cloud-Init
-
ECS Creation
- Can I Change the Image of a Purchased ECS?
- Can I Change the Specifications Defined by a Private Image When I Use the Image to Create an ECS?
- Can I Specify the System Disk Capacity When I Create an ECS Using an Image?
- What Do I Do If a Partition Is Not Found During the Startup of an ECS Created from an Imported Private Image?
- What Do I Do If the Disks of a CentOS ECS Created from an Image Cannot Be Found?
- What Do I Do If I Enabled Automatic Configuration During Image Registration for an ECS Created from a Windows Image and Now It Won't Start?
- What Do I Do If an Exception Occurs When I Start an ECS Created from an Image Using UEFI Boot?
-
Driver Installation
- Must I Install Guest OS Drivers on an ECS?
- Why Do I Need to Install and Update VirtIO Drivers for Windows?
- Why Did I Fail to Install Guest OS Drivers on a Windows ECS?
- How Do I Install PV Drivers in Windows?
- How Do I Install VirtIO Drivers in Windows?
- How Do I Install Native KVM Drivers in Linux?
- How Do I Install Native Xen and KVM Drivers?
- Image Tags
- Billing
-
Image Consulting
- Videos
- Glossary
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Overview
- Using IAM to Grant Access to IMS
-
Creating a Private Image
- Introduction
- Creating a System Disk Image from a Windows ECS
- Creating a System Disk Image from a Linux ECS
- Creating a Windows System Disk Image from an External Image File
- Creating a Linux System Disk Image from an External Image File
- Creating a BMS System Disk Image
- Creating a Data Disk Image from an ECS
- Creating a Data Disk Image from an External Image File
- Creating a Full-ECS Image from an ECS
- Creating a Full-ECS Image from a CBR Backup
- Creating a Windows System Disk Image from an ISO File
- Creating a Linux System Disk Image from an ISO File
- Importing an Image
- Fast Import of an Image File
-
Managing Private Images
- Creating an ECS from an Image
- Modifying an Image
- Exporting an Image
- Exporting Image List
- Checking the Disk Capacity of an Image
- Deleting Images
-
Sharing Images
- Overview
- Obtaining the Account Name and Project Name
- Sharing Specified Images
- Accepting or Rejecting Shared Images
- Rejecting Accepted Images
- Accepting Rejected Images
- Stopping Sharing Images
- Adding Tenants Who Can Use Shared Images
- Deleting Image Recipients Who Can Use Shared Images
- Replicating a Shared Image
- Replicating Images
- Optimizing a Windows Private Image
-
Optimizing a Linux Private Image
- Optimization Process
- Checking Whether a Private Image Needs to be Optimized
- Uninstalling PV Drivers from a Linux ECS
- Changing Disk Identifiers in the GRUB File to UUID
- Changing Disk Identifiers in the fstab File to UUID
- Installing Native Xen and KVM Drivers
- Installing Native KVM Drivers
- Clearing System Logs
- Encrypting Images
- Converting the Image Format
- Windows Operations
- Linux Operations
- Managing Tags
- Managing Quotas
- Auditing Key Operations
-
FAQs
-
Image Consulting
- Basic Concepts
- How Do I Select an Image?
- What Do I Do If I Cannot Find a Desired Image?
- What Are the Differences Between Images and Backups?
- Can I Tailor an Image?
- How Can I Back Up the Current Status of an ECS for Restoration in the Case of a System Fault?
- How Can I Apply a Private Image to an Existing ECS?
- Can I Import Data from a Data Disk Image to a Data Disk?
- Can I Use Private Images of Other Accounts?
-
Image Creation
- General Creation FAQ
- Full-ECS Image FAQ
- Is There Any Difference Between the Image Created from a CSBS/CBR Backup and That Created from an ECS?
- Why Can't I Find an ISO Image When I Want to Use It to Create an ECS or Change the OS of an ECS?
- How Do I Create a Full-ECS Image Using an ECS That Has a Spanned Volume?
- Why Is Sysprep Required for Creating a Private Image from a Windows ECS?
- How Do I Handle the Startup Failure of a Windows ECS Created from a Windows Image Generalized by Sysprep?
- What Do I Do If I Cannot Create an Image in ZVHD2 Format Using an API?
- Image Sharing
- OS
-
Image Import
- Can I Use Images in Formats not Described in This Document?
- What Are the Impacts If I Do Not Pre-configure an ECS Used to Create a Private Image?
- How Do I Import an OVF or OVA File to the Cloud Platform?
- What Do I Do If I Chose the Wrong OS or System Disk Capacity When Registering a Private Image?
- Why Did My VHD Upload Fail? Why Does the System Say the System Disk in the VHD Image File Is Larger Than What I Specified on the Management Console?
-
Image Export
- Can I Download My Private Images to a Local PC?
- Can I Use the System Disk Image of an ECS on a BMS After I Export It from the Cloud Platform?
- Why Is the Image Size in an OBS Bucket Different from That Displayed in IMS?
- Can I Download a Public Image to My PC?
- What Are the Differences Between Import/Export and Fast Import/Export?
- Why the Export Option Is Unavailable for My Image?
-
Image Optimization
- Must I Install Guest OS Drivers on an ECS?
- Why Do I Need to Install and Update VirtIO Drivers for Windows?
- What Will the System Do to an Image File When I Use the File to Register a Private Image?
- How Do I Configure an ECS or an Image File Before I Use It to Create an Image?
- What Do I Do If a Windows Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- What Do I Do If a Linux Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- How Do I Enable NIC Multi-Queue for an Image?
- How Do I Configure an ECS to Use DHCPv6?
- How Do I Make a System Disk Image Support Fast ECS Creation?
- Why Did I Fail to Install Guest OS Drivers on a Windows ECS?
- How Do I Install Native Xen and KVM Drivers?
- Image Replication
- Image Deletion
- Image Encryption
- Accounts and Permissions
- Cloud-Init
-
ECS Creation
- Can I Change the Image of a Purchased ECS?
- Can I Change the Specifications Defined by a Private Image When I Use the Image to Create an ECS?
- Can I Specify the System Disk Capacity When I Create an ECS Using an Image?
- What Do I Do If a Partition Is Not Found During the Startup of an ECS Created from an Imported Private Image?
- What Do I Do If the Disks of a CentOS ECS Created from an Image Cannot Be Found?
- What Do I Do If I Enabled Automatic Configuration During Image Registration for an ECS Created from a Windows Image and Now It Won't Start?
- What Do I Do If an Exception Occurs When I Start an ECS Created from an Image Using UEFI Boot?
-
Driver Installation
- Must I Install Guest OS Drivers on an ECS?
- Why Do I Need to Install and Update VirtIO Drivers for Windows?
- Why Did I Fail to Install Guest OS Drivers on a Windows ECS?
- How Do I Install VirtIO Drivers in Windows?
- How Do I Install Native KVM Drivers in Linux?
- How Do I Install Native Xen and KVM Drivers?
- Image Tags
- Billing
-
Image Consulting
-
API Reference (ME-Abu Dhabi Region)
- Before You Start
- API Overview
- Calling APIs
- Getting Started
- IMS APIs
-
Native OpenStack APIs
-
Image (Native OpenStack APIs)
- Querying Images (Native OpenStack API)
- Querying Image Details (Native OpenStack API)
- Updating Image Information (Native OpenStack API)
- Uploading an Image (Native OpenStack API)
- Deleting an Image (Native OpenStack API)
- Creating Image Metadata (Native OpenStack API)
- Deleting an Image (Native OpenStack API v1.1 - Abandoned and Not Recommended)
- Querying Image Metadata (Native OpenStack API v1 - Abandoned and Not Recommended)
- Querying Image Details (Native OpenStack API v1.1 - Abandoned and Not Recommended)
- Image Schema (Native OpenStack APIs)
- Image Sharing (Native OpenStack APIs)
- API Version Query (Native OpenStack API)
-
Image (Native OpenStack APIs)
- Examples
- Permission Policies and Supported Actions
- Common Parameters
- Status Codes
- Error Codes
- Change History
-
User Guide (Paris Regions)
- Overview
- Using IAM to Grant Access to IMS
-
Creating a Private Image
- Introduction
- Creating a System Disk Image from a Windows ECS
- Creating a System Disk Image from a Linux ECS
- Creating a Windows System Disk Image from an External Image File
- Creating a Linux System Disk Image from an External Image File
- Creating a Data Disk Image from an External Image File
- Creating a Full-ECS Image from an ECS
- Creating a Full-ECS Image from a CSBS Backup
- Creating a Full-ECS Image from a CBR Backup
- Creating a Windows System Disk Image from an ISO File
- Creating a Linux System Disk Image from an ISO File
- Importing an Image
- Fast Import of an Image File
-
Managing Private Images
- Creating an ECS from an Image
- Modifying an Image
- Exporting an Image
- Exporting Image List
- Checking the Disk Capacity of an Image
- Deleting Images
- Sharing Images
- Replicating Images Within a Region
- Optimizing a Windows Private Image
-
Optimizing a Linux Private Image
- Optimization Process
- Checking Whether a Private Image Needs to be Optimized
- Uninstalling PV Drivers from a Linux ECS
- Changing Disk Identifiers in the GRUB File to UUID
- Changing Disk Identifiers in the fstab File to UUID
- Installing Native Xen and KVM Drivers
- Installing Native KVM Drivers
- Clearing System Logs
- Encrypting Images
- Converting the Image Format
- Windows Operations
- Linux Operations
- Managing Tags
- Managing Quotas
- Auditing Key Operations
-
FAQs
-
Image Consulting
- Basic Concepts
- How Do I Select an Image?
- What Do I Do If I Cannot Find a Desired Image?
- What Are the Differences Between Images and Backups?
- Can I Tailor an Image?
- How Can I Back Up the Current Status of an ECS for Restoration in the Case of a System Fault?
- How Can I Apply a Private Image to an Existing ECS?
- Can I Import Data from a Data Disk Image to a Data Disk?
- Can I Use Private Images of Other Accounts?
- End-of-Support for OSs
-
Image Creation
- General Creation FAQ
- Full-ECS Image FAQ
- How Can I Use a Backup to Create an EVS Disk or ECS?
- Is There Any Difference Between the Image Created from a CSBS/CBR Backup and That Created from an ECS?
- Why Can't I Find an ISO Image When I Want to Use It to Create an ECS or Change the OS of an ECS?
- How Do I Create a Full-ECS Image Using an ECS That Has a Spanned Volume?
- Why Is Sysprep Required for Creating a Private Image from a Windows ECS?
- How Do I Handle the Startup Failure of a Windows ECS Created from a Windows Image Generalized by Sysprep?
- What Do I Do If I Cannot Create an Image in ZVHD2 Format Using an API?
- Image Sharing
-
OS
- How Do I Select an OS?
- How Is BIOS Different from UEFI?
- How Do I Delete Redundant Network Connections from a Windows ECS?
- What Do I Do If an ECS Starts Slowly?
- What Do I Do If a Windows 7 ECS Equipped with an Intel 82599 NIC Reports an Error in SR-IOV Scenarios?
- Why Can't I Find My Private Image When I Want to Use It to Create an ECS or Change the OS of an ECS?
-
Image Import
- Can I Use Images in Formats not Described in This Document?
- What Are the Impacts If I Do Not Pre-configure an ECS Used to Create a Private Image?
- What Do I Do If I Chose the Wrong OS or System Disk Capacity When Registering a Private Image?
- Why Did My VHD Upload Fail? Why Does the System Say the System Disk in the VHD Image File Is Larger Than What I Specified on the Management Console?
-
Image Export
- Can I Download My Private Images to a Local PC?
- Can I Use the System Disk Image of an ECS on a BMS After I Export It from the Cloud Platform?
- Why Is the Image Size in an OBS Bucket Different from That Displayed in IMS?
- Can I Download a Public Image to My PC?
- What Are the Differences Between Import/Export and Fast Import/Export?
- Why the Export Option Is Unavailable for My Image?
-
Image Optimization
- Must I Install Guest OS Drivers on an ECS?
- Why Do I Need to Install and Update VirtIO Drivers for Windows?
- What Will the System Do to an Image File When I Use the File to Register a Private Image?
- How Do I Configure an ECS, a BMS, or an Image File Before I Use It to Create an Image?
- What Do I Do If a Windows Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- What Do I Do If a Linux Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- How Do I Enable NIC Multi-Queue for an Image?
- How Do I Make a System Disk Image Support Fast ECS Creation?
- Why Did I Fail to Install Guest OS Drivers on a Windows ECS?
- How Do I Install Native Xen and KVM Drivers?
- Image Replication
- Image Deletion
- Image Encryption
- Accounts and Permissions
- Cloud-Init
-
ECS Creation
- Can I Change the Image of a Purchased ECS?
- Can I Change the Specifications Defined by a Private Image When I Use the Image to Create an ECS?
- Can I Specify the System Disk Capacity When I Create an ECS Using an Image?
- What Do I Do If a Partition Is Not Found During the Startup of an ECS Created from an Imported Private Image?
- What Do I Do If the Disks of a CentOS ECS Created from an Image Cannot Be Found?
- What Do I Do If I Enabled Automatic Configuration During Image Registration for an ECS Created from a Windows Image and Now It Won't Start?
- What Do I Do If an Exception Occurs When I Start an ECS Created from an Image Using UEFI Boot?
-
Driver Installation
- Must I Install Guest OS Drivers on an ECS?
- Why Do I Need to Install and Update VirtIO Drivers for Windows?
- Why Did I Fail to Install Guest OS Drivers on a Windows ECS?
- How Do I Install VirtIO Drivers in Windows?
- How Do I Install Native KVM Drivers in Linux?
- How Do I Install Native Xen and KVM Drivers?
- Image Tags
-
Image Consulting
-
API Reference (Paris Regions)
- Before You Start
- API Overview
- Calling APIs
- Getting Started
- IMS APIs
-
Native OpenStack APIs
-
Image (Native OpenStack APIs)
- Querying Images (Native OpenStack API)
- Querying Image Details (Native OpenStack API)
- Updating Image Information (Native OpenStack API)
- Uploading an Image (Native OpenStack API)
- Deleting an Image (Native OpenStack API)
- Creating Image Metadata (Native OpenStack API)
- Deleting an Image (Native OpenStack API v1.1 - Abandoned and Not Recommended)
- Querying Image Metadata (Native OpenStack API v1 - Abandoned and Not Recommended)
- Querying Image Details (Native OpenStack API v1.1 - Abandoned and Not Recommended)
- Image Tagging (Native OpenStack APIs)
- Image Schema (Native OpenStack APIs)
- Image Sharing (Native OpenStack APIs)
- API Version Query (Native OpenStack API)
-
Image (Native OpenStack APIs)
- Examples
- API Actions
- Common Parameters
- Status Codes
- Error Codes
- Change History
-
User Guide (Kuala Lumpur Region)
- Overview
- Using IAM to Grant Access to IMS
-
Creating a Private Image
- Introduction
- Creating a System Disk Image from a Windows ECS
- Creating a System Disk Image from a Linux ECS
- Creating a Windows System Disk Image from an External Image File
- Creating a Linux System Disk Image from an External Image File
- Creating a BMS System Disk Image
- Creating a Data Disk Image from an ECS
- Creating a Data Disk Image from an External Image File
- Creating a Full-ECS Image from an ECS
- Creating a Full-ECS Image from a CBR Backup
- Creating a Windows System Disk Image from an ISO File
- Creating a Linux System Disk Image from an ISO File
- Importing an Image
- Fast Import of an Image File
-
Managing Private Images
- Creating an ECS from an Image
- Modifying an Image
- Exporting an Image
- Exporting Image List
- Checking the Disk Capacity of an Image
- Deleting Images
-
Sharing Images
- Overview
- Obtaining the Account Name and Project Name
- Sharing Specified Images
- Accepting or Rejecting Shared Images
- Rejecting Accepted Images
- Accepting Rejected Images
- Stopping Sharing Images
- Adding Tenants Who Can Use Shared Images
- Deleting Image Recipients Who Can Use Shared Images
- Replicating a Shared Image
- Replicating Images Within a Region
- Optimizing a Windows Private Image
-
Optimizing a Linux Private Image
- Optimization Process
- Checking Whether a Private Image Needs to be Optimized
- Uninstalling PV Drivers from a Linux ECS
- Changing Disk Identifiers in the GRUB File to UUID
- Changing Disk Identifiers in the fstab File to UUID
- Installing Native Xen and KVM Drivers
- Installing Native KVM Drivers
- Clearing System Logs
- Encrypting Images
- Converting the Image Format
- Windows Operations
- Linux Operations
- Managing Tags
- Managing Quotas
- Auditing Key Operations
-
FAQs
-
Image Consulting
- Basic Concepts
- How Do I Select an Image?
- What Do I Do If I Cannot Find a Desired Image?
- What Are the Differences Between Images and Backups?
- Can I Tailor an Image?
- How Can I Back Up the Current Status of an ECS for Restoration in the Case of a System Fault?
- How Can I Apply a Private Image to an Existing ECS?
- Can I Import Data from a Data Disk Image to a Data Disk?
- Can I Use Private Images of Other Accounts?
- End-of-Support for OSs
-
Image Creation
- General Creation FAQ
- Full-ECS Image FAQ
- Is There Any Difference Between the Image Created from a CSBS/CBR Backup and That Created from an ECS?
- Why Can't I Find an ISO Image When I Want to Use It to Create an ECS or Change the OS of an ECS?
- How Do I Create a Full-ECS Image Using an ECS That Has a Spanned Volume?
- Why Is Sysprep Required for Creating a Private Image from a Windows ECS?
- How Do I Handle the Startup Failure of a Windows ECS Created from a Windows Image Generalized by Sysprep?
- What Do I Do If I Cannot Create an Image in ZVHD2 Format Using an API?
- Image Sharing
- OS
-
Image Import
- Can I Use Images in Formats not Described in This Document?
- What Are the Impacts If I Do Not Pre-configure an ECS Used to Create a Private Image?
- How Do I Import an OVF or OVA File to the Cloud Platform?
- What Do I Do If I Chose the Wrong OS or System Disk Capacity When Registering a Private Image?
- Why Did My VHD Upload Fail? Why Does the System Say the System Disk in the VHD Image File Is Larger Than What I Specified on the Management Console?
-
Image Export
- Can I Download My Private Images to a Local PC?
- Can I Use the System Disk Image of an ECS on a BMS After I Export It from the Cloud Platform?
- Why Is the Image Size in an OBS Bucket Different from That Displayed in IMS?
- Can I Download a Public Image to My PC?
- What Are the Differences Between Import/Export and Fast Import/Export?
- Why the Export Option Is Unavailable for My Image?
-
Image Optimization
- Must I Install Guest OS Drivers on an ECS?
- Why Do I Need to Install and Update VirtIO Drivers for Windows?
- What Will the System Do to an Image File When I Use the File to Register a Private Image?
- How Do I Configure an ECS or an Image File Before I Use It to Create an Image?
- What Do I Do If a Windows Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- What Do I Do If a Linux Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- How Do I Enable NIC Multi-Queue for an Image?
- How Do I Configure an ECS to Use DHCPv6?
- How Do I Make a System Disk Image Support Fast ECS Creation?
- Why Did I Fail to Install Guest OS Drivers on a Windows ECS?
- How Do I Install Native Xen and KVM Drivers?
- Image Replication
- Image Deletion
- Image Encryption
- Accounts and Permissions
- Cloud-Init
-
ECS Creation
- Can I Change the Image of a Purchased ECS?
- Can I Change the Specifications Defined by a Private Image When I Use the Image to Create an ECS?
- Can I Specify the System Disk Capacity When I Create an ECS Using an Image?
- What Do I Do If a Partition Is Not Found During the Startup of an ECS Created from an Imported Private Image?
- What Do I Do If the Disks of a CentOS ECS Created from an Image Cannot Be Found?
- What Do I Do If I Enabled Automatic Configuration During Image Registration for an ECS Created from a Windows Image and Now It Won't Start?
- What Do I Do If an Exception Occurs When I Start an ECS Created from an Image Using UEFI Boot?
-
Driver Installation
- Must I Install Guest OS Drivers on an ECS?
- Why Do I Need to Install and Update VirtIO Drivers for Windows?
- Why Did I Fail to Install Guest OS Drivers on a Windows ECS?
- How Do I Install VirtIO Drivers in Windows?
- How Do I Install Native KVM Drivers in Linux?
- How Do I Install Native Xen and KVM Drivers?
- Image Tags
-
Image Consulting
-
API Reference (Kuala Lumpur Region)
- Before You Start
- API Overview
- Calling APIs
- Getting Started
- IMS APIs
-
Native OpenStack APIs
-
Image (Native OpenStack APIs)
- Querying Images (Native OpenStack API)
- Querying Image Details (Native OpenStack API)
- Updating Image Information (Native OpenStack API)
- Uploading an Image (Native OpenStack API)
- Deleting an Image (Native OpenStack API)
- Creating Image Metadata (Native OpenStack API)
- Deleting an Image (Native OpenStack API v1.1 - Abandoned and Not Recommended)
- Querying Image Metadata (Native OpenStack API v1 - Abandoned and Not Recommended)
- Querying Image Details (Native OpenStack API v1.1 - Abandoned and Not Recommended)
- Image Schema (Native OpenStack APIs)
- Image Sharing (Native OpenStack APIs)
- API Version Query (Native OpenStack API)
-
Image (Native OpenStack APIs)
- Examples
- Permission Policies and Supported Actions
- Common Parameters
- Status Codes
- Error Codes
- Change History
-
User Guide (Ankara Region)
- Overview
- Using IAM to Grant Access to IMS
-
Creating a Private Image
- Introduction
- Creating a System Disk Image from a Windows ECS
- Creating a System Disk Image from a Linux ECS
- Creating a Windows System Disk Image from an External Image File
- Creating a Linux System Disk Image from an External Image File
- Creating a Data Disk Image from an ECS
- Creating a Data Disk Image from an External Image File
- Creating a Full-ECS Image from an ECS
- Creating a Full-ECS Image from a CSBS Backup
- Creating a Full-ECS Image from a CBR Backup
- Creating a Windows System Disk Image from an ISO File
- Creating a Linux System Disk Image from an ISO File
- Fast Import of an Image File
-
Managing Private Images
- Creating an ECS from an Image
- Modifying an Image
- Exporting an Image
- Exporting Image List
- Checking the Disk Capacity of an Image
- Deleting Images
- Sharing Images
- Replicating Images
- Optimizing a Windows Private Image
-
Optimizing a Linux Private Image
- Optimization Process
- Checking Whether a Private Image Needs to be Optimized
- Uninstalling PV Drivers from a Linux ECS
- Changing Disk Identifiers in the GRUB File to UUID
- Changing Disk Identifiers in the fstab File to UUID
- Installing Native Xen and KVM Drivers
- Installing Native KVM Drivers
- Clearing System Logs
- Converting the Image Format
- Windows Operations
- Linux Operations
- Managing Tags
- Managing Quotas
- Auditing Key Operations
-
FAQs
-
Image Consulting
- How Do I Select an Image?
- What Are the Differences Between Images and Backups?
- Can I Tailor an Image?
- How Can I Back Up the Current Status of an ECS for Restoration in the Case of a System Fault?
- How Can I Apply a Private Image to an Existing ECS?
- Can I Import Data from a Data Disk Image to a Data Disk?
- Can I Use Private Images of Other Accounts?
-
Image Creation
- General Creation FAQ
- Full-ECS Image FAQ
- Is There Any Difference Between the Image Created from a CSBS/CBR Backup and That Created from an ECS?
- Why Can't I Find an ISO Image When I Want to Use It to Create an ECS or Change the OS of an ECS?
- How Do I Create a Full-ECS Image Using an ECS That Has a Spanned Volume?
- Why Is Sysprep Required for Creating a Private Image from a Windows ECS?
- How Do I Handle the Startup Failure of a Windows ECS Created from a Windows Image Generalized by Sysprep?
- What Do I Do If I Cannot Create an Image in ZVHD2 Format Using an API?
- Image Sharing
-
OS
- How Do I Select an OS?
- How Is BIOS Different from UEFI?
- How Do I Delete Redundant Network Connections from a Windows ECS?
- What Do I Do If an ECS Starts Slowly?
- What Do I Do If the One-Click Password Resetting Plug-In Failed to Start?
- What Do I Do If a Windows 7 ECS Equipped with an Intel 82599 NIC Reports an Error in SR-IOV Scenarios?
- Why Can't I Find My Private Image When I Want to Use It to Create an ECS or Change the OS of an ECS?
-
Image Import
- Can I Use Images in Formats not Described in This Document?
- What Are the Impacts If I Do Not Pre-configure an ECS Used to Create a Private Image?
- What Do I Do If I Chose the Wrong OS or System Disk Capacity When Registering a Private Image?
- Why Did My VHD Upload Fail? Why Does the System Say the System Disk in the VHD Image File Is Larger Than What I Specified on the Management Console?
-
Image Export
- Can I Download My Private Images to a Local PC?
- Can I Use the System Disk Image of an ECS on a BMS After I Export It from the Cloud Platform?
- Why Is the Image Size in an OBS Bucket Different from That Displayed in IMS?
- Can I Download a Public Image to My PC?
- Why the Export Option Is Unavailable for My Image?
-
Image Optimization
- Must I Install Guest OS Drivers on an ECS?
- Why Do I Need to Install and Update VirtIO Drivers for Windows?
- What Will the System Do to an Image File When I Use the File to Register a Private Image?
- How Do I Configure an ECS or an Image File Before I Use It to Create an Image?
- What Do I Do If a Windows Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- What Do I Do If a Linux Image File Is Not Pre-Configured When I Use It to Register a Private Image?
- How Do I Enable NIC Multi-Queue for an Image?
- How Do I Configure an ECS to Use DHCPv6?
- How Do I Make a System Disk Image Support Fast ECS Creation?
- Why Did I Fail to Install Guest OS Drivers on a Windows ECS?
- How Do I Install Native Xen and KVM Drivers?
- Image Replication
- Image Deletion
- Image Encryption
- Cloud-Init
-
ECS Creation
- Can I Change the Image of a Purchased ECS?
- Can I Change the Specifications Defined by a Private Image When I Use the Image to Create an ECS?
- Can I Specify the System Disk Capacity When I Create an ECS Using an Image?
- What Do I Do If a Partition Is Not Found During the Startup of an ECS Created from an Imported Private Image?
- What Do I Do If the Disks of a CentOS ECS Created from an Image Cannot Be Found?
- What Do I Do If I Enabled Automatic Configuration During Image Registration for an ECS Created from a Windows Image and Now It Won't Start?
- What Do I Do If an Exception Occurs When I Start an ECS Created from an Image Using UEFI Boot?
-
Driver Installation
- Must I Install Guest OS Drivers on an ECS?
- Why Do I Need to Install and Update VirtIO Drivers for Windows?
- Why Did I Fail to Install Guest OS Drivers on a Windows ECS?
- How Do I Install VirtIO Drivers in Windows?
- How Do I Install Native KVM Drivers in Linux?
- How Do I Install Native Xen and KVM Drivers?
- Image Tags
-
Image Consulting
-
API Reference (Ankara Region)
- Before You Start
- API Overview
- Calling APIs
- Getting Started
- IMS APIs
-
Native OpenStack APIs
-
Image (Native OpenStack APIs)
- Querying Images (Native OpenStack API)
- Querying Image Details (Native OpenStack API)
- Updating Image Information (Native OpenStack API)
- Uploading an Image (Native OpenStack API)
- Deleting an Image (Native OpenStack API)
- Creating Image Metadata (Native OpenStack API)
- Deleting an Image (Native OpenStack API v1.1 - Abandoned and Not Recommended)
- Querying Image Metadata (Native OpenStack API v1 - Abandoned and Not Recommended)
- Querying Image Details (Native OpenStack API v1.1 - Abandoned and Not Recommended)
- Image Schema (Native OpenStack APIs)
- Image Sharing (Native OpenStack APIs)
- API Version Query (Native OpenStack API)
-
Image (Native OpenStack APIs)
- Examples
- Permission Policies and Supported Actions
- Common Parameters
- Status Codes
- Error Codes
- Change History
-
User Guide (ME-Abu Dhabi Region)
- General Reference
Copied.
Creating a Private Image Using Packer
Packer is an open-source tool for creating custom images. Packer's behavior is determined by a template which is a HashiCorp Configuration Language (HCL2) or JSON file and mainly contains three component types: builder, provisioner, and post-processor. These components can be flexibly combined in the template to automatically create image files for multiple cloud platforms in parallel. Packer simplifies private image creation by using manageable code. In this way, you can flexibly customize images and easily use identical images between different cloud platforms.
This section describes how to use Packer to create an Ubuntu 22.04 Server 64-bit private image on a CentOS 8.2 64-bit ECS.
Constraints
Full-ECS images cannot be used as an image source when you use Packer to create private images.
Procedure
Install Packer
- Log in to the management console, create an ECS (for example, an ECS running CentOS 8.2 64-bit), and bind an EIP to the ECS.
- Log in to the ECS.
- Visit https://www.packer.io/downloads and download the latest version of Packer that matches the ECS OS and architecture.
- Run the following command to install Packer (packer_1.9.1_linux_amd64.zip as an example):
wget --no-check-certificate https://releases.hashicorp.com/packer/1.9.1/packer_1.9.1_linux_amd64.zip
NOTE:
- Ensure that you have bound an EIP to the ECS so that the ECS can access the Internet.
- If message "command not found" is displayed, the wget tool is not installed. Run the yum install wget command to install it.
- Run the following command to decompress the Packer installation package:
- Run the following command to move the Packer installation package to the /usr/local/bin directory:
mv packer /usr/local/bin
NOTE:
The /usr/local/bin directory has been added to environment variables. You can also move the Packer installation package to another directory that has been added to environment variables.
- Run the following command to check whether Packer is installed successfully:
- If the command output contains the Packer version number, Packer is installed successfully.
- If "command not found" is displayed, the Packer installation failed. Check whether the directory where Packer resides has been added to environment variables.
NOTE:
Run the env | grep PATH command to check whether the environment variable PATH contains the Packer installation directory.
If PATH does not contain the Packer installation directory, perform the following operations to add it to PATH:
- Run the following command to open the profile file:
vim /etc/profile
- Press i to enter the editing mode and add export PATH=$PATH:/usr/local/bin to the end of the file.
If your Packer resides in a directory other than /usr/local/bin, replace /usr/local/bin in the command with the actual directory.
- Press Esc to exit the editing mode. Enter :wq and press Enter to save the changes and exit.
- Run the following command to make the change take effect:
- Run the following command to open the profile file:
Create a Packer Template
To create an image using Packer, you need a template in .pkr.hcl format. In the template, you need to configure builders, provisioners, and post-processors. In a provisioner, you can modify the source image as you need. For example, you can modify the configurations and specify the software to be pre-installed. In this example, a post-processor is used to redirect the output path of manifest. If your Packer template has multiple builders, you can locate the ID of the image created by each builder based on the manifest output. For more information about builders, provisioners, and post-processors, see the official Packer documentation.
This section takes a Shell provisioner as an example.
- Run the following command to create a hwcloud.pkr.hcl file:
touch hwcloud.pkr.hcl
- Run the following command to open the hwcloud.pkr.hcl file:
vim hwcloud.pkr.hcl
- Press i to enter the editing mode and edit the template based on the site requirements. For parameter details, see Table 1. The following content is for reference only.
packer { required_plugins { huaweicloud = { version = ">= 1.0.0" source = "github.com/huaweicloud/huaweicloud" } } } source "huaweicloud-ecs" "artifact" { region = "xxx" availability_zone = "xxx" flavor = "c6.large.2" source_image_name = "Ubuntu 22.04 server 64bit" image_name = "Ubuntu-2204-image-powered-by-Packer" image_tags = { builder = "packer" os = "Ubuntu-22.04-server" } ssh_username = "root" eip_type = "5_bgp" eip_bandwidth_size = 5 } build { sources = ["source.huaweicloud-ecs.artifact"] provisioner "shell" { inline = ["apt-get update -y"] } post-processor "manifest" { strip_path = true output = "packer-result.json" } }
NOTE:
In Table 1, region, availability_zone, flavor, and source_image_name are the attributes of the temporary ECS that will be used to create the private image.
Table 1 Packer template parameters Parameter
Description
Mandatory
region
Region name. Obtain the region name from Regions and Endpoints.
Yes
flavor
Flavor of the temporary ECS.
Yes
image_name
Name of the private image to be created.
Yes
image_tags
Tags of the private image to be created.
No
availability_zone
AZ. Obtain the region name from Regions and Endpoints.
No
source_image_name
Name of the source image. This is the image whose base OS you intend to build on top of. You can obtain the source image name from the public image list on the IMS console.
NOTE:
To specify a source image, you can also use source_image to specify an image ID or use source_image_filter to filter a source image.
No
ssh_username
SSH login username of the private image to be created.
This parameter is mandatory for SSH login.
No
eip_type
EIP line type.
No
eip_bandwidth_size
EIP bandwidth (Mbit/s). This parameter is mandatory if access to the Internet is required.
NOTE:
eip_type and eip_bandwidth_size are configured to create a new EIP. To use an existing EIP, configure reuse_ips and floating_ip.
No
provisioner
Provisioner type. For details, see Packer Provisioners.
Yes
post-processor
Post-processor type.
No
Create a Private Image Using Packer
- After the Packer template is created, run the following command to import AK/SK:
export HW_ACCESS_KEY=<AccessKey ID>
export HW_SECRET_KEY=<AccessKey Secret>
- Run the following command to create an image:
huaweicloud-ecs.artifact: output will be in this color. ==> huaweicloud-ecs.artifact: Loading availability zones... huaweicloud-ecs.artifact: the specified availability_zone ap-southeast-1a is available ==> huaweicloud-ecs.artifact: Loading flavor: c6.large.2 ==> huaweicloud-ecs.artifact: Creating temporary keypair: packer_64abc4fd-xxxx-xxxx-xxxx-2139eee76819... ==> huaweicloud-ecs.artifact: Created temporary keypair: packer_64abc4fd-xxxx-xxxx-xxxx-2139eee76819 huaweicloud-ecs.artifact: Found Image ID: 19d9079e-xxxx-xxxx-xxxx-642116ad6557 ==> huaweicloud-ecs.artifact: Creating temporary VPC... huaweicloud-ecs.artifact: temporary VPC ID: 6e309adc-xxxx-xxxx-xxxx-4c3356b972c7 ==> huaweicloud-ecs.artifact: Creating temporary subnet... huaweicloud-ecs.artifact: temporary subnet ID: 66ab3bc3-xxxx-xxxx-xxxx-d8ca2d9378cc huaweicloud-ecs.artifact: the [default] security groups will be used ... ==> huaweicloud-ecs.artifact: Creating EIP ... huaweicloud-ecs.artifact: Created EIP: '0cd696e3-xxxx-xxxx-xxxx-220b8d277604' (159.xxx.xxx.180) ==> huaweicloud-ecs.artifact: Launching server in AZ ap-southeast-1a... huaweicloud-ecs.artifact: Waiting for server to become ready... huaweicloud-ecs.artifact: Server ID: 13f78f88-xxxx-xxxx-xxxx-7e8c27a9ad1f ==> huaweicloud-ecs.artifact: Using SSH communicator to connect: 159.138.141.180 ==> huaweicloud-ecs.artifact: Waiting for SSH to become available... ==> huaweicloud-ecs.artifact: Connected to SSH! ==> huaweicloud-ecs.artifact: Provisioning with shell script: /tmp/packer-shell2456008753 huaweicloud-ecs.artifact: Hit:1 http://repo.huaweicloud.com/ubuntu jammy InRelease ...... huaweicloud-ecs.artifact: Fetched 5,536 kB in 3s (2,006 kB/s) huaweicloud-ecs.artifact: Reading package lists... ==> huaweicloud-ecs.artifact: Stopping server: 13f78f88-xxxx-xxxx-xxxx-7e8c27a9ad1f ... huaweicloud-ecs.artifact: Waiting for server to stop: 13f78f88-xxxx-xxxx-xxxx-7e8c27a9ad1f ... ==> huaweicloud-ecs.artifact: Creating the system image: Ubuntu-2204-image-powered-by-Packer ... huaweicloud-ecs.artifact: Image: 62dc6e37-xxxx-xxxx-xxxx-a2a00a677f5b ==> huaweicloud-ecs.artifact: Terminating the source server: 13f78f88-xxxx-xxxx-xxxx-7e8c27a9ad1f... ==> huaweicloud-ecs.artifact: Deleted temporary public IP '0cd696e3-xxx-xxxx-xxxx-220b8d277604' (159.xxx.xxx.180) ==> huaweicloud-ecs.artifact: Deleting temporary subnet: 66ab3bc3-xxxx-xxxx-xxxx-d8ca2d9378cc... ==> huaweicloud-ecs.artifact: Deleting temporary VPC: 6e309adc-xxxx-xxxx-xxxx-4c3356b972c7... ==> huaweicloud-ecs.artifact: Deleting temporary keypair: packer_64abc4fd-xxxx-xxxx-xxxx-2139eee76819 ... ==> huaweicloud-ecs.artifact: Running post-processor: (type manifest) Build 'huaweicloud-ecs.artifact' finished after 5 minutes 48 seconds. ==> Wait completed after 5 minutes 48 seconds ==> Builds finished. The artifacts of successful builds are: --> huaweicloud-ecs.artifact: An image was created: 62dc6e37-xxxx-xxxx-xxxx-a2a00a677f5b
- Log in to the management console and click Image Management Service under Compute.
- Click the Private Images tab and view the image created using Packer. Figure 1 shows the created image.
Helpful Links
Packer official guide: https://www.packer.io/intro/getting-started/install.html
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot