VMware-vSphere-Auto-Deploy-configuration-guide-Part2

In the second part of Auto Deploy configuration guide, we will continue with setup and we will boot ESXi.

vSphere Auto Deploy Software Depot – PowerCLI basic deployment

In order to provision ESXi hosts with Auto Deploy, we need to create Software Depot. In order to do it, you need to install PowerCLI. I am using latest version 5.5 which you can download from VMware website PowerCLI 5.5 Download link.

Connect to a vCenter server and start PowerCLI.

After successful connection, we have to add ESXi Offline Bundle ZIP file into the repository. But hey, first we need to download it. As always you can find it on VMware website, but I will provide direct URL to file – ESXi 5.5 Offline Bundle.

I placed it in following directory E:\SoftwareDepot\ and we add the repository using the following command in PowerCLI.

VMware vSphere Auto Deploy Software Depot Powercli - 1

Now after creating Software Depot we can create first deployment rule

And as you see Image is imported into Auto Deploy.

 

After successful import, we just need to activate rule set by typing following command in PowerCLI.

As you see on screenshot ESXi is booting using Auto Deploy.

VMware vSphere Auto Deploy Software Depot Powercli - 2

VMware vSphere Auto Deploy Software Depot Powercli - 3

vSphere Auto Deploy Host Profile

After successful boot from the network, we have three new ESXi hosts connected to vCenter.

VMware vSphere Auto Deploy - Booted

We see that deployment works fine but to make this easier and less time-consuming we will use Host Profile. Host Profile is captured configuration of ESXi hosts (we can call it a template or golden image) which can be applied to other ESXi hosts to have consistent and standardized configuration in the environment.

  1. Select ESXi hosts which are already configured so when you will apply host profile to Auto Deployed servers they will be already configured. In order to do it navigate to Host and Clusters and select host. Click Host Profile and Create Profile from Host.
    VMware vSphere Auto Deploy - Host Profiles - 1
  2. Provide a name for host profile and/or description and click Finish.
  3. Go to Host Profiles and you will see that profile was created.
    VMware vSphere Auto Deploy - Host Profiles - 2

vSphere Auto Deploy Software Depot – PowerCLI advanced deployment

In order to do more advanced and more automated deployment, we have to make adjustments in Software Depot. In just a few minutes we will create rules which will allow us to boot ESXi using Auto Deploy with enabled HA agent. The host will be added to the cluster and Host Profile will be applied.

Let us first drop previously created rule to avoid any confusion by typing

In order to check if any rules are still present use following command

  1. We add Software Depot – just VMware Offline Bundle.
  2. We add HA Software Depot from vCenter.
  3. We clone existing depot to add HA features. If you will be asked for vendor type it. In my case, it is VMware, Inc.
  4. We add HA features into an ESXi_5.5 profile.
  5. It is good to export newly created profile into Offline Bundle to store it locally after all changes we did. In order to do that use following command.
  6. We will create deployment rule. Where: -name is Rule name -item is Image Profile name, AutoDeploy is Host Profile name and Cluster2 is cluster name in vCenter. -Pattern might be vendor ID or IP range.
  7. Now we need to activate rule by typing.
  8. As you see on screenshot during boot Host Profile settings are applied.
    VMware vSphere Auto Deploy - PowerCLI advanced 1
  9. All three ESXi hosts are booted using Auto Deploy.
    VMware vSphere Auto Deploy - PowerCLI advanced 2
  10. In order to complete our setup, we need to update Answer File.
    VMware vSphere Auto Deploy - Host Profiles - 3
  11. Click on the host and select Update Answer File.
    VMware vSphere Auto Deploy - Host Profiles - 4
  12. Fill all missing information
    VMware vSphere Auto Deploy - Host Profiles - 6
    and apply Host Profile.
    VMware vSphere Auto Deploy - Host Profiles - 7
  13. As you see on screenshot Cluster2 is compliant with host profile.
    VMware vSphere Auto Deploy - Host Profiles - 8

Stateful caching vs Stateless caching

Before we will finish the post with Cherry on Top let me explain what is stateful and stateless caching.

Stateful means that ESXi is deployed using Auto Deploy and image is saved to hosts internal storage. It can be a traditional hard drive or USB disk. First boot is initiated using network boot and image is deployed locally. Boot order on a host is set to boot from a network during first boot and later on, disk should be set to first. After other reboots disk is used to boot ESXi.

Stateless means that ESXi is deployed using Auto Deploy and image is cached to local USB. The host is using network boot, boot order is set to network first.

VMware vSphere Auto Deploy - Stateless vs Statefull

vSphere Auto Deploy – Stateful ESXi

In order to deploy Stateful ESXi, we need to select in section SystemImageCacheProfileSettings several settings. First, we select Enable stateful installs on the host, second thing is to give arguments for the first disk. In our case local is correct setting – you can provide your own parameters. We want as well to overwrite VMFS on existing disk.
VMware vSphere Auto Deploy - Stateful 1

Here we see what changes will be applied to ESXi.
VMware vSphere Auto Deploy - Stateful 2

And we have summary after Host Profile was applied.
VMware vSphere Auto Deploy - Stateful 3

And we are compliant 🙂
VMware vSphere Auto Deploy - Stateful 4

vSphere Auto Deploy – Stateless ESXi

In order to deploy Stateless ESXi, we need to enable it in section SystemImageCacheProfileSettings. First, we select Enable stateless caching on the host, second thing is to give arguments for the first disk. In our case local is correct setting – you can provide your own parameters.
VMware vSphere Auto Deploy - Stateless 1

After applying host profile and reboot, our host is compliant.
VMware vSphere Auto Deploy - Stateless 2
How do we check if it is really cached and not boot from disk? Simply we can see in host settings that it has only two iSCSI disks and CD-ROM. I removed as well disk from ESXi4 on purpose.
VMware vSphere Auto Deploy - Stateless 3

 

VMware vSphere Auto Deploy configuration guide – Part 2
Rate this post
Wojciech Marusiak
Social Media

Wojciech Marusiak

Senior Consultant at VMware Global, Inc.
I am innovative and experienced VMware and Windows Server Engineer with over 10 years in the IT industry specializing in VMware virtualization and Microsoft Server environment.

My experience and skills have been proven by leading vendor certifications like VMware Certified Implementation Expert 6 – Data Center Virtualization, VMware Certified Advanced Professional 6 – Data Center Virtualization Design, VMware Certified Professional 6 - Data Center Virtualization, VMware Certified Professional 6 - Network Virtualization, AWS Certified Solutions Architect - Associate, ITIL V3, VMware vExpert 2014 - 2017 and VMware vExpert NSX 2017 Award.

My blog wojcieh.net - was voted #43 in Top vBlog 2017 contest!
Wojciech Marusiak
Social Media

Latest posts by Wojciech Marusiak (see all)