Skip to content

Commit

Permalink
AUSTA-270: Add check step for /kickstart_isos on ESXi Host (#13)
Browse files Browse the repository at this point in the history
* AUSTA-215: Added checks to see if drivers_{newOsNode.fqn}.iso exists before running steps "Copy Drivers ISO to ESXi Host" and "Load Drivers ISO into VM".

* AUSTA-216: Removed Guest Type check in steps "Copy Drivers ISO to ESXi Host" and "Load Drivers ISO into VM".

* AUSTA-217: Created blueprint "Perform Deploy ESXi Drivers to a Drop Directory".

* AUSTA-218: Renamed newOsNode parameters to be newVmNode.

* AUSTA-218: Added verbose flag for mkdir in step "Create ESXi Drivers Drop Directory".

* AUSTA-218: Updated comment for step "Load Drivers ISO into VM".

* AUSTA-218: Added step "Set Boot Order UEFI".

* AUSTA-218: Fixed bug in step "Copy Drivers ISO to ESXi Host".

* AUSTA-218: Increased timeout for "Test if VMWare Drivers Installed".

* AUSTA-218: Changed back "Set Boot Order" to what it was before.

* AUSTA-218: Increased timeout for "Test if VMWare Drivers Installed".

* AUSTA-218: Increased timeout for "Test if VMWare Drivers Installed".

* AUSTA-227: Added comments to steps.

* AUSTA-251: First working version of step "Delete ISO on ESXi Host".

* AUSTA-251: Added step "Delete Drivers ISO on ESXi Host".

* AUSTA-251: Added step "Detach All CD Drives".

* AUSTA-251: Added comments to steps.

* AUSTA-258: Set step " Test if VMWare Drivers Installed" to continue on fail.

* AUSTA-258: Added an initial call to driverquery for step " Test if VMWare Drivers Installed".

* AUSTA-260: Hardcoded these steps to use "/kickstart_isos" for vmwareBootIsoDirectory.

* AUSTA-215: Added checks to see if drivers_{newOsNode.fqn}.iso exists before running steps "Copy Drivers ISO to ESXi Host" and "Load Drivers ISO into VM".

* AUSTA-216: Removed Guest Type check in steps "Copy Drivers ISO to ESXi Host" and "Load Drivers ISO into VM".

* AUSTA-217: Created blueprint "Perform Deploy ESXi Drivers to a Drop Directory".

* AUSTA-218: Renamed newOsNode parameters to be newVmNode.

* AUSTA-218: Added verbose flag for mkdir in step "Create ESXi Drivers Drop Directory".

* AUSTA-218: Updated comment for step "Load Drivers ISO into VM".

* AUSTA-218: Added step "Set Boot Order UEFI".

* AUSTA-218: Fixed bug in step "Copy Drivers ISO to ESXi Host".

* AUSTA-218: Increased timeout for "Test if VMWare Drivers Installed".

* AUSTA-218: Changed back "Set Boot Order" to what it was before.

* AUSTA-218: Increased timeout for "Test if VMWare Drivers Installed".

* AUSTA-218: Increased timeout for "Test if VMWare Drivers Installed".

* AUSTA-227: Added comments to steps.

* AUSTA-251: First working version of step "Delete ISO on ESXi Host".

* AUSTA-251: Added step "Delete Drivers ISO on ESXi Host".

* AUSTA-251: Added step "Detach All CD Drives".

* AUSTA-251: Added comments to steps.

* AUSTA-258: Set step " Test if VMWare Drivers Installed" to continue on fail.

* AUSTA-258: Added an initial call to driverquery for step " Test if VMWare Drivers Installed".

* AUSTA-260: Hardcoded these steps to use "/kickstart_isos" for vmwareBootIsoDirectory.

* AUSTA-264: Renamed the bash Steps for Linux worker to end with " with macOS or Linux Worker".

* AUSTA-269: Added the "with Windows Worker" versions of helper blueprints.a

* AUSTA-264: Renamed the bash Steps for Linux worker to end with " with macOS or Linux Worker".

* AUSTA-265: First draft of "Build Virtual Machine on ESXi with Windows Worker".

* AUSTA-269: Added the "with Windows Worker" versions of helper blueprints.a

* AUSTA-270: Added the check steps "Check if kickstart_isos Exist on ESXi Host with macOS or Linux Worker" and "Check if kickstart_isos Exist on ESXi Host with Windows Worker".

---------

Co-authored-by: Default User <default@email.com>
Co-authored-by: brentonford <brenton.ford@synerty.com>
  • Loading branch information
3 people authored Oct 20, 2023
1 parent 38750f4 commit 4b42662
Show file tree
Hide file tree
Showing 12 changed files with 524 additions and 166 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ This Project contains the following Blueprints.
### Deploy VMWare Drivers on macOS or Linux Worker


### Deploy VMWare Drivers on Windows Worker

### Perform Delete ISOs on ESXi Host with macOS or Linux Worker


Expand All @@ -93,15 +95,12 @@ This Project contains the following Blueprints.
### Perform Deploy ESXi Drivers to a Drop Directory with Windows Worker


### Setup VMWare Tools on Windows

Post Windows install setup of VMWare tools for new VM Windows node.

### Deploy VMWare Drivers on Windows Worker
### Perform Test if VMWare Drivers Installed on Windows


### Perform Test if VMWare Drivers Installed on Windows
### Setup VMWare Tools on Windows

Post Windows install setup of VMWare tools for new VM Windows node.



Expand Down
165 changes: 136 additions & 29 deletions docs/Build-Virtual-Machine-on-ESXi-with-Windows-Worker.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,105 +205,113 @@ <h6 class="text-right">



<p class="text-muted pt-2">
<a href="#checkifkickstartisosexistonesxihostwithwindowsworker">
<strong>Step 1 -</strong> Check if kickstart_isos Exist on ESXi Host with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#setpowerclioptionswithwindowsworker">
<strong>Step 1 -</strong> Set PowerCLI Options with Windows Worker
<strong>Step 2 -</strong> Set PowerCLI Options with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#deletevmwithwindowsworker">
<strong>Step 2 -</strong> Delete VM with Windows Worker
<strong>Step 3 -</strong> Delete VM with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#createvmwithwindowsworker">
<strong>Step 3 -</strong> Create VM with Windows Worker
<strong>Step 4 -</strong> Create VM with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#configurebootfirmwarewithwindowsworker">
<strong>Step 4 -</strong> Configure Boot Firmware with Windows Worker
<strong>Step 5 -</strong> Configure Boot Firmware with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#enablesaswithwindowsworker">
<strong>Step 5 -</strong> Enable SAS with Windows Worker
<strong>Step 6 -</strong> Enable SAS with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#enable3dwithwindowsworker">
<strong>Step 6 -</strong> Enable 3D with Windows Worker
<strong>Step 7 -</strong> Enable 3D with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#setbootorderwithwindowsworker">
<strong>Step 7 -</strong> Set Boot Order with Windows Worker
<strong>Step 8 -</strong> Set Boot Order with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#setnetworkadaptertovmxnet3">
<strong>Step 8 -</strong> Set Network Adapter to vmxnet3
<strong>Step 9 -</strong> Set Network Adapter to vmxnet3
</a>
</p>



<p class="text-muted pt-2">
<a href="#copyisotohostwithwindowsworker">
<strong>Step 9 -</strong> Copy ISO To Host with Windows Worker
<strong>Step 10 -</strong> Copy ISO To Host with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#copydriversisotoesxihostwithwindowsworker">
<strong>Step 10 -</strong> Copy Drivers ISO to ESXi Host with Windows Worker
<strong>Step 11 -</strong> Copy Drivers ISO to ESXi Host with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#loadosisointovmwithwindowsworker">
<strong>Step 11 -</strong> Load OS ISO into VM with Windows Worker
<strong>Step 12 -</strong> Load OS ISO into VM with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#loaddriversisointovmwithwindowsworker">
<strong>Step 12 -</strong> Load Drivers ISO into VM with Windows Worker
<strong>Step 13 -</strong> Load Drivers ISO into VM with Windows Worker
</a>
</p>



<p class="text-muted pt-2">
<a href="#startvmwithwindowsworker">
<strong>Step 13 -</strong> Start VM with Windows Worker
<strong>Step 14 -</strong> Start VM with Windows Worker
</a>
</p>

Expand Down Expand Up @@ -397,17 +405,17 @@ <h6 class="text-right">


<div class="row pt-5">
<h3 id="setpowerclioptionswithwindowsworker">
<a href="#setpowerclioptionswithwindowsworker">
<strong>Step 1 -</strong> Set PowerCLI Options with Windows Worker
<h3 id="checkifkickstartisosexistonesxihostwithwindowsworker">
<a href="#checkifkickstartisosexistonesxihostwithwindowsworker">
<strong>Step 1 -</strong> Check if kickstart_isos Exist on ESXi Host with Windows Worker
</a>
</h3>
</div>

<div class="row">
<div class="description col px-0">
<p>
<p>Sets PowerShell CLI options.</p>
<p>Checks if the <code>/kickstart_isos</code> directory exists on the ESXi host.</p>
</p>
</div>
</div>
Expand Down Expand Up @@ -444,6 +452,105 @@ <h3 id="setpowerclioptionswithwindowsworker">



<div class="row">
<p>
Execute the following script:
</p>
</div>
<div class="row">
<div class="col px-0">
<pre>
<code class="language-sql py-0">
$ErrorActionPreference = &quot;Stop&quot;
Import-Module VMware.VimAutomation.Core

Connect-VIServer {vmwareVcenterNode.ip} `
-User &quot;{vmwareVcenterUser.user}&quot; `
-Password &#x27;{vmwareVcenterUser.password}&#x27;

if ($? -eq $false) {
Write-Host &quot;Error: Not connected.&quot;
exit 1
}

# Get the Datastore
$datastore = Get-Datastore -Name &#x27;{vmStoragePoolName}&#x27;
$datastore

# Create the DS drive
if (Test-Path &quot;ds:&quot;) {
Remove-PSDrive ds -Force
}

if ($datastore -is [System.Array]) {
Write-Host &quot;Get-Datastore returned multiple datastores, using first item in array..&quot;
$datastore = $datastore[0]
}

New-PSDrive -Location $datastore -Name ds -PSProvider VimDatastore -Root &quot;&quot;

$vmwareBootIsoDirectory = &quot;/kickstart_isos&quot;

# Ensure the destination dir exists
$KICKSTART_ISOS_DIR=&quot;ds:$vmwareBootIsoDirectory/&quot;
$KICKSTART_ISOS_DIR = $KICKSTART_ISOS_DIR -Replace &quot;/&quot;,&quot;\&quot;
Write-Host &quot;KICKSTART_ISOS_DIR=$KICKSTART_ISOS_DIR&quot;

Get-Location

if (-Not (Test-Path $KICKSTART_ISOS_DIR)) {
Write-host &quot;Please create a $vmwareBootIsoDirectory directory on the ESXi Host.&quot;
exit 1
} else {
Write-host &quot;$vmwareBootIsoDirectory directory exists on the ESXi Host. Great.&quot;
}

# Remove the DS Drive
Remove-PSDrive ds -Force
</code>
</pre>
</div>
</div>









<div class="row pt-5">
<h3 id="setpowerclioptionswithwindowsworker">
<a href="#setpowerclioptionswithwindowsworker">
<strong>Step 2 -</strong> Set PowerCLI Options with Windows Worker
</a>
</h3>
</div>

<div class="row">
<div class="description col px-0">
<p>
<p>Sets PowerShell CLI options.</p>
</p>
</div>
</div>
















<div class="row">
<p>
Execute the following script:
Expand Down Expand Up @@ -473,7 +580,7 @@ <h3 id="setpowerclioptionswithwindowsworker">
<div class="row pt-5">
<h3 id="deletevmwithwindowsworker">
<a href="#deletevmwithwindowsworker">
<strong>Step 2 -</strong> Delete VM with Windows Worker
<strong>Step 3 -</strong> Delete VM with Windows Worker
</a>
</h3>
</div>
Expand Down Expand Up @@ -558,7 +665,7 @@ <h3 id="deletevmwithwindowsworker">
<div class="row pt-5">
<h3 id="createvmwithwindowsworker">
<a href="#createvmwithwindowsworker">
<strong>Step 3 -</strong> Create VM with Windows Worker
<strong>Step 4 -</strong> Create VM with Windows Worker
</a>
</h3>
</div>
Expand Down Expand Up @@ -660,7 +767,7 @@ <h3 id="createvmwithwindowsworker">
<div class="row pt-5">
<h3 id="configurebootfirmwarewithwindowsworker">
<a href="#configurebootfirmwarewithwindowsworker">
<strong>Step 4 -</strong> Configure Boot Firmware with Windows Worker
<strong>Step 5 -</strong> Configure Boot Firmware with Windows Worker
</a>
</h3>
</div>
Expand Down Expand Up @@ -735,7 +842,7 @@ <h3 id="configurebootfirmwarewithwindowsworker">
<div class="row pt-5">
<h3 id="enablesaswithwindowsworker">
<a href="#enablesaswithwindowsworker">
<strong>Step 5 -</strong> Enable SAS with Windows Worker
<strong>Step 6 -</strong> Enable SAS with Windows Worker
</a>
</h3>
</div>
Expand Down Expand Up @@ -811,7 +918,7 @@ <h3 id="enablesaswithwindowsworker">
<div class="row pt-5">
<h3 id="enable3dwithwindowsworker">
<a href="#enable3dwithwindowsworker">
<strong>Step 6 -</strong> Enable 3D with Windows Worker
<strong>Step 7 -</strong> Enable 3D with Windows Worker
</a>
</h3>
</div>
Expand Down Expand Up @@ -893,7 +1000,7 @@ <h3 id="enable3dwithwindowsworker">
<div class="row pt-5">
<h3 id="setbootorderwithwindowsworker">
<a href="#setbootorderwithwindowsworker">
<strong>Step 7 -</strong> Set Boot Order with Windows Worker
<strong>Step 8 -</strong> Set Boot Order with Windows Worker
</a>
</h3>
</div>
Expand Down Expand Up @@ -983,7 +1090,7 @@ <h3 id="setbootorderwithwindowsworker">
<div class="row pt-5">
<h3 id="setnetworkadaptertovmxnet3">
<a href="#setnetworkadaptertovmxnet3">
<strong>Step 8 -</strong> Set Network Adapter to vmxnet3
<strong>Step 9 -</strong> Set Network Adapter to vmxnet3
</a>
</h3>
</div>
Expand Down Expand Up @@ -1049,7 +1156,7 @@ <h3 id="setnetworkadaptertovmxnet3">
<div class="row pt-5">
<h3 id="copyisotohostwithwindowsworker">
<a href="#copyisotohostwithwindowsworker">
<strong>Step 9 -</strong> Copy ISO To Host with Windows Worker
<strong>Step 10 -</strong> Copy ISO To Host with Windows Worker
</a>
</h3>
</div>
Expand Down Expand Up @@ -1159,7 +1266,7 @@ <h3 id="copyisotohostwithwindowsworker">
<div class="row pt-5">
<h3 id="copydriversisotoesxihostwithwindowsworker">
<a href="#copydriversisotoesxihostwithwindowsworker">
<strong>Step 10 -</strong> Copy Drivers ISO to ESXi Host with Windows Worker
<strong>Step 11 -</strong> Copy Drivers ISO to ESXi Host with Windows Worker
</a>
</h3>
</div>
Expand Down Expand Up @@ -1273,7 +1380,7 @@ <h3 id="copydriversisotoesxihostwithwindowsworker">
<div class="row pt-5">
<h3 id="loadosisointovmwithwindowsworker">
<a href="#loadosisointovmwithwindowsworker">
<strong>Step 11 -</strong> Load OS ISO into VM with Windows Worker
<strong>Step 12 -</strong> Load OS ISO into VM with Windows Worker
</a>
</h3>
</div>
Expand Down Expand Up @@ -1347,7 +1454,7 @@ <h3 id="loadosisointovmwithwindowsworker">
<div class="row pt-5">
<h3 id="loaddriversisointovmwithwindowsworker">
<a href="#loaddriversisointovmwithwindowsworker">
<strong>Step 12 -</strong> Load Drivers ISO into VM with Windows Worker
<strong>Step 13 -</strong> Load Drivers ISO into VM with Windows Worker
</a>
</h3>
</div>
Expand Down Expand Up @@ -1426,7 +1533,7 @@ <h3 id="loaddriversisointovmwithwindowsworker">
<div class="row pt-5">
<h3 id="startvmwithwindowsworker">
<a href="#startvmwithwindowsworker">
<strong>Step 13 -</strong> Start VM with Windows Worker
<strong>Step 14 -</strong> Start VM with Windows Worker
</a>
</h3>
</div>
Expand Down
Loading

0 comments on commit 4b42662

Please sign in to comment.