VMware Cloud Community
nicholas1982
Hot Shot
Hot Shot

Automating Host Profile Host Customisations From Answer File

Hi All,

I'm starting to provision hosts using auto deploy, the auto deploy profile is a stageful install, with a single management vmk0 and then added to vcenter.

We then apply a second host profile which creates about 6 vmk interfaces, add to a windows AD and creates a new local ESXi user account.

The second host profile was created from a master known good host for that cluster, when attaching the profile to a new host I'm having to copy and paste IP, Subnets, user accounts manually.

I was wondering if I could apply the profile with Powershell with some sort of answer file.

Nicholas
0 Kudos
2 Replies
daphnissov
Immortal
Immortal

See if something like this is good enough to get you started.

0 Kudos
LucD
Leadership
Leadership

You should be able to do that.
Check with the Get-VMHostProfileRequiredInput if you can get all the required input data into a hash table. (start with the code as shown in Example 1).

If that is not the case, you will need a script that ultimately calls the UpdateHostProfile method.

See my Change The Root Password In Hosts And Host Profiles post.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos