Error occurred during initialization of VM


(Patrick Delaney) #1

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.


(G Ann Campbell) #2

Hi,

This isn’t my area, but off-hand it looks like it’s a problem with the size of your VM:

Ann


(Patrick Delaney) #3

Are you suggesting the size of the JavaVM The machine I am getting the error on is a physical machine.


(Colin Mueller) #4

Patrick,

When you’re running the build, is there at least 1GB of memory free on the desktop build machine?

And for the heck of it, can you report back on what version of Java (the Java Runtime Environment specifically) is running on the build machine?

Colin


(G Ann Campbell) #5

Hmm… I mis-read.

Still, this does indicate that something can’t grab enough memory.


(Patrick Delaney) #6

The desktop has 16gb of Ram when its running a build it still only using 6gb so that leaves a little less than 10 gb. I have Javea1.8.0_181 Java™ SE Runtime.

Oddly enough this time the build ran ok, but I was remote desktop into the PC.

I ran it a 2nd time but logged off the PC (build machine) and this time it OK… Maybe it was a setup error. I’ll keep an eye on it.