Hi, I want to find a domain name from domid. Is that possible with only libxc? Or the domain name is only exist at higher level, with xm and python code? Thanks, Jun _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Dec 17, 2008 at 12:59 PM, Jun Koi <junkoi2004@gmail.com> wrote:> Hi, > > I want to find a domain name from domid. Is that possible with only > libxc? Or the domain name is only exist at higher level, with xm and > python code? >And vice versa, any quick way to find domid from domain name (with libxc)? Thanks, Jun _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Dec 17, 2008 at 1:06 PM, Jun Koi <junkoi2004@gmail.com> wrote:> On Wed, Dec 17, 2008 at 12:59 PM, Jun Koi <junkoi2004@gmail.com> wrote: >> Hi, >> >> I want to find a domain name from domid. Is that possible with only >> libxc? Or the domain name is only exist at higher level, with xm and >> python code? >> > > And vice versa, any quick way to find domid from domain name (with libxc)? >Clearly we can get domain name from xenstore, given its domid. But vice versa (name --> domid), I dont see any way beside scanning the xenstore tree. And that seems suboptimal to me. Idea? Thanks, Jun _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 17/12/2008 04:23, "Jun Koi" <junkoi2004@gmail.com> wrote:>> And vice versa, any quick way to find domid from domain name (with libxc)? >> > > Clearly we can get domain name from xenstore, given its domid. But > vice versa (name --> domid), I dont see any way beside scanning the > xenstore tree. And that seems suboptimal to me. Idea?Why would you want to do that? Doubtless you can add lookup both ways via xenstore if you need it. I wouldn''t necessarily take the patches though. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Dec 17, 2008 at 5:28 PM, Keir Fraser <keir.fraser@eu.citrix.com> wrote:> On 17/12/2008 04:23, "Jun Koi" <junkoi2004@gmail.com> wrote: > >>> And vice versa, any quick way to find domid from domain name (with libxc)? >>> >> >> Clearly we can get domain name from xenstore, given its domid. But >> vice versa (name --> domid), I dont see any way beside scanning the >> xenstore tree. And that seems suboptimal to me. Idea? > > Why would you want to do that?I need that so my program can work with domain name, rather than with "less meaning full" domid. Now given the domain name, I must find its domid, since all libxc functions work with domid, but not domain name. Thanks, Jun _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
At 17:50 +0900 on 17 Dec (1229536230), Jun Koi wrote:> On Wed, Dec 17, 2008 at 5:28 PM, Keir Fraser <keir.fraser@eu.citrix.com> wrote: > > On 17/12/2008 04:23, "Jun Koi" <junkoi2004@gmail.com> wrote: > > > >>> And vice versa, any quick way to find domid from domain name (with libxc)? > >> > >> Clearly we can get domain name from xenstore, given its domid. But > >> vice versa (name --> domid), I dont see any way beside scanning the > >> xenstore tree. And that seems suboptimal to me. Idea? > > > > Why would you want to do that? > > I need that so my program can work with domain name, rather than with > "less meaning full" domid. Now given the domain name, I must find its > domid, since all libxc functions work with domid, but not domain name.Xen doesn''t care what a domain is called and so neither should libxc; syntactic sugar like that lives higher up the toolstack. But to answer your actual question, I don''t think there''s any option other than walking xenstore looking for a name or asking xend (which is unlikely to be much faster). Cheers, Tim. -- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel