<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Hi Carlos,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">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.
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">   column :IP, "IP address of VM", :size=>4 do |d|</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">           d["IP"]</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">     end</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">     default :IP, :USER, :GROUP, :NAME, :STAT, :UCPU, :UMEM, :HOST,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">           :TIME</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Courier New"; color:#1F497D">end</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">--</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Regards,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Anandharaj</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> Carlos Martín Sánchez [mailto:cmartin@opennebula.org]
<br>
<b>Sent:</b> Tuesday, July 15, 2014 9:14 PM<br>
<b>To:</b> Anandharaj Subramaniam<br>
<b>Cc:</b> users@lists.opennebula.org<br>
<b>Subject:</b> Re: [one-users] Genenare VM list</span></p>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Hi,</p>
<div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">On Thu, Jul 10, 2014 at 11:15 AM, Anandharaj Subramaniam <<a href="mailto:anandharaj.maniam@mimos.my" target="_blank">anandharaj.maniam@mimos.my</a>> wrote:</p>
<div>
<div>
<p class="MsoNormal" style="">Hi,</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style="">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?</p>
</div>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">You have the --describe option for that:</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">$ onevm list --describe</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">ID                  : ONE identifier for Virtual Machine</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">NAME                : Name of the Virtual Machine</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">USER                : Username of the Virtual Machine owner</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">GROUP               : Group of the Virtual Machine</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">STAT                : Actual status       </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">UCPU                : CPU percentage used by the VM</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">UMEM                : Memory used by the VM</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">HOST                : Host where the VM is running</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">TIME                : Time since the VM was submitted</span></p>
</div>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0cm 0cm 0cm 6.0pt; margin-left:4.8pt; margin-right:0cm">
<div>
<p class="MsoNormal" style="">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?</p>
</div>
</blockquote>
</div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">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.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Regards</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">[1] <a href="https://github.com/OpenNebula/one/blob/one-4.6/src/cli/one_helper/onevm_helper.rb#L129">
https://github.com/OpenNebula/one/blob/one-4.6/src/cli/one_helper/onevm_helper.rb#L129</a></p>
</div>
<div>
<p class="MsoNormal">--</p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Carlos Martín, MSc<br>
Project Engineer</p>
</div>
<div>
<p class="MsoNormal">OpenNebula - Flexible Enterprise Cloud Made Simple</p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#888888"><a href="http://www.opennebula.org/" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span></p>
</div>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<hr>
<div style="font-size:12pt; font-family:'Cambria','times new roman','garamond',serif; color:#ff0000">
<b>DISCLAIMER:</b></div>
<br>
<div>
<p style="font-size:8pt; line-height:10pt; font-family:'Cambria','times new roman',serif">
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).</p>
</div>
<br>
<div>
<p style="font-size:8pt; line-height:10pt; font-family:'Cambria','times new roman',serif">
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.</p>
</div>
</body>
</html>
------------------------------------------------------------------
-
-
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.