Adding Windows OS Images

This chapter contains the following sections:

Windows OS Provisioning through vMedia


Note


Starting with Cisco UCS Director 6.9(2.0), you can perform Windows Server 2022 OS deployment on bare metal servers.


The Cisco UCS Director allows Windows OS deployment through the automation of vMedia, enabling you to store ISO files on the Bare Metal Agent. During the execution of a Windows OS provisioning workflow, the vMedia is connected to the CD/DVD drive of Dell, HP, and UCSM bare metal servers using the ISO file, facilitating the Windows OS deployment.

Some prerequisites must be met before executing Windows OS provisioning workflows. For more information, see Provisioning OS Images through Orchestration Workflow Tasks.

Windows Operating Systems Supported for Cisco UCS Director Bare Metal Agent

Cisco UCS Director Bare Metal Agent (Bare Metal Agent) supports the following Windows operating system (OS) images and the automated creation of their required answer files:

  • Windows Server 2008 R2 x64

  • Windows Server 2012 x64

  • Windows Server 2012 R2 x64

  • Windows Server 2016 x64

  • Windows Server 2019 x64

  • Windows Server 2022 x64

  • Windows Server 2025 x64

You can set up all OS images in Bare Metal Agent. You can use the same answer file for both local boot and SAN boot.

The procedure for setting up a Windows OS image depend upon the operating system. Make sure you use the appropriate procedure for the OS image that you are setting up.


Note


After adding Bare Metal Agent to Cisco UCS Director and running inventory, Cisco UCS Director shows as if Windows images are added by default. But no Windows images are added. Install Windows images manually.


Guidelines and Limitations for Windows Operating System Images

Consider the following guidelines and limitations when you set up Windows Server OS images for provisioning:

Follow a Strict Naming Convention

You must follow a strict naming convention when you configure the files for Windows OS images. The paths and file names are case sensitive.


Note


Mistakes in naming will require you to modify the names throughout the Bare Metal Agent data infrastructure.


Ensure That File Names, Drive Letters, and Other Information Match in All Files

If you use the automatically generated answer file, Bare Metal Agent ensures that the file names, drive letters and other information match.

However, if you manually edit the answer file, you must ensure that the drive letter in the WinPE.wim matches the drive letter provided in the answer file. With this configuration you are defining WinPE.wim such that it installs Windows from a particular location by using an answer file setup option. The static names, paths, IP addresses, drive letters, answer file name, and user name credentials must be correct.

File and folder names are case sensitive: WinPE.wim names must exactly match entries in the Boot Configuration Data (BCD) store.

Use Single Path Workflow for SAN Boot


Warning


Because the Windows installation does not support multi-path SAN boot, you must use the single path workflow to achieve SAN boot.


Windows Server 2008 R2 x64 Operating System Images

The Windows Server 2008 R2 x64 OS (Windows 2008 OS) supports PXE boot and installation operations. You can use this OS image in bare metal provisioning workflows.

Prerequisites for Setting Up Windows Server 2008 R2 x64 Operating System Images

To install and set up the environment and files that are required for the setup of Windows Server 2008 R2 x64 OS images, you must first download the following:

  • Windows Assessment and Deployment Kit (ADK, sometimes called as Windows ADK). See https://www.microsoft.com/en-us/download/details.aspx?id=30652. The Windows ADK enables you to generate a customized WinPE. Make sure Windows ADK is compatible with Windows Server 2008 R2 version.

  • Windows Server 2008 R2 x64 ISO version.


Note


You need not manually create a Windows answer file when setting up the Windows OS images. Bare Metal Agent builds the Windows answer file necessary to support your PXE Boot request, based on the information you provide when you create the PXE boot request.


Before installing the Windows 2008 R2 operating system using the Bare Metal Agent VM, set up and configure the following prerequisites:

  • A customized Windows Pre-installation Environment (WinPE)

  • Boot Configuration Data (BCD) file (optional)

  • Windows installation files (the files extracted from the ISO image file)


Tip


We recommend that you use the Windows 2008 R2 OS ISO image file, which contains all editions, including Standard, Enterprise, Datacenter, and Web. You can typically remove all editions except for Standard and Datacenter.


After customizing the WinPE image and creating the BCD file, you must do the following:

  • Set up WinPE and copy the supporting files to the Bare Metal Agent VM for the PXE boot.

  • Extract the Windows 2008 R2 OS ISO image files into the appropriate image repository directory.

Creating a Customized WinPE

You need to create and customize the Windows Preinstallation Environment (WinPE) for Windows 2008 R2 x64. The initial WinPE includes the minimum boot image necessary to load kernel and default device drivers supported by the Windows OS. Most servers require additional drivers, such as network interface cards and storage controllers that enable Windows OS to detect the network and disks during installation. You must add these drivers to the WinPE.wim image.

Add the device drivers to the WinPE image by using the Deployment Image Servicing and Management (DISM.exe) command tool, which is installed with the Windows ADK. Make sure that you download the required device drivers before you execute the associated DISM commands.


Important


The following procedure includes a sample configuration that is for reference only. The sample configuration might or might not work in your environment. For information about adding device drivers to the WinPE image through DISM.exe, see the documentation provided by Microsoft.


Before you begin

Complete the prerequisites listed in Prerequisites for Setting Up Windows Server 2008 R2 x64 Operating System Images.

Download the following:

  • Windows Assessment and Deployment Kit (Windows ADK) specifically for Windows 2008 R2 x64.

  • Required device drivers to be added to the WinPE.wim image.

Procedure


Step 1

Launch the command prompt (click Start > All Programs > Accessories > Command Prompt).

Step 2

Change the directory to Windows ADK installation directory.


cd C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment

Here, C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment is the directory where Windows ADK has been installed.

Step 3

Create a new WinPE environment folder using ‘copype.cmd’ command.

copype.cmd amd64 c:\win2k8r2x64
Here, c:\win2k8r2x64 is the directory where the new WinPE environment is created.

Step 4

Extract the device drivers to a folder. For example, c:\cisco\drivers.

Step 5

Add the device drivers to the WinPE image by using the DISM.exe command.

  • Mount the WinPE.wim image:
    DISM.exe /mount-wim /wimfile:c:\win2k8r2x64\WinPE.wim /index:1 mountdir:c:\win2k8r2x64\mount
  • Add the device drivers to WinPE.wim image by using the individual driver’s absolute path:
    DISM.exe /image:c:\win2k8r2x64\mount /Add-Driver /driver:C:\cisco\drivers\1.inf /driver:C:\cisco\drivers\2.inf /driver:C:\cisco\drivers\3.inf
    
  • Alternatively, add the device drivers to the WinPE.wim image by automatically searching through all the subfolders of the device drivers directory:
    DISM.exe /image:c:\win2k8r2x64\mount /Add-Driver /driver:C:\cisco\drivers /Recurse
    

Step 6

Unmount the WinPE.wim image and commit the changes:

DISM.exe /unmount-wim /mountdir:c:\win2k8r2x64\mount /commit

When all the device drivers have been added, the WinPE.wim image is ready to be used.


Preparing Windows Server 2008 R2 Installation Files

Before you begin

You must have the following in place:

  • Windows Assessment and Deployment Kit (ADK, sometimes called as Windows ADK) that is compatible with the Windows 2008 R2 operating system

  • Windows 2008 R2 ISO image

Procedure


Step 1

Launch the command prompt (click Start > All Programs > Accessories > Command Prompt).

Step 2

Create a new folder and extract the Windows 2008 R2 ISO image installation files to the folder.

mkdir c:\win2k8r2x64-iso

Step 3

Take a backup copy of the install.wim file.

cd c:\win2k8r2x64-iso\sources
copy install.wim install.wim.backup

The backup is recommended as device drivers will be added to the install.wim file in the subsequent steps. The device drivers are used during the installation of the Windows 2008 R2 operating system.

Step 4

Create a folder to mount the c:\win2k8r2x64-iso\sources\install.wim file.

mkdir c:\win2k8r2x64-mount

Step 5

Change the directory to the Windows ADK installation directory.

cd C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\amd64\DISM

Step 6

Add the device drivers to the install.wim image by using the DISM.exe command from the Windows ADK installation directory.

Step 7

List the supported Windows 2008 R2 Editions.

dism.exe /Get-ImageInfo /imagefile:c:\win2k8r2x64-iso\sources\install.wim

The supported Windows 2008 R2 editions are listed, with each edition represented by an Index ID. Choose the corresponding Index ID of the Windows 2008 R2 Edition that you want to install through PXE.


Index : 1
Name : Windows Server 2008 R2 SERVERSTANDARD
Description : Windows Server 2008 R2 SERVERSTANDARD
Size : 10,510,509,480 bytes

Index : 2
Name : Windows Server 2008 R2 SERVERSTANDARDCORE
Description : Windows Server 2008 R2 SERVERSTANDARDCORE
Size : 3,563,998,339 bytes

Index : 3
Name : Windows Server 2008 R2 SERVERENTERPRISE
Description : Windows Server 2008 R2 SERVERENTERPRISE
Size : 10,510,890,698 bytes

Index : 4
Name : Windows Server 2008 R2 SERVERENTERPRISECORE
Description : Windows Server 2008 R2 SERVERENTERPRISECORE
Size : 3,563,972,455 bytes

Index : 5
Name : Windows Server 2008 R2 SERVERDATACENTER
Description : Windows Server 2008 R2 SERVERDATACENTER
Size : 10,510,997,874 bytes

Index : 6
Name : Windows Server 2008 R2 SERVERDATACENTERCORE
Description : Windows Server 2008 R2 SERVERDATACENTERCORE
Size : 3,564,010,572 bytes

Index : 7
Name : Windows Server 2008 R2 SERVERWEB
Description : Windows Server 2008 R2 SERVERWEB
Size : 10,520,088,768 bytes

Index : 8
Name : Windows Server 2008 R2 SERVERWEBCORE
Description : Windows Server 2008 R2 SERVERWEBCORE
Size : 3,562,616,654 bytes

Step 8

Mount the install.wim image with Index ID 5 to install Windows 2008 R2 Datacenter Edition.

DISM.exe /mount-wim /wimfile:c:\win2k8r2x64-iso\sources\install.wim /index:5 mountdir:c:\win2k8r2x64-mount

Step 9

Add device drivers to the install.wim image by using the individual driver's absolute path.

DISM.exe /image:c:\win2k8r2x64-mount /Add-Driver /driver:C:\cisco\drivers\1.inf /driver:C:\cisco\drivers\2.inf /driver:C:\cisco\drivers\3.inf

Alternatively, you can add the device drivers to the install.wim image by automatically searching through all the subfolders of the device drivers directory.
DISM.exe /image:c:\win2k8r2x64-mount /Add-Driver /driver:C:\cisco\drivers /Recurse

Step 10

Unmount the install.wim image and commit the changes.

DISM.exe /unmount-wim /mountdir:c:\win2k8r2x64-mount /commit

Note

 

When all the device drivers have been added, the install.wim image is ready to be used.


Creating a Boot Configuration Data File

The Boot Configuration Data (BCD) file contains the boot configuration parameters. It controls how the operating system is started in Windows and is used to load the base kernel (WinPE.wim) from the PXE server. Creating a new BCD file is optional. The Bare Metal Agent provides a BCD file with default configuration out of the box. The absolute location path of the BCD file is /opt/cnsaroot/Boot/BCD. The default BCD file can be used to install any Windows OS version, unless it is required to be customized for a specific version of Windows.

By default, the BCD file points to /opt/cnsaroot/Boot/WinPE.wim and /opt/cnsaroot/Boot/boot.sdi files. These filenames are case sensitive.

The new BCD file can be created through the BCDEdit command-line tool. This tool is commonly available in the Windows operating system under root directory, C:\Windows\system32.

Procedure


Step 1

Launch the command prompt (click Start > All Programs > Accessories > Command Prompt).

Step 2

Create a new working directory to create a new BCD file. (At the command prompt, type C:\> mkdir C:\NewBCDStore)

Step 3

Change the directory to C:\NewBCDStore. (At the command prompt, type C:\> cd C:\NewBCDStore)

Step 4

Run the below sequence of commands to create a new BCD file:


C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /createstore BCD

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /create {ramdiskoptions} /d "Ramdisk options"

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdidevice boot

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /create /d "My WinPE Boot Image" /application osloader

Running the above command generates and displays a new GUID as the command output.

Step 5

Run the following commands. When you run these commands, replace the GUID (for example: {a20f8db8-7459-11e2-8ec3-00155d37efa7}) with the GUID generated from your system:


C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} systemroot \Windows

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} detecthal Yes

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} winpe Yes

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /create {bootmgr} /d "Windows 2008r2 BootManager"

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /set {bootmgr} timeout 30

C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /displayorder {a20f8db8-7459-11e2-8ec3-00155d37efa7}
Use the following command to verify that the configurations are correct:
C:\NewBCDStore> C:\Windows\System32\bcdedit.exe /store BCD /enum all

What to do next

Verify that you have appropriate Windows 2008 R2 OS installation files inside the ISO image.

Verifying the Installation files For All Editions of Windows 2008 R2

Before you begin

Mount or extract the Windows 2008 R2 ISO image.

Procedure


Verify that you have the following CLG files under the SOURCE folder of mounted or extracted Windows 2008 R2 ISO image:

  • install_Windows Server 2008 R2 SERVERDATACENTER.clg

  • install_Windows Server 2008 R2 SERVERDATACENTERCORE.clg

  • install_Windows Server 2008 R2 SERVERENTERPRISE.clg

  • install_Windows Server 2008 R2 SERVERENTERPRISECORE.clg

  • install_Windows Server 2008 R2 SERVERSTANDARD.clg

  • install_Windows Server 2008 R2 SERVERSTANDARDCORE.clg

  • install_Windows Server 2008 R2 SERVERDATAWEB.clg

  • install_Windows Server 2008 R2 SERVERDATAWEBCORE.clg


What to do next

Edit the WinPE.wim image file to add PowerShell packages and modify the startnet.cmd file with PXE install commands and parameters as described in Customizing and Copying the WinPE.wim and PXE Boot Files for Windows 2008 R2.

Customizing and Copying the WinPE.wim and PXE Boot Files for Windows 2008 R2

Procedure


Step 1

Launch the command prompt (click Start > All Programs > Accessories > Command Prompt).

Step 2

Change the directory to WinPE environment that was created.

cd c:\win2k8r2x64

Step 3

Mount WinPE.wim image to a folder called 'mount' under the c:\win2k8r2x64 directory.

DISM.exe /mount-wim /wimfile:c:\win2k8r2x64\WinPE.wim /index:1 /mountdir:c:\win2k8r2x64\mount

Step 4

In WinPE.wim, add the required PowerShell packages and edit the paths in each command with the correct mount point and ADK installation path for your environment.

Note

 

The Powershell package files shown below are provided for your reference only. The PowerShell packages and file names that you need to add to WinPE.wim are dependent upon the version of Windows and WinPE.wim.To determine which PowerShell packages you need to add, see the compliance report on the Microsoft website. For information about the commands to add the necessary packages for PowerShell, see the WinPE: Adding PowerShell support to Windows PE Technet Page.


Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFX.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFX_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
 
Dism /Add-Package /Image:"C:\win2k8r2x64\mount" /PackagePath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab"
 

Step 5

Navigate to the mount folder (c:\win2k8r2x64\mount in the code example above) and verify that you can see the data inside the mount folder.

Step 6

Navigate to \windows\system32 in the mount folder and do the following:

  1. Edit startnet.cmd.

  2. Paste the following entries into the file in the order shown, to update the IP address and other details as required for your environment:


wpeinit
wpeutil.exe InitializeNetwork
wpeutil.exe disablefirewall
ECHO OFF
net use R: \\Baremetal_Agent_PXE_IP_Address\bits /user:user_id password
ECHO ON
R:
Powershell.exe -NonInteractive -NoLogo -ExecutionPolicy bypass -command R:\enroute.ps1

Note

 
  • Use the drvload command when a driver has failed to be installed. For example, include the following line in the startnet.cmd file to install a fnic driver:

    drvload <ipaddress of share>:\\<the_fnic.inf>
    

    Use the drvload command only when you face issues in installing drivers. Otherwise, follow the standard process to inject a driver to WinPE.

  • Make sure that you modify the IP address in all the entries so that they point to the Bare Metal Agent IP address.

  • All drive letter references (such as the reference to an R: drive) must match in both the startnet.cmd file and the Windows answer file. By default, Bare Metal Agent comes with an R: drive letter assignment.

Step 7

Save the startnet.cmd file.

Step 8

After you have confirmed that the startnet.cmd is updated correctly, unmount WinPE.wim with the DISM Unmount command and use the /commit option to save the modified startnet.cmd file.

 
DISM.exe /Unmount-Wim /Mountdir:c:\win2k8r2x64\mount /commit
 

Caution

 

Do not leave any files open that are located in the mounted directory when you unmount WinPE.wim. If you have any files open, the unmount process might fail.


What to do next

Copy the customized Windows installation files to the Bare Metal Agent VM.

Copying the Customized Windows Installation Files to the Bare Metal Agent VM

Before you begin

You must have the following in place:

  • Customized WinPE.wim image file

  • Customized install.wim image file

  • Customized BCD file (optional)

  • Windows 2008 R2 ISO image

Procedure


Step 1

Upload the Windows OS image file, customized WinPE.wim file, and customized BCD file (optional). For more information, see Uploading an OS Image File.

Step 2

Provision the Windows OS image. For more information, see Provisioning an OS Image.

Step 3

Customize install.wim image file from c:\win2k8r2x64-iso\sources to /tmp folder.

Step 4

Move the install.wim image file from /tmp to /samba/Win2k8R2x64/sources folder.

mv /tmp/install.wim /samba/Win2k8R2x64/sources/

Step 5

Open the /samba/notifications/notify.ps1 file and verify that the IP address in the file matches that of the PXE IP address of Bare Metal Agent.

Note

 

Do not change the folder paths, filenames, or folder names.

The following is a sample of the contents of a Win2k8R2x64 folder:


boot
efi
sources
support
autorun.inf
bootmgr.efi
setup.exe

Windows Server 2012 x64 and 2012 R2 x64 Operating System Images

Cisco UCS Director Bare Metal Agent supports PXE boot and installation operations for Windows 2012 x64 or 2012 R2 x64 OS images and PXE boot tasks used in bare metal provisioning workflows.


Note


If you need to support both Windows 2012 and 2012 R2, you must perform the image setup process twice, once for each OS. Although it is possible to set up a single WinPE file that supports multiple Windows OS versions, we recommend that you set up a separate WinPE file for each OS.


Prerequisites for Setting Up Windows Server 2012 x64 and 2012 R2 x64 Operating System Images

Before you can install a Windows 2012 or 2012 R2 OS image in the /opt/cnsaroot/Boot directory of the Bare Metal Agent VM, you must install and set up the following prerequisites:

  • Windows Assessment and Deployment Kit (Windows ADK, version 8.0 or later recommended, depending on the Windows version compatibilities with respect to the WinPE.wim file)
  • A customized Windows Preinstallation Environment (WinPE.wim) and PXE supporting files

  • Boot Configuration Data (BCD) file

  • Windows installation files (the files extracted from the ISO)


Note


You do not need to manually create a Windows answer file when setting up Windows OS images. Bare Metal Agent builds the Windows answer file necessary to support your PXE Boot request, based on the information you provide when you create the PXE boot request.


To install and set up the images, download the following:


Tip


We recommend that you use the ISO download file, which contains all editions, including Standard, Enterprise, Datacenter, and Web. You can typically remove all editions except for Standard and Datacenter.


After the system image is in place, perform the following additional procedures:

  • Set up WinPE and copy the supporting files to the Network Service Agent server for the PXE boot.

  • Copy the Windows installation files to the server path.

Creating a Custom WinPE and Copying the PXE Supported Files for Windows 2012


Note


The /opt/cnsaroot/Boot folder is static, and each Bare Metal Agent can have only one boot folder.


Before you begin

Complete the prerequisites listed in Prerequisites for Setting Up Windows Server 2012 x64 and 2012 R2 x64 Operating System Images.

Procedure


Step 1

Download an ADK version that supports Windows 2012 and install it on a Windows 2012 machine.

Note

 

When you specify the features to include in the download, you must include the Windows PE and Deployment Tools.

Step 2

Navigate to the Windows Pre-installation Environment folder in the ADK tools and execute copype.cmd to create the files that WinPE requires.

 
Copype.cmd amd64 C:\WinPE_amd64
 

The target directory contains the WinPE.wim file. The latest ADK versions create a boot.wim file, which needs to be renamed to WinPE.wim.

Step 3

In the Windows machine that has the ADK tools installed, create a directory. Copy the WinPE.wim file from /opt/cnsaroot/Boot to the directory you have created.

Step 4

At the command line, navigate to the ADK installed folder.

Step 5

Add the drivers from their folder locations to the WinPE image.

Use the following DISM.exe command when you know the paths to the drivers that you want to add.


// The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k12x64 directory and the \mount subdirectory have been created before running the command.
DISM.exe /mount-wim /wimfile:c:\win2k12x64\WinPE.wim /index:1 /mountdir:c:\win2k12x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k12x64\mount /Add-Driver /driver:C:\test\drivers\1.inf /driver:C:\test\drivers\2.inf /driver:C:\test\drivers\3.inf

Use the following DISM.exe command when you do not know the paths to the drivers that you want to add and need to query all subfolders.


 // The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k12x64 directory and the \mount subdirectory have been created before running the command. 
DISM.exe /mount-wim /wimfile:c:\win2k12x64\WinPE.wim /index:1 /mountdir:c:\win2k12x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k12x64\mount /Add-Driver /driver:c:\test\drivers /Recurse

Step 6

Mount WinPE.wim to a folder.

Step 7

In WinPE.wim, add the required PowerShell packages and edit the paths in each command with the correct mount point and ADK installation path for your environment.

Note

 

The PowerShell packages and file names that you need to add to WinPE.wim are dependent upon the version of Windows and WinPE.wim.To determine which PowerShell packages you need to add, see the compliance report on the Microsoft website. For information about the commands to add the necessary packages for PowerShell, see the WinPE: Adding PowerShell support to Windows PE Technet Page. The PowerShell package files shown below are provided for reference and will vary depending on the version of Windows and WinPE.wim.


\\ Sample PowerShell package files. 
\\ The PowerShell packages and file names that you need to add to WinPE.wim vary depending on the version of Windows and WinPE.wim.

Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFX.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFX_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
 
Dism /Add-Package /Image:"C:\win2k12x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab"
 

Step 8

Navigate to \windows\system32 in the mount folder and do the following:

  1. Edit startnet.cmd.

  2. Paste the following entries into the file in the order shown, to update the password for samba service and the PXE interface IP address for Bare Metal Agent as required for your environment:


wpeinit
wpeutil.exe InitializeNetwork
wpeutil.exe disablefirewall
ECHO OFF
net use R: \\Baremetal_Agent_PXE_IP_Address\bits /user:smbuser password
ECHO ON
R:
Powershell.exe -NonInteractive -NoLogo -ExecutionPolicy bypass -command R:\enroute.ps1

Note

 
  • Do not change any information in the startnet.cmd file, except for the password for samba service and the PXE interface IP address of the Bare Metal Agent.

  • Make sure that you modify the IP addresses in all the entries so that they point to the Bare Metal Agent IP address.

  • All drive letter references (such as the reference to an R: drive) must match in both the startnet.cmd file and the Windows answer file. By default, Bare Metal Agent comes with an R: drive letter assignment.

Step 9

Save the startnet.cmd file.

Step 10

After you have confirmed that the startnet.cmd is updated correctly, unmount WinPE.wim with the DISM Unmount command and use the /commit option to save the modified startnet.cmd file.

 
DISM.exe /Unmount-Wim /Mountdir:c:\win2k12x64\mount /commit
 

What to do next

Install and set up (as necessary) the Boot Configuration Data (BCD) file.

Creating a Custom WinPE and Copying the PXE Supported Files for Windows 2012 R2

For Windows Server 2012 R2 x64, Bare Metal Agent provides the WinPE and supported PXE files. You need only add any required drivers to the WinPE.wim file, and then edit the WinPE.wim file to change the IP address in the startnet.cmd file to the PXE IP address for your Bare Metal Agent.


Note


The /opt/cnsaroot/Boot folder is static, and each Bare Metal Agent can have only one boot folder.


Before you begin

Complete the prerequisites listed in Prerequisites for Setting Up Windows Server 2012 x64 and 2012 R2 x64 Operating System Images.

Procedure


Step 1

Download an ADK version that supports Windows 2012 R2 and install it on a Windows 2012 R2 machine.

Note

 

When you specify the features to include in the download, you must include the Windows PE and Deployment Tools.

Step 2

In the Windows machine that has the ADK tools installed, create a directory. Copy the WinPE.wim file from /opt/cnsaroot/Boot to the directory you created.

Step 3

At the command line, navigate to the ADK installed folder.

Step 4

Add the drivers from their folder locations to the WinPE image.

Use the following DISM.exe command when you know the paths to the drivers that you want to add.


// The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k12r2x64 directory and the \mount subdirectory have been created before running the command.
DISM.exe /mount-wim /wimfile:c:\win2k12r2x64\WinPE.wim /index:1 /mountdir:c:\win2k12r2x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k12r2x64\mount /Add-Driver /driver:C:\test\drivers\1.inf /driver:C:\test\drivers\2.inf /driver:C:\test\drivers\3.inf

Use the following DISM.exe command when you do not know the paths to the drivers that you want to add and need to query all subfolders.


 // The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k12r2x64 directory and the \mount subdirectory have been created before running the command. 
DISM.exe /mount-wim /wimfile:c:\win2k12r2x64\WinPE.wim /index:1 /mountdir:c:\win2k12r2x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k12r2x64\mount /Add-Driver /driver:c:\test\drivers /Recurse

Step 5

Mount winPE.wim to a folder.

Step 6

In WinPE.wim, add the required PowerShell packages and edit the paths in each command with the correct mount point and ADK installation path for your environment.

Note

 

The PowerShell packages and file names that you need to add to WinPE.wim are dependent on the version of Windows and WinPE.wim. To determine which PowerShell packages you need to add, see the compliance report on the Microsoft website. For information about the commands to add the necessary packages for PowerShell, see the WinPE: Adding PowerShell support to Windows PE Technet Page. The PowerShell package files shown below are provided for reference and will vary depending on the version of Windows and WinPE.wim.


\\ Sample PowerShell package files. 
\\ The PowerShell packages and file names that you need to add to WinPE.wim vary depending on the version of Windows and WinPE.wim.
  
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFX.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFX_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
 
Dism /Add-Package /Image:"C:\win2k12r2x64\mount" /PackagePath:"C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab"
 

Step 7

Navigate to \windows\system32 in the mount folder and do the following:

  1. Edit startnet.cmd.

  2. Paste the following entries into the file in the order shown, to update the password for samba service and the PXE interface IP address for Bare Metal Agent as required for your environment:


wpeinit
wpeutil.exe InitializeNetwork
wpeutil.exe disablefirewall
ECHO OFF
net use R: \\Baremetal_Agent_PXE_IP_Address\bits /user:smbuser password
ECHO ON
R:
Powershell.exe -NonInteractive -NoLogo -ExecutionPolicy bypass -command R:\enroute.ps1

Note

 
  • Do not change any information in the startnet.cmd file, except for the password for samba service and the PXE interface IP address of the Bare Metal Agent.

  • Make sure that you modify the IP addresses in all the entries so that they point to the Bare Metal Agent IP address.

  • All drive letter references (such as the reference to an R: drive) must match in both the startnet.cmd file and the Windows answer file. By default, Bare Metal Agent comes with an R: drive letter assignment.

Step 8

Save the startnet.cmd file.

Step 9

After you have confirmed that the startnet.cmd is updated correctly, unmount WinPE.wim with the DISM Unmount command and use the /commit option to save the modified startnet.cmd file.

DISM.exe /Unmount-Wim /Mountdir:c:\win2k12r2x64\mount /commit

What to do next

Install and set up (as necessary) the Boot Configuration Data (BCD) file.

Preparing Windows Server 2012 Installation Files

Before you begin

You must have the following in place:

  • Windows Assessment and Deployment Kit (ADK, sometimes called as Windows ADK) that is compatible with the Windows 2012 operating system

  • Windows 2012 ISO image

Procedure


Step 1

Launch the command prompt (click Start > All Programs > Accessories > Command Prompt).

Step 2

Create a new folder and extract the Windows 2012 ISO image installation files to the folder.

mkdir c:\win2k12x64-iso

Step 3

Take a backup copy of the install.wim file.

cd c:\win2k12x64-iso\sources
copy install.wim install.wim.backup

The backup is recommended as device drivers will be added to the install.wim file in the subsequent steps. The device drivers are used during the installation of the Windows 2012 operating system.

Step 4

Create a folder to mount the c:\win2k12x64-iso\sources\install.wim file.

mkdir c:\win2k12x64-mount

Step 5

Change the directory to the Windows ADK installation directory.

cd C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\amd64\DISM

Step 6

Add the device drivers to the install.wim image by using the DISM.exe command from the Windows ADK installation directory.

Step 7

List the supported Windows 2012 Editions.

dism.exe /Get-ImageInfo /imagefile:c:\win2k12x64-iso\sources\install.wim

The supported Windows 2012 editions are listed, with each edition represented by an Index ID. Choose the corresponding Index ID of the Windows 2012 Edition that you want to install through PXE.


Index : 1
Name : Windows Server 2012 SERVERSTANDARD
Description : Windows Server 2012 SERVERSTANDARD
Size : 10,510,509,480 bytes

Index : 2
Name : Windows Server 2012 SERVERSTANDARDCORE
Description : Windows Server 2012 SERVERSTANDARDCORE
Size : 3,563,998,339 bytes

Index : 3
Name : Windows Server 2012 SERVERENTERPRISE
Description : Windows Server 2012 SERVERENTERPRISE
Size : 10,510,890,698 bytes

Index : 4
Name : Windows Server 2012 SERVERENTERPRISECORE
Description : Windows Server 2012 SERVERENTERPRISECORE
Size : 3,563,972,455 bytes

Index : 5
Name : Windows Server 2012 SERVERDATACENTER
Description : Windows Server 2012 SERVERDATACENTER
Size : 10,510,997,874 bytes

Index : 6
Name : Windows Server 2012 SERVERDATACENTERCORE
Description : Windows Server 2012 SERVERDATACENTERCORE
Size : 3,564,010,572 bytes

Index : 7
Name : Windows Server 2012 SERVERWEB
Description : Windows Server 2012 SERVERWEB
Size : 10,520,088,768 bytes

Index : 8
Name : Windows Server 2012 SERVERWEBCORE
Description : Windows Server 2012 SERVERWEBCORE
Size : 3,562,616,654 bytes

Step 8

Mount the install.wim image with Index ID 5 to install Windows 2012 Datacenter Edition.

DISM.exe /mount-wim /wimfile:c:\win2k12x64-iso\sources\install.wim /index:5 mountdir:c:\win2k12x64-mount

Step 9

Add device drivers to the install.wim image by using the individual driver's absolute path.

DISM.exe /image:c:\win2k12x64-mount /Add-Driver /driver:C:\cisco\drivers\1.inf /driver:C:\cisco\drivers\2.inf /driver:C:\cisco\drivers\3.inf

Alternatively, you can add the device drivers to the install.wim image by automatically searching through all the subfolders of the device drivers directory.
DISM.exe /image:c:\win2k12x64-mount /Add-Driver /driver:C:\cisco\drivers /Recurse

Step 10

Unmount the install.wim image and commit the changes.

DISM.exe /unmount-wim /mountdir:c:\win2k12x64-mount /commit

Note

 

When all the device drivers have been added, the install.wim image is ready to be used.


Preparing Windows Server 2012 R2 Installation Files

Before you begin

You must have the following in place:

  • Windows Assessment and Deployment Kit (ADK, sometimes called as Windows ADK) that is compatible with the Windows 2012 R2 operating system

  • Windows 2012 R2 ISO image

Procedure


Step 1

Launch the command prompt (click Start > All Programs > Accessories > Command Prompt).

Step 2

Create a new folder and extract the Windows 2012 R2 ISO image installation files to the folder.

mkdir c:\win2k12r2x64-iso

Step 3

Take a backup copy of the install.wim file.

cd c:\win2k12r2x64-iso\sources
copy install.wim install.wim.backup

The backup is recommended as device drivers will be added to the install.wim file in the subsequent steps. The device drivers are used during the installation of the Windows 2012 R2 operating system.

Step 4

Create a folder to mount the c:\win2k12r2x64-iso\sources\install.wim file.

mkdir c:\win2k12r2x64-mount

Step 5

Change the directory to the Windows ADK installation directory.

cd C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\amd64\DISM

Step 6

Add the device drivers to the install.wim image by using the DISM.exe command from the Windows ADK installation directory.

Step 7

List the supported Windows 2012 R2 Editions.

dism.exe /Get-ImageInfo /imagefile:c:\win2k12r2x64-iso\sources\install.wim

The supported Windows 2012 R2 editions are listed, with each edition represented by an Index ID. Choose the corresponding Index ID of the Windows 2012 R2 Edition that you want to install through PXE.


Index : 1
Name : Windows Server 2012 R2 SERVERSTANDARD
Description : Windows Server 2012 R2 SERVERSTANDARD
Size : 10,510,509,480 bytes

Index : 2
Name : Windows Server 2012 R2 SERVERSTANDARDCORE
Description : Windows Server 2012 R2 SERVERSTANDARDCORE
Size : 3,563,998,339 bytes

Index : 3
Name : Windows Server 2012 R2 SERVERENTERPRISE
Description : Windows Server 2012 R2 SERVERENTERPRISE
Size : 10,510,890,698 bytes

Index : 4
Name : Windows Server 2012 R2 SERVERENTERPRISECORE
Description : Windows Server 2012 R2 SERVERENTERPRISECORE
Size : 3,563,972,455 bytes

Index : 5
Name : Windows Server 2012 R2 SERVERDATACENTER
Description : Windows Server 2012 R2 SERVERDATACENTER
Size : 10,510,997,874 bytes

Index : 6
Name : Windows Server 2012 R2 SERVERDATACENTERCORE
Description : Windows Server 2012 R2 SERVERDATACENTERCORE
Size : 3,564,010,572 bytes

Index : 7
Name : Windows Server 2012 R2 SERVERWEB
Description : Windows Server 2012 R2 SERVERWEB
Size : 10,520,088,768 bytes

Index : 8
Name : Windows Server 2012 R2 SERVERWEBCORE
Description : Windows Server 2012 R2 SERVERWEBCORE
Size : 3,562,616,654 bytes

Step 8

Mount the install.wim image with Index ID 5 to install Windows 2012 R2 Datacenter Edition.

DISM.exe /mount-wim /wimfile:c:\win2k12r2x64-iso\sources\install.wim /index:5 mountdir:c:\win2k12r2x64-mount

Step 9

Add device drivers to the install.wim image by using the individual driver's absolute path.

DISM.exe /image:c:\win2k12r2x64-mount /Add-Driver /driver:C:\cisco\drivers\1.inf /driver:C:\cisco\drivers\2.inf /driver:C:\cisco\drivers\3.inf

Alternatively, you can add the device drivers to the install.wim image by automatically searching through all the subfolders of the device drivers directory.
DISM.exe /image:c:\win2k12r2x64-mount /Add-Driver /driver:C:\cisco\drivers /Recurse

Step 10

Unmount the install.wim image and commit the changes.

DISM.exe /unmount-wim /mountdir:c:\win2k12r2x64-mount /commit

Note

 

When all the device drivers have been added, the install.wim image is ready to be used.


Installing and Setting Up the Boot Configuration Data File

The Boot Configuration Data (BCD) file contains the boot configuration parameters. It controls how the operating system is started in Windows and is used to load the base kernel (WinPE.wim) from the PXE server. You do not need to create a BCD file. Bare Metal Agent provides a BCD file with default paths that you can use.

By default, the BCD file points to the /Boot/WinPE.wim and boot.sdi files. These filenames are case sensitive.


Note


We recommend that you use a set of standard names for Bare Metal Agent configuration purposes. The folder name should be Boot. The winpe file name should be WinPE.wim. Use corresponding filenames such as boot.sdi. The created BCD file should be in uppercase, and this file will not have any file extension. Bare Metal Agent delivers the BCD file to /opt/cnsaroot/Boot, which contains a default path pointing to /opt/cnsaroot/Boot/WinPE.wim. This file can be used by any Windows OS version, unless you change the path names.


The command bcdedit.exe used to create BCD files is commonly available in the Windows operating systems root directory: c:\windows\system32.

Before you begin

Create a custom WinPE and copy the PXE supported files

Procedure


Step 1

Navigate to the directory that contains the bcdedit.exe command and run the following sequence of commands to create the BCD file.

The bcdedit.exe command is commonly available in the Windows operating systems root directory: c:\windows\system32.

Step 2

bcdedit.exe /createstore BCD

Step 3

bcdedit.exe /store BCD /create {ramdiskoptions} /d "Ramdisk options"

Step 4

bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdidevice boot

Step 5

bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi

Step 6

bcdedit.exe /store BCD /create /d "My WinPE Boot Image" /application osloader

At this point, the GUID is displayed. Replace {a20f8db8-7459-11e2-8ec3-00155d37efa7} in the following steps with the GUID from your system.

Step 7

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} systemroot \Windows

Step 8

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} detecthal Yes

Step 9

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} winpe Yes

Step 10

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

Step 11

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

Step 12

One of the following:

  • bcdedit.exe /store BCD /create {bootmgr} /d "Windows 2012r2 BootManager"
  • bcdedit.exe /store BCD /create {bootmgr} /d "Windows 2012 BootManager"

Step 13

bcdedit.exe /store BCD /set {bootmgr} timeout 30

Step 14

bcdedit.exe /store BCD /displayorder {a20f8db8-7459-11e2-8ec3-00155d37efa7}

Step 15

Use the following command to verify that the configuration names are correct: bcdedit.exe /store BCD /enum all


What to do next

Copy the Windows installation ISO image to the server folder.

Copying the Windows Installation Files to the Server Folder

Before you begin

You must have the following in place:

  • Customized winPE.wim and PXE boot files in the opt/cnsaroot/Boot directory in the Bare Metal Agent VM.

  • Configured BCD file in the /opt/cnsaroot/Boot directory in the Bare Metal Agent VM.

  • Windows installation files (ISO version).

Procedure


Step 1

Upload the Windows OS image file, customized WinPE.wim file, and customized BCD file (optional). For more information, see Uploading an OS Image File.

Step 2

Provision the Windows OS image. For more information, see Provisioning an OS Image.

Step 3

Customize install.wim image file from:

  • c:\Win2k12R2x64-iso\sources (for Windows 2012 R2) to /tmp folder

  • c:\Win2k12x64-iso\sources (for Windows 2012) to /tmp folder

Step 4

Move the install.wim image file from /tmp to:

  • /samba/Win2k12R2x64/sources folder (for Windows 2012 R2)

  • /samba/Win2k12x64/sources folder (for Windows 2012).

Following is the sample content.

mv /tmp/install.wim /samba/Win2k12R2x64/sources/
mv /tmp/install.wim /samba/Win2k12x64/sources/

Step 5

Open the /samba/notifications/notify.ps1 file and verify that the IP address matches the PXE IP address of Bare Metal Agent.

Note

 

Do not change the folder paths, filenames, or folder names.

The following is a sample of the contents of a Win2k12x64 folder:


boot
efi
sources
support
autorun.inf
bootmgr.efi
setup.exe

Windows Server 2016 x64 Operating System Images

Cisco UCS Director Bare Metal Agent supports PXE boot and installation operations for Windows 2016 x64 OS images and PXE boot tasks used in bare metal provisioning workflows.

Prerequisites for Setting Up Windows Server 2016 x64 Operating System Images

Before you can install a Windows 2016 OS image in the /opt/cnsaroot/Boot directory of the Bare Metal Agent VM, you must install and set up the following prerequisites:

  • Windows Assessment and Deployment Kit (Windows ADK, version 8.0 or later recommended, depending on the Windows version compatibilities with respect to the WinPE.wim file)
  • A customized Windows Preinstallation Environment (WinPE.wim) and PXE supporting files

  • Boot Configuration Data (BCD) file

  • Windows installation files (the files extracted from the ISO)


Note


You do not need to manually create a Windows answer file when setting up Windows OS images. Bare Metal Agent builds the Windows answer file necessary to support your PXE Boot request, based on the information you provide when you create the PXE boot request.


To install and set up the images, download the following:


Tip


We recommend that you use the ISO download file, which contains all editions, including Standard, Enterprise, Datacenter, and Web. You can typically remove all editions except for Standard and Datacenter.


After the system image is in place, perform the following additional procedures:

  • Set up WinPE and copy the supporting files to the Network Service Agent server for the PXE boot.

  • Copy the Windows installation files to the server path.

Creating a Custom WinPE and Copying the PXE Supported Files for Windows 2016


Note


The /opt/cnsaroot/Boot folder is static, and each Bare Metal Agent can have only one boot folder.


Before you begin

Complete the prerequisites listed in Prerequisites for Setting Up Windows Server 2016 x64 Operating System Images.

Procedure


Step 1

Download an ADK version that supports Windows 2016 and install it on a Windows 2016 machine.

Note

 

When you specify the features to include in the download, you must include the Windows PE and Deployment Tools.

Step 2

Navigate to the Windows Pre-installation Environment folder in the ADK tools and execute copype.cmd to create the files that WinPE requires.

 
Copype.cmd amd64 C:\WinPE_amd64
 

The target directory contains the WinPE.wim file. The latest ADK versions create a boot.wim file, which needs to be renamed to WinPE.wim.

Step 3

In the Windows machine that has the ADK tools installed, create a directory. Copy the WinPE.wim file from /opt/cnsaroot/Boot to the directory you have created.

Step 4

At the command line, navigate to the ADK installed folder.

Step 5

Add the drivers from their folder locations to the WinPE image.

Use the following DISM.exe command when you know the paths to the drivers that you want to add.


// The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k16x64 directory and the \mount subdirectory have been created before running the command.
DISM.exe /mount-wim /wimfile:c:\win2k16x64\WinPE.wim /index:1 /mountdir:c:\win2k16x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k16x64\mount /Add-Driver /driver:C:\test\drivers\1.inf /driver:C:\test\drivers\2.inf /driver:C:\test\drivers\3.inf

Use the following DISM.exe command when you do not know the paths to the drivers that you want to add and need to query all subfolders.


 // The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k16x64 directory and the \mount subdirectory have been created before running the command. 
DISM.exe /mount-wim /wimfile:c:\win2k16x64\WinPE.wim /index:1 /mountdir:c:\win2k16x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k16x64\mount /Add-Driver /driver:c:\test\drivers /Recurse

Step 6

Mount WinPE.wim to a folder.

Step 7

In WinPE.wim, add the required PowerShell packages and edit the paths in each command with the correct mount point and ADK installation path for your environment.

Note

 

The PowerShell packages and file names that you need to add to WinPE.wim are dependent upon the version of Windows and WinPE.wim.To determine which PowerShell packages you need to add, see the compliance report on the Microsoft website. For information about the commands to add the necessary packages for PowerShell, see the WinPE: Adding PowerShell support to Windows PE Technet Page. The PowerShell package files shown below are provided for reference and will vary depending on the version of Windows and WinPE.wim.


\\ Sample PowerShell package files. 
\\ The PowerShell packages and file names that you need to add to WinPE.wim vary depending on the version of Windows and WinPE.wim.

Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFX.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFX_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
 
Dism /Add-Package /Image:"C:\win2k16x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab"
 

Step 8

Navigate to \windows\system32 in the mount folder and do the following:

  1. Edit startnet.cmd.

  2. Paste the following entries into the file in the order shown, to update the password for samba service and the PXE interface IP address for Bare Metal Agent as required for your environment:


wpeinit
wpeutil.exe InitializeNetwork
wpeutil.exe disablefirewall
ECHO OFF
net use R: \\Baremetal_Agent_PXE_IP_Address\bits /user:smbuser password
ECHO ON
R:
Powershell.exe -NonInteractive -NoLogo -ExecutionPolicy bypass -command R:\enroute.ps1

Note

 
  • Do not change any information in the startnet.cmd file, except for the password for samba service and the PXE interface IP address of the Bare Metal Agent.

  • Make sure that you modify the IP addresses in all the entries so that they point to the Bare Metal Agent IP address.

  • All drive letter references (such as the reference to an R: drive) must match in both the startnet.cmd file and the Windows answer file. By default, Bare Metal Agent comes with an R: drive letter assignment.

Step 9

Save the startnet.cmd file.

Step 10

After you have confirmed that the startnet.cmd is updated correctly, unmount WinPE.wim with the DISM Unmount command and use the /commit option to save the modified startnet.cmd file.

DISM.exe /Unmount-Wim /Mountdir:c:\win2k16x64\mount /commit

What to do next

Install and set up (as necessary) the Boot Configuration Data (BCD) file.

Preparing Windows Server 2016 R2 Installation Files

Before you begin

You must have the following in place:

  • Windows Assessment and Deployment Kit (ADK, sometimes called as Windows ADK) that is compatible with the Windows 2016 R2 operating system

  • Windows 2016 R2 ISO image

Procedure


Step 1

Launch the command prompt (click Start > All Programs > Accessories > Command Prompt).

Step 2

Create a new folder and extract the Windows 2016 R2 ISO image installation files to the folder.

mkdir c:\win2k16r2x64-iso

Step 3

Take a backup copy of the install.wim file.

cd c:\win2k16r2x64-iso\sources
copy install.wim install.wim.backup

The backup is recommended as device drivers will be added to the install.wim file in the subsequent steps. The device drivers are used during the installation of the Windows 2016 R2 operating system.

Step 4

Create a folder to mount the c:\win2k16r2x64-iso\sources\install.wim file.

mkdir c:\win2k16r2x64-mount

Step 5

Change the directory to the Windows ADK installation directory.

cd C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\DISM

Step 6

Add the device drivers to the install.wim image by using the DISM.exe command from the Windows ADK installation directory.

Step 7

List the supported Windows 2016 R2 Editions.

dism.exe /Get-ImageInfo /imagefile:c:\win2k16r2x64-iso\sources\install.wim

The supported Windows 2016 R2 editions are listed, with each edition represented by an Index ID. Choose the corresponding Index ID of the Windows 2016 R2 Edition that you want to install through PXE.


Index : 1
Name : Windows Server 2016 R2 SERVERSTANDARD
Description : Windows Server 2016 R2 SERVERSTANDARD
Size : 10,510,509,480 bytes

Index : 2
Name : Windows Server 2016 R2 SERVERSTANDARDCORE
Description : Windows Server 2016 R2 SERVERSTANDARDCORE
Size : 3,563,998,339 bytes

Index : 3
Name : Windows Server 2016 R2 SERVERENTERPRISE
Description : Windows Server 2016 R2 SERVERENTERPRISE
Size : 10,510,890,698 bytes

Index : 4
Name : Windows Server 2016 R2 SERVERENTERPRISECORE
Description : Windows Server 2016 R2 SERVERENTERPRISECORE
Size : 3,563,972,455 bytes

Index : 5
Name : Windows Server 2016 R2 SERVERDATACENTER
Description : Windows Server 2016 R2 SERVERDATACENTER
Size : 10,510,997,874 bytes

Index : 6
Name : Windows Server 2016 R2 SERVERDATACENTERCORE
Description : Windows Server 2016 R2 SERVERDATACENTERCORE
Size : 3,564,010,572 bytes

Index : 7
Name : Windows Server 2016 R2 SERVERWEB
Description : Windows Server 2016 R2 SERVERWEB
Size : 10,520,088,768 bytes

Index : 8
Name : Windows Server 2016 R2 SERVERWEBCORE
Description : Windows Server 2016 R2 SERVERWEBCORE
Size : 3,562,616,654 bytes

Step 8

Mount the install.wim image with Index ID 5 to install Windows 2016 R2 Datacenter Edition.

DISM.exe /mount-wim /wimfile:c:\win2k16r2x64-iso\sources\install.wim /index:5 mountdir:c:\win2k16r2x64-mount

Step 9

Add device drivers to the install.wim image by using the individual driver's absolute path.

DISM.exe /image:c:\win2k16r2x64-mount /Add-Driver /driver:C:\cisco\drivers\1.inf /driver:C:\cisco\drivers\2.inf /driver:C:\cisco\drivers\3.inf

Alternatively, you can add the device drivers to the install.wim image by automatically searching through all the subfolders of the device drivers directory.
DISM.exe /image:c:\win2k16r2x64-mount /Add-Driver /driver:C:\cisco\drivers /Recurse

Step 10

Unmount the install.wim image and commit the changes.

DISM.exe /unmount-wim /mountdir:c:\win2k16r2x64-mount /commit

Note

 

When all the device drivers have been added, the install.wim image is ready to be used.


Installing and Setting Up the Boot Configuration Data File

The Boot Configuration Data (BCD) file contains the boot configuration parameters. It controls how the operating system is started in Windows and is used to load the base kernel (WinPE.wim) from the PXE server. You do not need to create a BCD file. Bare Metal Agent provides a BCD file with default paths that you can use.

By default, the BCD file points to the /Boot/WinPE.wim and boot.sdi files. These filenames are case sensitive.


Note


We recommend that you use a set of standard names for Bare Metal Agent configuration purposes. The folder name should be Boot. The winpe file name should be WinPE.wim. Use corresponding filenames such as boot.sdi. The created BCD file should be in uppercase, and this file will not have any file extension. Bare Metal Agent delivers the BCD file to /opt/cnsaroot/Boot, which contains a default path pointing to /opt/cnsaroot/Boot/WinPE.wim. This file can be used by any Windows OS version, unless you change the path names.


The command bcdedit.exe used to create BCD files is commonly available in the Windows operating systems root directory: c:\windows\system32.

Before you begin

Create a custom WinPE and copy the PXE supported files

Procedure


Step 1

Navigate to the directory that contains the bcdedit.exe command and run the following sequence of commands to create the BCD file.

The bcdedit.exe command is commonly available in the Windows operating systems root directory: c:\windows\system32.

Step 2

bcdedit.exe /createstore BCD

Step 3

bcdedit.exe /store BCD /create {ramdiskoptions} /d "Ramdisk options"

Step 4

bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdidevice boot

Step 5

bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi

Step 6

bcdedit.exe /store BCD /create /d "My WinPE Boot Image" /application osloader

At this point, the GUID is displayed. Replace {a20f8db8-7459-11e2-8ec3-00155d37efa7} in the following steps with the GUID from your system.

Step 7

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} systemroot \Windows

Step 8

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} detecthal Yes

Step 9

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} winpe Yes

Step 10

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

Step 11

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

Step 12

bcdedit.exe /store BCD /create {bootmgr} /d "Windows 2016 BootManager"

Step 13

bcdedit.exe /store BCD /set {bootmgr} timeout 30

Step 14

bcdedit.exe /store BCD /displayorder {a20f8db8-7459-11e2-8ec3-00155d37efa7}

Step 15

Use the following command to verify that the configuration names are correct: bcdedit.exe /store BCD /enum all


What to do next

Copy the Windows installation ISO image to the server folder.

Copying the Windows Installation Files to the Server Folder

Before you begin

You must have the following in place:

  • Customized winPE.wim and PXE boot files in the opt/cnsaroot/Boot directory in the Bare Metal Agent VM.

  • Configured BCD file in the /opt/cnsaroot/Boot directory in the Bare Metal Agent VM.

  • Windows installation files (ISO version).

Procedure


Step 1

Upload the Windows OS image file, customized WinPE.wim file, and customized BCD file (optional). For more information, see Uploading an OS Image File.

Step 2

Provision the Windows OS image. For more information, see Provisioning an OS Image.

Step 3

Customize install.wim image file from c:\Win2k16x64-iso\sources to /tmp folder.

Step 4

Move the install.wim image file from /tmp to /samba/Win2k16x64/sources folder.

mv /tmp/install.wim /samba/Win2k16x64/sources/

Step 5

Open the /samba/notifications/notify.ps1 file and verify that the IP address in the file matches that of the PXE IP address of Bare Metal Agent.

Note

 

Do not change the folder paths, filenames, or folder names.

The following is a sample of the contents of a Win2k16x64 folder:


boot
efi
sources
support
autorun.inf
bootmgr.efi
setup.exe

Windows Server 2019 x64 Operating System Images

Cisco UCS Director Bare Metal Agent supports PXE boot and installation operations for Windows 2019 x64 OS images and PXE boot tasks used in bare metal provisioning workflows.


Important


For provisioning Windows 2019, after upgrading the Cisco Bare Metal Agent Connector Pack to the latest version, you should reset Samba password if the samba services are already enabled and running.


Prerequisites for Setting Up Windows Server 2019 x64 Operating System Images

Before you install a Windows 2019 OS image in the /opt/cnsaroot/Boot directory of the Bare Metal Agent VM, you must install and set up the following prerequisites:

  • Windows Assessment and Deployment Kit (Windows ADK, version 8.0 or later recommended, depending on the Windows version compatibilities with respect to the WinPE.wim file)

  • A customized Windows Preinstallation Environment (WinPE.wim) and PXE supporting files

  • Boot Configuration Data (BCD) file

  • Windows installation files (the files extracted from the ISO)


Note


You do not need to manually create a Windows answer file when setting up Windows OS images. Bare Metal Agent builds the Windows answer file necessary to support your PXE Boot request, based on the information you provide when you create the PXE boot request.


To install and set up the images, download the following:


Tip


We recommend that you use the ISO download file, which contains all editions, including Standard, Enterprise, Datacenter, and Web. You can typically remove all editions except for Standard and Datacenter.


After the system image is in place, perform the following additional procedures:

  • Set up WinPE and copy the supporting files to the Network Service Agent server for the PXE boot.

  • Copy the Windows installation files to the server path.

Creating a Custom WinPE and Copying the PXE Supported Files for Windows 2019


Note


The /opt/cnsaroot/Boot folder is static, and each Bare Metal Agent can have only one boot folder.


Before you begin

Complete the prerequisites listed in Prerequisites for Setting Up Windows Server 2019 x64 Operating System Images.

Procedure


Step 1

Download an ADK version that supports Windows 2019 and install it on a Windows 2019 machine.

Note

 

When you specify the features to include in the download, you must include the Windows PE and Deployment Tools.

Step 2

Navigate to the Windows Pre-installation Environment folder in the ADK tools and execute copype.cmd to create the files that WinPE requires.

 
Copype.cmd amd64 C:\WinPE_amd64
 

The target directory contains the WinPE.wim file. The latest ADK versions create a boot.wim file, which needs to be renamed to WinPE.wim.

Step 3

In the Windows machine that has the ADK tools installed, create a directory. Copy the WinPE.wim file from C:\WinPE_amd64/media/sources to the directory you have created.

Step 4

At the command line, navigate to the ADK installed folder.

Step 5

Mount WinPE.wim to a folder.

Step 6

Add the drivers from their folder locations to the WinPE image.

Use the following DISM.exe command when you know the paths to the drivers that you want to add.


// The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k19x64 directory and the \mount subdirectory have been created before running the command.
DISM.exe /mount-wim /wimfile:c:\win2k19x64\WinPE.wim /index:1 /mountdir:c:\win2k19x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k19x64\mount /Add-Driver /driver:C:\test\drivers\1.inf /driver:C:\test\drivers\2.inf /driver:C:\test\drivers\3.inf

Use the following DISM.exe command when you do not know the paths to the drivers that you want to add and need to query all subfolders.


 // The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k19x64 directory and the \mount subdirectory have been created before running the command. 
DISM.exe /mount-wim /wimfile:c:\win2k19x64\WinPE.wim /index:1 /mountdir:c:\win2k19x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k19x64\mount /Add-Driver /driver:c:\test\drivers /Recurse

Step 7

In WinPE.wim, add the required PowerShell packages and edit the paths in each command with the correct mount point and ADK installation path for your environment.

Note

 

The PowerShell packages and file names that you need to add to WinPE.wim are dependent upon the version of Windows and WinPE.wim.To determine which PowerShell packages you need to add, see the compliance report on the Microsoft website. For information about the commands to add the necessary packages for PowerShell, see the WinPE: Adding PowerShell support to Windows PE Technet Page. The PowerShell package files shown below are provided for reference and will vary depending on the version of Windows and WinPE.wim.


\\ Sample PowerShell package files. 
\\ The PowerShell packages and file names that you need to add to WinPE.wim vary depending on the version of Windows and WinPE.wim.

Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFX.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFX_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
 
Dism /Add-Package /Image:"C:\win2k19x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab"
 

Step 8

Navigate to \windows\system32 in the mount folder and do the following:

  1. Edit startnet.cmd.

  2. Paste the following entries into the file in the order shown, to update the password for samba service and the PXE interface IP address for Bare Metal Agent as required for your environment:


wpeinit
wpeutil.exe InitializeNetwork
wpeutil.exe disablefirewall
ECHO OFF
net use R: \\Baremetal_Agent_PXE_IP_Address\bits /user:smbuser password
ECHO ON
R:
Powershell.exe -NonInteractive -NoLogo -ExecutionPolicy bypass -command R:\enroute.ps1

Note

 
  • Do not change any information in the startnet.cmd file, except for the password for samba service and the PXE interface IP address of the Bare Metal Agent.

  • Make sure that you modify the IP addresses in all the entries so that they point to the Bare Metal Agent IP address.

  • All drive letter references (such as the reference to an R: drive) must match in both the startnet.cmd file and the Windows answer file. By default, Bare Metal Agent comes with an R: drive letter assignment.

Step 9

Save the startnet.cmd file.

Step 10

After you have confirmed that the startnet.cmd is updated correctly, unmount WinPE.wim with the DISM Unmount command and use the /commit option to save the modified startnet.cmd file.

 
DISM.exe /Unmount-Wim /Mountdir:c:\win2k19x64\mount /commit
 

Caution

 

Do not leave any files open that are located in the mounted directory when you unmount WinPE.wim. If you have any files open, the unmount process might fail.


What to do next

Install and set up (as necessary) the Boot Configuration Data (BCD) file.

Preparing Windows Server 2019 x64 Installation Files

Before you begin

You must have the following in place:

  • Windows Assessment and Deployment Kit (ADK, sometimes called as Windows ADK) that is compatible with the Windows 2019 x64 operating system

  • Windows 2019 x64 ISO image

Procedure


Step 1

Launch the command prompt (click Start > All Programs > Accessories > Command Prompt).

Step 2

Create a new folder and extract the Windows 2019 x64 ISO image installation files to the folder.

mkdir c:\win2k19x64-iso

Step 3

Take a backup copy of the install.wim file.

cd c:\win2k19x64-iso\sources
copy install.wim install.wim.backup

The backup is recommended as device drivers will be added to the install.wim file in the subsequent steps. The device drivers are used during the installation of the Windows 2019 x64 operating system.

Step 4

Create a folder to mount the c:\win2k19x64-iso\sources\install.wim file.

mkdir c:\win2k19x64-mount

Step 5

Change the directory to the Windows ADK installation directory.

cd C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\DISM

Step 6

List the supported Windows 2019 x64 Editions.

dism.exe /Get-ImageInfo /imagefile:c:\win2k19x64-iso\sources\install.wim

The supported Windows 2019 x64 editions are listed, with each edition represented by an Index ID. Choose the corresponding Index ID of the Windows 2019 x64 Edition that you want to install through PXE.


Index : 1
Name : Windows Server 2019 x64 SERVERSTANDARD
Description : Windows Server 2019 x64 SERVERSTANDARD
Size : 10,510,509,480 bytes

Index : 2
Name : Windows Server 2019 x64 SERVERSTANDARDCORE
Description : Windows Server 2019 x64 SERVERSTANDARDCORE
Size : 3,563,998,339 bytes

Index : 3
Name : Windows Server 2019 x64 SERVERENTERPRISE
Description : Windows Server 2019 x64 SERVERENTERPRISE
Size : 10,510,890,698 bytes

Index : 4
Name : Windows Server 2019 x64 SERVERENTERPRISECORE
Description : Windows Server 2019 x64 SERVERENTERPRISECORE
Size : 3,563,972,455 bytes

Index : 5
Name : Windows Server 2019 x64 SERVERDATACENTER
Description : Windows Server 2019 x64 SERVERDATACENTER
Size : 10,510,997,874 bytes

Index : 6
Name : Windows Server 2019 x64 SERVERDATACENTERCORE
Description : Windows Server 2019 x64 SERVERDATACENTERCORE
Size : 3,564,010,572 bytes

Index : 7
Name : Windows Server 2019 x64 SERVERWEB
Description : Windows Server 2019 x64 SERVERWEB
Size : 10,520,088,768 bytes

Index : 8
Name : Windows Server 2019 x64 SERVERWEBCORE
Description : Windows Server 2019 x64 SERVERWEBCORE
Size : 3,562,616,654 bytes

Step 7

Mount the install.wim image with Index ID 5 to install Windows 2019 x64 Datacenter Edition.

DISM.exe /mount-wim /wimfile:c:\win2k19x64-iso\sources\install.wim /index:5 mountdir:c:\win2k19x64-mount

Step 8

Add the device drivers to the install.wim image by using the DISM.exe command from the Windows ADK installation directory.

Step 9

Add the device drivers to the install.wim image by using the individual driver's absolute path.

DISM.exe /image:c:\win2k19x64-mount /Add-Driver /driver:C:\cisco\drivers\1.inf /driver:C:\cisco\drivers\2.inf /driver:C:\cisco\drivers\3.inf

Alternatively, you can add the device drivers to the install.wim image by automatically searching through all the subfolders of the device drivers directory.
DISM.exe /image:c:\win2k19x64-mount /Add-Driver /driver:C:\cisco\drivers /Recurse

Step 10

Unmount the install.wim image and commit the changes.

DISM.exe /unmount-wim /mountdir:c:\win2k19x64-mount /commit

Note

 

When all the device drivers have been added, the install.wim image is ready to be used.


Installing and Setting Up the Boot Configuration Data File

The Boot Configuration Data (BCD) file contains the boot configuration parameters. It controls how the operating system is started in Windows and is used to load the base kernel (WinPE.wim) from the PXE server. You do not need to create a BCD file. Bare Metal Agent provides a BCD file with default paths that you can use.

By default, the BCD file points to the /Boot/WinPE.wim and boot.sdi files. These filenames are case sensitive.


Note


We recommend that you use a set of standard names for Bare Metal Agent configuration purposes. The folder name should be Boot. The winpe file name should be WinPE.wim. Use corresponding filenames such as boot.sdi. The created BCD file should be in uppercase, and this file will not have any file extension. Bare Metal Agent delivers the BCD file to /opt/cnsaroot/Boot, which contains a default path pointing to /opt/cnsaroot/Boot/WinPE.wim. This file can be used by any Windows OS version, unless you change the path names.


The command bcdedit.exe used to create BCD files is commonly available in the Windows operating systems root directory: c:\windows\system32.

Before you begin

Create a custom WinPE and copy the PXE supported files

Procedure


Step 1

Navigate to the directory that contains the bcdedit.exe command and run the following sequence of commands to create the BCD file.

The bcdedit.exe command is commonly available in the Windows operating systems root directory: c:\windows\system32.

Step 2

bcdedit.exe /createstore BCD

Step 3

bcdedit.exe /store BCD /create {ramdiskoptions} /d "Ramdisk options"

Step 4

bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdidevice boot

Step 5

bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi

Step 6

bcdedit.exe /store BCD /create /d "My WinPE Boot Image" /application osloader

At this point, the GUID is displayed. Replace {a20f8db8-7459-11e2-8ec3-00155d37efa7} in the following steps with the GUID from your system.

Step 7

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} systemroot \Windows

Step 8

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} detecthal Yes

Step 9

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} winpe Yes

Step 10

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

Step 11

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

Step 12

bcdedit.exe /store BCD /create {bootmgr} /d "Windows 2019 BootManager"

Step 13

bcdedit.exe /store BCD /set {bootmgr} timeout 30

Step 14

bcdedit.exe /store BCD /displayorder {a20f8db8-7459-11e2-8ec3-00155d37efa7}

Step 15

Use the following command to verify that the configuration names are correct: bcdedit.exe /store BCD /enum all


What to do next

Copy the Windows installation ISO image to the server folder.

Copying the Windows Installation Files to the Server Folder

Before you begin

You must have the following in place:

  • Customized winPE.wim and PXE boot files in the opt/cnsaroot/Boot directory in the Bare Metal Agent VM.

  • Configured BCD file in the /opt/cnsaroot/Boot directory in the Bare Metal Agent VM.

  • Windows installation files (ISO version).

Procedure


Step 1

Upload the Windows OS image file, customized WinPE.wim file, and customized BCD file (optional). For more information, see Uploading an OS Image File.

Step 2

Provision the Windows OS image. For more information, see Provisioning an OS Image.

Step 3

Customize install.wim image file from c:\Win2k19x64-iso\sources to /tmp folder.

Step 4

Move the install.wim image file from /tmp to /samba/Win2k19x64/sources folder.

mv /tmp/install.wim /samba/Win2k19x64/sources/

Step 5

Open the /samba/notifications/notify.ps1 file and verify that the IP address matches the PXE IP address of Bare Metal Agent.

Note

 

Do not change the folder paths, filenames, or folder names.

The following is a sample of the contents of a Win2k19x64 folder:


boot
efi
sources
support
autorun.inf
bootmgr.efi
setup.exe

Windows Server 2022 x64 Operating System Images

Cisco UCS Director Bare Metal Agent supports PXE boot and installation operations for Windows 2022 x64 OS images and PXE boot tasks used in bare metal provisioning workflows.

Prerequisites for Setting Up Windows Server 2022 x64 Operating System Images

Before you install a Windows 2022 OS image in the /opt/cnsaroot/Boot directory of the Bare Metal Agent VM, you must install and set up the following prerequisites:

  • Windows Assessment and Deployment Kit (Windows ADK, version 8.0 or later recommended, depending on the Windows version compatibilities with respect to the WinPE.wim file)

  • A customized Windows Preinstallation Environment (WinPE.wim) and PXE supporting files

  • Boot Configuration Data (BCD) file

  • Windows installation files (the files extracted from the ISO)


Note


You do not need to manually create a Windows answer file when setting up Windows OS images. Bare Metal Agent builds the Windows answer file necessary to support your PXE Boot request, based on the information you provide when you create the PXE boot request.


To install and set up the images, download the following:


Tip


We recommend that you use the ISO download file, which contains all editions, including Standard, Enterprise, Datacenter, and Web. You can typically remove all editions except for Standard and Datacenter.


After the system image is in place, perform the following additional procedures:

  • Set up WinPE and copy the supporting files to the Network Service Agent server for the PXE boot.

  • Copy the Windows installation files to the server path.

Creating a Custom WinPE and Copying the PXE Supported Files for Windows 2022


Note


The /opt/cnsaroot/Boot folder is static, and each Bare Metal Agent can have only one boot folder.


Before you begin

Complete the prerequisites listed in Prerequisites for Setting Up Windows Server 2022 x64 Operating System Images.

Procedure


Step 1

Download an ADK version that supports Windows 2022 and install it on a Windows 2022 machine.

Note

 

When you specify the features to include in the download, you must include the Windows PE and Deployment Tools.

Step 2

Navigate to the Windows Pre-installation Environment folder in the ADK tools and execute copype.cmd to create the files that WinPE requires.

 
Copype.cmd amd64 C:\WinPE_amd64
 

The target directory contains the WinPE.wim file. The latest ADK versions create a boot.wim file, which needs to be renamed to WinPE.wim.

Step 3

In the Windows machine that has the ADK tools installed, create a directory. Copy the WinPE.wim file from C:\WinPE_amd64/media/sources to the directory you have created.

Step 4

At the command line, navigate to the ADK installed folder.

Step 5

Mount WinPE.wim to a folder.

Step 6

Add the drivers from their folder locations to the WinPE image.

Use the following DISM.exe command when you know the paths to the drivers that you want to add.


// The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k22x64 directory and the \mount subdirectory have been created before running the command.
DISM.exe /mount-wim /wimfile:c:\win2k22x64\WinPE.wim /index:1 /mountdir:c:\win2k22x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k22x64\mount /Add-Driver /driver:C:\test\drivers\1.inf /driver:C:\test\drivers\2.inf /driver:C:\test\drivers\3.inf

Use the following DISM.exe command when you do not know the paths to the drivers that you want to add and need to query all subfolders.


 // The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k22x64 directory and the \mount subdirectory have been created before running the command. 
DISM.exe /mount-wim /wimfile:c:\win2k22x64\WinPE.wim /index:1 /mountdir:c:\win2k22x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k22x64\mount /Add-Driver /driver:c:\test\drivers /Recurse

Step 7

In WinPE.wim, add the required PowerShell packages and edit the paths in each command with the correct mount point and ADK installation path for your environment.

Note

 

The PowerShell packages and file names that you need to add to WinPE.wim are dependent upon the version of Windows and WinPE.wim.To determine which PowerShell packages you need to add, see the compliance report on the Microsoft website. For information about the commands to add the necessary packages for PowerShell, see the WinPE: Adding PowerShell support to Windows PE Technet Page. The PowerShell package files shown below are provided for reference and will vary depending on the version of Windows and WinPE.wim.


\\ Sample PowerShell package files. 
\\ The PowerShell packages and file names that you need to add to WinPE.wim vary depending on the version of Windows and WinPE.wim.

Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFX.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFX_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
 
Dism /Add-Package /Image:"C:\win2k22x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab"
 

Step 8

Navigate to \windows\system32 in the mount folder and do the following:

  1. Edit startnet.cmd.

  2. Paste the following entries into the file in the order shown, to update the password for samba service and the PXE interface IP address for Bare Metal Agent as required for your environment:


wpeinit
wpeutil.exe InitializeNetwork
wpeutil.exe disablefirewall
ECHO OFF
net use R: \\Baremetal_Agent_PXE_IP_Address\bits /user:smbuser password
ECHO ON
R:
Powershell.exe -NonInteractive -NoLogo -ExecutionPolicy bypass -command R:\enroute.ps1

Note

 
  • Do not change any information in the startnet.cmd file, except for the password for samba service and the PXE interface IP address of the Bare Metal Agent.

  • Make sure that you modify the IP addresses in all the entries so that they point to the Bare Metal Agent IP address.

  • All drive letter references (such as the reference to an R: drive) must match in both the startnet.cmd file and the Windows answer file. By default, Bare Metal Agent comes with an R: drive letter assignment.

Step 9

Save the startnet.cmd file.

Step 10

After you have confirmed that the startnet.cmd is updated correctly, unmount WinPE.wim with the DISM Unmount command and use the /commit option to save the modified startnet.cmd file.

 
DISM.exe /Unmount-Wim /Mountdir:c:\win2k22x64\mount /commit
 

Caution

 

Do not leave any files open that are located in the mounted directory when you unmount WinPE.wim. If you have any files open, the unmount process might fail.


What to do next

Install and set up (as necessary) the Boot Configuration Data (BCD) file.

Preparing Windows Server 2022 x64 Installation Files

Before you begin

You must have the following in place:

  • Windows Assessment and Deployment Kit (ADK, sometimes called as Windows ADK) that is compatible with the Windows 2022 x64 operating system

  • Windows 2022 x64 ISO image

Procedure


Step 1

Launch the command prompt (click Start > All Programs > Accessories > Command Prompt).

Step 2

Create a new folder and extract the Windows 2022 x64 ISO image installation files to the folder.

mkdir c:\win2k22x64-iso

Step 3

Take a backup copy of the install.wim file.

cd c:\win2k22x64-iso\sources
copy install.wim install.wim.backup

The backup is recommended as device drivers will be added to the install.wim file in the subsequent steps. The device drivers are used during the installation of the Windows 2022 x64 operating system.

Step 4

Create a folder to mount the c:\win2k22x64-iso\sources\install.wim file.

mkdir c:\win2k22x64-mount

Step 5

Change the directory to the Windows ADK installation directory.

cd C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\DISM

Step 6

List the supported Windows 2022 x64 Editions.

dism.exe /Get-ImageInfo /imagefile:c:\win2k22x64-iso\sources\install.wim

The supported Windows 2022 x64 editions are listed, with each edition represented by an Index ID. Choose the corresponding Index ID of the Windows 2022 x64 Edition that you want to install through PXE.


Index : 1
Name : Windows Server 2022 x64 SERVERSTANDARD
Description : Windows Server 2022 x64 SERVERSTANDARD
Size : 10,510,509,480 bytes

Index : 2
Name : Windows Server 2022 x64 SERVERSTANDARDCORE
Description : Windows Server 2022 x64 SERVERSTANDARDCORE
Size : 3,563,998,339 bytes

Index : 3
Name : Windows Server 2022 x64 SERVERENTERPRISE
Description : Windows Server 2022 x64 SERVERENTERPRISE
Size : 10,510,890,698 bytes

Index : 4
Name : Windows Server 2022 x64 SERVERENTERPRISECORE
Description : Windows Server 2022 x64 SERVERENTERPRISECORE
Size : 3,563,972,455 bytes

Index : 5
Name : Windows Server 2022 x64 SERVERDATACENTER
Description : Windows Server 2022 x64 SERVERDATACENTER
Size : 10,510,997,874 bytes

Index : 6
Name : Windows Server 2022 x64 SERVERDATACENTERCORE
Description : Windows Server 2022 x64 SERVERDATACENTERCORE
Size : 3,564,010,572 bytes

Index : 7
Name : Windows Server 2022 x64 SERVERWEB
Description : Windows Server 2022 x64 SERVERWEB
Size : 10,520,088,768 bytes

Index : 8
Name : Windows Server 2022 x64 SERVERWEBCORE
Description : Windows Server 2022 x64 SERVERWEBCORE
Size : 3,562,616,654 bytes

Step 7

Mount the install.wim image with Index ID 5 to install Windows 2022 x64 Datacenter Edition.

DISM.exe /mount-wim /wimfile:c:\win2k22x64-iso\sources\install.wim /index:5 mountdir:c:\win2k22x64-mount

Step 8

Add the device drivers to the install.wim image by using the DISM.exe command from the Windows ADK installation directory.

Step 9

Add the device drivers to the install.wim image by using the individual driver's absolute path.

DISM.exe /image:c:\win2k22x64-mount /Add-Driver /driver:C:\cisco\drivers\1.inf /driver:C:\cisco\drivers\2.inf /driver:C:\cisco\drivers\3.inf

Alternatively, you can add the device drivers to the install.wim image by automatically searching through all the subfolders of the device drivers directory.
DISM.exe /image:c:\win2k22x64-mount /Add-Driver /driver:C:\cisco\drivers /Recurse

Step 10

Unmount the install.wim image and commit the changes.

DISM.exe /unmount-wim /mountdir:c:\win2k22x64-mount /commit

Note

 

When all the device drivers have been added, the install.wim image is ready to be used.


Installing and Setting Up the Boot Configuration Data File

The Boot Configuration Data (BCD) file contains the boot configuration parameters. It controls how the operating system is started in Windows and is used to load the base kernel (WinPE.wim) from the PXE server. You do not need to create a BCD file. Bare Metal Agent provides a BCD file with default paths that you can use.

By default, the BCD file points to the /Boot/WinPE.wim and boot.sdi files. These filenames are case sensitive.


Note


We recommend that you use a set of standard names for Bare Metal Agent configuration purposes. The folder name should be Boot. The winpe file name should be WinPE.wim. Use corresponding filenames such as boot.sdi. The created BCD file should be in uppercase, and this file will not have any file extension. Bare Metal Agent delivers the BCD file to /opt/cnsaroot/Boot, which contains a default path pointing to /opt/cnsaroot/Boot/WinPE.wim. This file can be used by any Windows OS version, unless you change the path names.


The command bcdedit.exe used to create BCD files is commonly available in the Windows operating systems root directory: c:\windows\system32.

Before you begin

Create a custom WinPE and copy the PXE supported files

Procedure


Step 1

Navigate to the directory that contains the bcdedit.exe command and run the following sequence of commands to create the BCD file.

The bcdedit.exe command is commonly available in the Windows operating systems root directory: c:\windows\system32.

Step 2

bcdedit.exe /createstore BCD

Step 3

bcdedit.exe /store BCD /create {ramdiskoptions} /d "Ramdisk options"

Step 4

bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdidevice boot

Step 5

bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi

Step 6

bcdedit.exe /store BCD /create /d "My WinPE Boot Image" /application osloader

At this point, the GUID is displayed. Replace {a20f8db8-7459-11e2-8ec3-00155d37efa7} in the following steps with the GUID from your system.

Step 7

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} systemroot \Windows

Step 8

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} detecthal Yes

Step 9

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} winpe Yes

Step 10

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

Step 11

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

Step 12

bcdedit.exe /store BCD /create {bootmgr} /d "Windows 2022 BootManager"

Step 13

bcdedit.exe /store BCD /set {bootmgr} timeout 30

Step 14

bcdedit.exe /store BCD /displayorder {a20f8db8-7459-11e2-8ec3-00155d37efa7}

Step 15

Use the following command to verify that the configuration names are correct: bcdedit.exe /store BCD /enum all


What to do next

Copy the Windows installation ISO image to the server folder.

Copying the Windows Installation Files to the Server Folder

Before you begin

You must have the following in place:

  • Customized winPE.wim and PXE boot files in the opt/cnsaroot/Boot directory in the Bare Metal Agent VM.

  • Configured BCD file in the /opt/cnsaroot/Boot directory in the Bare Metal Agent VM.

  • Windows installation files (ISO version).

Procedure


Step 1

Upload the Windows OS image file, customized WinPE.wim file, and customized BCD file (optional). For more information, see Uploading an OS Image File.

Step 2

Provision the Windows OS image. For more information, see Provisioning an OS Image.

Step 3

Customize install.wim image file from c:\Win2k22x64-iso\sources to /tmp folder.

Step 4

Move the install.wim image file from /tmp to /samba/Win2k22x64/sources folder.

mv /tmp/install.wim /samba/Win2k22x64/sources/

Step 5

Open the /samba/notifications/notify.ps1 file and verify that the IP address matches the PXE IP address of Bare Metal Agent.

Note

 

Do not change the folder paths, filenames, or folder names.

The following is a sample of the contents of a Win2k22x64 folder:


boot
efi
sources
support
autorun.inf
bootmgr.efi
setup.exe

Windows Server 2025 x64 Operating System Images

Cisco UCS Director Bare Metal Agent supports PXE boot and installation operations for Windows 2025 x64 OS images and PXE boot tasks used in bare metal provisioning workflows.

Prerequisites for Setting Up Windows Server 2025 x64 Operating System Images

Before you install a Windows 2025 OS image in the /opt/cnsaroot/Boot directory of the Bare Metal Agent VM, you must install and set up the following prerequisites:

  • Windows Assessment and Deployment Kit (Windows ADK) version 10.1.26100.2454 and later depending on the Windows version compatibilities with respect to the WinPE.wim file

  • A customized Windows Preinstallation Environment (WinPE.wim) and PXE supporting files

  • Boot Configuration Data (BCD) file

  • Windows installation files (the files extracted from the ISO)


Note


You do not need to manually create a Windows answer file when setting up Windows OS images. Bare Metal Agent builds the Windows answer file necessary to support your PXE Boot request, based on the information you provide when you create the PXE boot request.


To install and set up the images, download the following:


Tip


We recommend that you use the ISO download file, which contains all editions, including Standard, Enterprise, Datacenter, and Web. You can typically remove all editions except for Standard and Datacenter.


After the system image is in place, perform the following additional procedures:

  • Set up WinPE and copy the supporting files to the Network Service Agent server for the PXE boot.

  • Copy the Windows installation files to the server path.

Creating a Custom WinPE and Copying the PXE Supported Files for Windows 2025


Note


The /opt/cnsaroot/Boot folder is static, and each Bare Metal Agent can have only one boot folder.


Before you begin

Complete the prerequisites listed in Prerequisites for Setting Up Windows Server 2025 x64 Operating System Images.

Procedure


Step 1

Download an ADK version that supports Windows 2025 and install it on a Windows 2025 machine.

Note

 

When you specify the features to include in the download, you must include the Windows PE and Deployment Tools.

Step 2

Navigate to the Windows Pre-installation Environment folder in the ADK tools and execute copype.cmd to create the files that WinPE requires.

 
Copype.cmd amd64 C:\WinPE_amd64
 

The target directory contains the WinPE.wim file. The latest ADK versions create a boot.wim file, which needs to be renamed to WinPE.wim.

Step 3

In the Windows machine that has the ADK tools installed, create a directory. Copy the WinPE.wim file from C:\WinPE_amd64/media/sources to the directory you have created.

Step 4

At the command line, navigate to the ADK installed folder.

Step 5

Mount WinPE.wim to a folder.

Step 6

Add the drivers from their folder locations to the WinPE image.

Use the following DISM.exe command when you know the paths to the drivers that you want to add.


// The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k25x64 directory and the \mount subdirectory have been created before running the command.
DISM.exe /mount-wim /wimfile:c:\win2k25x64\WinPE.wim /index:1 /mountdir:c:\win2k25x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k25x64\mount /Add-Driver /driver:C:\test\drivers\1.inf /driver:C:\test\drivers\2.inf /driver:C:\test\drivers\3.inf

Use the following DISM.exe command when you do not know the paths to the drivers that you want to add and need to query all sub folders.


 // The DISM.exe command mounts the WinPE to a folder.
// In this example, the c:\win2k25x64 directory and the \mount subdirectory have been created before running the command. 
DISM.exe /mount-wim /wimfile:c:\win2k25x64\WinPE.wim /index:1 /mountdir:c:\win2k25x64\mount

// To add individual driver files to WinPE image, use the following format.
DISM.exe /image:c:\win2k25x64\mount /Add-Driver /driver:c:\test\drivers /Recurse

Step 7

In WinPE.wim, add the required PowerShell packages and edit the paths in each command with the correct mount point and ADK installation path for your environment.

Note

 

The PowerShell packages and file names that you need to add to WinPE.wim are dependent upon the version of Windows and WinPE.wim.To determine which PowerShell packages you need to add, see the compliance report on the Microsoft website. For information about the commands to add the necessary packages for PowerShell, see the WinPE: Adding PowerShell support to Windows PE Technet Page. The PowerShell package files shown below are provided for reference and will vary depending on the version of Windows and WinPE.wim.


\\ Sample PowerShell package files. 
\\ The PowerShell packages and file names that you need to add to WinPE.wim vary depending on the version of Windows and WinPE.wim.

Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFX.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFX_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-DismCmdlets.cab"
 
Dism /Add-Package /Image:"C:\win2k25x64\mount" /PackagePath:"C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab"
 

Step 8

Navigate to \windows\system32 in the mount folder and do the following:

  1. Edit startnet.cmd.

  2. Paste the following entries into the file in the order shown, to update the password for samba service and the PXE interface IP address for Bare Metal Agent as required for your environment:


wpeinit
wpeutil.exe InitializeNetwork
wpeutil.exe disablefirewall
ECHO OFF
net use R: \\Baremetal_Agent_PXE_IP_Address\bits /user:smbuser password
ECHO ON
R:
Powershell.exe -NonInteractive -NoLogo -ExecutionPolicy bypass -command R:\enroute.ps1

Note

 
  • Do not change any information in the startnet.cmd file, except for the password for samba service and the PXE interface IP address of the Bare Metal Agent.

  • Make sure that you modify the IP addresses in all the entries so that they point to the Bare Metal Agent IP address.

  • All drive letter references (such as the reference to an R: drive) must match in both the startnet.cmd file and the Windows answer file. By default, Bare Metal Agent comes with an R: drive letter assignment.

Step 9

Save the startnet.cmd file.

Step 10

After you have confirmed that the startnet.cmd is updated correctly, unmount WinPE.wim with the DISM Unmount command and use the /commit option to save the modified startnet.cmd file.

 
DISM.exe /Unmount-Wim /Mountdir:c:\win2k25x64\mount /commit
 

Caution

 

Do not leave any files open that are located in the mounted directory when you unmount WinPE.wim. If you have any files open, the unmount process might fail.


What to do next

Install and set up (as necessary) the Boot Configuration Data (BCD) file.

Preparing Windows Server 2025 x64 Installation Files

Before you begin

You must have the following in place:

  • Windows Assessment and Deployment Kit (ADK, sometimes called as Windows ADK) that is compatible with the Windows 2025 x64 operating system

  • Windows 2025 x64 ISO image

Procedure


Step 1

Launch the command prompt (click Start > All Programs > Accessories > Command Prompt).

Step 2

Create a new folder and extract the Windows 2025 x64 ISO image installation files to the folder.

mkdir c:\win2k25x64-iso

Step 3

Take a backup copy of the install.wim file.

cd c:\win2k25x64-iso\sources
copy install.wim install.wim.backup

The backup is recommended as device drivers will be added to the install.wim file in the subsequent steps. The device drivers are used during the installation of the Windows 2025 x64 operating system.

Step 4

Create a folder to mount the c:\win2k25x64-iso\sources\install.wim file.

mkdir c:\win2k25x64-mount

Step 5

Change the directory to the Windows ADK installation directory.

cd C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\DISM

Step 6

List the supported Windows 2025 x64 Editions.

dism.exe /Get-ImageInfo /imagefile:c:\win2k25x64-iso\sources\install.wim

The supported Windows 2025 x64 editions are listed, with each edition represented by an Index ID. Choose the corresponding Index ID of the Windows 2025 x64 Edition that you want to install through PXE.


Index : 1
Name : Windows Server 2025 Standard
Description : (Recommended) This option omits most of the Windows graphical environment. Manage with a command prompt and PowerShell, or remotely with Windows Admin Center or other tools.
Size : 10,706,668,594 bytes

Index : 2
Name : Windows Server 2025 Standard (Desktop Experience)
Description : This option installs the full Windows graphical environment, consuming extra drive space. It can be useful if you want to use the Windows desktop or have an app that requires it.
Size : 23,309,091,550 bytes

Index : 3
Name : Windows Server 2025 Datacenter
Description : (Recommended) This option omits most of the Windows graphical environment. Manage with a command prompt and PowerShell, or remotely with Windows Admin Center or other tools.
Size : 10,709,582,325 bytes

Index : 4
Name : Windows Server 2025 Datacenter (Desktop Experience)
Description : This option installs the full Windows graphical environment, consuming extra drive space. It can be useful if you want to use the Windows desktop or have an app that requires it.
Size : 23,375,974,482 bytes

Step 7

Mount the install.wim image with Index ID 2 to install Windows Server 2025 Standard (Desktop Experience).

DISM.exe /mount-wim /wimfile:c:\win2k25x64-iso\sources\install.wim /index:5 mountdir:c:\win2k25x64-mount

Step 8

Add the device drivers to the install.wim image by using the DISM.exe command from the Windows ADK installation directory.

Step 9

Add the device drivers to the install.wim image by using the individual driver's absolute path.

DISM.exe /image:c:\win2k25x64-mount /Add-Driver /driver:C:\cisco\drivers\1.inf /driver:C:\cisco\drivers\2.inf /driver:C:\cisco\drivers\3.inf

Alternatively, you can add the device drivers to the install.wim image by automatically searching through all the subfolders of the device drivers directory.
DISM.exe /image:c:\win2k25x64-mount /Add-Driver /driver:C:\cisco\drivers /Recurse

Step 10

Unmount the install.wim image and commit the changes.

DISM.exe /unmount-wim /mountdir:c:\win2k25x64-mount /commit

Note

 

When all the device drivers have been added, the install.wim image is ready to be used.


Installing and Setting Up the Boot Configuration Data File

The Boot Configuration Data (BCD) file contains the boot configuration parameters. It controls how the operating system is started in Windows and is used to load the base kernel (WinPE.wim) from the PXE server. You do not need to create a BCD file. Bare Metal Agent provides a BCD file with default paths that you can use.

By default, the BCD file points to the /Boot/WinPE.wim and boot.sdi files. These filenames are case sensitive.


Note


We recommend that you use a set of standard names for Bare Metal Agent configuration purposes. The folder name should be Boot. The winpe file name should be WinPE.wim. Use corresponding filenames such as boot.sdi. The created BCD file should be in uppercase, and this file will not have any file extension. Bare Metal Agent delivers the BCD file to /opt/cnsaroot/Boot, which contains a default path pointing to /opt/cnsaroot/Boot/WinPE.wim. This file can be used by any Windows OS version, unless you change the path names.


The command bcdedit.exe used to create BCD files is commonly available in the Windows operating systems root directory: c:\windows\system32.

Before you begin

Create a custom WinPE and copy the PXE supported files

Procedure


Step 1

Navigate to the directory that contains the bcdedit.exe command and run the following sequence of commands to create the BCD file.

The bcdedit.exe command is commonly available in the Windows operating systems root directory: c:\windows\system32.

Step 2

bcdedit.exe /createstore BCD

Step 3

bcdedit.exe /store BCD /create {ramdiskoptions} /d "Ramdisk options"

Step 4

bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdidevice boot

Step 5

bcdedit.exe /store BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi

Step 6

bcdedit.exe /store BCD /create /d "My WinPE Boot Image" /application osloader

At this point, the GUID is displayed. Replace {a20f8db8-7459-11e2-8ec3-00155d37efa7} in the following steps with the GUID from your system.

Step 7

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} systemroot \Windows

Step 8

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} detecthal Yes

Step 9

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} winpe Yes

Step 10

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

Step 11

bcdedit.exe /store BCD /set {a20f8db8-7459-11e2-8ec3-00155d37efa7} device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}

Step 12

bcdedit.exe /store BCD /create {bootmgr} /d "Windows 2025 BootManager"

Step 13

bcdedit.exe /store BCD /set {bootmgr} timeout 30

Step 14

bcdedit.exe /store BCD /displayorder {a20f8db8-7459-11e2-8ec3-00155d37efa7}

Step 15

Use the following command to verify that the configuration names are correct: bcdedit.exe /store BCD /enum all


What to do next

Copy the Windows installation ISO image to the server folder.

Copying the Windows Installation Files to the Server Folder

Before you begin

You must have the following in place:

  • Customized winPE.wim and PXE boot files in the opt/cnsaroot/Boot directory in the Bare Metal Agent VM.

  • Configured BCD file in the /opt/cnsaroot/Boot directory in the Bare Metal Agent VM.

  • Windows installation files (ISO version).

Procedure


Step 1

Upload the Windows OS image file, customized WinPE.wim file, and customized BCD file (optional). For more information, see Uploading an OS Image File.

Step 2

Provision the Windows OS image. For more information, see Provisioning an OS Image.

Step 3

Customize install.wim image file from c:\Win2k25x64-iso\sources to /tmp folder.

Step 4

Move the install.wim image file from /tmp to /samba/Win2k25x64/sources folder.

mv /tmp/install.wim /samba/Win2k25x64/sources/

Step 5

Open the /samba/notifications/notify.ps1 file and verify that the IP address matches the PXE IP address of Bare Metal Agent.

Note

 

Do not change the folder paths, filenames, or folder names.

The following is a sample of the contents of a Win2k25x64 folder:


boot
efi
sources
support
autorun.inf
bootmgr.efi
setup.exe

Using MEMDISK for Deploying Multiple Versions of Windows Simultaneously

Currently, Bare Metal Agent adopts the Microsoft Windows PXE boot process, which expects WinPE.wim to be placed in the /tftproot/Boot folder. This process results in maintaining a single WinPE for deploying multiple versions of Windows simultaneously from Bare Metal Agent. To use different WinPE files for deploying different versions of Windows simultaneously, you have to rename each WinPE.wim file manually according to the BCD file. To overcome this limitation, you can use MEMDISK to boot the ISO file. The MEMDISK file is available in the /opt/cnsaroot folder in Bare Metal Agent, as part of syslinux. When you use MEMDISK , the ISO file can be placed anywhere in the TFTP root directory in Bare Metal Agent.

Requirements for Using MEMDISK

To use MEMDISK in Bare Metal Agent, create a bootable WINPE ISO file and then modify the MAC file template.

Creating Bootable WINPE File for Windows Server 2008 R2, 2012, 2012 R2, or 2016

Before you begin

Install Windows Assessment and Deployment Kit (Windows ADK) that is compatible with the Windows Server version you want to deploy.

Procedure

Step 1

Launch the Deployment and Imaging Tools Environment.

Step 2

Create a new WinPE environment folder:


Copype.cmd amd64 C:\WinPE_amd64

The ‘copype.cmd’ command creates a "WinPE_amd64" folder with three subfolders: fwfiles, media and mount. The folders created are based on the ADK version.

Step 3

Delete bootfix.bin from /media/Boot folder.

Deleting bootfix.bin helps you avoid pressing a key to boot the ISO if any partition is detected on the hard disk drive.

Step 4

Create the customized WinPE.wim (available in the /media/Sources folder) by making the following changes:

  1. Inject PowerShell packages.

  2. Inject drivers (if any)

  3. Edit Startnet.cmd.

For injecting PowerShell packages and editing Startnet.cmd for the Windows Server version you are deploying, see

Step 5

Execute the following command from the terminal to create the bootable WINPE ISO file:

Makewinpemedia.cmd /iso C:\WinPE_amd64 C:\WinPE_amd64.iso

Modifying MAC File Template

To support the MEMDISK boot process in Bare Metal Agent, the MAC file template has to be modified. The /opt/cnsaroot/templates folder in Bare Metal Agent has the configuration files templates for all the three versions of Windows.


Note


As the MAC template file is static, you can either implement the Windows PXE boot process or the MEMDISK boot process. You cannot implement both of them.


Procedure


Step 1

After creating the bootable WINPE ISO file, create a folder called 'windows' under /opt/cnsaroot (folder name is not static) in the BMA tftp root directory.

Step 2

Copy the working bootable WINPE ISO file to the windows folder.

Step 3

When the MEMDISK module is loaded, it adds the ISO image to the memory (specified as INITRD in the MAC File).

Step 4

Pass the two parameters, iso and raw, to MEMDISK using APPEND. (This instructs MEMDISK to load an ISO image and enter in protected mode directly).

Example:

For example, if you want to boot Windows Server 2012 R2 using MEMDISK, make the following changes in pxe.cfg available in the Win2k12R2x64 folder:


default 1
timeout 100
prompt 1
label 1
KERNEL memdisk
INITRD /windows/WinPE.iso
APPEND iso raw