Hi, You need to update the yaml file in /etc/one/cli to add the new column [1]
Regards. [1] http://docs.opennebula.org/4.6/user/references/cli.html -- Carlos Martín, MSc Project Engineer OpenNebula - Flexible Enterprise Cloud Made Simple www.OpenNebula.org | [email protected] | @OpenNebula <http://twitter.com/opennebula> <[email protected]> On Wed, Jul 23, 2014 at 11:37 AM, Anandharaj Subramaniam < [email protected]> wrote: > Hi Carlos, > > > > Thank you very much for the valuable information. I have done the changes > in onevm_helper.rb to add new column “IP” and also added into default > column list, but somehow it didn’t work for me. Anything I have missed? > Appreciate if you can guide more on this. > > > > > > column :IP, "IP address of VM", :size=>4 do |d| > > d["IP"] > > end > > > > > > default :IP, :USER, :GROUP, :NAME, :STAT, :UCPU, :UMEM, :HOST, > > :TIME > > end > > > > > > > > > > -- > > Regards, > > Anandharaj > > > > *From:* Carlos Martín Sánchez [mailto:[email protected]] > *Sent:* Tuesday, July 15, 2014 9:14 PM > *To:* Anandharaj Subramaniam > *Cc:* [email protected] > > *Subject:* Re: [one-users] Genenare VM list > > > > Hi, > > > > On Thu, Jul 10, 2014 at 11:15 AM, Anandharaj Subramaniam < > [email protected]> 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/> | [email protected] > | @OpenNebula <http://twitter.com/opennebula> > > > > ------------------------------ > *DISCLAIMER:* > > This e-mail (including any attachments) is for the addressee(s) only and > may be confidential, especially as regards personal data. If you are not > the intended recipient, please note that any dealing, review, distribution, > printing, copying or use of this e-mail is strictly prohibited. If you have > received this email in error, please notify the sender immediately and > delete the original message (including any attachments). > > MIMOS Berhad is a research and development institution under the purview > of the Malaysian Ministry of Science, Technology and Innovation. Opinions, > conclusions and other information in this e-mail that do not relate to the > official business of MIMOS Berhad and/or its subsidiaries shall be > understood as neither given nor endorsed by MIMOS Berhad and/or its > subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts > responsibility for the same. All liability arising from or in connection > with computer viruses and/or corrupted e-mails is excluded to the fullest > extent permitted by law. > ------------------------------------------------------------------ - - > DISCLAIMER: This e-mail (including any attachments) is for the addressee(s) > only and may contain confidential information. If you are not the intended > recipient, please note that any dealing, review, distribution, printing, > copying or use of this e-mail is strictly prohibited. If you have received > this email in error, please notify the sender immediately and delete the > original message. MIMOS Berhad is a research and development institution > under the purview of the Malaysian Ministry of Science, Technology and > Innovation. Opinions, conclusions and other information in this e- mail > that do not relate to the official business of MIMOS Berhad and/or its > subsidiaries shall be understood as neither given nor endorsed by MIMOS > Berhad and/or its subsidiaries and neither MIMOS Berhad nor its > subsidiaries accepts responsibility for the same. All liability arising > from or in connection with computer viruses and/or corrupted e-mails is > excluded to the fullest extent permitted by law. >
_______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
