I had recently discovered a really cool new feature that has been added into the vCenter Server Appliance (VCSA) 6.5 CLI Installer while helping out a fellow colleague. For those of you who have not worked with the VCSA before, you can deploy it using one of two methods: 1) Guided UI Installer 2) Scripted CLI installer. The latter approach is great for Automation purposes as well as being able to quickly spin up a new VCSA as the UI wizard can get tedious once you have done it a few times. The VCSA CLI Installer reads in a JSON configuration file which defines what you will be deploying whether that is an Embedded, PSC or VC node and its respective configuration (networking, password, etc).

In VCSA 6.5, the CLI Installer introduces a new option in the JSON schema called ovftool.arguments. Here is the description of what this new option provides:

Use this subsection to add arbitrary arguments to the OVF Tool

command that the script generates. You do not need to fill it out in

most circumstances.

First of all, I just want to mention that this option should not be required for general deployments but it may come in handy for more advanced use cases. Behind the scenes, the CLI Installer takes the human readable JSON and translates that to a set of OVF properties that are then sent down to ovftool for deployment. Not every single option is implemented in the JSON and for good reason as those level of details should be abstracted away from the end users. However, there may be cases where you may need to invoke a specific configuration or trigger a specific ovftool option and this would allow you to provide what I am calling a "pass-through" to ovftool.

Let me give you one concrete example on how this could be useful and how we can take advantage of this new capability. Since the release of VCSA 6.0, when you enable SSH and you login, you will notice that you are not placed in a regular bash shell but rather a restricted appliancesh interface. From an Automation standpoint, it was some what painful if you wanted to change the default as this feature is not implemented within the JSON configuration file. This meant that if you wanted the bash shell to be the default, you had to either change it manually as part of a post-deployment or you would have to by-pass the native CLI Installer and manually reverse engineer the required set of OVF properties needed for the deployment which is also not ideal.

In the case of changing the default shell, the required ovftool option that is required is the following (described in more detail in this blog post here):

--prop:guestinfo.cis.appliance.root.shell="/bin/bash"

Using this new ovftool argument pass-through, we can now specify that option directly inside of the JSON using the following:

"ovftool.arguments" : {

"prop:guestinfo.cis.appliance.root.shell" : "/bin/bash"

}

Below is a complete working example of an updated JSON configuration for deploying an Embedded VCSA 6.5 which includes this new ovftool arguments property.

{ "__version": "2.3.0", "__comments": "Sample template to deploy a vCenter Server Appliance with an embedded Platform Services Controller on an ESXi host.", "new.vcsa": { "esxi": { "hostname": "192.168.1.50", "username": "root", "password": "vmware123", "deployment.network": "VM Network", "datastore": "vsanDatastore" }, "appliance": { "thin.disk.mode": true, "deployment.option": "tiny", "name": "Embedded-vCenter-Server-Appliance-6.5" }, "network": { "ip.family": "ipv4", "mode": "static", "ip": "192.168.1.190", "dns.servers": [ "192.168.1.1" ], "prefix": "24", "gateway": "192.168.1.1", "system.name": "192.168.1.190" }, "os": { "password": "VMware1!", "ssh.enable": true }, "sso": { "password": "VMware1!", "domain-name": "vghetto.local", "site-name": "virtuallyGhetto" }, "ovftool.arguments" : { "prop:guestinfo.cis.appliance.root.shell" : "/bin/bash" } }, "ceip": { "settings": { "ceip.enabled": false } } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 { "__version" : "2.3.0" , "__comments" : "Sample template to deploy a vCenter Server Appliance with an embedded Platform Services Controller on an ESXi host." , "new.vcsa" : { "esxi" : { "hostname" : "192.168.1.50" , "username" : "root" , "password" : "vmware123" , "deployment.network" : "VM Network" , "datastore" : "vsanDatastore" } , "appliance" : { "thin.disk.mode" : true , "deployment.option" : "tiny" , "name" : "Embedded-vCenter-Server-Appliance-6.5" } , "network" : { "ip.family" : "ipv4" , "mode" : "static" , "ip" : "192.168.1.190" , "dns.servers" : [ "192.168.1.1" ] , "prefix" : "24" , "gateway" : "192.168.1.1" , "system.name" : "192.168.1.190" } , "os" : { "password" : "VMware1!" , "ssh.enable" : true } , "sso" : { "password" : "VMware1!" , "domain-name" : "vghetto.local" , "site-name" : "virtuallyGhetto" } , "ovftool.arguments" : { "prop:guestinfo.cis.appliance.root.shell" : "/bin/bash" } } , "ceip" : { "settings" : { "ceip.enabled" : false } } }

Once the VCSA has successfully completed, you will find that when you SSH to the VCSA, you will now automatically be defaulted to the bash shell rather than the restricted appliancesh. As you can see, this a pretty powerful extension of the existing VCSA CLI Installer without compromising on the current user experience. Stay tuned for a future blog post on some other interesting use cases this will help enable 🙂