API CLI

This is work in progress

Contents

API and CLI

oVirt provides a web-based API (using activeresource and REST-style calls) and a command line client for common tasks. These are all contained in the ovirt-client RPM.

Command line interface

This is a brief overview of what the command line client should be capable of, at a minimum. For brevity, commands aren't listed in full, justwith enough detail to tell them apart and explain what they do.

Storage

Storage related functionality can be accessed with ovirt storage. Subcommands are

--list
list pools/volumes from a storage pool, including status
--create
create a new storage pool/volume
--refresh
refresh a storage pool
--check
do something (maybe create some storage volume) to see if pool is working (???)
--tasks
list the tasks for a storage pool

Virtual machines

VM related functionality can be accessed with ovirt vm. Subcommands are

--list
list VM's
--create
create a new VM
--delete
delete a VM
--start/stop/shutdown/destroy/suspend/resume/save/restore
basic lifecycle control for individual VM
--migrate
migrate to another node
--console
open the VM's console in virt-viewer
--memset
balloon a VM's memory (dependant on KVM's ability to do so)

It would also be nice to add more status info, like top or uptime; and some basic inside-the-VM info like IP addresses and the like

Nodes

Node related functionality can be accessed with ovirt node. Subcommands are

--list
list nodes in a hardware pool, with options to see memory/cpu stats, and the VM's on a node
--tasks
list tasks concerning this node
--disable
migrate all VM's off a node and mark it as disabled
VM lifecycle control
change VM states (suspend/resume/stop etc.) for all VM's on a node

Systemwide

Some commands affect all of oVirt. They are accessed with ovirt system

--pause-all/--stop-all
pause/stop all VM's
--message
display a message to all WUI users and with wall on all nodes (needs taskomatic support and some WUI trickery)
--status-check
return in the exit code some indication of the cloud status (needs better definition)
MediaWiki