Creating a Full-ECS Image from an ECS
Scenarios
You can create an image of an entire ECS, including not just the OS, but also the software and all the service data. You can then use this image to migrate data by quickly provisioning exact clones of the original ECS.
Background
The following figure shows the process of creating an image from an entire ECS, with both the system and data disks included.
- The time required for creating a full-ECS image depends on the disk size, network quality, and the number of concurrent tasks.
- The ECS used to create a full-ECS image must be in Running or Stopped state. To create a full-ECS image containing a database, use a stopped ECS.
- If an ECS is in Stopped state, do not start it when you are using it to create a full-ECS image.
- When a full-ECS image is being created from an ECS, do not perform any operations on the ECS, or the image creation may fail.
- In Figure 1, if there are snapshots of the system disk and data disks but the ECS backup creation is not complete, the full-ECS image you create will only be available in the AZ where the source ECS is and can only be used to provision ECSs in this AZ. You cannot provision ECSs in other AZs in the region until the original ECS is fully backed up and the full-ECS image is in the Normal state.
- If you use a full-ECS image to change an ECS OS, only the system disk data can be written into the ECS. Therefore, if you want to restore or migrate the data disk data of an ECS by using a full-ECS image, you can only use the image to create a new ECS rather than use it to change the ECS OS.
Constraints
- When creating a full-ECS image from an ECS, ensure that the ECS has been properly configured, or the image creation may fail.
For details, see
- 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.
- An ECS used to create a full-ECS image cannot contain a Dedicated Distributed Storage Service (DSS) disk.
- A full-ECS image cannot be exported.
- A full-ECS image cannot be replicated within a region.
- Cross-region replication of full-ECS images is only available for certain regions.
If a full-ECS image cannot be replicated to a different region, you can use it to create an ECS, use the ECS to create a system disk image and a data disk image, and replicate the images to the destination region.
A full-ECS image created using an ECS backup can be replicated from the region where they reside to another region, but the replicated full-ECS image cannot be replicated across regions again.
- 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.
- Execute cmd.exe and run the following command to query the current SAN policy of the ECS:
diskpart
- 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.
- Run the following command to change the SAN policy of the ECS to OnlineAll:
san policy=onlineall
- Execute cmd.exe and run the following command to query the current SAN policy of the ECS:
Procedure
- Access the IMS console.
- Log in to the management console.
- Under Compute, click Image Management Service.
The IMS console is displayed.
- Create a full-ECS image.
- Click Create Image in the upper right corner.
- In the Image Type and Source area, select Full-ECS image for Type.
- Select ECS for Source and then select an ECS from the list.
Figure 2 Creating a full-ECS image using an ECS
- Specify Server Backup Vault to store backups.
The created full-ECS image and backup are stored in the server backup vault.
If no server backup vault is available, click Create Server Backup Vault to create one. Ensure that you select Backup for Protection Type. For more information about CBR backups and vaults, see What Is CBR?
- In the Image Information area, configure basic image details, such as the image name and description.
- Click Next.
- Confirm the settings. Read the image disclaimer and select I have read and agree to the Image Disclaimer, and click Submit.
- Go back to the Private Images page and view the new full-ECS image.
- When the image status changes to Normal, the image creation is complete.
- If Available in AZX is displayed under Normal in the Status column for a full-ECS image, the backup for this ECS has not been created and only a disk snapshot is created. (AZX indicates the AZ where the source ECS of the image resides.)
In this case, the full-ECS image can be used to provision ECSs only in the specified AZ. If you want to use this image to provision ECSs in other AZs of the region, you need to wait until Available in AZX disappears from under Normal, which indicates that the ECS backup has been successfully created. This process takes about 10 minutes, depending on the data volume of the source ECS.
Follow-up Procedure
- If you want to use the full-ECS image to create ECSs, click Apply for Server in the Operation column. On the displayed page, create ECSs by following the instructions in Elastic Cloud Server User Guide.
When you use a full-ECS image to create an ECS:
- The system and data disk information defaulted by the image will be automatically displayed.
- If the full-ECS image contains multiple data disks, it takes some time to load and display the disk information.
- If you use a full-ECS image to change an ECS OS, only the system disk data can be written into the ECS. Therefore, if you want to restore or migrate the data disk data of an ECS by using a full-ECS image, you can only use the image to create a new ECS rather than use it to change the ECS OS.
- If you want to share the full-ECS image with other tenants, you can use either of the following methods:
- If the ECS the full-ECS image was created from has a CSBS backup, you must first migrate the backup to CBR before you share the image because CSBS is being deprecated.
- If the ECS has no such a backup, you can share the full-ECS image directly.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.