[one-users] Genenare VM list

Carlos Martín Sánchez cmartin at opennebula.org
Tue Jul 15 06:13:11 PDT 2014


Hi,

On Thu, Jul 10, 2014 at 11:15 AM, Anandharaj Subramaniam <
anandharaj.maniam at mimos.my> wrote:

>  Hi,
>
>
>
> I would like to have an inventory of all the VM running on OpenNebula.
> Running “onevm list”  doesn’t not have all the info that I need. According
> to  “onevm” help page (--list x y c ), I can define the column name but
> what are the columns available to define there?
>
>
You have the --describe option for that:

$ onevm list --describe
ID                  : ONE identifier for Virtual Machine
NAME                : Name of the Virtual Machine
USER                : Username of the Virtual Machine owner
GROUP               : Group of the Virtual Machine
STAT                : Actual status
UCPU                : CPU percentage used by the VM
UMEM                : Memory used by the VM
HOST                : Host where the VM is running
TIME                : Time since the VM was submitted


> More or less, “onevm list” output  is fine but I need the IP address as
> well (same as VM list in Sunstone) How can I achieve this?
>
>
As you can see, the IP column does not exist. You can however customize the
command easily. Take a look
at /usr/lib/one/ruby/cli/one_helper/onevm_helper.rb, line 129 [1]. You can
add a new column that shows the VM/TEMPLATE/NIC/IP filed. Use onevm show -x
to see the VM object structure.

Regards

[1]
https://github.com/OpenNebula/one/blob/one-4.6/src/cli/one_helper/onevm_helper.rb#L129
--
Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org <http://www.opennebula.org/> | cmartin at opennebula.org |
@OpenNebula <http://twitter.com/opennebula> <cmartin at opennebula.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140715/466c513d/attachment.htm>


More information about the Users mailing list