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.
- 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.
- 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:
- 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
- Press i to enter editing mode.
- 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
- Press Esc, enter :wq, and press Enter.
The system saves the configuration and exits the vi editor.
- Install special drivers by following the instructions in (Optional) Installing Special Drivers.