- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Managing Public Images
-
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
- Modifying an Image
- Exporting Image List
- Checking the Disk Capacity of an Image
- Creating an ECS from an Image
- Deleting Images
- Sharing Images
- Exporting an Image
- 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 the Disk Identifier in the GRUB Configuration File to UUID
- Changing the Disk Identifier in the fstab File to UUID
- Installing Native Xen and KVM Drivers
- Installing Native KVM Drivers
- Clearing System Logs
- Encrypting Images
- Replicating Images Within a Region
- Replicating Images Across Regions
- Tagging an Image
- Auditing Key Operations
- Windows Operations
- Linux Operations
- Permissions Management
-
Best Practices
- Overview
- 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 Service Data Across Accounts (Data Disks)
-
API Reference
- 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
- Permission Policies and Supported Actions
- Common Parameters
- Status Codes
- Error Codes
- SDK Reference
-
FAQs
-
Image Consulting
- Basic Concepts
- How Do I Select an Image?
- Are There Any Public Images Already Containing Certain Applications, Such as OpenVPN or PyTorch?
- How Do I Increase the Image Quota?
- 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 FAQs
- Full-ECS Image FAQs
- 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
-
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, 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 Configure an ECS to Use DHCPv6?
- How Do I Clean Up the Disk Space of a Windows ECS?
- 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?
- Billing
-
Image Consulting
- Videos
Running Sysprep
Scenarios
Running Sysprep ensures that an ECS has a unique SID after it is added to a domain.
After installing Cloudbase-Init on an ECS, you need to decide whether the ECS needs to be added to a domain or whether it must have a unique SID. If yes, run Sysprep as instructed in this section.
Prerequisites
- Run Sysprep as the administrator.
- For a newly activated Windows ECS, you can run Sysprep only once at a time.
- If an ECS is created from an image file, only Sysprep provided by the image file can be used. In addition, Sysprep must always reside in the %WINDIR%\system32\sysprep directory.
- Windows must be in the activated state, and the remaining Windows rearm count must be greater than or equal to 1. Otherwise, the Sysprep encapsulation cannot be executed.
Run the following command in the Windows command line and check how many times you can run Sysprep in the displayed Windows Script Host dialog box:
slmgr.vbs /dlv
If the value of Remaining Windows rearm count is 0, you cannot run Sysprep.
Figure 1 Windows Script Host
Procedure
- Enter the Cloudbase-Init installation directory.
C:\Program Files\Cloudbase Solutions\ is used as an example of the Cloudbase-Init installation directory. Switch to the root directory of drive C and run the following command to enter the installation directory:
cd C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf
- Run the following command to encapsulate Windows:
C:\Windows\System32\sysprep\sysprep.exe /generalize /oobe /unattend:Unattend.xml
CAUTION:
- Ensure that /unattend:Unattend.xml is contained in the preceding command. Otherwise, the username, password, and other important configuration information of the ECS will be reset, and you must configure the OS manually when you use ECSs created from the Windows private image.
- After this command is executed, the ECS will be automatically stopped. After the ECS is stopped, use the ECS to create an image. ECSs created using the image have unique SIDs. If you restart a Windows ECS on which Sysprep has been executed, Sysprep takes effect only for the current ECS. Before creating an image using the ECS, you must run Sysprep again.
- For Windows Server 2012 and Windows Server 2012 R2, the administrator password of the ECS will be deleted after Sysprep is executed on the ECS. You need to log in to the ECS and reset the administrator password. In this case, the administrator password set on the management console will be invalid. Keep the password you set secure.
- If a domain account is required for logins, run Sysprep on the ECS before using it to create a private image. For details about the impact of running Sysprep, see Why Is Sysprep Required for Creating Private Images Using a Windows ECS?
- The Cloudbase-Init account of a Windows ECS is an internal account of the Cloudbase-Init agent. This account is used for obtaining metadata and completing relevant configuration when the Windows ECS starts. If you modify or delete this account, or uninstall the Cloudbase-Init agent, you will be unable to inject initial custom information into an ECS created from a Windows private image. Therefore, you are not advised to modify or delete the Cloudbase-Init account.
Figure 2 Running Sysprep
Follow-up Procedure
- Create a private image from the ECS on which Sysprep is executed. For details, see Creating a System Disk Image from a Windows ECS.
- You can use the image to create ECSs. Each ECS has a unique SID.
Run the following command to query the ECS SID:
whoami /user
Figure 3 ECS SID before Sysprep is executedFigure 4 ECS SID after Sysprep is executed
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.