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.
- 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.
From the XClarity Administrator menu bar, click to display the Deploy Operating System: Manage OS Images page.
Click the OS Images tab.
Click Import icon ().
Click Local Import.
Click Browse to find and select the
OS image that you want to import (for example, ja_windows_server_2016_x64_dvd_9720230.iso).
Click Import to upload the image to
the OS-images repository.
Wait for the import to complete. This might take a while.
- 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.
Click the Driver Files tab.
Click to go to the Lenovo
Support webpage, and download the bundle file for Windows 2016 to
the local system.
Click Import icon ().
Click Local Import.
Click Browse to find and select the
OS image that you want to import (for example, bundle_win2016_20180126130051.zip).
Click Import to upload the file to the
OS-images repository.
Wait for the import to complete. This might take a while.
- Download the custom software to the local system and import
the files into the OS-images repository. For more information, see Importing custom software.
Click the Software tab.
Click the Import icon ().
Click Local Import.
Select Windows for the operating system.
Click Browse to find and select the
configuration-settings file to import (for example, jre-8u151-windows-x64-with-configfile.zip).
Click Import to upload the file to the
OS-images repository.
Click the Import icon () again.
Click Local Import.
Select Windows for the operating system.
Click Browse to find and select the
configuration-settings file to import (for example, eclipse-java-oxygen-1a-win32-x86_64.zip).
Click Import to upload the file to the
OS-images repository.
- 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
Click the Installation Scripts tab.
Click the Import icon ().
Click Local Import.
Select Windows for the operating system.
Click Browse to find and select the
unattend file to import (for example, Windows_installSoftware_customScript.ps1).
Click Import to upload the file to the
OS-images repository.
- Create a custom OS-image profile that includes the custom
unattend file. For more information, see Creating a custom OS-image profile.
Click the OS Images tab.
Select an OS-image profile to customize (for example, Datacenter virtualization).
Click Create icon () to display the Create Customized
Profile dialog.
On the General tab:
Enter a name for the profile (for example, Custom Windows with software).
Use the default value for the Custom data and file
path field.
Select None for the customization type.
Click Next.
On the Driver Options tab, click Next. The inbox device drivers are included by default.
On the Boot Options tab, and click Next. The predefined WinPE boot file is selected by default.
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.
On the Installation Scripts tab, select
the installation scripts (for example, Windows_installSoftware_customScript.ps1), and click Next.
On the Summary tab, review the settings.
Click Customize to create the custom
OS-image profile.
- Deploy the custom OS-image profile to the target servers.
For more information, see Deploying an operating-system image.
From the XClarity Administrator menu bar, click to display the Deploy Operating System: Deploy OS Images page.
For each target server:
Select the server.
Click , 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 .
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.
(Optional) Click the License Key icon
() and specify the license key
to use to activate the operating system after it is installed.
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.
Verify that the deployment status for the selected server is Ready.
Select all target servers, and click the Deploy
image icon () to initiate the operating-system
deployment.
On the Summary tab, review the settings.
Click Deploy to deploy the operating
system.