How to use the vME CLI
Overview & Download
The vME Command Line Interface (CLI) can be used to interact with the vME API from your computer's command line.
The latest Windows CLI installer is available from this Download Link
The latest Unix CLI installer is available from this Download Link
Installing the Windows CLI
The Windows CLI ships as an MSI installer. It performs a per-machine install and updates the system PATH, so it requires administrator privileges.
- Download the
.msifrom the link above. - Run the
.msifile and accept the UAC elevation prompt.- If a vME CLI from an older, legacy installer is already present on the machine, setup will stop with an error asking you to uninstall the legacy CLI first. This is a one-time step - later vME CLI upgrades won't require it.
- Step through the setup wizard: accept the license agreement, then click Install.
- Once installation completes, click Finish to close the wizard.
- The CLI is installed to
C:\Program Files\vME CLI\vme.exe, and that folder is added to the systemPATHautomatically. - If you have a terminal or command prompt window that was already open before running the installer, close it and open a new one. The installer added
vmeto yourPATH, but windows opened before the install won't pick up that change. In the new window, confirm the install:vme --help - Continue with CLI Login below.
Installing the Unix CLI
After downloading, untar the installer and run the install script:
tar -xzf <downloaded-file>.tar.gz
sudo sh install.sh
CLI Login
To login to a vME instance using the installed CLI.
Open a terminal or command prompt
- Command:
vme login -u admin -U <vME URL> -t <API KEY> - Parameters:
-u,--username: required : The vME Username.-U,--url: required : The vME's full URL, includinghttps://, for examplehttps://vme.example.comorhttps://10.0.0.20. A host name or IP address on its own, withouthttps://, does not work: commands fail until you log in again with the full URL.-t,--token: required : The vME User's API key.
- Example:
vme login -u admin -U https://vme.example.com -t fa3e330b-4892-df45-49f2-293a0e13048e
Log in interactively
Run vme login with no options and the CLI asks for each value in turn: vME URL, Username and vME Token. Enter the URL in full, including https://.
- Command:
vme login - Example:
vme login
Log out
Remove the stored URL, username and API key from this computer. Other commands then ask you to log in again.
- Command:
vme logout - Example:
vme logout
Command Format
- General format:
vme <resource> <command> [options] - Global help:
vme help- lists all top-level resources. - Resource help:
vme <resource>orvme <resource> --help- lists subcommands for that resource, for examplevme workflow --help. Each resource has its own help page; this document does not repeat the help output per command.
Run commands from a YAML file
You can provide options from a YAML file using -f / --from-file.
- Command:
vme <resource> -f <file.yaml> - YAML Example:
create:
pool_name: demo-pool
name: demo-source
dbtype: mysql
quota: 10G - CLI Example:
vme source -f source-create.yaml
Pool Commands
Show all pools
- Command:
vme pool show <parameters> - Parameters:
--properties,-P: optional : Comma-separated ZFS properties to return for each pool.
- Example:
vme pool show
Create a pool
Run vme system disks to list available partitions and disks.
- Command:
vme pool create <parameters> - Parameters:
--name,-n: required : The created pool name.--device,-d: required : Path of the device to use for the pool (for example,/dev/nvme1n1).
- Example:
vme pool create -n demo-pool -d /dev/nvme1n1
Destroy a pool
- Command:
vme pool destroy <parameters> - Parameters:
--name,-n: required : The created pool name.--force,-f: optional : Force the pool to be destroyed. Defaultfalse.
- Example:
vme pool destroy -n demo-pool
Show current status of a pool
- Command:
vme pool status <parameters> - Parameters:
--name,-n: required : The name of the pool to show status on.
- Example:
vme pool status -n demo-pool
Show history of a pool
- Command:
vme pool history <parameters> - Parameters:
--name,-n: required : The name of the pool to run the history command on.
- Example:
vme pool history -n demo-pool
Register a pool
Register a pool for creation of sources and other operations.
- Command:
vme pool register <parameters> - Parameters:
--name,-n: required : Name of pool to be registered.
- Example:
vme pool register -n vme-pool
Check pool creation status
- Command:
vme pool create_status - Parameters:
- No parameters.
- Example:
vme pool create_status
Source Commands
Show all sources
- Command:
vme source show <parameters> - Parameters:
--pool_name,-p: optional : A name of a pool.--source_name,-s: optional : Show only this source.--properties,-P: optional : Comma-separated ZFS properties to return for each source.
- Output: Each source carries its
guid, its iSCSI target name (iqn_name), where it is attached (attached_to), and the unfinished onboarding workflows using it (used_by). See What a source or clone listing carries. - Example:
vme source show -p demo-pool
Create a source
-
Command:
vme source create <parameters> -
Parameters:
--pool_name,-p: required : A name of a pool.--name,-n: required : A name of created source.--dbtype,-d: optional : A database type name, such as mysql, mariadb, mssql, mongodb etc., use to label a source, default isunknown.--quota,-q: optional : A limit on the amount of disk space a dataset can consume, for example,10Gfor ten GB.--compression,-c: optional : Name of process where data is stored using less disk space, the name can be one ofon,off,lzjb,gzip,gzip-1,gzip-2,gzip-3,gzip-4,gzip-5,gzip-6,gzip-7,gzip-8,gzip-9,zle,lz4,False, default isFalse.--source_name,-s: optional : An existing source to create the new source beneath, so the new source is<source_name>/<name>. The command is refused when that source does not exist.--database_method,-m: optional : Database access method, can becontainerornetwork, default iscontainer.--network_info,-N: optional : JSON dictionary for network configuration, required when database_method isnetwork. Keys:type: required :iscsiornfs.- For iSCSI:
auto_grow: optional :trueto thin-provision the volume so it grows on demand up toauto_grow_max_gb. Defaultfalse.auto_grow_max_gb: optional : Largest size, in GB, the volume can grow to. Default16384.vsize: optional : Fixed volume size in GB, used whenauto_growisfalse. Left out or0, the volume grows on demand.- An iSCSI source is exported on the vME's own portal,
0.0.0.0:3260, so it takes no client address,anonuidoranongid.
- For NFS,
typeis all that is needed here. The client addresses allowed to mount the share, andanonuidandanongid, are given when the share is published withvme db network_create.
-
Example:
vme source create -n demo-source -p demo-pool
# An iSCSI source that grows on demand up to 500 GB
vme source create -n demo-iscsi -p demo-pool -m network -N '{"type": "iscsi", "auto_grow": true, "auto_grow_max_gb": 500}'
Modify a source
Modify source properties including quota, compression, dbtype, and network settings.
- Command:
vme source modify <parameters> - Parameters:
--pool_name,-p: required : Name of pool containing the source.--name,-n: required : Name of source to be modified.--property,-P: required : JSON dictionary of properties to modify. Valid keys:quota: Disk space limit (e.g., "10G")compression: Compression type (on, off, lzjb, gzip, gzip-[1-9], zle, lz4)dbtype: Database type label (mysql, mariadb, mssql, mongodb, etc.)database_method: Database access method (container, network)client_address: NFS client address(es) for network method
- Example:
vme source modify -p vme-pool -n foo -P '{"quota": "5G", "compression": "gzip", "dbtype": "mysql"}'
Rename a source
- Command:
vme source rename <parameters> - Parameters:
--pool_name,-p: required : A name of a pool.--currentname,-c: required : Name of the source to be renamed.--newname,-n: required : New name of the source to be renamed as.
- Example:
vme source rename -p demo-pool -c demo-source -n new-source-name
Destroy a source
- Command:
vme source destroy <parameters> - Parameters:
--pool_name,-p: required : A name of a pool.--source_name,-s: required : Name of the source to be destroyed.--recursive,-r: optional : Also destroy what is beneath the source. Given on its own it meanstrue.
- Example:
vme source destroy -p vme-pool -s demo-source
Check source status
- Command:
vme source status - Parameters:
- No parameters.
- Example:
vme source status
Snapshot Commands
Show all snapshots
- Command:
vme snapshot show <parameters> - Parameters:
--pool_name,-p: optional : A name of a pool.--source_name,-s: optional : A name of a base source, default isPOOLNAME.--properties,-P: optional : Comma-separated ZFS properties to return for each snapshot.--sort,-t: optional : Sort the snapshots. Given on its own it meanstrue.
- Example:
vme snapshot show -p demo-pool
Create a snapshot
- Command:
vme snapshot create <parameters> - Parameters:
--pool_name,-p: required : A name of a pool.--source_name,-s: required : A name of a source.--name,-n: required : A name of created snapshot.--recursive,-r: optional : Recursive option, default isFalse.--snapof,-o: optional :clonewhen--source_nameis the short name of a clone, to snapshot that clone. Defaultsource. Not needed when--source_nameis a full name such asdemo-pool/clones/foo.
- Example:
vme snapshot create -p demo-pool -s foo -n new-snap
Snapshots and rollbacks of a mounted source or clone
vme snapshot create and vme snapshot rollback take two more options:
--skip_host,-k: optional : Do it without asking the host that has the dataset mounted to take its databases offline first. Use only when you have done that yourself.--wait,-w: optional : When vME coordinates with the host, follow the three steps (quiesce, the snapshot or rollback, resume) until it finishes, printing each step as its state changes.
When the host coordination is queued, the command prints the task id and the command that shows its progress:
vme snapshot task_status -t <task id>
When it is refused, for example because the host's agent is offline, the steps to do it by hand are printed as a list.
Check a coordinated snapshot or rollback
Show how a snapshot or rollback that vME is coordinating with the host is getting on.
- Command:
vme snapshot task_status <parameters> - Parameters:
--task_id,-t: required : The task id printed byvme snapshot createorvme snapshot rollback.
- Output: The task's
state(PENDING,PROGRESS,SUCCESSorFAILURE), its threesteps(quiesce, the snapshot or rollback, resume), each with its own state and message, and once it has finished, aresultsaying what happened. See Follow a coordinated snapshot or rollback in the API reference. - Example:
vme snapshot task_status -t 6c9d1f3b-6c0b-4b8e-9f64-1b1c0f8d24a2
Rename a snapshot
- Command:
vme snapshot rename <parameters> - Parameters:
--pool_name,-p: required : Name of the pool to rename.--source_name,-s: required : Name of a source which the snapshot belongs to.--currentname,-c: required : Name of snapshot/bookmark to be renamed.--newname,-n: required : Name of the snapshot to rename.--snapof,-o: optional :clonewhen--source_nameis the short name of a clone. Defaultsource.
- Example:
vme snapshot rename -s foo -p demo-pool -n new-snap -c snap
Destroy a snapshot
- Command:
vme snapshot destroy <parameter> - Parameters:
--pool_name,-p: required : A name of a pool.--source_name,-s: required : A name of a source.--snapshot_name,-S: required : The name of snapshot to destroy.--snapof,-o: optional :clonewhen--source_nameis the short name of a clone. Defaultsource.
- Example:
vme snapshot destroy -p demo-pool -s foo -S new-snap
Rollback a snapshot
- Command:
vme snapshot rollback <parameter> - Parameters:
--pool_name,-p: required : A name of a pool.--source_name,-s: required : A name of a source.--snapshot_name,-S: required : A name of created snapshot.--force,-f: optional : Force option to rollback, default isFalse.--snapof,-o: optional :clonewhen--source_nameis the short name of a clone. Defaultsource.
- Example:
vme snapshot rollback -p demo-pool -s foo -S bar -f true
Clone Commands
Show all clones
- Command:
vme clone show <parameters> - Parameters:
--pool_name,-p: optional : Name of pool.--source_name,-s: optional : Name of source.--snapshot_name,-S: optional : Name of snapshot.--properties,-P: optional : Comma-separated ZFS properties to return for each clone.
- Output: Each clone carries its
guid, its iSCSI target name (iqn_name), where it is attached (attached_to), and the unfinished onboarding workflows using it (used_by). See What a source or clone listing carries. - Example:
vme clone show -p demo-pool -s demo-source -S demo-snapshot
Create a clone
- Command:
vme clone create <parameters> - Parameters:
--pool_name,-p: optional : Name of pool.--source_name,-s: required : A source name with respect to a<snapshot_name>.--snapshot_name,-S: required : Name of snapshot.--name,-n: required : Name of clone.--size,-z: optional : A size of clone farm, default is1.--dbtype,-d: optional : A database type name, such as mysql, mariadb, mssql, mongodb etc., use to label a clone, default isunknown.--database_method,-m: optional :container(default) ornetwork.--network_info,-N: optional : JSON dictionary, required when database_method isnetwork. Its one key istype:iscsiornfs. An iSCSI clone is exported on the vME's own portal and takes no client address,anonuidoranongid; an NFS clone's allowed clients and IDs are given withvme db network_create.--snapof,-o: optional :clonewhen--source_nameis the short name of a clone, to clone a snapshot of that clone. Defaultsource.
- Example:
vme clone create -s demo-source -S demo-snapshot -n demo-clone
# An iSCSI clone
vme clone create -s demo-source -S demo-snapshot -n demo-clone -m network -N '{"type": "iscsi"}'
Rename a clone
- Command:
vme clone rename <parameters> - Parameters:
--pool_name,-p: required : Name of pool.--newname,-n: required : New name of the clone.--currentname,-c: required : Current name of the clone.
- Example:
vme clone rename -p vme-pool -c foo -n bar
Modify a clone
Modify clone properties including quota, compression, dbtype, and network settings.
- Command:
vme clone modify <parameters> - Parameters:
--pool_name,-p: required : Name of pool containing the clone.--name,-n: required : Name of clone to be modified.--property,-P: required : JSON dictionary of properties to modify. Valid keys:quota: Disk space limit (e.g., "10G")compression: Compression type (on, off, lzjb, gzip, gzip-[1-9], zle, lz4)dbtype: Database type label (mysql, mariadb, mssql, mongodb, etc.)database_method: Database access method (container, network)client_address: NFS client address(es) for network method
- Example:
vme clone modify -p vme-pool -n foo-clone -P '{"quota": "10G", "dbtype": "postgres"}'
Destroy a clone
- Command:
vme clone destroy <parameters> - Parameters:
--pool_name,-p: required : Name of pool.--clone_name,-c: required : Name of the clone.--recursive,-r: optional : Recursive delete flag. Given on its own it meanstrue.
- Example:
vme clone destroy -p vme-pool -c foo
Check clone status
Check the status of clone creation operations.
- Command:
vme clone status - Parameters:
- No parameters.
- Example:
vme clone status
Docker Image Commands
Pull an image
- Command:
vme image create <parameters> - Parameters:
--repository,-r: required : The repository to pull.--tag,-t: optional : The tag to pull, default islatest.--dbtype,-d: optional : A database type name, such as mysql, mariadb, mssql, mongodb etc., use to label an image, default is<repository>.--credential,-c: optional : Information used to verify repository accession, default isNone. Must be valid JSON.
- Example:
vme image create -r mysql -t 8.0
Register an image
- Command:
vme image register <parameters> - Parameters:
--name,-n: required : Name of image to be registered.--dbtype,-d: optional : A database type name, such as mysql, mariadb, mssql, mongodb etc., use to label an image, default is<repository>.
- Example:
vme image register -n mysql:latest
List all images
- Command:
vme image list - Parameters:
- No Parameters.
- Example:
vme image list
Save an image
- Command:
vme image save <parameters> - Parameters:
--image,-i: required : The image to save.--filename,-f: required : Filename of saved image, the tar file will be saved at/home/vme/uploads.--wait,-w: optional : The save runs in the background and the command prints its task id. With--wait, the command also prints how to check the task and waits until it finishes.
- Example:
vme image save -i mysql:latest -f myimage.tar -w
Load an image
- Command:
vme image load <parameters> - Parameters:
--image,-i: required : Image name to tag the loaded image.--filename,-f: required : Filename of image to be loaded.--wait,-w: optional : The load runs in the background and the command prints its task id. With--wait, the command also prints how to check the task and waits until it finishes.
- Example:
vme image load -i mysql:latest -f myimage.tar
Remove an image
- Command:
vme image remove <parameters> - Parameters:
--image,-i: required : The image to remove.
- Example:
vme image remove -i mysql:latest
Check image status
Check the status of image pull/load operations.
- Command:
vme image status - Parameters:
- No parameters.
- Example:
vme image status
Get image details
Get detailed information about a specific image.
- Command:
vme image detail <parameters> - Parameters:
--name,-n: required : Name of the image.
- Example:
vme image detail -n postgres:latest
Get Docker information
Get Docker version and system information.
- Command:
vme image info - Parameters:
- No parameters.
- Example:
vme image info
Docker Container Commands
Create a Container
Create a container via /docker/container/create. Similar to the docker run command.
-
Command:
vme container create <parameters> -
Parameters:
--image,-i: required : An image name.--name,-n: optional : A container name.--detach,-d: optional : Boolean for running container in the background, default isTrue.--command,-c: optional : The command to run in the container.--environment,-e: optional : Environment variables to set inside the container, as a dictionary or a list of strings in the format"SOMEVARIABLE=xxx".--volumes,-v: optional : A list or dictionary to configure volumes mounted inside the container.--ports,-p: optional : Ports to bind inside the container in the format"a:b,c:d,...", for example 8080:80 means map port8080on the host to TCP port80in the container, default isNone.--privileged,-P: optional : Run the container in privileged mode. Given on its own it meanstrue. Defaultfalse.
-
Example:
vme container create -i mysql:latest -n foo -p 3307:3306
List all containers
- Command:
vme container list - Parameters:
- No parameters.
- Example:
vme container list
Start a container
- Command:
vme container start <parameters> - Parameters:
--name,-n: required : A container name.
- Example:
vme container start -n foo
Stop a container
- Command:
vme container stop <parameters> - Parameters:
--name,-n: required : A container name.
- Example:
vme container stop -n foo
Execute a command inside the container
- Command:
vme container exec <parameters> - Parameters:
--name,-n: required : A container name.--command,-c: required : A string or list of commands to be executed.--environment,-e: optional : Environment variables for the command, comma-separated in the format"SOMEVARIABLE=xxx,OTHER=yyy".
- Example:
vme container exec -n foo -c "ls -l"
Remove a container
- Command:
vme container remove <parameters> - Parameters:
--name,-n: required : A container name.--volume,-v: optional : Remove associated volumes.
- Example:
vme container remove -n foo
Get container log
- Command:
vme container log <parameters> - Parameters:
--name,-n: required : Container name.
- Example:
vme container log -n foo
Get details from container
- Command:
vme container detail <parameters> - Parameters:
--name,-n: required : Container name.
- Example:
vme container detail -n foo
Database commands
Connect Database
Testing connection to database.
- Command:
vme db connect <parameters> - Parameters:
--dbtype,-d: required : Type of database to connect to.--host,-h: required : Host IP of the database server to connect to.--user,-u: required : Username for the database.--password,-p: required : Password for the user of the database.--port,-P: required : Port to connect to on the database.--database,-D: optional : Name of the database to connect to, for database types that connect to a named database.--service_name,-s: optional : The service name to connect to. Required when--dbtypeisoracle.
- Example:
vme db connect -d mariadb -h localhost -u foo -p bar -P 3306
Receive Database
Receive backup and restore dataset.
- Command:
vme db receive <parameters> - Parameters:
--pool_name,-p: required : Name of pool.--dataset_name,-d: required : Name of dataset to be restored.--dbtype,-D: optional : Database type, such as mysql, mariadb, mssql, mongodb etc., used to label a source, default isunknown.--src,-s: required : Path name of received backup file in.vmebkformat, the default absolute path is/enov8/vme/data/<filename>when only the filename is provided.--wait,-w: optional : The receive runs in the background and the command prints its task id and the command that shows its progress. With--wait, the command also waits until the task finishes.
- Example:
vme db receive -p vme-pool -d mydata -D mariadb -s dataset.vmebk -w
Send Database
Send dataset.
-
Command:
vme db send <parameters> -
Parameters:
--type,-t: required : Sending type,pool2poolorsys2sys.--dataset,-d: required : Name of dataset to be send.--receiver,-r: optional : The receiver as a JSON dictionary. Every field in it can also be given as a flag below; a flag wins over the same field in the JSON. Fields:pool_name,dataset_name: where the data lands. Required for both types.- For
sys2sys, eitherpeer_id(an appliance registered withvme peer add), oraddress,usernameandapi-key(the receiver's admin api-key). Optionalssh_address.
--dest_pool,-p: The receiver'spool_name. Required unless it is in--receiver.--dest_dataset,-D: The receiver'sdataset_name. Required unless it is in--receiver.--dest_dbtype,-b: optional : Database type label for the received dataset.--peer_id,-i: optional :sys2sysonly. A registered appliance to send to. Its stored address, admin username, api-key and SSH address are used for any of those you do not give.--address,-a: optional :sys2sysonly. The receiver's address.--receiver_username,-u: optional :sys2sysonly. An admin username on the receiver.--receiver_api_key,-K: optional :sys2sysonly. That user's api-key on the receiver.--ssh_address,-s: optional :sys2sysonly. The address to transfer over, when it differs from--address.--overwrite,-o: optional :sys2sysonly. Replace an existing dataset of the same name on the receiving appliance. A destination that has clones there is never replaced: the transfer fails and names them. Default is false.--keep_snapshot,-k: optional : Keep the temporary snapshot created for send operation. Default is false (snapshot deleted after send).--wait,-w: optional : Wait until the transfer finishes. Without it the command prints the task id and the commands that show its progress.
-
Example:
# Within this vME
vme db send -t pool2pool -d demo-pool/sources/sender@now -r '{"pool_name": "vme-pool", "dataset_name": "receiver-snap"}'
# To a registered appliance, waiting for it to finish
vme db send -t sys2sys -d vme-pool/sources/app01@nightly -i c8d4f2e3b0a54c1c93e10a780a88b373 -p vme-pool -D app01-copy -w
Check Send Status
Check the status of a database send operation or view transfer history.
- Command:
vme db send_status <parameters> - Parameters (mutually exclusive - use one):
--task_id,-t: optional : Task ID returned from db send command. Returns status for specific transfer.--dataset,-d: optional : Dataset name (e.g., vme-pool/sources/foo). Returns all transfer history.
- Example:
# Check specific transfer by task ID
vme db send_status -t xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# View all transfers for a dataset
vme db send_status -d vme-pool/sources/foo
Backup Database
Create a backup of a dataset.
- Command:
vme db backup <parameters> - Parameters:
--dataset,-d: required : Name of dataset to be backup.--dest,-D: optional : Folder on the vME appliance to write the backup file to. It must already exist. Default/enov8/vme/data, the foldervme db backup_listlists andvme db receivereads a bare filename from.
- Output: The backup file is named after the dataset and the date and time of the backup, and ends in
.vmebk. The file name is returned asbackup. - Example:
vme db backup -d vme-pool/sources/foo
# Write the backup to another folder on the appliance
vme db backup -d vme-pool/sources/foo -D /mnt/backups
List Database Backups
List all available backup files.
- Command:
vme db backup_list - Parameters:
- No parameters.
- Example:
vme db backup_list
Create Network Database Connection
Export a dataset over NFS or iSCSI, as its network type was set when it was created, so a remote host can mount it.
- Command:
vme db network_create <parameters> - Parameters:
--full_name,-f: required : Full dataset path (pool/dataset).--client_address,-a: required for NFS : Client IPv4 address, or comma-separated addresses, allowed to mount the NFS export. Leave it out for iSCSI.--client_username,-u: optional : Client username (defaultadmin).--client_password,-P: optional : Client password (defaultadmin).--anonuid,-U: optional : NFS only. Anonymous UID for the export (default117).--anongid,-g: optional : NFS only. Anonymous GID for the export (default122).
- iSCSI: Every iSCSI export is served on the vME's own portal,
0.0.0.0:3260, on all of its interfaces, so an iSCSI export takes no client address,anonuidoranongid. A client address other than0.0.0.0is refused. - Example:
# NFS
vme db network_create -f vme-pool/sources/mydb -a 192.168.1.100
# iSCSI
vme db network_create -f vme-pool/sources/mydb-iscsi
Delete Network Database Connection
Remove the NFS or iSCSI network export from a dataset.
- Command:
vme db network_delete <parameters> - Parameters:
--full_name,-f: required : Full dataset path (pool/dataset).
- Example:
vme db network_delete -f vme-pool/sources/mydb
Log Commands
List Log Files
List all available log files.
- Command:
vme log list - Parameters:
- No parameters.
- Example:
vme log list
Show Log Content by ID
Display log content by log ID.
- Command:
vme log show <parameters> - Parameters:
--logid,-l: required : Log ID to retrieve.--limit,-n: optional : Most log entries to return. Default100.--offset,-o: optional : Log entries to skip first. Default0.
- Example:
vme log show -l 123 -n 50 -o 100
Get Log Content by ID
Alias for vme log show.
- Command:
vme log get <parameters> - Parameters:
--logid,-l: required : Log ID to retrieve.--limit,-n: optional : Most log entries to return. Default100.--offset,-o: optional : Log entries to skip first. Default0.
- Example:
vme log get -l 123
User Management Commands
Add User
Create a new user account.
- Command:
vme user add <parameters> - Parameters:
--username,-u: required : Username for the new user.--group_id,-g: required : Group ID the user belongs to.--name,-n: required : Display name.--mail,-m: required : User email.--password,-p: required : Required unlessauth_typeisldap.--auth_type,-a: optional : Authentication type (local,password,ldap).
- Example:
vme user add -u john.doe -g 2 -p SecurePass123 -n "John Doe" -m john.doe@example.com
Get Current User Info
Get information for the currently authenticated user.
- Command:
vme user info - Parameters:
- No parameters.
- Example:
vme user info
List Users
List all users (admin endpoint).
- Command:
vme user list - Parameters:
- No parameters.
- Example:
vme user list
Admin Add User
Create a user using the admin endpoint.
- Command:
vme user admin_add <parameters> - Parameters:
--username,-u: required : Username for the new user.--name,-n: required : Display name.--mail,-m: required : User email.--group_id,-g: optional : Group ID (default backend behavior applies).--auth_type,-a: optional : Authentication type (local,password,ldap).--password,-p: conditionally required : Required whenauth_typeislocal/password(or omitted).
- Example:
vme user admin_add -u jane.doe -n "Jane Doe" -m jane.doe@example.com -g 2 -p SecurePass123
Admin List Users
List users using admin endpoint.
- Command:
vme user admin_list - Parameters:
- No parameters.
- Example:
vme user admin_list
Modify User
Modify an existing user account.
- Command:
vme user modify <parameters> - Parameters:
--username,-u: required : Username to modify.--current_password,-c: required : Current password for verification.--name,-n: optional : New display name.--mail,-m: optional : New email.--rotate_api_key,-r: optional : Rotate API key (true/false). Given on its own it meanstrue.
- Notes:
vme user modifydoes not change passwords; given--password, it stops withPassword change is not available from the CLI. - Example:
vme user modify -u john.doe -c CurrentPass123 -n "John D."
Admin Modify User
Modify a user using admin endpoint.
- Command:
vme user admin_modify <parameters> - Parameters:
--username,-u: required : Username to modify.- At least one of the following is required:
--name,--mail,--group_id,--rotate_api_key,--auth_type,--password. --password,-p: optional : New password.--auth_type,-a: required when--passwordis provided.
- Example:
vme user admin_modify -u john.doe -g 2
Delete User
Delete a user account.
- Command:
vme user delete <parameters> - Parameters:
--username,-u: required : Username to delete.--password,-p: required : Password for verification.--confirm_text,-c: required : Confirmation text (for example:DELETE john.doe).--method,-m: optional : Auth method (passwordorldap).
- Example:
vme user delete -u john.doe -p SecurePass123 -c "DELETE john.doe"
Admin Delete User
Delete a user using admin endpoint.
- Command:
vme user admin_delete <parameters> - Parameters:
--username,-u: required : Username to delete.
- Example:
vme user admin_delete -u john.doe
Set User Group
Assign a user to a specific group.
- Command:
vme user setgroup <parameters> - Parameters:
--username,-u: required : Username to update.--password,-p: required : Password for verification.--group_id,-g: required : Group ID to assign.
- Example:
vme user setgroup -u john.doe -p SecurePass123 -g 3
List Groups
List all user groups.
- Command:
vme user group_list - Parameters:
- No parameters.
- Example:
vme user group_list
Add Group
Create a new user group.
- Command:
vme user group_add <parameters> - Parameters:
--group_id,-g: required : Group ID for the new group.--group_name,-n: required : Name of the new group.
- Example:
vme user group_add -g 5 -n developers
Delete Group
Delete a user group.
- Command:
vme user group_delete <parameters> - Parameters:
--group_id,-g: required : Group ID to delete.
- Example:
vme user group_delete -g 5
Get LDAP Settings
Retrieve current LDAP configuration.
- Command:
vme user ldap_get - Parameters:
- No parameters.
- Example:
vme user ldap_get
Create LDAP Settings
Create LDAP authentication settings.
- Command:
vme user ldap_create <parameters> - Parameters:
--server,-h: required : LDAP server hostname or IP.--hostis accepted too, with a warning to use--server.--port,-p: required : LDAP server port.--user_search_base,-b: required : Base DN to search for users under.--base_dnis accepted too, with a warning to use--user_search_base.--bind_dn,-d: required : Bind DN for LDAP authentication.--bind_password,-P: required : Password for bind DN.--user_filter,-u: required : LDAP search filter for users. The placeholder{adminuser}is replaced by the login name, for example(uid={adminuser}).--vme_attrs,-v: required : JSON dictionary mapping the vME user fieldsusername,nameandmailto LDAP attribute names, for example'{"username": "uid", "name": "cn", "mail": "mail"}'. All three keys, and no others.--auto_provision,-a: optional : Create a vME user the first time someone from the directory logs in. Given on its own it meanstrue. Defaultfalse.--enabled,-e: optional : Accepted and ignored, with a warning: LDAP is in use once it is configured.
- Example:
vme user ldap_create -h ldap.example.com -p 389 -b "ou=users,dc=example,dc=com" -d "cn=readonly,dc=example,dc=com" -P AdminPass123 -u "(uid={adminuser})" -v '{"username": "uid", "name": "cn", "mail": "mail"}'
Update LDAP Settings
Update LDAP authentication settings.
- Command:
vme user ldap_update <parameters> - Parameters: Any of the parameters of Create LDAP Settings. Only the settings you give are changed.
- Example:
vme user ldap_update -h ldap.example.com -p 636
Delete LDAP Settings
Delete LDAP configuration.
- Command:
vme user ldap_delete - Parameters:
- No parameters.
- Example:
vme user ldap_delete
Test LDAP Settings
Test LDAP connection without saving.
- Command:
vme user ldap_test <parameters> - Parameters:
--server,-h: required : LDAP server hostname or IP.--hostis accepted too, with a warning to use--server.--port,-p: required : LDAP server port.--user_search_base,-b: required : Base DN to search for users under.--base_dnis accepted too, with a warning to use--user_search_base.--bind_dn,-d: required : Bind DN for LDAP authentication.--bind_password,-P: required : Password for bind DN.- The other parameters of Create LDAP Settings are accepted as well.
- Example:
vme user ldap_test -h ldap.example.com -p 389 -b "ou=users,dc=example,dc=com" -d "cn=readonly,dc=example,dc=com" -P AdminPass123
Backward-Compatible LDAP Alias
vme user ldap_setting is kept as an alias of vme user ldap_create.
System Commands
System Info
- Command:
vme system info - Parameters:
- No parameters.
- Example:
vme system info
System Version
Show the version of the vME appliance's API.
The CLI itself has no --version option. On Windows, the installed CLI's version is shown against vME CLI in the list of installed apps. On Unix, the version is part of the installer's file name, and install.sh prints it when it finishes.
- Command:
vme system version - Parameters:
- No parameters.
- Example:
vme system version
Upload License Key
- Command:
vme system key_drop <parameters> - Parameters:
--secret,-s: required : License key secret.--renew,-r: optional : Renew flag.
- Example:
vme system key_drop -s YOUR_LICENSE_KEY
Get License Key Status
- Command:
vme system key_get - Parameters:
- No parameters.
- Example:
vme system key_get
List ZFS Disks
- Command:
vme system disks - Parameters:
- No parameters.
- Example:
vme system disks
Set iSCSI CHAP
Configure CHAP / mutual CHAP for a target and initiator pair.
- Command:
vme system iscsi_chap_set <parameters> - Parameters:
--target_iqn,-t: required : iSCSI target IQN.--initiator_iqn,-i: required : iSCSI initiator IQN.--chap_user,-u: optional : CHAP username.--chap_password,-p: optional : CHAP password.--mutual_chap_password,-m: optional : Mutual CHAP password.
- Example:
vme system iscsi_chap_set -t iqn.2025-01.local:target1 -i iqn.2025-01.local:init1 -u admin -m mutualSecret123
Remove iSCSI CHAP
Remove CHAP / mutual CHAP settings for a target and initiator pair.
- Command:
vme system iscsi_chap_remove <parameters> - Parameters:
--target_iqn,-t: required : iSCSI target IQN.--initiator_iqn,-i: required : iSCSI initiator IQN.
- Example:
vme system iscsi_chap_remove -t iqn.2025-01.local:target1 -i iqn.2025-01.local:init1
Task Commands
Check Task Status
- Command:
vme task status <parameters> - Parameters:
--task_id,-t: required : Task ID to query.
- Example:
vme task status -t 6c9d1f3b-6c0b-4b8e-9f64-1b1c0f8d24a2
Agent Commands
Agents are lightweight vME worker processes enrolled on other hosts. The agent commands cover three areas: enrollment tokens, registered agents, and agent jobs.
Create Enrollment Token
Generate a one-time token used to enroll a new agent.
- Command:
vme agent token_create <parameters> - Parameters:
--ttl_minutes,-t: optional : Token validity in minutes.--label,-l: optional : Human-readable label for the token.--environment,-e: optional : Environment tag.--scope,-s: optional : Scope restriction for the token.
- Example:
vme agent token_create -l "prod-agent-1" -t 60
List Enrollment Tokens
- Command:
vme agent token_list <parameters> - Parameters:
--active_only,-a: optional : Show only active (non-expired, non-revoked) tokens.
- Example:
vme agent token_list --active_only
Revoke Enrollment Token
- Command:
vme agent token_revoke <parameters> - Parameters:
--token_id,-t: required : ID of the token to revoke.
- Example:
vme agent token_revoke -t abc123
List Agents
List all enrolled agents.
- Command:
vme agent list <parameters> - Parameters:
--environment,-e: optional : Filter by environment tag.--enabled,-E: optional : Filter by enabled state (trueorfalse). Given on its own it meanstrue.--status,-s: optional : Filter by agent status.--version,-v: optional : Filter by agent version.
- Output: Each agent carries its label, environment,
tags, status, and theattributesit reports about its host. See List agents in the API reference. - Example:
vme agent list -e production
Manage an Agent
Enable, disable or rename an enrolled agent, or change its environment and tags.
- Command:
vme agent patch <parameters> - Parameters:
--agent_id,-a: required : ID of the agent.--action,-A: required :enable,disable,rotate(issue a new agent key),touch(refresh its last-seen time), orupdate.--label,-l: optional :updateonly. The agent's name in vME, 1 to 128 characters.--environment,-e: optional :updateonly. Up to 64 characters: letters, digits, spaces, dots, underscores and hyphens, starting with a letter or digit.--tags,-t: optional :updateonly. Comma-separated tags, which replace the agent's tags. Up to 20, each up to 32 characters, with the same characters allowed as--environment. Tags are compared without regard to case. Pass""to remove all tags.
- Notes:
updateneeds at least one of--label,--environmentand--tags, and changes only those. - Example:
vme agent patch -a agent-abc -A disable
vme agent patch -a agent-abc -A update -l "SQL-B (test)" -e test -t "sql2022,nightly-refresh"
Delete an Agent
Permanently remove an agent record.
- Command:
vme agent delete <parameters> - Parameters:
--agent_id,-a: required : ID of the agent to delete.
- Example:
vme agent delete -a agent-abc
Create Agent Job
Dispatch a job to a specific agent.
- Command:
vme agent job_create <parameters> - Parameters:
--agent_id,-a: required : ID of the target agent.--phase,-p: required : The phase to run, by its exact name, which is case-sensitive. Valid phases depend on the agent's connector; for the SQL Server iSCSI connector they areDiscoverHost,ConnectTargets,SourcePrep,SourcePrepOnly,SourceMigrateOnly,CloneMount,CloneUnmount,QuiesceandResume. See Phases in the iSCSI API reference.--config,-c: optional : JSON configuration object for the job.--secrets,-s: optional : JSON secrets object passed to the agent.--workflow_id: optional : Workflow this job belongs to. Give it in this long form.--wizard_step,-W: optional : Wizard step this job corresponds to.--job_type,-j: optional : Job type classification.--role,-r: optional : Role the agent should take for this job.--ingest_path,-i: optional : Path used for data ingest.
- Example:
vme agent job_create -a agent-abc -p DiscoverHost
List Agent Jobs
- Command:
vme agent job_list <parameters> - Parameters:
--job_id,-j: optional : Filter by job ID.--agent_id,-a: optional : Filter by agent ID.--state,-s: optional : Filter by job state.--workflow_id: optional : Filter by workflow ID. Give it in this long form.--wizard_step,-W: optional : Filter by wizard step.--job_type,-t: optional : Filter by job type.--role,-r: optional : Filter by role.--ingest_path,-i: optional : Filter by ingest path.--include_events,-e: optional : Include job event history.--limit,-l: optional : Maximum number of results to return.
- Example:
vme agent job_list -a agent-abc --include_events
# Jobs belonging to one workflow
vme agent job_list --workflow_id a1b2c3d4e5f6
Update Agent Job
Update or cancel an in-progress agent job.
- Command:
vme agent job_patch <parameters> - Parameters:
--job_id,-j: required : ID of the job to update.--action,-a: required : Action to perform, for examplecancel.
- Example:
vme agent job_patch -j job-xyz -a cancel
Workflow Commands
Workflows orchestrate onboarding a database and cloning it onto a SQL Server host. A workflow runs only the parts chosen for it, in this order: ingest (load the database into a source), snapshot, send (to a second vME appliance), clone, and mount (attach the clone to a host). It tracks progress through the steps those parts need, and holds the configuration and status for the whole operation. See Parts: what a workflow does.
The CLI covers the read and teardown side of the workflow API: enough to monitor in-flight workflows and recover from failures.
The CLI has no commands to create or step through a workflow. Workflows built from parts are created and run in the vME web UI, or with the Workflow API. The same applies to attaching a clone's database under a chosen name, and to detaching the source copy after a snapshot, the options used to put a clone on its source's own SQL Server host.
List Workflows
- Command:
vme workflow list <parameters> - Parameters:
--state,-s: optional : Filter by workflow state (draft,source_selection,source_provisioning,source_prep,snapshot_selection,snapshot,sending,cloning,clone_mounting,completed,failed,cancelled).--created_by,-c: optional : Filter by username who created the workflow.--workflow_type,-t: optional : Filter by workflow type.--source_mode,-S: optional : Filter by source mode.--target_mode,-T: optional : Filter by target mode.--transport_mode,-m: optional : Filter by transport mode.
- Example:
vme workflow list -s failed
Show Workflow Detail
Show a single workflow including per-step agent job history.
- Command:
vme workflow show <parameters> - Parameters:
--workflow_id,-i: required : Workflow ID.
- Example:
vme workflow show -i a1b2c3d4e5f6
List Workflow Templates
List the available workflow templates (for example, SQL Server over iSCSI). Templates define the dataset roles and agent behaviour for a flow type.
- Command:
vme workflow templates <parameters> - Parameters:
--enabled_only,-e: optional : Show only enabled templates.
- Example:
vme workflow templates
Preview Cleanup Candidates
List the ZFS objects (sources, snapshots, clones) that a delete --cleanup would destroy, across both the local and target vME. Use this before deleting to confirm what will be removed.
- Command:
vme workflow cleanup_preview <parameters> - Parameters:
--workflow_id,-i: required : Workflow ID.
- Example:
vme workflow cleanup_preview -i a1b2c3d4e5f6
Cancel a Workflow
Soft-cancel: sets the workflow state to cancelled. The workflow record and all ZFS objects are kept. Use this to mark a workflow stopped without removing anything.
- Command:
vme workflow cancel <parameters> - Parameters:
--workflow_id,-i: required : Workflow ID.
- Example:
vme workflow cancel -i a1b2c3d4e5f6
Delete a Workflow
Hard-delete: permanently removes the workflow record. Optionally also destroys the ZFS objects (sources, snapshots, clones) on both the local and target vME, in safe dependency order.
- Command:
vme workflow delete <parameters> - Parameters:
--workflow_id,-i: required : Workflow ID.--cleanup,-c: optional : Also destroy the workflow's ZFS objects on both vMEs before deleting the record. If any object destruction fails the record is kept so you can retry.--force,-f: optional : Delete the record even if--cleanupreported failures. Use when objects are already gone or you want to remove the record regardless.--objects,-o: optional : Comma-separated list of specific object keys to destroy (fromcleanup_preview). Omit to destroy all candidates.
- Example:
# Delete record only
vme workflow delete -i a1b2c3d4e5f6
# Delete record and destroy all ZFS objects
vme workflow delete -i a1b2c3d4e5f6 --cleanup
# Delete record and destroy specific objects, force even on failure
vme workflow delete -i a1b2c3d4e5f6 --cleanup --force -o clone_data,received_data
Peer Commands
Peer commands manage the other vME appliances this one sends snapshots to, and the SSH trust between them. A vME must trust the sending appliance's key before a zfs send can stream data to it.
The usual way to pair two appliances is to register the receiving appliance on the sending one with vme peer add, then run vme peer trust_push: the sending appliance installs its own key on the receiver using the stored credentials. A registered appliance can then be named by its peer_id in vme db send. All of these commands need an administrator account.
To pair by hand instead, run vme peer identity on the sending appliance, copy the printed public key, then run vme peer trust on the receiving one.
Register Another Appliance
Store another vME's address and admin credentials on this one. The api-key is stored encrypted and is never shown again.
- Command:
vme peer add <parameters> - Parameters:
--name,-n: required : A name for the appliance, up to 128 characters. Must be unique.--base_url,-u: required : Its address, for examplehttps://10.0.0.20. A bare host is read ashttps://<host>.--admin_api_key,-k: required : An administrator api-key on that appliance.--admin_username,-U: optional : The account that api-key belongs to. Defaultadmin.--ssh_address,-s: optional : The address to transfer data over, when it differs from--base_url.--verify_tls,-v: optional : Verify the appliance's TLS certificate. Defaultfalse, since appliances ship a self-signed certificate.
- Output: The registered appliance, including the
peer_idthe other peer commands take. - Example:
vme peer add -n vme-nonprod-01 -u https://10.0.0.20 -k xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
List Registered Appliances
- Command:
vme peer list - Parameters:
- No parameters.
- Output: Each appliance's
peer_id,name,base_url,ssh_address,admin_username,has_api_key,trust(trustedonce this vME's key is installed on it, otherwisenone),status(online,unreachableorunknown, from the last test), its version, hostname and pools as last read,last_seen_atandlast_error. - Example:
vme peer list
Show, Change or Remove a Registered Appliance
- Commands:
vme peer show -i <peer_id>: Show one appliance.vme peer update -i <peer_id> <parameters>: Change any of the parameters ofvme peer add. Give--admin_api_keyonly to replace the stored key.vme peer delete -i <peer_id>: Remove it from this vME's registry. Nothing on the other appliance is changed, including a key this vME installed there.
- Parameters:
--peer_id,-i: required : The appliance'speer_id, fromvme peer list.
- Example:
vme peer update -i c8d4f2e3b0a54c1c93e10a780a88b373 -s 172.31.0.20
Test a Registered Appliance
Check that the appliance answers with the stored credentials, and read its pools, agent count and version.
- Command:
vme peer test <parameters> - Parameters:
--peer_id,-i: required : The appliance'speer_id.
- Example:
vme peer test -i c8d4f2e3b0a54c1c93e10a780a88b373
Push This vME's Key to a Registered Appliance
Install this vME's managed SSH public key on the registered appliance, so snapshots can be sent to it.
- Command:
vme peer trust_push <parameters> - Parameters:
--peer_id,-i: required : The appliance'speer_id.
- Example:
vme peer trust_push -i c8d4f2e3b0a54c1c93e10a780a88b373
List a Registered Appliance's Pools or Agents
Read the other appliance's pools, or its enrolled agents, with the stored credentials.
- Commands:
vme peer pools -i <peer_id>,vme peer agents -i <peer_id> - Parameters:
--peer_id,-i: required : The appliance'speer_id.
- Example:
vme peer pools -i c8d4f2e3b0a54c1c93e10a780a88b373
Get This vME's Identity
Return this appliance's managed SSH public key and fingerprint. The key is generated on first call and reused on subsequent calls. Pass this key to vme peer trust on the target appliance.
- Command:
vme peer identity - Parameters:
- No parameters.
- Example:
vme peer identity
Trust a Peer's Public Key
Register an SSH public key on this appliance so it will accept zfs receive connections signed by that key. The operation is idempotent - registering the same key twice returns added: false without error.
- Command:
vme peer trust <parameters> - Parameters:
--pubkey,-p: required : The SSH public key string to trust (output ofvme peer identityon the peer).--label,-l: optional : Human-readable label stored alongside the key inauthorized_keys.
- Example:
vme peer trust -p "ssh-rsa AAAA... vme-peer@source-host" -l "prod-to-dr"
Object Commands
Destroy Several Objects at Once
Destroy a selection of sources, snapshots and clones in one request. vME destroys the clones first, then the snapshots, then the sources, whatever order you list them in, and reports on each object.
- Command:
vme object destroy <parameters> - Parameters:
--objects,-o: required : Comma-separated names, at most 100. Name each object in full:vme-pool/sources/app01,vme-pool/clones/app01-test, and a snapshot asvme-pool/sources/app01@nightly. A name without its pool is read as a source in the pool given by--pool_name.--pool_name,-p: optional : The pool for names given without one.--force,-f: optional : Also destroy objects an unfinished onboarding workflow is still using.
- Output: One entry per object with
ok,pendingand amessage, and thecountsof objects destroyed, in progress, refused and failed. An object that was not destroyed says why, for examplehas 2 snapshot(s) (...); delete them first, or select them with it. Sources and clones are destroyed in the background; when one had not finished as the command returned, it is markeddestroy in progressand the command says to check withvme source showorvme clone show. See Destroy several objects at once in the API reference. - Example:
vme object destroy -o vme-pool/clones/app01-test,vme-pool/sources/app01@nightly,vme-pool/sources/app01