All Products
Search
Document Center

:Slow ECS instance startup when you create an ECS instance by using a custom Debian image

Last Updated:Dec 30, 2020

Disclaimer: this article may contain information about third-party products. Such information is for reference only. Alibaba Cloud does not make any guarantee, express or implied, with respect to the performance and reliability of third-party products, as well as potential impacts of operations on the products.

Problem description

After you import the source Debian server to Alibaba Cloud custom image, the custom image allows you to create an ECS instance. However, the image takes a long time to start.

Cause

The SSH Host Key (SSH Host Key) in the source Debian system may have exceptions, so when an ECS instance is created from the custom image, it takes a long time for the Alibaba cloud backend to configure the Debian instance.

Solution

Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
  • You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
  • If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.

Because this problem occurs in the source Debian system, log on to the source Debian system and perform the following steps to fix the problem.

  1. Back up the SSH host key file in the source Debian system.
    Note: the path of the SSH host key file is /etc/ssh.
  2. Run the following command to generate a new SSH host key file:
    dpkg-reconfigure openssh-server
    Note: when executing this command, if the system is prompted to update the sshd_config file, select keep local version (keep the local version currently installed).
  3. Import the source Debian system to an Alibaba Cloud custom image, and create an ECS instance by using a new image.

Documentation

Application scope

  • Elastic Compute Service