SC//Reliant™ Virtual Controller 3.x client reference
This reference is for version 3.x of the SC//Reliant™ Virtual Controller client only. If you are using SC//Reliant Virtual Controller version 2.x these examples won't work.
The SC//Reliant Virtual Controller is a daemon whose purpose it is to be a single interface to manage resources hosted on the SC//Reliant platform. It can be used to manage aspects of your clusters, nodes, Docker containers, and KVM virtual machines as well as run shell commands.
SC//Reliant Virtual Controller CLI
The SC//Reliant Virtual Controller CLI is a command line tool to pass commands to the SC//Reliant Virtual Controller server. It’s meant to make the lives of people testing and debugging easier; all programmatic non-human interactions (e.g. RLSI, SC//Reliant Platform Manager and REST API calls coming via the SC//Reliant Virtual Controller Remote Job Execution agent) should never rely on the SC//Reliant Virtual Controller CLI because there’s no guarantee its interface will not change in incompatible ways.
If you need to write a script that issues commands to the SC//Reliant Virtual Controller, the rvc-send tool can be used instead, with JSON-RPC requests as inputs.
Run SC//Reliant Virtual Controller CLI commands as root, for example by prefixing them with sudo. Some commands produce different output when run as a regular user.
The SC//Reliant Virtual Controller method descriptions will include CLI examples that can be tried on any host with the SC//Reliant Virtual Controller installed. You can confirm whether or not the SC//Reliant Virtual Controller is installed on a host, as well as check the version, by using the following command:
rvc --version
rvc-send
The rvc-send tool is just a thin wrapper to send JSON-RPC requests to the SC//Reliant Virtual Controller server. Sending those requests could be done with whatever means you want, like a bash script, but rvc-send takes care of reading the rvc config file, and handling SSL processing, if needed.
Common parameters
The following are common parameters for all SC//Reliant Virtual Controller 3.x CLI commands.
--json
The --json flag shows the SC//Reliant Virtual Controller server response in the native JSON-RPC response format.
Example without the --json flag
rvc rvc version
3.13.0
Example with the --json flag
rvc rvc version --json
{
"jsonrpc": "2.0",
"id": 1,
"result": "3.13.0"
}
--dry-run
The --dry-run flag provides a way to test an action before applying it. The JSON-RPC response is displayed without actually performing the action.
Example
rvc cluster ping --dry-run
Response
{"jsonrpc":"2.0","id":1,"method":"cluster.ping"}
The response from a --dry-run action can be sent as is to the SC//Reliant Virtual Controller server using rvc-send.
rvc-send '{"jsonrpc":"2.0","id":1,"method":"cluster.ping"}'
Global options
The following options work with every SC//Reliant Virtual Controller 3.x CLI command, in addition to --json and --dry-run.
| Option | Description |
|---|---|
-c, --config=PATH | The path to the RVC daemon configuration file. The default is /etc/rvc/rvc.yaml. |
-v, --version | Shows the RVC version. |
-h, --help | Shows help. Run rvc --help for the list of modules, rvc <module> --help for the methods in a module, and rvc <module> <method> --help for the arguments of a method. |
Method arguments are passed as options, for example --hostname=kvm1. Method parameter names use hyphens on the CLI, for example the snapshot_definitions parameter is passed as --snapshot-definitions. A Boolean parameter that defaults to true is turned off with a --no- prefix, for example --no-base64.
RVC Methods
The operations that the SC//Reliant Virtual Controller server can perform are called methods. The methods are grouped in modules, that correspond to a certain domain, like cluster or kvm, which also map how the SC//Reliant Virtual Controller server code is structured. The full method name is module.method, for example, the method to perform a backup on a KVM virtual machine is called kvm.full_backup. On the CLI, replace the dot with a space and any underscores with hyphens: the kvm.full_backup method is run as rvc kvm full-backup, and cluster.status is run as rvc cluster status.
The following are the available SC//Reliant Virtual Controller methods and their options.