When deploying Windows Server 2008 using an SCCM 2007 OSD Task Sequence, additional disks may show as offline when the Task Sequence completes

When deploying Windows Server 2008 using an SCCM 2007 OSD Task Sequence, additional disks may show as offline when the Task Sequence completes

  • Comments 2
  • Likes

image

Note: There is an updated version of this article over at the Configuration Manager OSD Support Team Blog. For the latest version, please visit the below article:

When deploying Windows Server 2008 using a Configuration Manager OSD Task Sequence, additional disks may show as offline when the Task Sequence completes

=====

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

Disk is offline due to a policy set by an administrator

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 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 mount 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 SCCM 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 SCCM 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 SCCM 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 SCCM 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.

Frank Rojas | System Center Support Escalation Engineer

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • there is an infiitely easier way to get your disk running. Right click on the disk icon in Disk Management then click "ONLINE"

  • You are a Genius Laurie