• Image Management Service

  1. Help Center
  2. Image Management Service
  3. User Guide
  4. Creating a Private Image
  5. Creating a System Disk Image Using a Linux ECS
  6. Configuring the Linux ECS

Configuring the Linux ECS


If the ECS that will be used to create a Linux private image uses a static IP address, you must set its IP address obtaining mode to DHCP.

The configuration method varies depending on OSs.


For how to enable the NIC multi-queue feature, see the Elastic Cloud Server User Guide.


You have logged in to the ECS.

For detailed operations, see the Elastic Cloud Server User Guide.


  • For Red Hat Linux, CentOS, Oracle Enterprise Linux, and EulerOS, use the vi editor to add PERSISTENT_DHCLIENT="y" to configuration file /etc/sysconfig/network-scripts/ifcfg-ethX.
  • For SUSE Linux Enterprise, use the vi editor to set DHCLIENT_USE_LAST_LEASE to no in the configuration file /etc/sysconfig/network/dhcp.
  • For Ubuntu 12.04, upgrade dhclient to 4.2.4 so that the NICs can consistently obtain an IP address from the DHCP server. For the detailed upgrade method, see the OS documentation.

The following operations use Ubuntu14.04 as an example to describe how to check and configure DHCP.

  1. Run the following command on the ECS to open the /etc/network/interfaces file using the vi editor and query the IP address obtaining mode:

    vi /etc/network/interfaces

    • If DHCP has been configured on all NICs, enter :q to exit the vi editor.
      Figure 1 DHCP IP address obtaining mode
    • If static IP addresses are set on the NICs, go to 2.
      Figure 2 Static IP address obtaining mode
  2. Press i to enter editing mode.
  3. Delete the static IP address configuration and configure DHCP for the NICs.

    You can insert a number sign (#) in front of each line of static IP address configuration to comment it out.

    Figure 3 Configuring DHCP on one NIC

    If the ECS has multiple NICs, you must configure DHCP for all the NICs.

    Figure 4 Configuring DHCP on multiple NICs
  4. Press Esc, enter :wq, and press Enter.

    The system saves the configuration and exits the vi editor.

  5. Install special drivers by following the instructions in (Optional) Installing Special Drivers.