VIO 2.0 comes with several command line utilities, in a previous post I showed the usage of viopatch to perform patching of an existing VIO installation. In this post I will discuss viocli which is the main command line utility that allow, via several subcommands, to perform many maintenance and administration operations from VIO Manager. We will cover the most commonly used and useful viocli subcommands.
viocli must always be run using sudo. The available subcommands can be retrieved with a simple viocli -h
To get the help for any of the subcommands run viocli <command> -h. The configuration for viocli can be found in /opt/vmware/vio/etc/viocli.conf
viocli deployment can be used to manage an existing VIO deployment. It allows to start, stop, pause, resume or configure a deployment. Can also be used to create a certificate signing request, update the certificate or get the logs for the deployment.
Start a deployment
Stop a deployment
Get the logs
Used to retrieve the list of nodes of a VIO deployment and get information about the deployment’s inventory file.
viocli services can be used to start and stop the services within a VIO deployment. The main differerence with viocli deployment is that services will only start/stop the services running on the virtual machines and deployment subcommand will start/stop the whole OpenStack cluster, including the virtual machines.
The recommended to perform a major version upgrade in VIO is still the vSphere Web Client, as I shown in VIO upgrade post, however using viocli upgrade the upgrade can also be performed from VIO Manager shell.
Perform an upgrade
This viocli subcommand will allow to rollback a VIO upgrade in case of any failure during the upgrade operation.
This command allows to perform a backup of the VIO Manager server of the OpenStack database. Requires an NFS volume available, there is no need to be mounted on the manager since viocli will take care of that.
Management Server backup
OpenStack database backup
viocli restore can be used to restore a backup of the VIO management server or the OpenStack database.
Management Server restore
OpenStack database restore
The recover subcommand can be used to recover a node or a group of nodes after a critical failure. Since most of the nodes are stateless there is no need of a database backup to recover them, for database nodes you must provide the NFS path and the name of the backup file. When you recover a VIO node, it returns to the state of a newly deployed node.
Recovery operations can be executed by node with -n or by role with -r. Get the list of nodes from a deployment with viocli show. Recovery by role will perform a recover of all the nodes of that role while recovery by role allows to specify a single node to be recover.
Recover by node
The following example shows the recovery operation for the controller01 node.
Recover by role
The following example show the recover of the OpenStack DB role, that will perform the recovery of all DB nodes. As it can be seen the name of the backup and the NFS path must be provided.
The dbverify command allows and administrator to verify an OpenStack database before doing an upgrade. It can find knows issued like duplicated or missing keys, that may casue problems during the upgrade operation.
viocli hyperic can be used to manage the Hyperic agent. Tasks like installation, configuration, and start/stop can be performed.