This topic describes how to create a custom image and import it to Alibaba Cloud. If you want to create an instance that runs an operating system currently unavailable in Alibaba Cloud, you can create a custom image and import it to the ECS console. Then, you can use the custom image to create instances running the operating system.
- VirtualBox is installed. You can download it from the VirtualBox website.
- You have a stable Internet connection.
- You have an Alibaba Cloud account. You can visit the Alibaba Cloud website to register for a free account.
- An operating system ISO or binary file such as Red Hat Enterprise Linux is installed.
- Alibaba Cloud ossbrowser is installed.
- Create a new Virtual Machine (VM) on VirtualBox:
- Start VirtualBox and click New.
- Enter a name for the VM and select the correct OS type (for example, Microsoft Windows)
and OS version (for example, Windows 7 (64-bit)).
- Set the memory size.
- Create a virtual hard disk.
- Select VHD (Virtual Hard Disk) as the hard disk file type. Alibaba Cloud supports RAW, VHD, and qcow2 formats.
- Select Dynamically allocated for the storage type.
- Enter a name for the virtual hard disk and click Create.
- Wait until the VHD file is created, and then double-click the newly created VM to
- Run the following command to install KVM virtualization platform drivers:
yum install qemu-kvm qemu-img libvirt
- Run the following command to disable the firewall of the VM:
service firewalld stop
- Upload the VHD file to OSS, and then use the ossbrowser to upload the VHD file to
the region in which you want to create an instance. For more information, see ossbrowser quick start.
- Import the custom image:
- Log on to the ECS console.
- Select the same region that you selected for uploading the VHD file to OSS, and then
click Import Image. For information about how to allow ECS to access your OSS resources, see Import custom images.
- Set the relevant parameters, and then click OK.
- You can log on to the OSS console to obtain the OSS Object Address. For more information, see Download an object.
- After the custom image is imported, it appears in the list of images.