Video Screencast Help

Restarting a Computer as part of a Job

Created: 03 Dec 2013 • Updated: 09 Dec 2013 | 4 comments
This issue has been solved. See solution.


Im new to Symantec Management Platform and Deployment Solution and Im currently putting together an imaging solution to replace Ghost Solution Suite.

Im running DS 7.5 with the expectation that most of the deployment jobs we will run will be multicast. At a high level all I really want to know is how to sucessfully restart a computer as part of a job AND have the console not fail the task or any subsequent tasks.

Here my deployment job (currently using the default sysprep answer file)

1) Boot to Automation
2) Deploy Windows 7 x64 image using ghost
3) Use DISM in a script to source and inject correct drivers for the computer model
4) Copy various files to mounted image
5) Boot to production
6) Apply an "Always on" power scheme
7) Script to copy various installers, set registry keys and various other windows customisations
8) Apply a system configuration to set the computer name as the computer serial number
9) Restart the computer
10) Final Shutdown

Essentially all Im trying to achive to is have the job sucessfully restart the computer after step 7. I need this to complete as Im setting the RunOnceEx registry key run the application installers I have copied in this step.

I have tried

a) Completely baffeled myslef as to why step 8 didnt restart the computer, before eventually coming to the conclusion that as the computer is known to DS and there is inventory information on a machine, DS was appliyng the correct computer name to it during step 5 and mini setup.

b) Setup a simple batch script using "shutdown -r", but found that this creates a failure when I run the task on multiple computer models

c) Using the "Power Control" task, but find this sometimes does not restart the machine and when it does can still fail the job.

Each of the steps above will work when I run a single task on single machine, but have inconistencies when run as part of a job.

Can anyone help please?



Operating Systems:

Comments 4 CommentsJump to latest comment

awslyall's picture

I dont wish to lead anyone here....but I think this is a timing issue.

I took the same set of computers and create another job out of tasks 6-10 from my post above and the job ran flawlessly.

Am Im running the original job on multiple machines of different specification they are completing task 5 at different points in time, which is throwing the rest of the tasks off??

Thomas Baird's picture

Did you include the "force" option in your power-control task?  it can take time for it to run.  Your shutdown command can do the same thing BTW.  Make it a command script task and use the force switch.  It'll force-close any running apps.

Please note however that you may want to check and see what is happening in the agent logs at the same time the shutdown tries to execute.  If you have a policy firing at the same time, they may be bumping into each other.  In the logs, you can look at PID's or task / policy GUIDs to see what is starting and finishing and sometimes I've seen things overlap.  (should they overlap? not to "us" and we have a request to modify that, but the work required is VERY steep, and conflicts with other requests from customers who WANT them to overlap).

At that point in your job/task, the shutdown/power-control should work unless it's being blocked.

Thomas Baird
Enthusiast for making things better!

awslyall's picture

Hi Thomas

To confirm my final use case for DS will be to multicast sets of training lab computers two or three times a week. The majority of the time the hardware in the labs will be identical, but there wil be occasional instances when the have different types of machines.

Having said that I have stripped it back to a single machine to try help identify the cause(s)

On a single computer if I run my complete job with steps 1-10 the job fails "during" the restart task. The computer itself restarts, but when it is installing the applications I have set to be installed during step 7 the restart job returns a failure. For clarity the installation of these applications takes about 4 minutes, so its not a huge amount of time. Any settings I can mess around with here?

Unfortuntely, Ill have to admit Im not sure what logs you mean, are they the ones at c:\programdata\symantec on the Win7X64 client.

Im also trying to tackle this from another perspective, by using a custom sysprep answerfile to set a random computer name. The computer will then restart at task 8 and I can eliminate the need for the power control tasks in 9 & 10. Initial tests on a single computer have worked, Im currently testing on multiple machines.
This does lead to another question, where is the default Win7x64 answer file? I can find the x86 one, but not the x64 one.



awslyall's picture

Just an FYi that the custom answer file worked and the computers are now all reporting a successful job completion and rebooting at the end of step 8.