Update:
The question below was solved with the help of the accepted answer below. However, the actual cause of the problem was due to a bug. I have added another answer to this question below that contains the details of this bug as well as details on a hotfix solution that has been released.
Question:
At my organization we have a lab of computers that must be reimaged every week. We are currently doing this via SCCM 2007. At the moment this is done by creating a new mandatory advertisement each week for a working OSD task sequence (TS). However, I would like to do this by setting one advertisement on a recurring schedule.
In order for a TS to repeatedly run on a machine you must enable the advertisement option "Always rerun program" or the TS will only run the one time.
The problem I am running into is that when performing a reimage of the machine a new client gets installed and thus a new GUID is created. This means I must provide some automatic way to readd that new client GUID to the collection where the recurring TS is advertised. Of course since the client has a new GUID this means SCCM thinks the TS has yet to run on this machine and begins the reimage as soon as it is readded to the collection thus effectively putting the machine into an infinite rebuild loop.
I have considered simply building the client into the image so that it maintains the same GUID through the reimage but there are other issues with that approach.
Any suggestions on how to setup a recurring TS that will reimage a machine once a week?
Edit:
To clarify a few things I will explain the situation a little better:
The OSD Task Sequence I am trying to run will take about an hour and
a half to complete and this will occur around 3am. After the OS
deployment is done another TS will need to run in order to install
one last program that must be done through a separate TS due to certain
program constraints.Secondly, when I refer to the GUID above I am in fact referring to
the SMS GUID that gets assigned to newly installed ConfigMgr clients.
Of course there are other reasons a new SMS GUID would be created but
those aren't of any concern in this situation.
Solution Details:
With the suggestion from newmanth below I did the following to resolve this issue:
For the OSD Task Sequence and associated advertisement I set the
following settings:- Maximum allowed run time (minutes) : 90 (TS Properties -> Advanced)
- Program rerun behavior : Always rerun program (Advertisement Properties -> Schedule)
- Advertisement Schedule : 3am, recurs once per week
For the collection containing the computers in question I used the
following settings:Maintenance Window Duration : 3am - 4:35am, recurs once per week.
I also check the option, "This schedule applies only
to operating system deployment task sequences". This allows me to
run my second TS mentioned above outside the maintenance window but
prevents the rebuild recurring immediately after re-adding the
client to the collection.A maintenance window must be greater than or equal to the max run time of the TS or program plus the Advertised Programs Client Agent countdown duration (mine was set to 5 minutes).
Since my TS will have a max run time of 90 mins, I will have to set
my window to 95 mins.Collection Membership Update Schedule : 4:45am, recurs daily.
Rebuild is complete, maintenance window closed at 4:35am. I
now wait 10 mins for good measure and schedule a collection
membership update in order to re-add the newly installed client. I
could do this weekly on the same day as the rebuild but I do it
daily for other reasons.Depending on how your collection
adds new client members, you may also need to schedule your
discovery methods to run before this update happens. For instance if
your collection adds new client members based on an Active Directory
group then you will need to run the respective Active Directory
discovery methods first so that the newly created client record has
its corresponding Active Directory information populated. Otherwise
the new client record will not have any AD group info and it will not
get added to the collection.
With the settings above the rebuild process should go something like this:
- Maintenance Window opens at 3am.
- OSD Task Sequence starts at 3am.
- OSD Task Sequence ends roughly 1 hour and a half later (4:30am).
- Maintenance Window closes at 4:35am preventing an immediate repeat of the TS.
- Collection Membership updates at 4:45am re-adding the newly installed client.
- After the client policy retrieval the second TS mentioned above runs.
- Steps 1-6 should automatically repeat themselves the following week.
Answer
I think you might be able to get this to work by setting a once-per-week maintenance window on the collection in question, in conjunction with always re-running the advertisement. Make sure the window is just long enough to allow the advertisement to run once. This will prevent a subsequent run until the maintenance window hits again. Technet: http://technet.microsoft.com/en-us/library/bb632801.aspx
No comments:
Post a Comment