[one-users] VM description/comment

Daniel Molina dmolina at opennebula.org
Wed Oct 24 02:58:20 PDT 2012


On 24 October 2012 11:08, <knawnd at gmail.com> wrote:

> Daniel Molina wrote on 23/10/12 20:23:
>
>  On 23 October 2012 14:31, <knawnd at gmail.com <mailto:knawnd at gmail.com>>
>> wrote:
>>
>>     Dear Ruben,
>>
>>     first of all, sorry for delay with reply!
>>     Please, see my comments inline.
>>
>>     Ruben S. Montero wrote on 19/10/12 00:34:
>>
>>         Hi Ricardo + Nikolay
>>
>>         You are right, one thing we have in our short roadmap is to add a
>> generic metada section
>>         for VMs. This metadata could be updated using the *update*
>> functionality currently present
>>         for other commands.
>>
>>     sounds encouraging! Is any information when such feature is planned
>> to be implemented?
>>
>>
>>         Just to give you the rationale behind not having this yet. As you
>> probably know the VM
>>         template is extended once the VM created with control data (e.g.
>> DISK_ID's, specifric
>>         LEASES, SOURCE for DISK...) for obvious reasons we do not want a
>> user to modify this.
>>
>>     seems reasonable
>>
>>         So we will split this in two, one for the control data and other
>> to be used/modified by
>>         the user.
>>
>>         For now, as Nikolay suggests this limit somehow part of the
>> out-of-the-box functionality
>>         (e.g. adding DESCRIPTION in  a bulk submission), this
>> functionality will need a custom
>>         program using OCA. About parsing the out put of onevm show, note
>> that you can always get
>>         the full pool information with onevm list -x  (TEMPLATE included)
>> the onevm list command
>>         just parse and pick some of this info and present it in a tabular
>> form...
>>
>>     Thanks a lot for detailed reply and explanations!
>>
>>
>> JFYI You can easily add new columns to the onevm list command. The
>> following patch adds a new DESCRIPTION column to the onevm list output:
>>
>> https://gist.github.com/**8f8499704cbee0e5db84<https://gist.github.com/8f8499704cbee0e5db84>
>>
>> The onevm.yaml can be defined per user in $HOME/.one/onevm.yaml or
>> globally in /etc/one/cli/onevm.yaml
>>
> Hi Daniel,
> Thanks for your patch and efforts!
> But I wasn't able to archive desired behavior.
>
> I did the following changes:
> $ diff /usr/lib/one/ruby/cli/one_**helper/onevm_helper.rb{,.orig}
> 138,141d137
> <             column :DESCRIPTION, "DESCRIPTION", :size=>12 do |d|
> <                 d["TEMPLATE"]["DESCRIPTION"]
> <             end
> <
> 143c139
> <                 :TIME, :DESCRIPTION
> ---
> >                 :TIME
>
> $ cp /etc/one/cli/onevm.yaml ~/.one/
>

Sorry I sent you a wrong path, use this instead

$ mkdir ~/.one/cli/
$ cp /etc/one/cli/onevm.yaml ~/.one/cli/




> $ diff ~/.one/onevm.yaml /etc/one/cli/onevm.yaml
> 42,46d41
> < :DESCRIPTION:
> <  :desc: DESCRIPTION
> <  :size: 20
> <
> <
> 57d51
> < - :DESCRIPTION
>
> With help of 'onetemplate update' command I added DESCRIPTION parameter
> $ onetemplate show 5|grep -i description
> DESCRIPTION="description"
>
>  and instantiate a VM based on that template.
>
> Although 'onevm show <VMID>' shows the presence of DESCRIPTION parameter
> 'onevm list' doesn't show DESCRIPTION column (neither column name nor
> content).
>
> 'one stop' and 'one start' didn't help.
>
> If you have any guess why it is so then please share it.
>
> Regards,
> Nikolay.
>
>
>> Cheers
>>
>>
>>     Regards,
>>     Nikolay.
>>
>>
>>         THANKS FOR YOUR FEEDBACK!
>>
>>
>>         On Thu, Oct 18, 2012 at 10:21 AM, <knawnd at gmail.com <mailto:
>> knawnd at gmail.com>
>>         <mailto:knawnd at gmail.com <mailto:knawnd at gmail.com>>> wrote:
>>
>>             Hi Ruben,
>>
>>             Ruben S. Montero wrote on 17/10/12 14:42:
>>
>>                 Hi
>>
>>                 Why not using the name of the VM for this?.....
>>
>>             The name of the VM I would like to use to put hostname in it
>> and perhaps use $NAME in
>>             contextualization as e.g.
>>
>>             CONTEXT=[
>>               HOSTNAME="$NAME.domain.org <http://NAME.domain.org> <
>> http://NAME.domain.org>" ]
>>
>>
>>
>>             But that would make a sense in case when one could be
>> possible to specify IP address in
>>             'onetemplate instantiate' command.
>>
>>
>>                 Also if you want to append any arbitrary data to the VM
>> (at creation) you can
>>         simply added
>>                 to the VM template as:
>>
>>                 DESCRIPTION="this is a web server, use 1234 as root
>> password"
>>
>>                 This will be stored in the template ans can be queried
>> with the onevm show command
>>         or in
>>                 the Template tab in Sunstone
>>
>>             As far as I understand that will work for a creation of a
>> single VM but won't if I need to
>>             create a bunch of VMs with help of 'onetemplate instantiate'
>> command.
>>             Is there any way to modify certain deployed VM's config to
>> add arbitrary data like e.g.
>>             DESCRIPTION field (something like 'onevm update')?
>>             Moreover, in my opinion it's not convenient to parse the
>> output of 'onevm show'
>>         command when I
>>             need to get a list of all VMs e.g. what have a word "web" in
>> its description. It would
>>         be more
>>             convenient to have a separate column for that as I wrote
>> before. But probably to do
>>         that there
>>             is a need to modify DB schema which is not desirable I guess.
>>
>>             Regards,
>>             Nikolay.
>>
>>
>>                 Cheers
>>
>>                 Ruben
>>
>>
>>                 On Tue, Oct 16, 2012 at 4:02 PM, <knawnd at gmail.com<mailto:
>> knawnd at gmail.com>
>>         <mailto:knawnd at gmail.com <mailto:knawnd at gmail.com>>
>>                 <mailto:knawnd at gmail.com <mailto:knawnd at gmail.com>
>> <mailto:knawnd at gmail.com
>>         <mailto:knawnd at gmail.com>>>> wrote:
>>
>>                     Dear list,
>>
>>                     I wonder if there is any way to specify some text as
>> a description/comment for a
>>                 certain VM in
>>                     order to be able toquery such info later e.g. during
>> 'onevm list' command
>>         execution. I
>>                 just
>>                     don't want to get lost in all my VMs and which one is
>> for what.
>>                     I would like to have something like
>>                     $ onevm list
>>                         ID USER     GROUP    NAME            STAT UCPU
>> UMEM HOST             TIME
>>                   DESCRIPTION
>>                         11 oneadmin oneadmin one-11          runn 100 1G
>> <host1> 0d 02h07                          web-server
>>                         12 oneadmin oneadmin one-12          runn 1001G
>> <host1> 0d 02h03                          mail-server
>>                         13 oneadmin oneadmin one-13          runn    100
>>  1G <host2> 0d 00h17
>>          development server
>>
>>
>>                     Regards,
>>                     Nikolay.
>>                     ______________________________**_________________
>>                     Users mailing list
>>         Users at lists.opennebula.org <mailto:Users at lists.**opennebula.org<Users at lists.opennebula.org>
>> >
>>         <mailto:Users at lists.**opennebula.org <Users at lists.opennebula.org><mailto:
>> Users at lists.**opennebula.org <Users at lists.opennebula.org>>>
>>                 <mailto:Users at lists.**opennebula.org<Users at lists.opennebula.org><mailto:
>> Users at lists.**opennebula.org <Users at lists.opennebula.org>>
>>         <mailto:Users at lists.**opennebula.org <Users at lists.opennebula.org><mailto:
>> Users at lists.**opennebula.org <Users at lists.opennebula.org>>>>
>>
>>
>>         http://lists.opennebula.org/**listinfo.cgi/users-opennebula.**org<http://lists.opennebula.org/listinfo.cgi/users-opennebula.org>
>>
>>
>>
>>
>>                 --         Ruben S. Montero, PhD
>>                 Project co-Lead and Chief Architect
>>                 OpenNebula - The Open Source Solution for Data Center
>> Virtualization
>>         www.OpenNebula.org <http://www.OpenNebula.org> <
>> http://www.OpenNebula.org>
>>         <http://www.OpenNebula.org> |
>>         rsmontero at opennebula.org <mailto:rsmontero at opennebula.**org<rsmontero at opennebula.org>
>> >
>>         <mailto:rsmontero at opennebula.**org <rsmontero at opennebula.org><mailto:
>> rsmontero at opennebula.**org <rsmontero at opennebula.org>>>
>>                 <mailto:rsmontero at opennebula.**org<rsmontero at opennebula.org><mailto:
>> rsmontero at opennebula.**org <rsmontero at opennebula.org>>
>>         <mailto:rsmontero at opennebula.**org <rsmontero at opennebula.org><mailto:
>> rsmontero at opennebula.**org <rsmontero at opennebula.org>>>> | @OpenNebula
>>
>>
>>
>>
>>
>>
>>
>>         --         Ruben S. Montero, PhD
>>         Project co-Lead and Chief Architect
>>         OpenNebula - The Open Source Solution for Data Center
>> Virtualization
>>         www.OpenNebula.org <http://www.OpenNebula.org> <
>> http://www.OpenNebula.org> |
>>         rsmontero at opennebula.org <mailto:rsmontero at opennebula.**org<rsmontero at opennebula.org>
>> >
>>         <mailto:rsmontero at opennebula.**org <rsmontero at opennebula.org><mailto:
>> rsmontero at opennebula.**org <rsmontero at opennebula.org>>> | @OpenNebula
>>
>>
>>     ______________________________**_________________
>>     Users mailing list
>>     Users at lists.opennebula.org <mailto:Users at lists.**opennebula.org<Users at lists.opennebula.org>
>> >
>>      http://lists.opennebula.org/**listinfo.cgi/users-opennebula.**org<http://lists.opennebula.org/listinfo.cgi/users-opennebula.org>
>>
>>
>>
>>
>> --
>> Daniel Molina
>> Project Engineer
>> OpenNebula - The Open Source Solution for Data Center Virtualization
>> www.OpenNebula.org <http://www.OpenNebula.org> | dmolina at opennebula.org<mailto:
>> dmolina at opennebula.org**> | @OpenNebula
>>
>
>


-- 
Daniel Molina
Project Engineer
OpenNebula - The Open Source Solution for Data Center Virtualization
www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20121024/76d990bd/attachment-0002.htm>


More information about the Users mailing list