EUCweb / BIS-F

Base Image Script Framework (BIS-F)
https://eucweb.com
GNU General Public License v3.0
96 stars 34 forks source link

SCCM agent sealing error #313

Open FrankLangbein opened 3 years ago

FrankLangbein commented 3 years ago

Describe the bug I see in the BISF logs that the CcmExec service cannot be stopped or killed during preparation of my vdisks.

To Reproduce Run BISF sealing with SMS Agent Host service installed.

Expected behavior SMS Agent Host service is stopped and CCM data is deleted.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context After some testing I found out that switching the stop and kill command and adding some delay solves the problem:

image

ulaaser commented 2 years ago

Hi Frank, have you achieved to use sccm in non-persistent VM. Im mean so that it is usable over prolonged time? My concern is the consistency of SCCM LOGs and Inventory like Software Metering etc.. specially after reboot of non persistent VM. Of course i already investigate the option deploying the SCCM Agent in the Master image and at the end remove/clean specific parts of the sccm agent in registry and files... but my question is, once the "production" VM starts and reboots what will be the behavior of SCCM Agent and the Server-Side... Thanks for any useful answer.

mkools commented 1 year ago

Bumping an old topic but I get the same error. I don't see any reason though to run a SCCM client on a non-persistent image, so I just created a SMS post ts task that removes the SCCM client once the TS is complete.

jeremyts commented 1 year ago

Nice info @FrankLangbein

I think this was broken under issue 289

Perhaps different operating systems and/or flavors of SCCM Agent have timing quirks, so it needs to be managed accordingly.

In my opinion a better way to handle these issues overall would be to attempt to stop the service first, but have a timeout on this action to avoid it getting stuck as per issue 289. Then you only need to terminate the process if the service doesn't stop cleanly. This way the SCCM personalization tasks executed by the Remove-CCMData function will be completed correctly.

Hope that helps others.

Cheers, Jeremy