Compartir a través de


Migrating DHCP to a Cluster Running Windows Server 2008 R2 Step-by-Step Guide

Updated: September 17, 2009

Applies To: Windows Server 2008 R2

A failover cluster is a group of independent computers that work together to increase the availability of applications and services. The clustered servers (called nodes) are connected by physical cables and by software. If one of the cluster nodes fails, another node begins to provide service (a process known as failover). Users experience a minimum of disruptions in service.

This guide describes the process of migrating a clustered DHCP server to a cluster running Windows Server® 2008 R2. Specific steps are required when migrating a clustered DHCP server to Windows Server 2008 R2 from any of the following operating systems:

  • Windows Server 2003

  • Windows Server 2003 R2

  • Windows Server 2008

This guide describes the steps that are necessary when migrating a clustered DHCP server to a cluster running Windows Server 2008 R2, beyond the standard steps required for migrating clustered services and applications in general. The guide indicates when to use the Migrate a Cluster Wizard in the migration, but does not describe the wizard in detail. For more information about the Migrate a Cluster Wizard, see Understanding the Process of Migrating to a Cluster Running Windows Server 2008 R2 (https://go.microsoft.com/fwlink/?LinkId=161333).

Note

If you are migrating from a cluster running Windows Server 2008 R2 to another cluster running Windows Server 2008 R2, the steps in this guide, other than running the Migrate a Cluster Wizard, are not necessary.

In this guide

  • Step 1: Review requirements and create a cluster running Windows Server 2008 R2

  • Step 2: On the old cluster, adjust registry settings and permissions before migration

  • Step 3: On a node in the old cluster, prepare for export, and then export the DHCP database to a file

  • Step 4: On the new cluster, configure a network for DHCP clients and run the Migrate a Cluster Wizard

  • Step 5: On the new cluster, import the DHCP database, bring the clustered DHCP server online, and adjust permissions

Step 1: Review requirements and create a cluster running Windows Server 2008 R2

Before beginning the migration described in this guide, review the requirements for a cluster running Windows Server 2008 R2, install the failover clustering feature on servers running Windows Server 2008 R2, and create a new cluster. These steps are described in Checklist: Create a Failover Cluster (https://go.microsoft.com/fwlink/?LinkId=161334).

We recommend that you also review the migration information in Understanding the Process of Migrating to a Cluster Running Windows Server 2008 R2 (https://go.microsoft.com/fwlink/?LinkId=161333).

Step 2: On the old cluster, adjust registry settings and permissions before migration

To prepare for migration, you must make changes to registry settings and permissions on each node of the old cluster.

To adjust registry settings and permissions before migration

  1. Confirm that you have a current backup of the old cluster, one that includes the configuration information for the clustered DHCP server (also called the DHCP resource group).

  2. Confirm that the clustered DHCP server is online on the old cluster. It must be online while you complete the remainder of this procedure.

  3. On a node of the old cluster, open a command prompt as an administrator.

  4. Type:

    regedit

Warning

Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer. You can also use the Last Known Good Configuration startup option if you encounter problems after manual changes have been applied.

  1. Navigate to:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\DHCPServer\Parameters

  2. Choose the option that applies to your cluster:

    • If the old cluster is running Windows Server 2008, skip to step 7.

    • If the old cluster is running Windows Server 2003 or Windows Server 2003 R2:

      1. Right-click Parameters, click New, click String Value, and for the name of the new value, type:

        ServiceMain

      2. Right-click the new value (ServiceMain), click Modify, and for the value data, type:

        ServiceEntry

      3. Right-click Parameters again, click New, click Expandable String Value, and for the name of the new value, type:

        ServiceDll

      4. Right-click the new value (ServiceDll), click Modify, and for the value data, type:

        %systemroot%\system32\dhcpssvc.dll

  3. Right-click Parameters, and then click Permissions.

  4. Click Add.

  5. Locate the appropriate account and assign permissions:

    • On Windows Server 2008: Click Locations, select the local server, and then click OK. Under Enter the object names to select, type NT Service\DHCPServer. Click OK. Select the DHCPServer account and then select the check box for Full Control.

    • On Windows Server 2003 or Windows Server 2003 R2: Click Locations, ensure that the domain name is selected, and then click OK. Under Enter the object names to select, type Everyone, and then click OK (and confirm your choice if prompted). Under Group or user names, select Everyone and then select the check box for Full Control.

Important

The step of adding permissions for Everyone is a temporary measure. After performing this step, be sure to follow the remaining steps in this guide, specifically the last step, in which you remove the permissions for Everyone when they are no longer needed. This ensures that after migration is complete, the permissions are limited to the correct account.

  1. Repeat the process on the other node or nodes of the old cluster.

Step 3: On a node in the old cluster, prepare for export, and then export the DHCP database to a file

As part of migrating a clustered DHCP server, on the old cluster, you must export the DHCP database to a file. This requires preparatory steps that prevent the cluster from restarting the clustered DHCP resource during the export. The following procedure describes the process.

To prepare for export and then export the DHCP database to a file

  1. On the old cluster, start the clustering snap-in and configure the restart setting for the clustered DHCP server (DHCP resource group):

    • If the cluster is running on Windows Server 2003 or Windows Server 2003 R2:

      1. Click Start, click Control Panel, double-click Administrative Tools, and then double-click Cluster Administrator.

      2. In the console tree, click the Resources folder, and in the details pane, click the DHCP resource.

      3. On the File menu, click Properties, click the Advanced tab, and then click Do not restart.

    • If the cluster is running on Windows Server 2008:

      1. Click Start, click Administrative Tools, and then click Failover Cluster Management. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.

      2. If the console tree is collapsed, expand the tree under the cluster that you are migrating settings from. Expand Services and Applications and then, in the console tree, click the clustered DHCP server.

      3. In the center pane, right-click the DHCP server resource, click Properties, click the Policies tab, and then click If resource fails, do not restart.

    This step prevents the resource from restarting during the export of the DHCP database, which would stop the export.

  2. On the node of the old cluster that currently owns the clustered DHCP server, confirm that the clustered DHCP server is running. Then open a command prompt window as an administrator.

  3. Type:

    netsh dhcp server export <exportfile> all

    Where <exportfile> is the name of the file to which you want to export the DHCP database.

    The export causes DHCP to stop running, and as a result, in the clustering interface, the DHCP server resource may be marked as failed. If this occurs, do not be concerned.

  4. After the export is complete, in the clustering interface (Cluster Administrator or Failover Cluster Management), right-click the clustered DHCP server (DHCP resource group) and then click either Take Offline or Take this service or application offline. If the command is unavailable, in the center pane, right-click each online resource and click either Take Offline or Take this resource offline. If prompted for confirmation, confirm your choice.

  5. If the old cluster is running Windows Server 2003 or Windows Server 2003 R2, obtain the account name and password for the Cluster service account (the Active Directory account used by the Cluster service on the old cluster). Alternatively, you can obtain the name and password of another account that has access permissions for the Active Directory computer accounts (objects) that the old cluster uses. For a migration from a cluster running Windows Server 2003 or Windows Server 2003 R2, you will need this information for the next procedure.

Step 4: On the new cluster, configure a network for DHCP clients and run the Migrate a Cluster Wizard

We recommend that you make the network settings on the new cluster as similar as possible to the settings on the old cluster. In any case, on the new cluster, you must have at least one network that DHCP clients can use to communicate with the cluster. The following procedure describes the cluster setting needed on the client network, and indicates when to run the Migrate a Cluster Wizard.

To configure a network for DHCP clients and run the Migrate a Cluster Wizard

  1. On the new cluster (running Windows Server 2008 R2), click Start, click Administrative Tools, and then click Failover Cluster Manager. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.

  2. If the cluster that you want to configure is not displayed, in the console tree, right-click Failover Cluster Manager, click Manage a Cluster, and then select or specify the cluster that you want.

  3. If the console tree is collapsed, expand the tree under the cluster.

  4. Expand Networks, right-click the network that clients will use to connect to the DHCP server, and then click Properties.

  5. Make sure that Allow cluster network communication on this network and Allow clients to connect through this network are selected.

  6. To prepare for the migration process, find and take note of the drive letter used for the DHCP database on the old cluster. Ensure that the same drive letter exists on the new cluster. (This drive letter is one of the settings that the Migrate a Cluster Wizard will migrate.)

  7. In Failover Cluster Manager, in the console tree, select the new cluster, and then under Configure, click Migrate services and applications.

  8. Use the Migrate a Cluster Wizard to migrate the DHCP resource group from old to the new cluster. If you are using new storage on the new cluster, during the migration, be sure to specify the disk that has the same drive letter on the new cluster as was used for the DHCP database on the old cluster.

    The wizard will migrate resources and settings, but not the DHCP database.

    For more information about the Migrate a Cluster Wizard, see Migrate Resource Groups to a Failover Cluster Running Windows Server 2008 R2 (https://go.microsoft.com/fwlink/?LinkId=161335).

Step 5: On the new cluster, import the DHCP database, bring the clustered DHCP server online, and adjust permissions

To complete the migration process, import the DHCP database that you exported to a file in Step 2. Then you can bring the clustered DHCP server online and adjust settings that were changed temporarily during the migration process.

To import the DHCP database, bring the clustered DHCP server online, and adjust permissions

  1. If you are reusing the old cluster storage for the new cluster, confirm that you have stored the exported DHCP database file in a safe location. Then be sure to delete all the DHCP files other than the exported DHCP database file from the old storage. This includes the DHCP database, log, and backup files.

  2. On the new cluster, in Failover Cluster Manager, expand Services and Applications, right-click the clustered DHCP server, and then click Bring this service or application online.

    The DHCP service starts with an empty database.

  3. Click the clustered DHCP server.

  4. In the center pane, right-click the DHCP server resource, click Properties, click the Policies tab, and then click If resource fails, do not restart.

    This step prevents the resource from restarting during the import of the DHCP database, which would stop the import.

  5. In the new cluster, on the node that currently owns the migrated DHCP server, view the disk used by the migrated DHCP server, and make sure that you have copied the exported DHCP database file to this disk.

  6. In the new cluster, on the node that currently owns the migrated DHCP server, open a command prompt as an administrator. Change to the disk used by the migrated DHCP server.

  7. Type:

    netsh dhcp server import <exportfile>

    Where <exportfile> is the filename of the file to which you exported the DHCP database.

    The import causes DHCP to stop running, and as a result, in the clustering interface, the DHCP server resource may be marked as failed. If this occurs, do not be concerned.

  8. If the migrated DHCP server is not online, in Failover Cluster Manager, under Services and Applications, right-click the migrated DHCP server, and then click Bring this service or application online.

  9. In the center pane, right-click the DHCP server resource, click Properties, click the Policies tab, and then click If resource fails, attempt restart on current node.

    This returns the resource to the expected setting, instead of the "do not restart" setting that was temporarily needed during the import of the DHCP database.

  10. If the cluster was migrated from Windows Server 2003 or Windows Server 2003 R2, after the clustered DHCP server is online on the new cluster, make the following changes to permissions in the registry:

    1. On the node that owns the clustered DHCP server, open a command prompt as an administrator.

    2. Type:

      regedit

Warning

Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer. You can also use the Last Known Good Configuration startup option if you encounter problems after manual changes have been applied.

3.  Navigate to:  
      
    **HKEY\_LOCAL\_MACHINE\\SYSTEM\\CurrentControlSet\\services\\DHCPServer\\Parameters**  
      
4.  Right-click **Parameters**, and then click **Permissions**.  
      
5.  Click **Add**, click **Locations**, and then select the local server.  
      
6.  Under **Enter the object names to select**, type **NT Service\\DHCPServer** and then click **OK**. Select the **DHCPServer** account and then select the check box for **Full Control**. Then click **Apply**.  
      
7.  Select the **Everyone** account (created through steps earlier in this topic) and then click **Remove**. This removes the account from the list of those that are assigned permissions.  
      

Perform the preceding steps only after DHCP is online on the new cluster.

After you complete these steps, you can test the clustered DHCP server and begin to provide DHCP services to clients.

Additional references