Service Template Errors

Hi,

I am setting up a single tier service template that simply installs the symantec endpoint protection client onto a virtual machine at as a pre-install script running a batch file from a custom resource package I created. The application installs (with a reboot pending on the application) however I get a load of error messages telling me that the service has failed to install.

The details are as follows:

Custom Resource Package = setup.exe, scvmmcrt.cr, InstallSEP.cmd
Install.cmd is below:

@echo off
echo Installing Symantec Endpoint Protection...
start /wait Setup.exe
if errorlevel 1 (
    echo "SEP installation failed."
    exit 1
    goto EOF
)
echo Symantec Endpoint Protection installed.
:EOF

The application profile has this to run under the system account with 500sec timeout. I did try to change the advanced settings to enable logging but for some reason these settings will not apply and they always change back to default for some reason?

The errors I get are listed below:

Error (22042)
The service TESTSVC1 was not successfully deployed. Review the event log to determine the cause and corrective actions.

Recommended Action
The deployment can be restarted by retrying the job.


Error (22753)
The script command with properties: Type (PreInstall), Deployment Order (1) and Parent Type (ApplicationProfile), failed to complete successfully. Refer to the errors list for more information.

Recommended Action
If the script command's job restart action is set to restart, then the script will be re-executed.  Otherwise, the script command will be skipped when the job is restarted, in which case corrective action should be taken to mitigate the effects of the script command failure.


Error (22631)
The script command exit code 1 matched the failure policy setting "Match any value other than zero." Standard output log data: "Installing Symantec Endpoint Protection...
"SEP installation failed.""

Recommended Action
If the script command's job restart action is set to restart, then the script will be re-executed. Otherwise, the script command will be skipped when the job is restarted, in which case corrective action should be taken to mitigate the effects of the script command failure.


Error (20400)
1 parallel subtasks failed during execution.


Error (21952)
Application deployment failed for one or more tiers or application hosts in the service TESTSVC1. Check job logs to get more information on the failed operation.

Recommended Action
Check error messages and retry the operation if needed.

Any Ideas where I am going

February 23rd, 2015 10:15am

First of all, be sure that your script DOES NOT initiate a reboot.  And if a reboot is necessary, the script must output one of the three reboot exit codes.  And then SCVMM will capture that and handle the reboot - if SCVMM does not handle the reboot it will always consider it an error.

Second, it appears that your Symantec installer is outputting an exit of 1, not a clean exit of 0.  So SCVMM is capturing some error (it can even capture deeply nested errors - errors that you might never see as the application installers have swallowed them)

So you have to be sure that your script properly swallows these as well.

Without more info, these are my best comments from experience.

Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2015 11:16am

Thanks Brian this is very useful information... I did manage to get the advanced script command settings working so now I can write to output and error files. I know know that the script exits with a 1 but I have only echoed "SEP Installation Requires Reboot" to the standard output file. 

I configured the advanced script settings to "Always restart after the script has finished running" but still received an error. 

I am thinking that I may try to output one of the three reboot exit codes you mention in my script. What are the differences between the three exit codes? Any idea how I would get a batch file script to exit a specific code?

Thanks in advance,

February 24th, 2015 8:27am

Actually, I do have notes on all of this.  Except I am remote for a couple days.  And it has been a while since I did this, so I would need to look back.

There are three exit codes that need to be sent.  They can be sent from a batch file, but batch inherently only exits with 0 or 1, not a 3010, 3011, (and I can't recall the third).

I believe that I ended up using PowerShell to handle this as it was far easier.

You can take a look at what I did, since it is a service template, I can't hide anything ( I strayed from the blogs and guidance by the SCVMM team but made sure that I didn't do anything that they would be breaking later on):  http://www.citrix.com/go/xendesktop-for-the-private-cloud.html

On the right side of the page.

And there are a couple things I do that are not documented by the SCVMM team. ;-)

The other thing that I do is that my script (powershell or batch) always sends an explicit exit code.  I don't allow SCVMM to attempt to interpret a clean exit, my script determines it.

 

Free Windows Admin Tool Kit Click here and download it now
February 24th, 2015 9:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics