VCP6-DCV blueprint section 8.1:Deploy ESXi Hosts Using Autodeploy

Home / autodeploy / VCP6-DCV blueprint section 8.1:Deploy ESXi Hosts Using Autodeploy

In this post we will continue covering the objective from the blueprint and now its time for Deploy ESXi Hosts Using Autodeploy

before you read this post please make sure you understand section 8.2 which talk about host profiles

The following are the blueprint objective:

  • Describe the components and architecture of an Auto Deploy environment
  • Install and configure Auto Deploy
  • Understand PowerCLI cmdlets for Auto Deploy
  • Deploy multiple ESXi Hosts using Auto Deploy
  • Implement Host Profiles with an Auto Deploy of an ESXi Host
  • Use Auto Deploy Image Builder and PowerCLI scripts

For auto deploy we will need several components:

  1. DHCP server
  2. TFTP server
  3. Auto Deploy server
  4. VMware PowerCLI console.

Before we start make sure to download and install VMware PowerCLI .Here is some configuration you need to do before we starting the auto deploy.

DHCP settings:(in my lab I am using the Windows 2012R2 as my DHCP server)

DHCP1

For TFTP server  i am using Microsoft Deployment Service

WDS5

To enable AudoDeploy on vCSA. click on vCenter>>Services>>Auto Deploy >> Start

AutoDeploy2

After you enable the service you will be able to boot zip file for the TFTP, Extract the zip file and locate them in your TFTP folder.

AutoDeploy3

Here are the steps that we need to to take in the PowerCLI to deploy ESXi host (with no host profile)

  • Enable remote sign
  • Connecting to vCenter
  • Connect to VMware online depot
  • Get the list of all available images to download
  • Download the Offline bundle
  • Disconnect from VMware depot
  • Connect to the local depot
  • Create the deployment rule
  • Make the deployment rule active
  • boot the machine

So lets start:

Enable remote sign Set-ExecutionPolicy RemoteSigned . click Y to enable the remore execution policy 

PowerCLI1

Connecting to vCenter  – Connect-VIServer -Server socalvcenter.vsphere6.lab.local -Protocol https -User xxx -Password xxxthe output show that we are connected

PowerCLI2

Connect to VMware online depot – Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml 

PowerCLI3

Get the list of all available images to download and download (lets get all the ESXi6 version) –  Get-EsxImageProfile -name “ESXi-6*”

PowerCLI4

Download the image – Export-ESxImageProfile -ImageProfile ESXi6-0.0-2494585-standard – ExportToBundle -Filepath c:\AutoDepoly\esxi6.0.zipPowerCLI5

Disconnect from VMware software Depot:- Get-esxSoftwareDepot | Remove-ESXSoftwareDepot

PowerCLI6point1

Connect to the local depot – Add-EsxSoftwareDepot C:\AutoDeploy\esxi6.0.0.zip

PowerCLI7

Create a Deployment rule – New-DeployRule -Name “Install” -item “esxi6.0.0” -pattern “ipv4=192.168.128.200-192.168.128.205

PowerCLI8

Now that we have the Install Rule we need to make it active – Add-DeployRule -DeployRule Install

PowerCLI9

When you start the new host machine (i use VMware workstation for the new host)

PowerCLI10

 

Implement Host Profiles with an Auto Deploy of an ESXi Host:

The process is the same as the above but with minor changes ,you will first understand how host profile work(look at my post about host profile)

The changes:

  • Have you Host profile ready and compliant
  • Connect to the local depot (we already download the image no need to connect to VMware depot)
  • Assign variable to the image $img=GetImageProfile
  • Add a new deployment rule that include the host profile.
  • Activate the new  deployment rule

PowerCLI12

Verify:

PowerCLI15

Use Auto Deploy Image Builder and PowerCLI scripts:

Basically you can update your Auto deploy environment with the image builder using PowerCli

The process is to connect to VMware online depot and injecting new VIB to your image and then download the new image.

Here is a Screenshots of injecting new “esx-base” VIB

ImageBuilder4

 

Thanks for reading

Mordi.

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *