Article ID: 2018787 - Last Review: July 8, 2010 - Revision: 6.0

ConfigMgr 2007: When deploying Windows Server 2008 using an Configuration Manager 2007 OSD Task Sequence, additional disks may show as offline when the TS completes

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Expand all | Collapse all

Symptoms

When deploying Windows Server 2008 or Windows Server R2 on a server that contains disks that are not local (such as SAN or SAS disks) using an Configuration Manager 2007 OSD Task Sequence, when the Task Sequence completes, the additional disks may not come online and may show as offline. Specifically in the Disk Management, the additional disks will show offline with the message:

Disk is offline due to a policy set by an administrator

Cause

This issue usually happens with the Enterprise and Datacenter editions of Windows Server 2008 and Windows Server 2008 R2, but may also happen in the Standard edition. In the Enterprise and Datacenter editions of Windows Server Server 2008 and Windows Server 2008 R2, the default SAN policy is to set the disks to offline. Please see the following for more information:

You may see "Media is Write Protected" Error or VDS error 80070013 after bringing SAN disk online via Diskpart in Windows Server 2008
http://support.microsoft.com/kb/971436/

VDS_SAN_POLICY Enumeration
http://msdn.microsoft.com/en-us/library/bb525577(VS.85).aspx

Configure the SAN policy
http://technet.microsoft.com/en-us/library/cc749466(WS.10).aspx

SanPolicyType
http://technet.microsoft.com/en-us/library/cc765965(WS.10).aspx

Note: The above link regarding SanPolicyType specifies that the default value for the SAN Policy is 1 and to mounts all available storage devices. However, in the case of the Enterprise and Datacenter editions of Windows Server 2008 and Windows Server 2008 R2, the actual default policy is 2 and to mount all storage devices except those on a shared bus. This can be confirmed by using the System Image Manager (SIM) of the WAIK. When building an unattend.xml file for either the Enterprise or Datacenter editions of Windows Server 2008 or Windows Server 2008 R2 using the SIM, when the SanPolicyType is added under the Microsoft-Windows-PartitionManager section, the policy defaults to 2. In all other Windows OSes, the policy defaults to 1.

Resolution

To resolve the issue, the steps from KB971436 need to be added in a Task Sequence. Additionally, the section described in the TechNet article regarding SanPolicyType may need to be added to the unattend.xml file.

1) Open Notepad

2) In Notepad, paste the following lines:

select disk <disk#>
online disk
attribute disk clear readonly

Replace <disk#> with the disk number of the SAN/SAS disk (without the brackets <>).

3) Save the Notepad file with the name

sanpolicy.txt

4) In the Configuration Manager 2007 Admin Console, under the "Computer Management" --> "Software Distribution" --> "Packages" node, create a package that contains the sanpolicy.txt file created in Steps 2 & 3. A Program does not need to be created for the Package. After creating the Package, make sure to copy the Package to the Distribution Points.

5) In the Configuration Manager 2007 Admin Console, under the "Computer Management" --> "Operating System Deployment" --> "Task Sequences" node, right click on the affected Task Sequence and choose "Properties".

6) Immediately after the "Format and Partition Disk" tasks, add a "Run Command Line" task.

7) In the newly created "Run Command Line" task:

a) Check the "Package:" option and then click on the "Browse..." button and select the Package created in Step 4.

b) In the "Name:" box, type in:

Set SAN Policy

c) In the "Command line:" box, enter in

diskpart /s sanpolicy.txt

8) Click on the "Apply" button to save the Task Sequence.

If after following the above steps the disk still appears as offline and does not come on online automatically, then a custom unattend.xml file needs to be added to change the default SAN policy:

9) Open Notepad

10) Below, choose the appropriate architecture of the Windows OS being deployed, copy the lines below the architecture, and paste them into the Notepad:



x86
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="offlineServicing">
        <component name="Microsoft-Windows-PartitionManager" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <SanPolicy>1</SanPolicy>
        </component>
    </settings>
</unattend>


x64
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="offlineServicing">
        <component name="Microsoft-Windows-PartitionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <SanPolicy>1</SanPolicy>
        </component>
    </settings>
</unattend>

11) Save the Notepad file with the name

unattend.xml

When saving the file, make sure that "All Files (*.*)" is selected next to "Save as type:" so that it does not append the .txt extension to the file.

12) In the Configuration Manager 2007 Admin console, under the "Computer Management" --> "Software Distribution" --> "Packages" node, create a new package that contains the unattend.xml file created in Steps 10 & 11. A Program does not need to be created for the Package. After creating the Package, make sure to copy the Package to the Distribution Points.

13) In the Configuration Manager 2007 Admin Console, under the "Computer Management" --> "Operating System Deployment" --> "Task Sequences" node, right click on the affected Task Sequence and choose "Properties".

14) In the "Apply Operating System" task, check the option "Use an unattended or sysprep answer file for a custom installation". Next to the "Package:" field, click on the "Browse..." button and select the package created in Step 12. Next to the field "Filename:", enter in

unattend.xml

15) Click on the "Apply" button to save the Task Sequence.

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use (http://go.microsoft.com/fwlink/?LinkId=151500) for other considerations.

APPLIES TO
  • Microsoft System Center Configuration Manager 2007
  • Microsoft System Center Configuration Manager 2007 R2
  • Microsoft System Center Configuration Manager 2007 Service Pack 1
  • Microsoft System Center Configuration Manager 2007 Service Pack 2
Keywords: 
KB2018787