When updating your Citrix VM Tools for Windows through Windows Update, multiple VM reboots can sometimes be required to complete the update. If all reboots are not completed, you might temporarily lose your static IP configuration.
You can set a registry key that specifies the maximum number of automatic reboots that are performed when you install the drivers through Device Manager or Windows Update. When this registry key is set, the Citrix VM Tools for Windows performs as many reboots as are needed to complete the updates or the number of reboots specified by the registry key - whichever value is lower. The xenbus driver version 9.1.1.8 or later takes this registry key into account and performs the required reboots. If you have an earlier version of xenbus, you might still encounter the static IP loss issue. If this occurs, reboot the VM from XenCenter.
To use this feature, we recommend that you set the following registry key as soon as possible: HLKM\System\CurrentControlSet\services\xenbus_monitor\Parameters\Autoreboot.
The value of the registry key must be a positive integer. We recommend that you set the number of reboots in the registry key to 3.
Before each reboot, Windows can display an alert for 60 seconds that warns of the upcoming reboot. You can dismiss the alert, but this does not cancel the reboot. Because of this delay between the reboots, wait a few minutes after the initial reboot for the reboot cycle to complete. (Note that in some cases the alert might not be shown, but there is still a 60 second delay before reboot.)
This setting is required for headless servers with static IP addresses.
This automatic reboot feature only applies to updates to the Windows I/O drivers through Device Manager or Windows Update. If you are using the Management Agent installer to deploy your drivers, the installer disregards this registry key and manages the VM reboots according to its own settings.
Note: If, after waiting for all reboots to complete, you still lose your static IP configuration, initiate a reboot of the VM from XenCenter to attempt to restore the configuration.
reg add HKLM\System\CurrentControlSet\Services\xenbus_monitor\Parameters /v Autoreboot /t REG_DWORD /d 3
Note: 3 is the recommended value, but you can change the value of the /d parameter to any integer.
OR
reg add \\<windows-name>\HKLM\System\CurrentControlSet\Services\xenbus_monitor\Parameters /v Autoreboot /t REG_DWORD /d 3
Note: 3 is the recommended value, but you can change the value of the /d parameter to any integer.
For more information, see https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/reg-add