TechRant
Installing ESXi Using vSphere Auto Deploy – Section 6
Jan 26, 2014

Provisioning ESXi Systems with vSphere Auto Deploy – Section 6

 

Provision a Host (First Boot)

 

Provisioning a host that has never been provisioned with Auto Deploy (first boot) differs from subsequent boot processes. You must prepare the host and fulfill all other prerequisites before you can provision the host. You can optionally define a custom image profile with Image Builder PowerCLI cmdlets.

 

Procedure

1. Turn on the host.

The host contacts the DHCP server and downloads iPXE from the location the server points it to. Next, the Auto Deploy server provisions the host with the image specified by the rule engine. The Auto Deploy server might also apply a host profile to the host if one is specified in the rule set. Finally, Auto Deploy adds the host to the vCenter Server system that is specified in the rule set.

Auto deploy 5

2. (Optional) If Auto Deploy applies a host profile that requires user input such as an IP address, the host is placed in maintenance mode. Reapply the host profile with the vSphere Client or the vSphere Web Client and provide the user input when prompted.

 

After the first boot process, the host is running and managed by a vCenter Server system. The vCenter Server stores the host’s image profile, host profile, and location information.

You can now reboot the host as needed. Each time you reboot, the host is reprovisioned by the vCenter Server system.

 

What to do next

 

  • Reprovision hosts as needed.

 

  • If you want to change the image profile, host profile, or location of the host, update the rules and perform a test and repair compliance operation.

 

Reprovisioning Hosts

vSphere Auto Deploy supports multiple reprovisioning options. You can perform a simple reboot or reprovision with a different image profile or a different host profile.

A first boot using Auto Deploy requires that you set up your environment and add rules to the rule set.

 

The following reprovisioning operations are available.

 

  • Simple reboot.
  • Reboot of hosts for which the user answered questions during the boot operation.
  • Reprovision with a different image profile.
  • Reprovision with a different host profile.

 

 Reprovision Hosts with Simple Reboot Operations

A simple reboot of a host that is provisioned with Auto Deploy requires only that all prerequisites are still met. The process uses the previously assigned image profile, host profile, and vCenter Server location. Setup includes DHCP server setup, writing rules, and making an image profile available to the Auto Deploy infrastructure.

 

Prerequisites

 

Make sure the setup you performed during the first boot operation is in place.

 

Procedure

1. Check that the image profile and host profile for the host are still available, and that the host has the identifying information (asset tag, IP address) it had during previous boot operations.

2. Place the host in maintenance mode.

 

Host Type Action
Host is part of a DRS cluster VMware DRS migrates virtual machines to appropriate hosts when you place the host in maintenance mode.
Host is not part of a DRS cluster You must migrate all virtual machines to different hosts and place each host in maintenance mode.

 

3. Reboot the host.

The host shuts down. When the host reboots, it uses the image profile that the Auto Deploy server provides.

The Auto Deploy server also applies the host profile stored on the vCenter Server system.

 

Reprovision a Host with a New Image Profile

You can reprovision the host with a new image profile, host profile, or vCenter Server location by changing the rule for the host and performing a test and repair compliance operation.

 

Several options for reprovisioning hosts exist.

 

  • If the VIBs that you want to use support live update, you can use an esxcli software vib command. In that case, you must also update the rule set to use an image profile that includes the new VIBs.
  • During testing, you can apply an image profile to an individual host with the Apply-EsxImageProfile cmdlet and reboot the host so the change takes effect. The Apply-EsxImageProfile cmdlet updates the association between the host and the image profile but does not install VIBs on the host.
  • In all other cases, use this procedure.

 

Prerequisites

 

  • Create the image profile you want to boot the host with. Use the Image Builder PowerCLI.
  • Make sure that the setup that you performed during the first boot operation is in place.

 

Procedure

1. At the PowerShell prompt, run the Connect-VIServer PowerCLI cmdlet to connect to the vCenter Server system that Auto Deploy is registered with.

 Connect-VIServer yourVCServer

The cmdlet might return a server certificate warning. In a production environment, make sure no server certificate warnings result. In a development environment, you can ignore the warning.

2. Determine the location of a public software depot that contains the image profile that you want to use, or define a custom image profile with the Image Builder PowerCLI.

3. Run Add-EsxSoftwareDepot to add the software depot that contains the image profile to the PowerCLI session.

 

Depot Type Cmdlet
Remote depot Run:  Add-EsxSoftwareDepot   depot_url
ZIP file a. Download the ZIP file to a local file path or create a mount point local to the PowerCLI machine.
b. Run:    Add-EsxSoftwareDepot C:\file_path\my_offline_depot.zip

 

4. Run Get-EsxImageProfile to see a list of image profiles, and decide which profile you want to use.

5. Run Copy-DeployRule and specify the ReplaceItem parameter to change the rule that assigns an image profile to hosts.

The following cmdlet replaces the current image profile that the rule assigns to the host with the my_new_imageprofile profile. After the cmdlet completes, adamrule assigns the new image profile to hosts.

The old version of adamrule is renamed and hidden.

Copy-DeployRule adamrule -ReplaceItem my_new_imageprofile

 

6. Test and repair rule compliance for each host that you want to deploy the image to.

 

When you reboot hosts after compliance repair, Auto Deploy provisions the hosts with the new image profile.

 

 Applying a Host Profile to Prompt for User Input in the vSphere Client

 

If a host required user input during a previous boot, the answers are saved with the vCenter Server in an answer file. If you want to prompt the user for new information, you reapply the host profile.

 

Prerequisites

 

Attach a host profile that prompts for user input to the host.

 

Procedure

1. Migrate all virtual machines to different hosts, and place the host into maintenance mode.

 

Host Type Action
Host is part of a DRS cluster VMware DRS migrates virtual machines to appropriate hosts when you place the host in maintenance mode.
Host is not part of a DRS cluster You must migrate all virtual machines to different hosts and place each host in maintenance mode.

 

2. In the vSphere Client, choose Host Profiles > Apply Profile

3. Select the host profile that requires user input when prompted.

4. When prompted, provide the user input.

 

You can now direct the host to exit maintenance mode.

 

The user input information is saved in an answer file. The next time you boot, the answer file information is applied to the host. One answer file per host is available.

 

 

Update the Host Customization in the vSphere Web Client

If a host required user input during a previous boot, the answers are saved with the vCenter Server. If you want to prompt the user for new information, you remediate the host.

 

Prerequisites

 

Attach a host profile that prompts for user input to the host.

 

Procedure

1. Migrate all virtual machines to different hosts, and place the host into maintenance mode.

 

Host Type Action
Host is part of a DRS cluster VMware DRS migrates virtual machines to appropriate hosts when you place the host in maintenance mode.
Host is not part of a DRS cluster You must migrate all virtual machines to different hosts and place each host in maintenance mode.

 

2. In the vSphere Web Client, remediate the host.

Right click the host and click All vCenter Actions > Host Profiles > Remediate.

 

3. When prompted, provide the user input.

 

You can now direct the host to exit maintenance mode.

 

The host customization is saved. The next time you boot, the host customization is applied to the host. 

Comments:

No comment found.

Leave a new comment

Search

Please enter a keyword.

Recent Posts

Categories

Copyright © 2017 New Horizons Worldwid, Inc. All rights reserved.
Version: 5.7.1.0