Assume that you try to migrate a Windows Server 2008 R2-based Dynamic Host Configuration Protocol (DHCP) server to a Windows Server 2012 or Windows Server 2012 R2-based DHCP server by using Windows PowerShell scripts. When you try to import the active (dynamic, non-reserved) leases on the target server, the svchost.exe process that hosts the DHCP Server service crashes.
Additionally, you receive the following Error events that have event ID 1000 in the Application log and event ID 7031 in the System log:
Event ID 1000 in Application log
Event ID 7031 in System logNote The tldhcp03.XXXXXX.YYYYYYYYYYYYY-ZZ.de placeholders in the event logs are the FQDN of the target DHCP server.
For the example in the "Symptoms" section, you can optimize the scripts as follows by using the NetBIOS names:
$dhcpServerSource1 = "server00000001" # current 80%
$dhcpServerSource2 = "server00000002" # current 20%
$dhcpServerTarget1 = "tldhcp03" # future 95%, Active
$dhcpServerTarget2 = "tldhcp04" # future 5%, Hot Standby
$folderDhcpMigrationConfigurationBackup = <path of the backup folder>
Export-DhcpServer –computername $dhcpServerSource1 -Leases -File "$folderDhcpMigrationConfigurationBackup\DHCPServerExportIncludingLeases_$dhcpServerSource1.xml" -Verbose
Import-DhcpServer -ScopeOverwrite -Force -ComputerName $dhcpServerTarget1 -Leases -File "$folderDhcpMigrationConfigurationBackup\DHCPServerExportIncludingLeases_$dhcpServerSource1.xml" -BackupPath "$folderDhcpMigrationConfigurationBackup" -Verbose
Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.
To troubleshoot the issue, you can follow these steps:
- Enable the creation of user-mode crash dump files by using Windows Error Reporting. To do this, perform the following actions:
- From Registry Editor, create a registry key named LocalDumps in the following path:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting
- Under LocalDumps, create the following entries:
- Create a REG_DWORD type of entry named DumpCount,and set the value to 10.
- Create a REG_EXPAND_SZ type of entry named DumpFolder,and set the value to the path that you use to store dump files. For example, set the value to C:\memDumps.
- Create a REG_DWORD type of entry named DumpType,and set the value to 2.
- Enable the debug logs for the DHCP Server service. To do this, set the DebugFlag entry in the following path to 0xFFFFFFFF:HKEY_LOCAL_MACHINE \System\CurrentControlSet\Services\DhcpServer\Parameters
- Restart the computer.
Article ID: 2923656 - Last Review: 9 Jan 2014 - Revision: 1