WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

Re: [Xen-API] Accessing xentore data created by VM.add_to_xenstore_data

To: George Shuklin <george.shuklin@xxxxxxxxx>
Subject: Re: [Xen-API] Accessing xentore data created by VM.add_to_xenstore_data
From: Marco Sinhoreli <msinhore@xxxxxxxxx>
Date: Thu, 14 Jul 2011 12:53:25 -0300
Cc: xen-api@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 14 Jul 2011 08:54:53 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=SYGvSaZplO2H/x+6bdRuopmH4hq+Ls+Lo39pg0/hVe0=; b=QlJMIgZXtQaXXd/l4lcfV+BRcErTTrEldLMMqSQaOEKhZELhjpTPThaoV/0d9rR3fB w2SlndHVyzEBeynSm568iFNEqzy1KuqDfa09U8i1DadxU+CVnpcWTjUcWLf1keTq8dJl F9WMCEWSpcJOkb6bd7OsupSG4XPm2XLT/oXuI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1310658022.1862.359.camel@mabase>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <CAPz9JuVLMeOoE=kH8Scyps3=nNdiWBLHszgMW_3x6=OzKSN+5Q@xxxxxxxxxxxxxx> <4E1E1342.2000505@xxxxxxxxx> <CAPz9JuXd=-wwkpBYqQ4NXQMw5urC67Wk4CeN00qGgXW2iFunjA@xxxxxxxxxxxxxx> <4E1E191A.7@xxxxxxxxx> <CAPz9JuVjtNka2+gpXNazQ74t7HWXLJBBOAuehq+voZY69Ed-Xw@xxxxxxxxxxxxxx> <1310658022.1862.359.camel@mabase>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Hi George:

On Thu, Jul 14, 2011 at 12:40 PM, George Shuklin
<george.shuklin@xxxxxxxxx> wrote:
> You say you trying to do this in domU.
>
> We already say you: don't use xapi (XenAPI) for this.
> Why I still see a 'VM.add_to_xenstore-bla-bla-bla'?
>
Because I'm using a system wrote using XenAPI to do that.

> Again:
>
> Log in to domU guest machine. Check if xenstore-read command available.
> If not, install xe-guest-tools.
>
> After that do:
>
> xenstore-write data/title description
> xenstore-ls data


The xe-guest-tools is installed. insert it in each DomU that I have
will be a crazy way because it will be used in large scale for
hundreds VMs created using the XenAPI. My way is: use the XenAPI and I
don't want to change the approach to do this.

Could be it a bug in XCP/XenAPI?


Cheers
>
> That's all.
>
>
> В Чтв, 14/07/2011 в 12:20 -0300, Marco Sinhoreli пишет:
>> I tried the code below and the data isn't created in xenstore:
>>
>> <code>
>> VM.add_to_xenstore_data(vm_ref, 'data/description', description)
>> </code>
>>
>> In Host, I checked the vmid to use in xenstore in guest shell:
>>
>> <host_shell>
>>  # xl list
>> xen-vmd24                                   18  1024     6        r--      
>> 9.2
>> </host_shell>
>>
>> And also I checked the xenstore-data vm-params:
>>
>> <host_shell>
>> # xe vm-param-get uuid=9b6f6aec-5be0-54cf-077f-131cd8a49d5a
>> param-name=xenstore-data
>> data/description: data of description
>> </host_shell>
>>
>> Checking if the data was write in xenstore and is available to read in VM:
>>
>> <vm_shell>
>> l# xenstore-list /local/domain/18/data
>> meminfo_total
>> meminfo_free
>> os_name
>> os_majorver
>> os_minorver
>> os_uname
>> os_distro
>> updated
>> </vm_shell>
>>
>>
>> Some idea how can I use this feature?
>>
>>
>> Cheers
>>
>>
>> On Wed, Jul 13, 2011 at 7:15 PM, George Shuklin
>> <george.shuklin@xxxxxxxxx> wrote:
>> > Use relative paths inside VM.
>> >
>> > For example:
>> >
>> > xenstore-write data/foo bar
>> > xenstore-ls data
>> >
>> > PS If you are using XCP, dig into xe guest tools, they do many operations
>> > with xenstore from guest machine from shell scripts.
>> >
>> >
>> >
>> > On 14.07.2011 02:00, Marco Sinhoreli wrote:
>> >>
>> >> Hi George:
>> >>
>> >> I don't want to access the data from host, my interest is access this
>> >> from VM shell as I explained in last mail.
>> >>
>> >> Cheers,
>> >>
>> >> On Wed, Jul 13, 2011 at 6:50 PM, George Shuklin
>> >> <george.shuklin@xxxxxxxxx>  wrote:
>> >>>
>> >>> We now using libxs to access xenstore directly on host.
>> >>>
>> >>> xapi is not very reliable way to get this access (f.e. if master is down,
>> >>> centralized access is unavailable, but xenstore on hosts still works
>> >>> fine),
>> >>> and not very fast, actually.
>> >>>
>> >>> On 14.07.2011 00:04, Marco Sinhoreli wrote:
>> >>>>
>> >>>> Hello all:
>> >>>>
>> >>>> I'm trying to access the data stored in xenstore using the xenapi and
>> >>>> it isn't available to read into VM. In VM creation, I used:
>> >>>> VM.add_to_xenstore_data(vm_ref, 'key', 'value')
>> >>>>
>> >>>> Consulting the xenstore-data in cli return this:
>> >>>> xe vm-param-get param-name=xenstore-data
>> >>>> uuid=723831a7-b9f6-f3ff-f4df-7462e3a9c8e5
>> >>>> key: value
>> >>>>
>> >>>> Where is the path to access this data into VM?
>> >>>>
>> >>>> Cheers,
>> >>>>
>> >>>>
>> >>> _______________________________________________
>> >>> xen-api mailing list
>> >>> xen-api@xxxxxxxxxxxxxxxxxxx
>> >>> http://lists.xensource.com/mailman/listinfo/xen-api
>> >>>
>> >>
>> >>
>> >
>>
>>
>>
>
>
>



-- 
Marco Sinhoreli

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api