“A duplicate IP address was assigned” on Provisioning Services target devices

A few days ago I ran into the problem that when I changing a Citrix XenApp vDisk (or created a new one) the Citrix XenApp servers crashes within the same VLAN with a BSOD with error message “A duplicate IP address was assigned to this machine while attempting to boot from the network” (see screenshot below). Striking is that the Citrix XenApp servers within another VLAN, booted from the same vDisk, do not have this problem.

A duplicated IP address was assigned_001

Every VLAN have two Citrix Provisioning Servers with the DHCP services installed on it. For all the Citrix XenApp servers booting from the vDisk there is a DHCP reservation created on both DHCP servers to the respective VLAN. When one of the PVS servers was turned off, this problem did not occur. Lease durations are set to Unlimited and Conflict detection attempts are set to 1.

I installed the Citrix Provisioning Services Servers with the source from hotfix CPVS61016 as described here. So the latest hotfixes have been applied.

As far as I know, the only way to fix this problem is to clear all the DHCP information from the registry within the vDisk. To do that you have to mount the vDisk on the Citrix Provisioning Services server.

To have the ability to mount the vDisk it may not be in use, so it a good plan the make a copy of the vDisk and add it to the vDisk store. Alternatively, you can turn off all Citrix XenApp servers that are using the vDisk and remove the vDisk locks (if needed).

Follow the instructions below to fix this problem.

A duplicated IP address was assigned_002

 Right click the vDisk and select Mount vDisk

A duplicated IP address was assigned_003

The icon next to the vDisk is now changed, indicating the vDisk is mounted.

A duplicated IP address was assigned_004

Within Windows Explorer the vDisk is now mounted as a disk drive, in my case, drive F

A duplicated IP address was assigned_005

Open the Registry Editor, select HKEY_LOCAL_MACHINE, go to the File menu and select Load Hive.

A duplicated IP address was assigned_006

Browse to <vDisk Drive>\Windows\System32\Config\System. Fill in a Key Name, in this example “XenApp-vDisk” (you can give it any name you like). Click OK.

A duplicated IP address was assigned_007

Browse to “HKEY_LOCAL_MACHINE\<loaded hive>\ControlSet001\services\Tcpip\parameters” and clear the data from the DhcpNameServer registry key. Repeat this step for the ControlSet002 hive!

A duplicated IP address was assigned_008

Browse to “HKEY_LOCAL_MACHINE\<loaded hive>\ControlSet001\services\Tcpip\parameters\Interfaces” and clear the data from the DhcpDefaultGateway, DhcpIPAddress, DhcpNameServer, DhcpSubnetMask and DhcpSubnetMaskOpt registry key. Repeat this step for each sub key under the Interfaces key.

Repeat this step also for the ControlSet002 hive!

A duplicated IP address was assigned_009

Select “HKEY_LOCAL_MACHINE\<loaded hive>”, go to the File menu and select Unload Hive.

A duplicated IP address was assigned_010

Click Yes

A duplicated IP address was assigned_011

In the Citrix Provisioning Services console, right click the vDisk and select Unmount vDisk <vDisk name>.

If there are multiple Provisioning Services servers within your environment, copy the vDisk to the other servers. Boot all the Citrix XenApp servers from the edited vDisk. If everything is done properly, they now start without problems.

11 comments

  • Hi Robin

    Great article

    I have the same issue , but instead of XenApp 6.5

    We are getting these on random VMs through XenDesktop 5.6.

    We are using pvs 6.1

    And like you most VMs run fine but some get a BSOD and with the “duplicate ip address problem ”

    Am i right in assuming if i apply this fix it will resolve the issue ?

    The hypervisor we are using is Hyper V 2

    Cheers

  • We have the same issue. We found a Ghost NIC installed which can be removed by running this on the CMD.

    set show_devmgr_nonpresent_devices=1

    Then open the device manager and select show hidden devices and if you see another copy of NIC, uninstall it.

    Reboot

  • The Second suspect was the InfoBlox DHCP server. Update it to the latest build and use the Option 61.

  • I encounter ip conflict because dns is not fast enought to update its record when vm rebooted.
    That causing problem for KMS too
    These what I did.
    DNS:
    -Set Aging/Scaveging for All Zones
    Non-refresh 1days
    Refresh 2 days
    -in dns server Properties Advanced
    tick Enable automatic scavenging of stale records
    Scaveging period: 1 day
    -in domain properties/General click Zone Aging
    Set Aging/Scaveging for All Zones
    Non-refresh 1days
    Refresh 2 days

    DHCP:
    -IPv4 Properties/DNS
    tick Enable DNS dynamic updates
    click Always dynamically update
    tick Discard A and PTR recors
    tick Dynamically update DNS A and PTR
    -set DHCP lease to 3 days base on PVS recommendation

  • Nice article.

    I have a similar issue but mine is a duplicate default gateway. We have 2 NIC’s in our vDisk, one for streaming and the other one for network connections. I found out that the streaming nic was picking up a second default gateway making the machine have 2 default gateways and this then causes a protocol driver error when connecting remotely.

    Steps taken includes running route delete from command. Resetting the IP stack with Netsh int IP reset command and Netsh winsock reset catalog… All to no avail. I have completely removed all the registry entries shown above inckuding the whole adapter key, also removed the second nic completely, removed target device software and vmware tools, restarted and the issue still exists. I also reversed the image as well for that. We use dhcp reservation and there is nothing in both scopes apart from the main default gateway. If I do ipconfig /release everything gets released apart from the second rouge default gateway.

    One observation is that the second default gateway only comes in when I’m connected to PVS. If I disable the machine object in pvs then it’s fine and I don’t get the second default gateway. We have other vDisks that work fine and the previous version is fine but I have just inherited this vDisk and don’t know the changes made to it. I can start afresh but just want to know what could be causing this issue especially when all other machines are fine so it can’t be the bootstraps bin file that is causing the issue.

    The environment is PVS 7.1 XenApp 6.5 and we use SCCM and App-V too.

    Any help will be appreciated.

  • Hi Robin!
    First of all for all your good and helpful work! You saved my *** many times! 😉

    Could you please update this article for the same issue with Server2012R2 vDisk issues?!

    Thanks in advance!

    Best regards
    Soeren

    • Hi Soeren!
      I had the same issue with PVS 7.6 and a 2012R2 V-Disk.
      Followed the article and it worked just fine!

      Cheers
      // Jonas

  • Hi Robin,
    we’re experiencing the issue with duplicate addresses only on machines with PvD.
    So on VDIs with PvD it wouldn’t make sense to delete the mentioned registry keys.
    We had the Problem with PVS 7.9 and 7.12, Windows 7 on XenServer 6.5 and 7.
    Do you have any idea how to fix this issue on PvDs?

    Thanks
    Walter

About Robin Hobo

I work as a Senior Solution Architect with focus on the Modern Workspace. I am specialized in Azure Virtual Desktop (AVD), Windows 365 and Microsoft EM+S (including Microsoft Endpoint Manager - Microsoft Intune).

For my full bio, check the About Me page.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close