Поделиться через


WinPE: Storage Area Network (SAN) Policy

Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2

Storage area network (SAN) functionality enables a computer to mount disks and other storage devices automatically from other computers. By configuring the SAN policy on a Windows Preinstallation Environment (Windows PE) image, you can control whether or not disks are automatically mounted and which disks can be mounted. You can also disable the policy to automatically mount disks.

Configuring the SAN policy on a Windows PE image

For Windows PE images that are available in the Windows Assessment and Deployment Kit (Windows ADK), the default SAN policy is to mount available disks automatically. But if the SAN environment has many available disks, automatically mounting them might reduce the performance of Windows PE. The container ID determines the external and internal disk status. If the device container ID of a disk is the same as the root container ID, the disk is internal. Otherwise, it's an external disk. You can use the Setsanpolicy.cmd file in the Windows PE tools path to configure the SAN policy on a Windows PE image.

To configure the SAN policy on a Windows PE image

  1. Mount the Windows PE image to an available mount point. For example:

    Dism /mount-image /imagefile:C:\winpe_x86\ISO\sources\boot.wim /index:<image_index> /mountdir:C:\winpe_x86\mount
    

    where <image_index> is the number of the selected image in the .wim file.

  2. Run the setsanpolicy command. For example:

    Setsanpolicy.cmd <image_path><policy_number>
    

    where <image_path> is the path of a mounted Windows PE image, and <policy_number> is the SAN policy number.

    These values are valid <policy_number> values:

SAN policy number Description

1

Mounts all available storage devices.

This is the default value.

2

Mounts all storage devices except those on a shared bus.

3

Doesn't mount storage devices.

4

New for Windows 8. Makes internal disks offline.

Note
All external disks and the boot disk are online.

This example shows how to configure the SAN policy on a Windows PE image to mount all disks except those disks on a shared bus: Setsanpolicy C:\winpe_x86\mount <2> where *\<2\>* is the SAN policy number that mounts all storage device except those on a shared bus.
  1. Unmount the image and commit the changes. For example:

    Dism /unmount-image /mountdir:C:\winpe_x86\mount /commit
    

Configuring the SAN Policy on a Windows Image

You can change the default SAN policy of a Windows image by using Windows System Image Manager (Windows SIM) to customize the Microsoft-Windows-PartitionManager component. You use the SanPolicy setting to configure the Windows image during an unattended installation.

To configure the SAN policy by using an answer file

  1. On your technician computer, open Windows System Image Manager (Windows SIM). Click Start, type Windows System Image Manager, and then select Windows System Image Manager.

  2. Create a new answer file, or update an existing answer file. For more information, see Create or Open an Answer File and Best Practices for Authoring Answer Files.

  3. On the Insert menu, click RunSynchronous.

  4. Select the configuration pass where you want to install the command. This can be the auditUser or oobeSystem configuration pass.

Note

Don't use the RunSynchronousNetsh advfirewall command during the specialize configuration pass.

The **Create Synchronous Command** dialog box appears.
  1. Enter the Netsh advfirewall firewall commands to add them to the answer file, and then click OK.

    For more information, see the Network Shell (Netsh) Technical Reference. You can convert Netsh commands to Windows PowerShell® commands. For more information, see the Netshell to Powershell Conversion Guide.

  2. In the SynchronousCommand Properties pane, in the Settings section next to Description, enter a description like Enable Windows Messenger.

See Also

Tasks

WinPE: Mount and Customize
WinPE Network Drivers: Initializing and adding drivers

Reference

DISM Image Management Command-Line Options

Other Resources

WinPE for Windows 8: Windows PE 5.0
Configure Network Settings in an Unattended Installation
Windows Deployment Options