oneimage
- manages OpenNebula images
oneimage
command [args] [options]
--adjust x,y,z Adjust size to not truncate selected columns
--admin lock admin actions
--all lock all actions
-a, --append Append new attributes to the current template
--csv Write table in csv format
--csv-del del Set delimiter for csv output
-d, --datastore id|name Selects the datastore
--decrypt Get decrypted attributes
-d, --delay x Sets the delay in seconds for top command
--describe Describe list columns
--description description Description for the new Image
--disk_type disk_type Type of the image BLOCK, CDROM, RBD or FILE (for
others, check the documentation)
--dry Just print the template
--endpoint endpoint URL of OpenNebula xmlrpc frontend
--expand [x=prop,y=prop] Expands the columns size to fill the terminal.
For example: $onevm list --expand
name=0.4,group=0.6 will expand name 40% and
group 60%. $onevm list --expand name,group will
expand name and group based on its size.$onevm
list --expand will expand all columns.
-f, --filter x,y,z Filter data. An array is specified with
column=value pairs. Valid operators
=,!=,<,<=,>,>=,~ e.g. NAME=test (match name with
test) NAME~test (match test, te, tes..)
--format format Format of the image (raw, qcow2, ...)
--fs filesystem Filesystem to format the image (ext4, xfs, ...)
-h, --help Show this message
-j, --json Show the resource in JSON format
-l, --list x,y,z Selects columns to display with list command
-c, --listconf conf Selects a predefined column list
--manage lock manage actions
--name name Name of the new image
--no_check_capacity Check Datastore capacity. By Default YES
--no-context Do not add context when building from Dockerfile
--no-expand Disable expand
--no-header Hides the header of the table
--no-pager Disable pagination
-n, --numeric Do not translate user and group IDs
--operator operator Logical operator used on filters: AND, OR.
Default: AND.
--password password Password to authenticate with OpenNebula
--path path Path of the image file
--persistent Tells if the image will be persistent
--prefix prefix Device prefix for the disk (eg. hd, sd, xvd or
vd)
--size size Size in MB. Used for DATABLOCK type or SOURCE
based images.
--source source Source to be used. Useful for not file-based
images
--target target Device the disk will be attached to
--type type Type of the new Image: OS, CDROM, DATABLOCK,
KERNEL, RAMDISK, CONTEXT
--use lock use actions
--user name User name used to connect to OpenNebula
--vcenter_adapter_type vcenter_adapter_type Controller that will handle
this image in vCenter (lsiLogic, ide, busLogic).
For other values check the documentation
--vcenter_disk_type vcenter_disk_type The vCenter Disk Type of the image
for vCenter: THIN, THICK, ZEROEDTHICK (for
others, check the documentation)
-v, --verbose Verbose mode
-V, --version Show version and copyright information
-x, --xml Show the resource in xml format
-y, --yaml Show the resource in YAML format
chgrp range|imageid_list groupid Changes the Image group
chmod range|imageid_list octet Changes the Image permissions
chown range|imageid_list userid [groupid] Changes the Image owner and group
chtype range|imageid_list type Changes the Image's type
clone imageid name Creates a new Image from an existing one valid options: datastore
create [file] Creates a new Image Examples:
- using a template description file:
oneimage create -d default centOS.tmpl
- new image "arch" using a path:
oneimage create -d default --name arch --path /tmp/arch.img
- new persistent image, OS type and qcow2 format:
oneimage create -d 1 --name ubuntu --path /tmp/ubuntu.qcow2 \
--prefix sd --type OS --driver qcow2 \
--description "A OS plain installation \
--persistent"
- a datablock image of 400MB:
oneimage create -d 1 --name data --type DATABLOCK --size 400
valid options: datastore, description, disk_type, dry, format, fs, name, no_check_capacity, no_context, path, persistent, prefix, size, source, target, type, vcenter_adapter_type, vcenter_disk_type
delete range|imageid_list Deletes the given Image
disable range|imageid_list Disables the given Image
dockerfile Create an image based on a Dockerfile valid options: datastore, description, disk_type, dry, format, fs, name, no_check_capacity, no_context, path, persistent, prefix, size, source, target, type, vcenter_adapter_type, vcenter_disk_type
enable range|imageid_list Enables the given Image
list [filterflag] Lists Images in the pool valid options: adjust, csv, csv_del, delay, describe, expand, filter, json, list, listconf, no_expand, no_header, no_pager, numeric, operator, size, xml, yaml
lock range|imageid_list Locks a VM with differents levels for lock any actions with this VM, show and monitoring never will be locked. Valid states are: All. Levels: [Use]: locks Admin, Manage and Use actions. [Manage]: locks Manage and Use actions. [Admin]: locks only Admin actions. valid options: admin, all, manage, use
nonpersistent range|imageid_list Makes the given Image non persistent. See 'oneimage persistent'
orphans Shows orphans images (i.e images not referenced in any template).
persistent range|imageid_list Makes the given Image persistent. A persistent Image saves the changes made to the contents after the VM instance is shutdown (or in real time if a shared FS is used). Persistent Images can be used by only one VM instance at a time.
rename imageid name Renames the Image
show imageid Shows information for the given Image valid options: decrypt, json, xml, yaml
snapshot-delete imageid snapshot_id Deletes a snapshot from the image
snapshot-flatten imageid snapshot_id Flattens the snapshot and removes all other snapshots in the image
snapshot-revert imageid snapshot_id Reverts image state to a snapshot
top [filterflag] Lists Images continuously valid options: adjust, csv, csv_del, delay, describe, expand, filter, json, list, listconf, no_expand, no_header, no_pager, numeric, operator, size, xml, yaml
unlock range|imageid_list Unlocks a VM for unlock any actions with this VM. Valid states are: All.
update imageid [file] Update the template contents. If a path is not provided the editor will be launched to modify the current content. valid options: append
file Path to a file
filterflag a, all all the known IMAGEs m, mine the IMAGE belonging to the user in ONE_AUTH g, group 'mine' plus the IMAGE belonging to the groups the user is member of G, primary group the IMAGE owned the user's primary group uid IMAGE of the user identified by this uid user IMAGE of the user identified by the username
groupid OpenNebula GROUP name or id
imageid OpenNebula IMAGE name or id
imageid_list Comma-separated list of OpenNebula IMAGE names or ids
range List of id's in the form 1,8..15
text String
type Image type: OS, CDROM, DATABLOCK, KERNEL, RAMDISK, CONTEXT
userid OpenNebula USER name or id
OpenNebula 6.0.0.3 Copyright 2002-2021, OpenNebula Project, OpenNebula Systems