WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / VCSA 6.5 CLI Installer now supports new ovftool argument pass-through feature

VCSA 6.5 CLI Installer now supports new ovftool argument pass-through feature

11.30.2016 by William Lam // 2 Comments

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"
        },
        "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 🙂

More from my site

  • How to automate the deployment of an un-configured VCSA 6.5 (Stage 1 only)?
  • vCenter Server High Availability (VCHA) PowerCLI 6.5 community module
  • vCommunity "shorts" on their experiences w/the VCSA Migration
  • Updates to VMDK partitions & disk resizing in VCSA 6.5
  • Will I get Photon OS when I upgrade my VCSA 5.5/6.0 to VCSA 6.5?

Categories // Automation, OVFTool, VCSA, vSphere 6.5 Tags // guestinfo, ovftool, vcenter server appliance, vcsa, vcsa-deploy, vcva, vSphere 6.5

Comments

  1. Steve says

    11/30/2016 at 12:36 pm

    I wish you could have posted the new 6.5 JSON sooner 🙂
    I was using your old 6.0 JSON config,,, After many fails, finally noticed the dif from the stock JSON on 6.5 iso.
    Very good work,,, appreciate the effort.

    Reply
  2. brendan62269 says

    05/22/2017 at 11:25 am

    Any idea where I might find documentation of the available --prop/ovftool.arguments: ?

    Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023
  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • NFS Multi-Connections in vSphere 8.0 Update 1 03/20/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023