/ #vcenter #vsphere 

Integrated vCenter Server Appliance 6.0 Command-Line Deployment

I started to play a bit with vSphere 6.0 this week in my lab, and I thought I could share the method I’m using to deploy the vCSA 6.0 with the new CLI installer. You can perform a vCenter Server Appliance 6.0 (vCSA) installation using this command-line installer from any virtual or physical server in the network. 

In the vCSA ISO, you will find a “vcsa-cli-installer” folder with multiple sub folders. Currently, the vCenter Server Appliance command-line deployment is supported* on the following operating systems:

  • Windows 7, Windows 8, Windows Server 2008, Windows Server 2012 (win32 folder).
  • SUSE Linux 11 SP3 (lin64 folder).
  • Mac OS 10.9 (mac folder).

*: supported on these platform does not mean that it will not work on other operating systems.

This command-line installer method is using deployment templates in JSON format. The template folder is here to provide you 4 usable deployment examples.

Below is the JSON file I used to deploy a vCSA 6.0 in my lab. As mentioned in the comments, this template deploys a single vCenter Server Appliance with embedded Platform Service Controller (PSC) with tiny form factor (2 vCPUs, 8GB memory)  and configure it with a static IP address.

{
    "__comments":
    [
        "Romain : cloudmaniac.net",
        "vCSA 6.0 CLI deployment example: tiny form factor, embedded PSC, static IP"
    ],

    "deployment":
    {
        "esx.hostname":"10.51.XX.YY",
        "esx.datastore":"LAB-EQL-iSCSI01",
        "esx.username":"root",
        "esx.password":"whereiswaldo?",
        "deployment.option":"tiny",
        "deployment.network":"VM Network",
        "appliance.name":"vcsa6a-z51",
        "appliance.thin.disk.mode":true
    },

    "vcsa":
    {

        "system":
        {
            "root.password":"BruceWayneisBatman1!",
            "ssh.enable":true,
            "ntp.servers":"time.lab.cloudmaniac.net"
        },

        "sso":
        {
            "password":"BruceWayneisBatman1!",
            "domain-name":"vsphere.local",
            "site-name":"Default-First-Site"
        },

        "networking":
        {
            "ip.family":"ipv4",
            "mode":"static",
            "ip":"10.51.XX.ZZ",
            "prefix":"24",
            "gateway":"10.51.10.254",
            "dns.servers":"10.51.10.5",
            "system.name":"vcsa6a-z51.lab.cloudmaniac.net"
        }
    }
}

Finally, to deploy the appliance from the template, you simply specify the JSON file you have created to the installer and…have a coffee. Meanwhile, the installer will:

  1. Check the parameters and the syntax of the JSON file,

  2. Connect to the target ESXi,

  3. Deploy the OVA,

  4. Power On the appliance,

  5. Install the various services,

  6. Configure those services.

Command-Line Deployment of VMware vCenter Server Appliance 6.0

After 10 to 20 minutes (may vary depending on your infrastructure), you can launch a browser to access your newly deployed vCenter and benefit of the new vSphere Web client. :)

Some deployment considerations to take into account if you want to use the command-line deployment method:

  • You can only deploy vCenter Server Appliance 6.0 to hosts (running ESXi 5.1 or later), and not to an existing vCenter Server. You can find reference to this in the VMware vCenter Server 6.0 Deployment Guide.

  • Non-ephemeral distributed virtual port groups are not supported to deploy the vCSA.

  • You can not deploy to a temporary portgroup where you don’t have network connectivity: to configure the services, the installer needs to connect to the appliance via its IP address.

  • You can set optional arguments when using the CLI; however when set, settings in JSON file are ignored.

  • There is no pre-check function available for the network settings, so ensure that the values provided in the JSON file are valid (IP address, netmask, gateway, DNS, and so on).

I find this new scripted method of deployment for the vCSA really easy to understand and to consume. It can save you a lot of time if you need to deploy and deploy again (for lab purpose for example). :)

The documentation for the CLI installer is available here (useful to check options and arguments): Command-Line Deployment of VMware vCenter Server Appliance 6.0

Additional useful links:

Author

Romain

Staff Architect & Member of the CTO Ambassador Program at VMware, focusing on NSX and Cloud-Native Applications. He is a double VCDX (DCV and NV, #120), VCDX panelist, frequent VMUG/VMworld speaker and contributor to the community via this blog or social media (follow him on Twitter @woueb).