I have 2 build machines, one is a server VM the other is a desktop. The server build machine is working fine. But when I trigger a build, and point it to the Desktop build machine, I am getting the following error during the Complete the SonarQube analysis:
Starting task: Complete the SonarQube analysis
Executing the powershell script: E:\Agent\tasks\SonarQubeScannerMsBuildEnd\3.1.0\SonarQubePostTest.ps1
SonarQube Scanner for MSBuild 4.0
Default properties file was found at E:\Agent\tasks\SonarQubeScannerMsBuildBegin\3.1.0\SonarQubeScannerMsBuild\SonarQube.Analysis.xml
Loading analysis properties from E:\Agent\tasks\SonarQubeScannerMsBuildBegin\3.1.0\SonarQubeScannerMsBuild\SonarQube.Analysis.xml
Post-processing started.
07:47:30.005 Fetching code coverage report information from TFS...
07:47:30.01 Attempting to locate a test results (.trx) file...
07:47:30.019 Looking for TRX files in: E:\Agent\_work\6\TestResults
07:47:30.019 Located a test results file: E:\Agent\_work\6\TestResults\TFSBuild1_SVCACCT_2UA4431HMS 2018-08-24 07_47_24.trx
SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
Calling the SonarQube Scanner...
Error occurred during initialization of VM
Could not reserve enough space for 1048576KB object heap
The SonarQube Scanner did not complete successfully
07:47:30.458 Creating a summary markdown file...
07:47:30.462 Post-processing failed. Exit code: 1
Unexpected exit code received from batch file: 1
Waiting on the SonarQube server to finish processing in order to determine the quality gate status.
Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407
Finishing task: SonarQubeScannerMsBuildEnd
Task SonarQubeScannerMsBuildEnd failed. This caused the job to fail. Look at the logs for the task for more details.