xcp-ng / xcp

Entry point for issues and wiki. Also contains some scripts and sources.
https://xcp-ng.org
1.27k stars 74 forks source link

Windows PV Drivers Won't Install on Windows Server 2022 #547

Open bret-miller opened 2 years ago

bret-miller commented 2 years ago

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.

xTITUSMAXIMUSX commented 2 years ago

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.

bret-miller commented 2 years ago

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 commented 2 years ago

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.

sonoracomm commented 2 years ago

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

olivierlambert commented 2 years ago

Please try the Citrix drivers instead.

sonoracomm commented 2 years ago

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

anchorman55555 commented 1 year ago

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.
bret-miller commented 1 year ago

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.

nagilum99 commented 1 year ago

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.

anchorman55555 commented 1 year ago

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

DSJ2 commented 1 year ago

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: @.***>

nagilum99 commented 1 year ago

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.

eleyzam commented 1 year ago

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

nagilum99 commented 1 year ago

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

eleyzam commented 1 year ago

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

lightingman117 commented 4 months ago

All the links above are dead.

Any ideas on how to install Citrix agent?

New SVR-2022 VM says management agent not detected (in XO).

olivierlambert commented 4 months ago

It's even easier now: https://www.xenserver.com/downloads

Eg: https://downloads.xenserver.com/vm-tools-windows/9.3.2/managementagentx64.msi

bret-miller commented 4 months ago

What I have found that works on Windows VM's is to install Windows, update Windows, then install the Windows PV agent and drivers NOT allowing the drivers to be managed in Windows Update.

Is there a reason we should prefer installing the Citrix drivers over the XCP-NG drivers?

lightingman117 commented 4 months ago

What I have found that works on Windows VM's is to install Windows, update Windows, then install the Windows PV agent and drivers NOT allowing the drivers to be managed in Windows Update.

Good plan, for a (new) VM I do the same.

Is there a reason we should prefer installing the Citrix drivers over the XCP-NG drivers?

There is documentation for that. https://xcp-ng.org/docs/guests.html#windows

https://github.com/xcp-ng/xcp/wiki/Windows-guest-tools-community-testing

Second link shows testing for various releases.

Given the newer age of server 22 and win11 I wanted to try out the citrix deivers on some VMs.

I haven't had any issues using the XCP-NG guest tools, but they are a bit long in the tooth at this point.