xcp icon indicating copy to clipboard operation
xcp copied to clipboard

Windows PV Drivers Won't Install on Windows Server 2022

Open bret-miller opened this issue 3 years ago • 19 comments

Trying to install the Windows PV Drivers on Windows Server 2022. It seems to install, but then fails to install the management agent with the message "Windows Management Agent failed to install".

I assume that means it just isn't compatible yet. Citrix Guest Tools get a similar error.

bret-miller avatar Apr 27 '22 13:04 bret-miller

What version of xcp-ng are you on? I have deployed quite a few 2022 vm's and installed the pv drivers and the citrix agent without issue. I am on 8.2.1 Build release/yangtze/master/58.

xTITUSMAXIMUSX avatar May 24 '22 22:05 xTITUSMAXIMUSX

I am also guessing that is the issue. I just need to schedule some off-hours downtime to upgrade. It needs to be done anyway.

bret-miller avatar May 25 '22 11:05 bret-miller

Well, obviously something besides the version of xcp-ng which is now 8.2.1 fully yum-updated as you 4-Jul-2022. In the install log, I get this:

7/5/2022 8:39:48 AM: Checking service: 'xeniface' 7/5/2022 8:39:48 AM: Service xeniface was not found on computer '.'. 7/5/2022 8:39:48 AM: driver: xeniface does not work after enumerte, will try reinstall 7/5/2022 8:39:48 AM: Is 'VIF' needed? 7/5/2022 8:39:48 AM: System.NullReferenceException: Object reference not set to an instance of an object. at PVDevice.PVDevice.IsServiceNeeded(String device) at PVDevice.XenVif.IsFunctioning(Boolean& bNeedReinstall) at PVDevice.PVDevice.AllFunctioning() at InstallAgent.InstallAgent.__InstallThreadHandler() at InstallAgent.InstallAgent.InstallThreadHandler() 7/5/2022 8:39:48 AM: Setting 'InstallStatus': 'Failed'

And the full log from today's attempt (after trying to remove every file related to the PV drivers & agent) can be found at https://cloud.gci.org/files/InstallAgent-2022-07-05.log in case that helps.

Everything works except for the one last "management agent" piece that allows you to see the actual memory use, and have any sort of control through Xen Orchestra or XCP-NG Center.

bret-miller avatar Jul 05 '22 12:07 bret-miller

Just installed my first WS 2022 VM and I'm having the same issue.

Fully updated XCP-ng and latest XCP-ng.Windows.PV.Drivers.8.2.2.200-rc1.

G

sonoracomm avatar Aug 27 '22 23:08 sonoracomm

Please try the Citrix drivers instead.

olivierlambert avatar Aug 28 '22 08:08 olivierlambert

I was ultimately successful with the Citrix tools/drivers, but I had to reinstall Windows Server 2022 clean:

  1. Installed Windows Server 2022 fresh, no updates, no nothing, do not try to install the Open Source PV drivers of any version
  2. Acquired latest Citrix managementagentx64.msi (6/30/2022) (XenServer/Citrix Hypervisor is no longer free!)
  3. Installed Citrix tools/drivers before anything else

Thanks,

G

sonoracomm avatar Aug 28 '22 16:08 sonoracomm

Hello friends. Defeated the same problem.

  1. The first thing to do is to remove traces of the old installation:

Follow the step below, take into consideration that some steps are optional: Take a snapshot of the VM for backing up everything before any change, just as a safety measure.
From "Control Panel \ Program and Features" (run Appwiz.cpl) uninstall "Citrix XenServer Windows Management Agent", after reboot verify that it is uninstalled. Delete installation file and registry keys about "Citrix XenServer Windows Management Agent", all listed below. Please do a backup before any deletion, just in case: Files C:\Windows\System32\xen* C:\Windows\System32\drivers\xen* C:\Program Files\Citrix\XenToos
Registry keys HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xen* (XEN should not be deleted all the others) xenagent xenbus xenbus_monitor xendisk xenfilt xeniface xennet xenSvc xenvbd xenvif HKEY_LOCAL_MACHINE\SOFTWARE\Citrix
InstallAgent XenTools XenToolsInstaller XenToolsNetSettings HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\Wow6432Node\Citrix Xentools XenToolsInstaller Edit the following registry values to remove XENFILT:

HKLM\SYSTEM\CurrentControlSet\Control\Class{4d36e97d-e325-11ce-bfc1-08002be10318} (this GUID refers to System class) UpperFilters HKLM\SYSTEM\CurrentControlSet\Control\Class{4d36e96a-e325-11ce-bfc1-08002be10318} (this GUID refers to HDC class) UpperFilters Optional, this will be necessary if the re-installation doesn't work after the steps above were done. Use pstools to delete the keys detailed below c:\pstools>psexec.exe -i -s -d c:\windows\regedit.exe HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\XENBUS HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\XENVIF HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\XENBUS HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\XENVIF HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Xen* HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Enum\XENBUS HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Enum\XENVIF HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Xen* Optional, this will be necessary if the re-installation doesn't work after the steps above were done. Rebuild WMI: In a newer O.S. (Vista/2008 and newer), to try fixing a corrupt repository, you will run the following commands: winmgmt /backup %computername%_MM_DD_YEAR.WMI_backup winmgmt /verifyrepository winmgmt /salvagerepository winmgmt /resetrepository To fully rebuild the WMI Repository follow these steps: Disable and stop the winmgmt service Remove or rename C:\Windows\System32\wbem\repository Enable and start the winmgmt service Open a CMD prompt as Administrator Navigate to C:\Windows\System32\wbem
Run the following command: for /f %s in ('dir /b *.mof') do mofcomp %s Note: This will take a minute or so to complete. Now run the command: for /f %s in ('dir /b en-us*.mfl') do mofcomp en-us%s Shutdown the VM, then re-start VM and install "Citrix XenServer Windows Management Agent" again. Important Note: This step could be done after step 3, if that re-installation doesn't work, and the VM shows "I/O not optimized" and "Management Agent not installed", you can repeat the all process including step 4. If the second chance including step 4 doesn't work neither and the VM shows "I/O not optimized" and "Management Agent not installed", you can repeat the all process including step 5.

  1. Download and install citrix geust tools 9.3.1 from http://downloadns.citrix.com.edgesuite.net/17461/managementagentx64.msi and install it with full privilegies.

anchorman55555 avatar Apr 12 '23 10:04 anchorman55555

What has worked for me on newer VM's is to install Windows Server 2022. Then update Windows using Windows Update. Then install the XCP-NG Windows PV Drivers. This seems to get around whatever problem prevents it from installing. But if you go about installing other stuff first, then I have not yet figured a way to clean everything out and allow it to install--either it or the Citrix tools. Very frustrating, but as long as you remember the order when first installing a VM, you should be good with either one.

I do note that it is getting more difficult to find the link to the latest Citrix guest tools unless you are a paid subscriber.

bret-miller avatar Apr 12 '23 10:04 bret-miller

IIRC the XenServer training (it's a few years ago) said: Always install Updates first, then drivers. It might be intuitive to install the drivers first, but they might rely on newer system files.

nagilum99 avatar Apr 12 '23 12:04 nagilum99

http://downloadns.citrix.com.edgesuite.net/17461/managementagentx64.msi

anchorman55555 avatar Apr 12 '23 12:04 anchorman55555

Is there a good solution for this?Sent from my iPhoneOn Apr 12, 2023, at 6:53 AM, Bret Miller @.***> wrote:I do note that it is getting more difficult to find the link to the latest Citrix guest tools unless you are a paid subscriber.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

DSJ2 avatar May 04 '23 23:05 DSJ2

You don't need to have a paid subscription, but the drivers are behind a "registered accounts only"-wall. So yess, Signed non-Citrix drivers should be on the roadmap.

Though: I remember that ?Oliver? said that Citrix has modifications to the OSS drivers but did not publish them.

nagilum99 avatar May 04 '23 23:05 nagilum99

In english

what worked for me... perform steps 1,2 and 3 by anchorman55555 restart download drivers https://xenproject.org/downloads/windows-pv-drivers/windows-pv-drivers-9-series/windows-pv-drivers-9-0-0/ Download additional drivers from windows update Of the downloaded install first: xeniface > xennet > xenvbd > xenvif then last: xenbus if you're lucky it will ask you to reboot. And so you will have the i/o optimized and you will be able to migrate more, it will not show you IP. To do this, use the xen agent link provided above, do not try to install drivers and when you install the agent, the magic will be done.

To put it in context, I installed the XCP beta drivers and at first it worked fine. However, one day out of nowhere it has the emulated NIC and nothing works from the agent.

So I came to this thread, and I saw more or less how to solve it. It would be nice to see why windows 10 22H2 and Server 2022 lose the PV driver functionality. Greetings

eleyzam avatar May 16 '23 18:05 eleyzam

@eleyzam: You should try again in english - like as on almost every OSS project.

nagilum99 avatar May 16 '23 19:05 nagilum99

Hello again, doing tests There is another option that I saw as well, which is to remove the pv driver that is waiting for reboot in the device manager and then install the free pv drivers. It will ask like 3 or 4 times to reboot but in the end it will allow you to have the NIC PV. for the agent, the citrix shared above works.

it is not worth installing the xen driver from windows update

eleyzam avatar May 19 '23 17:05 eleyzam