All Products
Search
Document Center

:The hostname of a Windows instance reverts to its previous name after a restart

Last Updated:Nov 24, 2025

This topic describes solutions for an issue where the hostname of a Windows instance reverts to its previous name after you change the hostname and restart the instance.

Problem description

After you change the hostname of a Windows instance and restart the instance, the hostname reverts to its previous name.

Cause

This issue may be caused by a firewall policy that blocks the instance's access to MetaServer, which results in an abnormal hostname (HostName) update.

Solutions

To resolve this issue, add an outbound firewall rule or disable the system firewall to allow the instance to access MetaServer.

Solution 1: Add an outbound firewall rule

  1. Connect to the Windows instance.

    For more information, see Log on to a Windows instance using Workbench (RDP).

  2. Open the Windows Defender Firewall with Advanced Security window.

    1. Right-click the Dingtalk_20210510142550.jpg icon and click Run.

    2. In the Run dialog box, enter wf.msc and click OK.

  3. In the Windows Defender Firewall with Advanced Security window, click Outbound Rules, and then click New Rule.

  4. In the New Outbound Rule Wizard, select Custom, and then click Scope.

  5. In the Which Remote IP addresses does this rule apply to? section, select These IP addresses and click Add.

  6. Enter the MetaServer IP address 100.100.100.200 and click OK.

  7. In the New Outbound Rule Wizard window, click Action, and then select Allow the connection.

  8. Enter a Name for the new outbound rule, click Finish, and confirm that the rule is created.

  9. Change the hostname again. If the hostname updates correctly after a restart, the issue is resolved.

Solution 2: Disable the system firewall

  1. Connect to the Windows instance.

    For more information, see Log on to a Windows instance using Workbench (RDP).

  2. You can open the Windows Defender Firewall With Advanced Security window.

    1. Right-click the Dingtalk_20210510142550.jpg icon and click Run.

    2. In the Run dialog box, enter wf.msc and then click OK.

  3. In the Windows Defender Firewall with Advanced Security window, click Windows Defender Firewall Properties.

  4. In the Windows Defender Firewall with Advanced Security on Local Computer dialog box, set Firewall state to Off and click OK.

  5. Confirm the firewall status.

  6. Change the hostname again. If the hostname updates correctly after a restart, the issue is resolved.