Updated on 2026-09-16 GMT+08:00

Configuring DHCP

Scenarios

If a private image is created from an ECS or external image file and the VM where the ECS or external image file is located is configured with a static IP address, you need to configure DHCP so that the new ECSs created from the private image can dynamically obtain an IP address.

This section uses Windows Server 2008 R2 as an example to describe how to configure DHCP. For details about how to configure DHCP on ECSs running other OSs, see the relevant OS documentation.

When registering an external image file as a private image, configure DHCP on the VM where the external image file is located. You are advised to configure DHCP on the VM and then export the image file.

Prerequisites

You have logged in to the ECS used to create a Windows private image.

For details about how to log in to an ECS, see Login Overview.

Procedure

The following uses Windows Server 2022 Datacenter, Windows Server 2019 Datacenter, and Windows Server 2008 R2 as examples. The configuration methods for Windows Server 2019 Datacenter and Windows Server 2022 Datacenter are the same. The configuration methods for other OSs are slightly different. They are not described here. For details, see the documentation of the corresponding OS.

  1. On the ECS, choose Start > Control Panel.
  2. Click Network and Sharing Center.
    Figure 1 Network and Sharing Center
  3. Select the connection configured with the static IP address. For example, click tap58dd65a3-91, as shown in Figure 2.
    Figure 2 tap58dd65a3-91 status
  4. Click Properties and select the configured Internet protocol version.
  5. On the General tab, select Obtain an IP address automatically and Obtain DNS server address automatically and click OK, as shown in Figure 3. The system will automatically obtain an IP address.

    You are advised to record the original network information so that you can restore the network if necessary.

    Figure 3 Configuring DHCP
  1. On the ECS, choose Start > Control Panel.
  2. Click Network and Internet.
  3. Click Network and Sharing Center, as shown in Figure 4.
    Figure 4 Network and Sharing Center
  4. Select the connection configured with the static IP address. For example, click Local Area Connection 2, as shown in Figure 5.
    Figure 5 Local Area Connection 2 Status
  5. Click Properties and select the configured Internet protocol version.
  6. On the General tab, select Obtain an IP address automatically and Obtain DNS server address automatically and click OK, as shown in Figure 6. The system will automatically obtain an IP address.

    You are advised to record the original network information so that you can restore the network if necessary.

    Figure 6 Configuring DHCP