XenServer 7.1 "I/O not optimized" and "management agent not installed" error

XenServer 7.1 "I/O not optimized" and "management agent not installed" error

book

Article ID: CTX236718

calendar_today

Updated On:

Description

Upgrade xentools failed after upgrade xenserver from 6.2 to 7.1.1 with error "I/O not optimized" and "Management Agent not installed".
Driver installation conflicts in 7.1 CU1 "I/O not optimized" and "Management Agent not installed".

Driver conflict Xentool Diagnostic Tool (Xentool Bugtool, see Additional Resources) some errors logs that point me that there is an error, as an additional comment the machine was restarted many times after the driver installation:

programdata\Citrix Tools For Virtual Machines\<version>\XenGuestAgent-<date>.log

11/13/2018 1:11:00 PM : NETINFO Record Emulated
11/13/2018 1:11:00 PM : ID = {4D8F8582-71F4-45FB-BCEB-E291B1C05602}
11/13/2018 1:11:00 PM : NETINFO Record A68BE9F0D1F6
11/13/2018 1:11:00 PM : NETINFO StoreSavedNetworkSettingsToEmulatedDevices
11/13/2018 1:11:00 PM : BRANDING_errNoWMI:Citrix XenServer guest Agent cannotfix XenIface WMI interface

programdata\InstallAgent\<version>\InstallAgent.log

11/13/2018 1:09:25 PM: Setting 'InstallStatus': 'Installing'
11/13/2018 1:09:25 PM: Add to driverstore C:\Program Files\Citrix\XenTools\Drivers\xenvif\x64\xenvif.inf
11/13/2018 1:09:26 PM: Unable to update driver - code 80
11/13/2018 1:09:26 PM: OEMInf file already copied
11/13/2018 1:09:26 PM: Installing driver: 'xenvif.inf'
11/13/2018 1:09:27 PM: Driver installed successfully
11/13/2018 1:09:27 PM: Add to driverstore C:\Program Files\Citrix\XenTools\Drivers\xenvbd\x64\xenvbd.inf
11/13/2018 1:09:27 PM: Unable to update driver - code 80
11/13/2018 1:09:27 PM: OEMInf file already copied
11/13/2018 1:09:27 PM: Installing driver: 'xenvbd.inf'
11/13/2018 1:09:40 PM: Driver installed successfully
11/13/2018 1:09:40 PM: Add to driverstore C:\Program Files\Citrix\XenTools\Drivers\xeniface\x64\xeniface.inf
11/13/2018 1:09:40 PM: Unable to update driver - code 80
11/13/2018 1:09:40 PM: OEMInf file already copied
…
11/13/2018 1:09:41 PM: Checking service: 'xeniface'
11/13/2018 1:09:41 PM: Service 'xeniface' not running; Status: Stopped
11/13/2018 1:09:41 PM: Searching system for device: 'PCI\VEN_5853&DEV_C000&SUBSYS_C0005853&REV_01'; (strict search: 'False')
11/13/2018 1:09:41 PM: Found: 'PCI\VEN_5853&DEV_C000&SUBSYS_C0005853&REV_01  PCI\VEN_5853&DEV_C000&SUBSYS_C0005853  PCI\VEN_5853&DEV_C000&CC_088000  PCI\VEN_5853&DEV_C000&CC_0880'
11/13/2018 1:09:41 PM: Enumeration completed successfully
11/13/2018 1:09:41 PM: Checking if drivers are currently installing
11/13/2018 1:09:41 PM: Blocking for 300 seconds..
11/13/2018 1:09:41 PM: No drivers installing
11/13/2018 1:09:41 PM: Checking service: 'xeniface'
11/13/2018 1:09:41 PM: Service 'xeniface' not running; Status: Stopped
11/13/2018 1:09:41 PM: driver: xeniface does not work after enumerate, will try reinstall
11/13/2018 1:09:41 PM: Is 'VIF' needed?
11/13/2018 1:09:41 PM: Yes
11/13/2018 1:09:41 PM: Checking service: 'xenvif'
11/13/2018 1:09:41 PM: Service 'xenvif' not running; Status: Stopped
11/13/2018 1:09:41 PM: driver: xenvif does not work after enumerate, will try reinstall
11/13/2018 1:09:41 PM: Checking service: 'xenvbd'
11/13/2018 1:09:41 PM: Service 'xenvbd' not running; Status: Stopped
11/13/2018 1:09:41 PM: driver: xenvbd does not work after enumerate, will try reinstall
11/13/2018 1:09:41 PM: ensure service 'xenbus' is boot start
11/13/2018 1:09:41 PM: Changing Start Mode of service: 'xenbus'
11/13/2018 1:09:41 PM: Start Mode successfully changed to: 'Boot'
11/13/2018 1:09:41 PM: ensure service 'xendisk' is boot start
11/13/2018 1:09:41 PM: Changing Start Mode of service: 'xendisk'
11/13/2018 1:09:41 PM: Start Mode successfully changed to: 'Boot'
11/13/2018 1:09:41 PM: ensure service 'xenvbd' is boot start
11/13/2018 1:09:41 PM: Changing Start Mode of service: 'xenvbd'
11/13/2018 1:09:41 PM: Start Mode successfully changed to: 'Boot'
11/13/2018 1:09:41 PM: Setting 'InstallStatus': 'NeedsReboot'

Resolution

There is conflict when try to install the new "Citrix XenServer Windows Management Agent" though the installation seems to be fine, internally it failed. The solution is to uninstall "Citrix XenServer Windows Management Agent" then clean-up all the installation, to do this we have to verify that all the configurations in "Citrix XenServer Windows Management Agent" are deleted.

Follow the step below, take into consideration that some steps are optional:
  1. Take a snapshot of the VM for backing up everything before any change, just as a safety measure.  
  2. From "Control Panel \ Program and Features" (run Appwiz.cpl) uninstall "Citrix XenServer Windows Management Agent", after reboot verify that it is uninstalled.
  3. 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
  4. 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
  5. 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*
  6. 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
  7. 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.

Problem Cause

WMI issues.
Conflict with previous installations when try to install "Citrix XenServer Windows Management Agent".

Issue/Introduction

This article can be applied when you have "I/O not optimized" and "Management Agent not installed" messages in the Virtualization State in the VM. The optional parts are required if you have a WMI issue. but if your problem is only an installation conflict with "Citrix XenServer Windows Management Agent", you can avoid using those optional steps. The article could work on both scenarios.

Additional Information

https://www.citrix.com/blogs/2015/10/12/introducing-the-xentools-diagnostic-tool-aka-xentools-bugtool/