Scenario 2: Creating a Linux System Disk Image from an External Image File
You can import a local image or a system disk image from another cloud platform. After an image is imported, you can use it to create an ECS or reinstall the OS of an existing ECS.
This guide describes how to create a Linux system disk image from an external image file.
Step1: Prepare an Image File
You need to prepare an image file that meets the following requirements:
- OS: SUSE, Oracle Linux, Red Hat, Ubuntu, etc. (32-bit or 64-bit)
- Image format: VMDK, VHD, QCOW2, RAW, VHDX, QED, VDI, QCOW, ZVHD2, or ZVHD
- Image size: no larger than 128 GB. If the image size is between 128 GB and 1 TB, convert the image file into RAW or ZVHD2 and import it using fast import.
- Network: Files in the network rule directory are deleted and DHCP is configured for the NICs.
- Tools: Cloud-Init has been installed.
- Drivers: Native Xen and KVM drivers have been installed.
- File system: The disk identifier in the GRUB configuration file and fstab file are set to UUID.
Click here to learn more about the file restrictions and how to check and configure an image file.
Step 2: Upload the Image File
You are advised to use OBS Browser+ to upload external image files to an OBS bucket. For details, see OBS Browser+ Best Practices.
For how to download OBS Browser+, see Downloading OBS Browser+.
Step 3: Register the Image File as a Private Image
- Log in to the management console. In the service list, choose Compute > Elastic Cloud Server.
- In the upper right corner of the page, click Create Image. Configure the parameters.
- Read and agree to the image disclaimer. Click Next.
- Confirm the parameter settings and click Submit.
- Go back to the private image list. When the image status changes to Normal, the image is created successfully.
Follow-up Procedure
After a system disk image is created, you can use it to create an ECS or change the OS of an existing ECS. This way, you can migrate data from a server to another. For details, see:
For more information, see Creating a Linux System Disk Image from an External Image File.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.