Command Line Interface 1.4
OpenNebula provides four commands to interact with the system:
onevm
: to submit, control and monitor virtual machinesonehost
: to add, delete and monitor hostsonevnet
: to add, delete and monitor virtual networksoneuser
: to add, delete and monitor usersThese commands share common options described below:
Number ranges can also be specified this way:
[<start>-<end>]
: generates numbers from start to end[<start>+<count>]
: generates a range that starts with the number provided and has count number of elementsIf start first number is 0 then it will pad the numbers generated with 0 to the same size as the last element in the range.
Example:
[9-11]: 9 10 11 [09-11]: 09 10 11 [8+3]: 8 9 10 [08+3]: 08 09 10
This command enables the user to manage virtual machines in the ONE server. The user can allocate, deploy, migrate, suspend, resume and shutdown a virtual machine with the functionality present in onevm.
onevm [<options>] <command> [<parameters>]
create
Submits a new virtual machine, adding it to the ONE VM pool. It requires the filename of the VM template.
onevm create <template>
deploy
Starts a previously submitted VM on a specific host
onevm deploy <vm_id> <host_id>
shutdown
Shutdown an already deployed VM
onevm shutdown <vm_id>
livemigrate
Migrates a running VM to another host without downtime
onevm livemigrate <vm_id> <host_id>
migrate
Saves a running VM and starts it again in the specified host
onevm migrate <vm_id> <host_id>
hold
Sets a VM to hold state, scheduler will not deploy it
onevm hold <vm_id>
release
Releases a VM from hold state
onevm release <vm_id>
stop
Stops a running VM
onevm stop <vm_id>
suspend
Saves a running VM
onevm suspend <vm_id>
resume
Resumes the execution of a saved VM
onevm resume <vm_id>
delete
Deletes a VM from the pool
onevm delete <vm_id>
restart
Resubmits the VM after failure
onevm restart <vm_id>
list
Shows VMs in the pool
onevm list <filter_flag> where filter_flag can be a, all --> all the known VMs m, mine --> the VMs belonging to the user in ONE_AUTH uid --> VMs of the user identified by this uid username --> VMs of the user identified by the username
show
Gets information about a specific VM
onevm show <vm_id>
top
Lists VMs continuously
onevm top
history
Gets history from VMs, if no vm_id is provided it will list history for all known VMs
onevm history [<vm_id> <vm_id> ...]
ID | ONE VM identifier |
---|---|
USER | Username of the VM owner |
NAME | Name of the ONE |
STAT | Status of the VM |
CPU | CPU percentage used by the VM |
MEM | Memory used by the VM |
HOSTNAME | Host where the VM is being or was run |
TIME | Time since the submission of the VM (days hours:minutes:seconds) |
pend | pending |
---|---|
hold | VM on hold (not runnable) |
stop | stopped |
susp | suspended |
done | finished |
prol | prolog |
boot | booting |
runn | running |
migr | migrating |
save | saving the VM to disk |
epil | epilog |
shut | shutting down |
fail | failed |
This command enables the user to manage hosts in the Open Nebula server. It provides functionality to allocate, get information and delete a particular host or to list all the available hosts.
onehost [<options>] <command> [<parameters>]
create
Adds a new machine to the pool
onehost create <hostname> <im_mad> <vmm_mad>
im_mad and vmm_mad as written in oned.conf.
show
Gets info from a single host
onehost show <host_id>
delete
Removes a machine from the pool
onehost delete <host_id>
list
Lists machines in the pool
onehost list
enable
Enables host
onehost enable <host_id>
disable
Disables host
onehost disable <host_id>
top
Lists hosts continuously
onehost top
HID | Host ID |
---|---|
NAME | Host name |
RVM | Number of running VMs |
TCPU | Total CPU (percentage) |
FCPU | Free CPU (percentage) |
ACPU | Available CPU (not allocated by VMs) |
TMEM | Total memory |
FMEM | Free memory |
STAT | Host status |
This command enables the user to manage virtual networks in the OpenNebula server. It provides functionality to create, get information and delete a particular network or to list available and used IP's.
onevnet <command> [<parameters>]
create
Adds a new virtual network to the pool
onevnet create <network_configuration_file>
show
Gets info from a single virtual network
onevnet show <network_id>
delete
Removes a virtual network
onevnet delete <network_id>
list
Lists virtual networks in the pool
onevnet list <filter_flag> where filter_flag can be a, all --> all the known VNs m, mine --> the VNs belonging to the user in ONE_AUTH uid --> VNs of the user identified by this uid username --> VNs of the user identified by the username
NID | Network ID |
---|---|
NAME | Name of the virtual network |
TYPE | Type of virtual network (0=ranged, 1=fixed) |
BRIDGE | Bridge associated to the virtual network |
#LEASES | Number of leases used from this virtual network |
This command enables the OpenNebula administrator to manage users, adding, listing and deleting them.
oneuser [<options>] <command> [<parameters>]
create
Creates a new user
oneuser create username password
delete
Removes a user
oneuser delete <uid>
list
Lists all the user prenset in OpenNebula
oneuser list
UID | User ID |
---|---|
NAME | Name of the user |
PASSWORD | SHA1 encrypted password |
ENABLE | Whether the user is enabled or not |