Save to My DOJO
Table of contents
In Part 1 of this series, we went over the workflow of the bare metal deployment process as well as created a web server to host our ISOs. We also got a jump on downloading the latest HP Proliant Support Pack and installed the HP iLO PowerShell cmdlets. Now we are going to build our RAID configuration ISOs and our ESXi install ISO. Let’s get started!
How Does the Automated RAID Configuration Work?
The automated RAID configuration uses SSASScripting.exe which is a component of the HP Proliant Scripting Tools. It allows us to feed the executable an array configuration through a .ini file to create the proper RAID configuration that we want. The SSASScripting.exe application is run through a WinPE image that we boot to. Additionally, we configure that image to run HP’s RAID configuration tool on startup through the startnet.cmd file. So all we have to do is boot up to the WinPE image and poof, we configure our raid and the server gets powered off afterward.
Also, because of how this process works, in order to make up for the fact that we may be building servers with a different number of disks, we will need to create a WinPE image for each scenario. Unfortunately, I haven’t been able to find a better way to do this, if you think of a better way let me know in the comments section below. Once we have the ISO’s created we will store each one on the file server and during the deployment script there will be a parameter for how many disks the server has, this will determine which RAID configuration ISO is mounted during the build process.
At the time of writing this article, HP has created some PowerShell cmdlets that allow you to directly configure the array. This eliminates the need to boot to a WinPE image or create separate disks for each RAID configuration. However, this is only available to the G10 servers right now, so for the sake of backward compatibility with the G9 and G8 models, we will demonstrate how to configure the RAID with the SSASScripting tool.
Create WinPE Image for RAID Configuration
Let’s get started creating our RAID configuration ISOs. Download the HP Proliant Scripting Tool Kit here. Save the zip file to a location and remember where it’s at.
Download the Windows Assessment and Deployment Kit for Windows 10 here.
Install Windows ADK. Choose only the “WinPE” and “Deployment Tools” options:
Click install to install the components. Once installed open up the Deployment and Imaging Tools Environment application from your start menu. Type in the following syntax:
copype x86 c:\winpe
This will copy all the WinPE files that we need to a directory so that we can compile our RAID configuration disks from it. Now we need to modify the boot.wim file to add our HP tools and the startup script. Then we will need to convert it into an ISO. Also, we have to do this for EACH RAID configuration ISO that we want. For example, we have multiple servers with 8 and 16 disks, we will need an ISO for the 8 disk configuration and the 16 disk configuration. This process can be long and tedious, however, I have created a script that will do this all for you. So copy the following code below to a text file and save it as a .ps1:
[CmdletBinding()] param( [Parameter(Mandatory=$True, HelpMessage="Please insert the path to the HP Tools zip file.")] [String]$HPToolsSource, [Parameter(Mandatory=$True, HelpMessage="Please insert the path to the WinPE directory.")] [String]$WinpeDir ) Begin{ #make the temporary directories and unzip the HP Scripting Tools Write-host "Preparing to make RAID Concfig ISOs" -ForegroundColor Cyan $makedirectory = mkdir c:\templocation expand-archive -Path $HPToolsSource -DestinationPath C:\templocation $makedirectory = mkdir c:\templocation\mount #create an array of the possible disk scenarios $DriveConfig = 4..24 } Process{ Foreach ($drives in $DriveConfig) { Write-host "Creating RAID Configuration ISO for a server with $drives drives" -ForegroundColor Yellow #subtract 1 drive for the hotspare $raiddrives = $drives - 1 #mount WIM file to edit $mountstatus = mount-windowsimage -ImagePath "C:\winpe\media\sources\boot.wim" -Path "C:\templocation\mount" -Index 1 #create directory for HP Scripting Tools copy over tools $makedirectory = mkdir C:\templocation\mount\Script -Force Copy-Item "C:\templocation\x64\tools" "C:\templocation\mount\Script" -Container -Recurse -Force copy-item "C:\templocation\Samples\DataFiles\ArraySettings\erase.ini" "C:\templocation\mount\Script" -force #create startnet.cmd "wpeinit x:\script\tools\ssascripting.exe -i x:\script\erase.ini x:\script\tools\ssascripting.exe -i x:\script\Deploy.ini wpeutil shutdown" | out-file C:\templocation\mount\Windows\System32\startnet.cmd -Encoding ascii #create RAID Configuration Script. Creates a 50GB Partition and a 2nd Partition with the remaining disks. "@Action= Configure Method= Custom Controller= SLOT 0 ; PowerMode= MaxPerformance ReadCache= 10 WriteCache= 90 RebuildPriority= High ExpandPriority= Medium ParallelSurfaceScanCount= 1 SurfaceScanMode= Idle SurfaceScanDelay= 3 Latency= Disable DriveWriteCache= Disabled NoBatteryWriteCache= Disabled MNPDelay= 60 IRPEnable= Disabled DPOEnable= Disabled ElevatorSortEnable= Enabled QueueDepth= Automatic PredictiveSpareActivation= Disable ; Array Specifications Array= A Drive= $raiddrives OnlineSpare= 1 ; Logical Drive Specifications LogicalDrive= 1 RAID= 5 Size= 51199 Sectors= 32 StripSize= 256 Caching= Enabled ; Logical Drive Specifications LogicalDrive= 2 RAID= 5 Size= MAX Sectors= 32 StripSize= 256 Caching= Enabled @" | out-file C:\templocation\mount\Script\Deploy.ini -Encoding ascii #Create iso name format $isoname = ".\" + $drives + "Drives.iso" $mountstatus = Dismount-WindowsImage -Path "C:\templocation\mount" -Save #Create ISO file $Createiso = &"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\x86\Oscdimg\oscdimg.exe" -n -b"C:\winpe\fwfiles\etfsboot.com" "C:\winpe\media" $isoname } remove-item -Path C:\templocation -Recurse -Force }
I’ve copied the code above and saved it to a text file called “New-DiskCFGISO.ps1”:
Now, we will open up an administrative PowerShell console and browse to a directory where we want to create all the ISOs at. In my example its C:\temp:
Now we will run the following syntax. I have the HP Scripting tools downloaded and will specify the zip file as the script will automatically unzip it and copy the files where they need to be. I also reference the location of our winpe directory that we created in the steps above:
PowerShell "c:\temp\New-DiskCFGISO.ps1" -HPToolsSource "C:\Users\Luke\Downloads\hpe-scripting-toolkit-windows-11.10-4.zip" -WinPEDir "C:\winpe"
Now we take a break and let it create the ISO files (there are 20 to create). This process takes a few minutes, but hey it’s better than doing it by hand. Also, note that each file is around 200MB in size so beware of the space requirements. Once the script has completed we can check out ISO files. It does all the way up to 24 disks, so if you have a server with anywhere between 4 to 24 disks we will be able to automatically configure the Array:
Looks like they are all there. Let’s look at them real quick and I’ll go over how they work. I mounted one and drilled down to the “sources” folder. We can see our customized boot.wim:
If we open up this file we can see the stuff that was added, our scripts folder with the HP Tools, as well as our INI files for configuring the RAID:
When we open up the Deploy.ini folder, we can see this holds our RAID configuration for a server with 14 drives (13 Raid 5 and 1 hotspare). If you want to change how this is automatically configured, just edit the “#create RAID Configuration Script” section of my PowerShell script. Check out the HP Scripting Tools Documentation here for help with creating a config to your liking:
Now we just copy our ISO files to our web server and we are done!
Configuring the ESXi Install ISO
For the ESXi install ISO, I have already gone over the process in my previous series “Scripted Deployment of ESXi”. Instead of placing the cfg file on an NFS share, place it on the web server. Also, the kickstart file will be generated on the fly with the deployment script and then saved to the web server, so make sure that the account you are running the script with has access to the web server. In my example, I am making 3 staging slots for deployment, so I will make 3 ESXi install ISOs that are hardcoded to look for their own “ESXiStagingSlot1.cfg” file on the web server. This allows us to make configuration changes to the kickstart file during each deployment and also allows me to deploy up to 3 hosts at a time since there are 3 ISOs and kickstart files. So the Boot.CFG will look like this:
I have 3 ESXi ISO installs on the web server, all hardcoded to grab their config from their respective .cfg file:
We are now done with all the setup. We can proceed with making a few small edits to the deployment script and are ready to give it a run. Be sure to check out our final chapter of automating a bare metal install with ESXi and an HP Proliant Server in part 3. If there’s anything you’re unsure about in this post let me know in the comments below and I’ll get back to you ASAP. Also if you are unsure about ESXi on HP Proliant hardware and want me to cover it in this series, write to me in the comments!
[the_ad id=”4738″][thrive_leads id=’18673′]
Not a DOJO Member yet?
Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!
2 thoughts on "Bare Metal Deployment of ESXi on HP Proliant Hardware: Part 2"
Luke,
First off wanted to say great guide! I am having a bit of an issue when the script reaches the portion to have iLO boot from the WinPe image we created, the image wont fully boot. I confirmed the image was fully transferred from the WebServer, but the server just sits at the Windows logo for hours. I am using a G9 server.
I’ve run into this before. I ended up missing the MIME Type on the web server that allows the files to be downloaded from the server. HPE Servers will hang at the login screen if you map an ISO that isn’t actually there. So test to make sure that you can download the file from the web server.