GP Agent cannot connect to GW due to the error "The virtual adapter was not set up correctly due to a delay"
Symptom
- The GP agent is not able to connect to a gateway and the logs show the error "The virtual adapter was not set up correctly due to a delay. GlobalProtect will try again soon. If the issue persists, please restart your system."
- Certain GP logs are not correctly populated like systeminfo.log, serviceinfo.log, or nicinfo.log.
Environment
- OS Windows 10 and Windows 11.
- Any GP agent version.
Cause
- For some reason, WMI(Windows Management Instrumentation) is not working properly.
- Since GP Agent relies on WMI to run some tasks, the WMI problem impacts the normal working of GP agent.
Resolution
- Generate GP logs.
-
Confirm the GP agent is correctly installed, open the logs setupapi.dev.log, and check the driver installation:
The following output indicated the GP agent is correctly installed:>>> [Install network driver - PanGpd] --- Ommitted putput ---- dvi: Install finished for ROOT\PANGPD\0000 --- Ommitted putput ---- <<< [Exit status: SUCCESS]If the Agent is not correctly installed, uninstall and install again following the instructions in the next KB Article.
https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000Cm5eCAC
- Check the log serviceinfo.log, that log gets information directly using WMI. If the log shows the following output or similar, there is a problem with the WMI:
ERROR: Description = Invalid namespaceYou can also check other logs to confirm like ProcessInfo.log or NicConfig.log.
-
Open cmd as administrator and run the following command to check the WMI:
wmimgmt.mscThe next screen will appear:
From there, right-click on WMI Control (local) > properties, and a successful connection should be seen, if it is not able to connect the WMI, this confirms the WMI problem.
Example of a successful connection:
- In the CMD, run the following command to confirm if the repository is OK:
winmgmt /verifyrepositoryIf the output is different than "WMI Repository is consistent", there is a problem with WMI repository, the following commands can help to fix the repository issue:
winmgmt /salvagerepository winmgmt /resetrepository - If until now, the issue persists, run the following script using the CMD (this can take some minutes):
@echo off sc config winmgmt start= disabled net stop winmgmt /y %systemdrive% cd %windir%\system32\wbem for /f %s in ('dir /b *.dll') do regsvr32 /s %s wmiprvse /regserver winmgmt /regserver sc config winmgmt start= auto net start winmgmt for /f %s in ('dir /s /b *.mof *.mfl') do mofcomp %s -
Once the script finishes, check again the WMI status (Step 4), if the issue persists, contact Microsoft support to get help on how to fix the WMI problem.
Additional Information
- Be sure there is no third-party software blocking WMI or communication between the GP agent and WMI.
-
Bear in mind that there are many ways to fix a WMI problem and Microsoft forums show different ways to fix the problem, below is one example:
https://answers.microsoft.com/en-us/windows/forum/all/cannot-access-the-windows-management/75284a7d-8b8a-491b-afab-15fe465b4b53 - WMI is a Windows tool and the above steps are provided for a quick reference and possible fix, however, the customer can contact Microsoft Support Service to analyze the issue and request another possible or better way to fix the WMI problem.