Inside ConfigMgr 07 Operating System Deployment

  • Joining a Domain: Epilogue

    Fault Tolerance with Join Domain or Workgroup 

    Previously I mentioned that the Apply Network Settings step simply writes the domain join information to the Windows Setup answer file, and Windows Setup handles the actual domain join.  As a result, the Task Sequence is unaware of the domain join status and will continue execution after Windows Setup completes, even if the domain join fails.

    If you would like to join a domain as part of Windows Setup, but need to ensure that the machine is domain joined before proceeding with subsequent steps in the task sequence, you can simply add a Join Domain or Workgroup step to your Task Sequence, right after the Setup Windows and ConfigMgr step.  If the domain join succeeded during Windows Setup, then the Join Domain or Workgroup step will simply verify this and return success.  If the domain join failed, then Join Domain or Workgroup will attempt to join the domain, and the Task Sequence will halt (and report a meaningful error code) if this fails.

    If you decide to try this, you'll want to read my previous post for details about copying the network membership settings captured by the Capture Network Settings step into the Task Sequence variables used by Join Domain or Workgroup.

    Your Task Sequence would end up looking something like this:

    • Capture Network Settings
    • Run Command Line: CopyDomainInfo.vbs (see below)
    • ...
    • Apply Network Settings
    • ...
    • Setup Windows and ConfigMgr
    • Join Domain or Workgroup
    • ...

    CopyDomainInfo.vbs

    ' Create environment
    SET env = CreateObject("Microsoft.SMS.TSEnvironment")

    ' Copy captured settings to Join Domain or Workgroup variables
    env("OSDJoinDomainName") = env("OSDDomainName")
    env("OSDJoinDomainOUName") = env("OSDDomainOUName")

  • Joining a Domain, Part 2

    Capture Network Settings and Apply Network Settings are designed to work together to migrate network membership (and other network configuration info) from the old operating system to the new operating system.  For network membership, these actions share the following Task Sequence variables:

    • OSDJoinType (0 = domain, 1 = workgroup)
    • OSDDomainOUName
    • OSDDomainName
    • OSDWorkgroupName

    These variables are set by Capture Network Settings and consumed by Apply Network Settings.

    In the previous blog post, I discussed another way to join a domain during an operating system deployment, the Join Domain or Workgroup step.  This step uses a different set of variables (the join type, workgroup or domain, is passed on the command line):

    • OSDJoinDomainName
    • OSDJoinDomainOUName
    • OSDJoinWorkgroupName

    Consequently, Join Domain or Workgroup will not work directly with Capture Network Settings to migrate domain membership.  However, it's easy to modify your task sequence to make these two steps work together.

    The following script does two things:

    1. Copy network membership captured by Capture Network Settings to variables used by Join Domain or Workgroup
    2. Tell Apply Network Settings to join WORKGROUP.  If you don't need to migrate TCP/IP, DNS, or WINS or other adapter-specific settings, you can remove this step altogether.

    The script should be inserted as a Run Command Line step, after the Capture Network Settings step and before the Join Domain or Workgroup step you inserted after the Setup Windows and ConfigMgr step. 

    You'll need to make sure you provide credentials in the Join Domain or Workgroup step for an account which has domain join permissions.  In fact, you'll need to do this regardless of which method you use to join the domain.  If you choose to migrate network membership using the Apply Network Settings step, then you'll need to provide domain join credentials in that step.


    NetMigrate.vbs
    ==============

    ' Create environment
    SET env = CreateObject("Microsoft.SMS.TSEnvironment")

    ' Copy captured settings to Join Domain or Workgroup variables
    env("OSDJoinDomainName") = env("OSDDomainName")
    env("OSDJoinDomainOUName") = env("OSDDomainOUName")

    ' Tell Configure Network Settings to join WORKGROUP
    env("OSDJoinType") = "1"
    env("OSDWorkgroupName") = "WORKGROUP"

  • Joining a domain during an OS deployment

    There are two ways to join a domain as part of an OS Deployment:

    1. Using the Apply Network Settings step in Windows PE
    2. Using the Join Domain or Workgroup step in the new operating system

    Apply Network Settings
    Apply Network Settings simply writes the required information to the Windows answer file (sysprep.inf, unattend.txt, or unattend.xml) and Windows Setup does the actual domain join in the Setup Windows and ConfigMgr step. 

    If Windows Setup fails to join the domain, it does not report an error back to the caller.  However, it logs the attempt to join the domain to:

    •  Vista:
      • c:\windows\panther\unattendGC\setuperr.log (errors only)
      • c:\windows\panther\unattendGC\setupact.log (detailed logging for all unttend generic components)
    •  Pre-Vista:
      • c:\windows\setuperr.log (errors only)
      • c:\windows\debug\netsetup.log (detailed logging of join attempt)

    Consequently, if the domain join fails, the Task Sequence is not aware that something went wrong and continues to execute without reporting an error.  This has been the source of some confusion.  If the Apply Network Settings step succeeds, this simply means that the settings were successfully written to the Windows answer file.  It is still possible for the domain join to fail during Windows setup.

    Since the domain join is performed by Windows Setup, the machine will be joined prior to resuming the Task Sequence in the new operating system.  If your infrastructure requires domain membership to access network resources, then this is likely the preferred method.

    Apply Network Settings is designed to work seamlessly with Capture Network Settings to migrate domain membership from the old operating system to the new operating system.


    Join Domain or Workgroup
    Since Join Domain or Workgroup runs in the new operating system, after the Setup Windows and ConfigMgr step, the machine is not domain-joined until this step runs.  If your infrastructure requires domain membership to access network resources, then this method is likely not appropriate. 

    Join Domain or Workgroup actually attempts to do the join itself.  If the join attempt fails, then the Join Domain or Workgroup step will fail and report status to the Task Sequence Manager.

    Join Domain or Workgroup is not designed to work with Capture Network Settings by default, so you'll have to add a custom step if you want to use the two together.  In my next blog post, I'll explain how to customize your task sequence to use Capture Network Settings and Join Domain or Workgroup to migrate domain membership from the old operating system to the new operating system.

  • What is OSDDiskpartBiosCompatibilityMode?

    Prior to Vista, the default alignment for partitions was cylinder alignment for MBR disks and sector alignment for GPT disks.  With Vista (and Windows PE 2.0), the default partition alignment was changed to 1 MB.  This can result in a 2x performance enhancement, since disk sectors are aligned with the cache line size.  Unfortunately, this may cause some systems to blue screen if the disk was partitioned in Windows PE 2.0 and pre-Vista operating system is installed to it.  The text-mode portion of Setup will complete successfully, but the system will blue screen when it reboots into GUI-mode Setup.  You may also see a blue screen after deploying an image of a sysprepped pre-Vista operating system.  See KB articles 931760 and 931761 for more information.

    In order to help customers who experience this issue, we have added a Task Sequence variable, OSDDiskpartBiosCompatibilityMode, to the Partition and Format Disk step.  This variable is not exposed in the Task Sequence Editor, so you have to set it using a machine or collection variable, or explicitly in a Set Task Sequence Variable step, prior to any Format and Partition Disk steps.  If this variable is set to "TRUE", then the Format and Partition Disk step will automatically make the changes to the Windows PE registry described in KB articles 931760 and 931761 prior to partitioning the disk.

    We only recommend using this variable if you have hardware which experiences this problem, since you will miss out on the disk performance enhancements.  If you are applying Windows Vista, then you should never need to use this option.

  • Introduction

    The purpose of this blog is to provide an inside look at System Center Configuration Manager 2007 (ConfigMgr 07) Operating System Deployment (OSD).  OSD began as a Feature Pack for Systems Management Server 2003 (SMS 2003), and has been promoted to full feature status in ConfigMgr 07.  In the following blog posts, I'll try to provide an in-depth technical look at many of the various components which comprise OSD.  I plan to start off by delving into a few of the OSD components with which I've been most directly involved, and see where it goes from there.  If there are specific OSD-related topics you'd like to see covered, please feel free to leave a comment and I'll see what I can do.

    About the author

    My name is Victor, and I've been a developer throughout the development cycle for ConfigMgr 07, working exclusively on OSD.  I joined Microsoft just before the release of the OSD Feature Pack for SMS 2003.

More Posts « Previous page

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker