Upgrading vCenter Server Appliance 5.5 to 6.0 using CLI

In 6.0 the standard installation and upgrade of the vCenter Server Appliance has changed to an ISO which you can mount in Windows. This ISO provides a web interface. This interfaces asks you to install the Client Integration Plugin 6.0, after which you can use the web interface to install or upgrade your vCenter Server Appliance.

Of course, this gives us Unix users another hurdle to overcome with installing the vSphere environment. Also, the Client Integration Plugin has some issues working with the latest versions of Chrome and Firefox. Lastly, hardly anybody likes using a web interface for this kind of installations.

Luckily, VMware has been kind enough to provide us with a CLI installer as well! I’ve seen a couple of blog posts about using the CLI installer to install a new VCSA, but not as much about upgrading an existing VCSA. So i decided to do a little write-up providing some examples.

Overview of the upgrade

The tool will use a json template file containing all the information to perform the upgrade. It uses the information to first deploy a new VCSA VM on a target host. This new VCSA VM is provisioned with a temporary network. It will then migrate all the data from the existing VCSA to the new one. Once this is done, it will shut down the existing VCSA and reconfigure the network on the new VCSA to take all the settings from the old VCSA.

JSON template

Below is an example of a JSON template file that can be used to upgrade a 5.5 VCSA to a 6.0 VCSA. There are more templates inside the ISO (folder vcsa-cli-installer/templates) which you can use, but i’ve noticed some issues with these templates missing important sections.

{
    "__version": "1.0",
    "__comments": "Sample template to upgrade a vCenter Server with an embedded Platform Services Controller from 5.5 to 6.0.",
    "source.vc": {
        "esx": {
            "hostname": "<IP of ESXi with current vCenter on>",
            "username": "root",
            "password": "vmware"
        },
        "vc.vcsa": {
            "hostname": "<IP of current vCenter",
            "username": "[email protected]",
            "password": "vmware",
            "root.password": "vmware"
        }
    },
    "target.vcsa": {
        "appliance": {
            "deployment.network": "<Name of your Management network Port group on your target ESXi>",
            "deployment.option": "<tiny|small|medium|large>",
            "name": "<VM name, this has to be different from the current vCenter VM>",
            "thin.disk.mode": true
        },
        "os": {
            "ssh.enable": true
        },
        "sso": {
            "site-name": "First-Default-Site"
        },
        "temporary.network": {
            "hostname": "<Temporary hostname, does not have to be DNS resolvable>",
            "dns.servers": [
                "<First DNS server IP>",
                "<Second DNS server IP>"
            ],
            "gateway": "<Gateway IP>",
            "ip": "<Temporary IP for migration>",
            "ip.family": "ipv4",
            "mode": "static",
            "prefix": "<network prefix, for instance: 24>"
        },
        "esx": {
            "hostname": "<IP of ESXi to which the new VCSA should be placed on>",
            "username": "root",
            "password": "vmware",
            "datastore": "<The datastore name inside the target ESXi where to store the VCSA VM>"
        }
    }
}

Of course I kept some values to the default, but i’m sure you can figure out what to change where. There are a couple of important mentions I would like to mention:

Running the CLI installer

I will run this installer directly from the ISO mounted on /mnt/vcsa  on a Linux machine.

I would first suggest to do a dry run, you can do so with the following command:

/mnt/vcsa/vcsa-cli-installer/lin64/vcsa-deploy upgrade --verify-only --accept-eula --no-esx-ssl-verify vcsa-upgrade-template.json

This command will verify the configuration and all the connectivity. It will return a list of warnings and errors. Some of the more common warnings and errors you might encounter:

After you fixed any errors, you can run the command without the --verify-only option:

/mnt/vcsa/vcsa-cli-installer/lin64/vcsa-deploy upgrade --accept-eula --no-esx-ssl-verify vcsa-upgrade-template.json

This will start the upgrade and migration, just follow along with what is happening, you get some good info on the progress. It can take a while to finish (half an hour to an hour, easily. If you have a slow connection between the machine you are running the command and the appliances & esxi’s, it might take longer for the data transfers)