Deploying Windows 2016 with custom software

This scenario installs the Windows 2016 operating system along with custom software (Java and Eclipse IDE). A custom profile is used that includes the custom software and post-installation scripts to install and configure the custom software. The custom software packages are copied to the host during the deployment and made available for the custom post-install script to use.

Before you begin

This scenario uses the following sample files.

Note:
  • Windows installation scripts can be in one of the following formats: Command file (.cmd), PowerShell (.ps1)

  • Software files and installation scripts are installed from the custom data and files path that you specify during deployment. The default custom data and files path is C:\lxca.

Procedure

To deploy Windows 2016 with custom software, complete the following steps.

  1. Download the Japanese Windows 2016 operating system to the local system, and import the image to the OS-images repository. For more information, see Importing operating-system images.
    1. From the XClarity Administrator menu bar, click Provisioning > Manage OS Images to display the Deploy Operating System: Manage OS Images page.

    2. Click the OS Images tab.

    3. Click Import icon (Import icon).

    4. Click Local Import.

    5. Click Browse to find and select the OS image that you want to import (for example, ja_windows_server_2016_x64_dvd_9720230.iso).

    6. Click Import to upload the image to the OS-images repository.

    7. Wait for the import to complete. This might take a while.

  2. Download the bundle file for Windows 2016 to the local system, and import the image to the OS-images repository. For more information, see Importing device drivers.

    The bundle file contains the latest device drivers and WinPE boot files that you can add to your custom OS-images profiles. This scenario uses a custom boot file, so the boot file in the bundle will not be used.

    1. Click the Driver Files tab.

    2. Click Downloads > Windows Bundle Files to go to the Lenovo Support webpage, and download the bundle file for Windows 2016 to the local system.

    3. Click Import icon (Import icon).

    4. Click Local Import.

    5. Click Browse to find and select the OS image that you want to import (for example, bundle_win2016_20180126130051.zip).

    6. Click Import to upload the file to the OS-images repository.

    7. Wait for the import to complete. This might take a while.

  3. Download the custom software to the local system and import the files into the OS-images repository. For more information, see Importing custom software.
    1. Click the Software tab.

    2. Click the Import icon (Import icon).

    3. Click Local Import.

    4. Select Windows for the operating system.

    5. Click Browse to find and select the configuration-settings file to import (for example, jre-8u151-windows-x64-with-configfile.zip).

    6. Click Import to upload the file to the OS-images repository.

    7. Click the Import icon (Import icon) again.

    8. Click Local Import.

    9. Select Windows for the operating system.

    10. Click Browse to find and select the configuration-settings file to import (for example, eclipse-java-oxygen-1a-win32-x86_64.zip).

    11. Click Import to upload the file to the OS-images repository.

  4. Create a custom post-installation script, and import the file to the OS-images repository.
    Add commands to install the software, for example:
    Write-Output "Install Java...."
    Invoke-Command -ScriptBlock 
           {#predefined.otherSettings.deployDataAndSoftwareLocation#\jre-8u151-windows-x64.exe
           [INSTALLCFG=#predefined.otherSettings.deployDataAndSoftwareLocation#\java_configfile.cfg] 
           /s}
    
    Write-Output "Install Eclipse..."
    $eclipseDir="C:\Users\Administrator\Desktop\eclipse"
    New-Item -ItemType directory -Path $eclipseDir
    Expand-Archive -LiteralPath 
           "#predefined.otherSettings.deployDataAndSoftwareLocation#\eclipse-java-oxygen-1a-win32-x86_64.zip" 
           -DestinationPath $eclipseDir 
    

    Note that these command use the predefined macro for the path to the extracted data and software files (predefined.otherSettings.deployDataAndSoftwareLocation).

    You can also add commands to send custom messages to the jobs log in XClarity Administrator, as shown in the sample file. For more information, see Adding custom status reporting to installation scripts.

    To import the custom installation script, complete these steps. For more information, see Importing custom installation scripts

    1. Click the Installation Scripts tab.

    2. Click the Import icon (Import icon).

    3. Click Local Import.

    4. Select Windows for the operating system.

    5. Click Browse to find and select the unattend file to import (for example, Windows_installSoftware_customScript.ps1).

    6. Click Import to upload the file to the OS-images repository.

  5. Create a custom OS-image profile that includes the custom unattend file. For more information, see Creating a custom OS-image profile.
    1. Click the OS Images tab.

    2. Select an OS-image profile to customize (for example, Datacenter virtualization).

    3. Click Create icon (Create icon) to display the Create Customized Profile dialog.

    4. On the General tab:

      1. Enter a name for the profile (for example, Custom Windows with software).

      2. Use the default value for the Custom data and file path field.

      3. Select None for the customization type.

      4. Click Next.

    5. On the Driver Options tab, click Next. The inbox device drivers are included by default.

    6. On the Boot Options tab, and click Next. The predefined WinPE boot file is selected by default.

    7. On the Software tab, select the software installation files (for example jre-8u151-windows-x64-with-configfile.zip and eclipse-java-oxygen-1a-win32-x86_64.zip), and click Next.

    8. On the Installation Scripts tab, select the installation scripts (for example, Windows_installSoftware_customScript.ps1), and click Next.

    9. On the Summary tab, review the settings.

    10. Click Customize to create the custom OS-image profile.

  6. Deploy the custom OS-image profile to the target servers. For more information, see Deploying an operating-system image.
    1. From the XClarity Administrator menu bar, click Provisioning > Deploy OS Images to display the Deploy Operating System: Deploy OS Images page.

    2. For each target server:

      1. Select the server.

      2. Click Change Selected > Network Settings, and specify the hostname, IP address, DNS, MTU and VLAN settings for the server.

        Tip: VLAN settings are available only when VLAN mode is set in Global Settings > IP Assignment > Use VLANs.
      3. Select the custom OS-image profile (for example, <base_OS>|<timestamp>_Custom Windows with software) from the drop-down list in the Image to Deploy column

        Note: Ensure that all target servers use the same custom profile.
      4. (Optional) Click the License Key icon (License key icon) and specify the license key to use to activate the operating system after it is installed.

      5. Select the preferred storage location where you want to deploy the operating system image from the Storage column.

        Note: To ensure that operating-system deployments are successful, detach all storage from the managed server except the storage that is chosen for the operating-system deployment.
      6. Verify that the deployment status for the selected server is Ready.

    3. Select all target servers, and click the Deploy image icon (Deploy image icon) to initiate the operating-system deployment.

    4. On the Summary tab, review the settings.

    5. Click Deploy to deploy the operating system.