Migrate from XenServer GuestTools to XCP-ng GuestTools
-
Hello everyone
I'd like to get your opinion.
It's about migrating from Citrix GuestTools to XCP-ng GuestTools.
The VMs have driver updates enabled via Windows Update.
According to the instructions at https://docs.xcp-ng.org/vms/#fully-removing-xen-pv-drivers-with-xenclean, Windows driver updates should be disabled.
If this is done before XenClean, the IP configuration is lost in my tests because the network device switches from XenServer PV to the
emulated device.The following procedure worked for me. The IP address was always retained. However, three reboots are required:
- Create a VM snapshot
- Uninstall Citrix XenServer Tools using a script (XenClean.ps1)
a. VM restarts automatically - Network check -> IP address correct
- Shut down VM
- Disable automatic driver updates for the VM via Windows Update
- Restart VM
- Network check -> IP address correct
- Attempt to install XCP-ng drivers
a. Errors may occur because the vendor device might still be active. In this case, run XenClean.ps1 again to uninstall it.
b. Uninstall Citrix XenServer Tools using the script (XenClean.ps1)
i. VM restarts automatically - Network check -> IP address correct
- Install XCP-ng Tools
- Reboot when prompted
- Network check -> IP address correct
Point 8 is critical. The XCP-ng GuestTools cannot be installed at this time because the vendor device for driver updates is still detected and has to be uninstalled first.
What do you think? Is there a better way, perhaps with only two reboots, while keeping the IP address the same?
I find it important to take over the IP address, as otherwise it temporarily reverts to DHCP, which can cause problems with the running server services.
I also tried disabling Windows Updates first and then running XenClean. However, XenClean doesn't then take over the original IP address of the XenServer PV adapter.
Thanks for your opinions or experiences.
-
@Chemikant784 I've been preparing a reworked XenClean and XCP-ng driver onboarding tool here. Every time the onboard.ps1 script is run, it'll try to automatically uninstall old drivers and install the XCP-ng as conditions permit: https://nextcloud.vates.tech/index.php/s/eL4sfxQGxZXe8SX
The Windows Update device is quite stubborn since disabling it causes the problem as you said. Could you try the following procedure:
- Keep the Windows Update option enabled
- Block installation of the
PCI\VEN_5853&DEV_C000device using the "Prevent installation of devices that match any of these device IDs" setting - Run XenClean
- Turn off the Windows Update option
- Install XCP-ng drivers
Getting rid of the Windows Update device is quite cumbersome... I'll look for a way to automate this
-
@dinhngtu Hi dinhngtu, thank you for your answer. I will try this out and report back later with any findings about this procedure.
-
I've managed to test it as you suggested.
The IP address was retained throughout the entire process. But the installer of XCP-ng Tools still detects an incompatible device and asks to run XenClean again. The "Prevent installation of devices that match any of these device IDs" Policy was set as instructed.
This procedure has required four reboots. (1st XenClean, 2nd manual shutdown to disable Windows Update option, 3rd XenClean and 4th install XCP-ng tools)
Theoretically, there should be one final step to remove the PCI\VEN_5853&DEV_C000 device from the policy, just to avoid future problems.
-
@Chemikant784 Indeed one of the problems is that on newer versions of Windows, Microsoft decided to completely disregard several Windows Update policies, including the ones related to device installation (?!). So once the Citrix option is enabled, Windows will insist on installing the drivers for it no matter what, which is why the 2nd XenClean is needed after disabling the Windows Update option in order to clean up after Windows.
-
@dinhngtu Since I'm not currently using these group policies myself, I can't contribute any recent experience.
However, it seems to be the case, since you've also noticed this. Would my current approach be the most sensible regarding IP address retention and the number of restarts?
Or would it make sense to wait a while until a solution to this problem is found?
Would it be useful to offer the option to shut down instead of reboot in XenClean.ps1? Then disabling the Windows Update drivers could be done in the same step.
-
@Chemikant784 Never mind, I think I've found the right combination of Registry options to disable the driver installations from the onboard script side.
But yes, the idea is to make the process as automatic as possible. I can change the onboard script to shut down after the initial uninstallation instead.