Deploying vCenter Server Appliance 6.5 Via the CLI

One of my customers wanted to deploy a new vCenter Server Appliance 6.5 environment.  I helped them build JSON answer files and deploy their VCSA 6.0 environment, so they asked me to update them for the new version.  The JSON file format has been updated a bit, so I decided to start fresh from the template to ensure that I had everything that we needed.  Most of it was self-explanatory, except that I ran into a bit of trouble at one point.

The template has a section like this, for determining where the appliances are going to be deployed:

"VC" : {
 ...
 "datacenter" : [
  "parent folder",
  "child folder",
  "Datacenter"
 ]
 ...
 "target" : [
  "parent folder",
  "child folder",
  "<ESXi host or DRS cluster>"
 ]
 ...
}


I had a bit of trouble understanding what data to enter into those fields, which was causing my appliance deployments to fail.  Fortunately, the error message was helpful (although I had to spend a bit of time digging around to find the pertinent bit).

I was trying to deploy to a specific host in a cluster that sat in my datacenter.  To find that host, the system looks in the datacenter specified in the "datacenter" section (duh), looking in the system managed "hosts" folder.  Then, it looks for the specific path specified in the "target" section, under that system "hosts" folder.

So, for example, if my ESXi Host (myHost.myDomain) was in a cluster (myCluster) that was in a Datacenter (myDatacenter), the path that I would need it to generate is \myDatacenter\Hosts\myCluster\myHost.myDomain.  In order to do that, I would need to fill out those sections of the template files thusly:

"VC" : {
 ...
 "datacenter" : [
  "myDatacenter"
 ]
 ...
 "target" : [
  "myCluster",
  "myHost.myDomain"
 ]
 ...
}


I hope this helps!

Comments

Popular posts from this blog

PowerShell Sorting by Multiple Columns

Clone a Standard vSwitch from one ESXi Host to Another

Deleting Orphaned (AKA Zombie) VMDK Files