The hostid is a good way of doing this since it is visible as of LDoms 1.1 from the control domain and by using hostid(1) in the guest. You could also using the vnet's MAC address for all versions of LDoms but that won't work if you happen to configure an LDom without networking (not typical).
Kris Kasner wrote: > > Nice.. Good to hear. ) > > Thanks everyone for responding. > > It occured to me that I can see the hostid from the control ldom, from > that I can map back in my hosts database to the running OS. > > The sneep suggestion was also interesting, or something similar.. > nothing says I cant put a tag into each ldom's nvramrc to tell it what > the ldom name is. With our infrastructure it would be better to have > the OS know what it's ldom name is rather than have the primary try > and inject the mapping into each record.. > > --Kris > > Today at 15:05, Eric Sharakan <Eric.Sharakan at Sun.COM> wrote: > >> On May 1, 2009, at 1:22 PM, Octave Orgeron wrote: >> >>> >>> Hmm.. there isn't a method to do this with LDoms. However, there is >>> a method on the old SunFire systems that used SMS. I wonder if that >>> kind of functionality can be ported. Have the guest OS report the >>> hostname on an LDC or through OBP.It would mean that "ldm list" >>> would require a new column "Hostname" or something like that. Put >>> in an RFE for this feature, I think it makes sense. >> >> An RFE for this feature already exists: 6506767. It's not currently >> slotted into a specific upcoming release, but the infrastructure to >> make it possible to implement is in progress. >> >> -Eric >> >>> >>> >>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- >>> *-*-*-*-* >>> Octave J. Orgeron >>> Solaris Virtualization Architect and Consultant >>> Web: http://unixconsole.blogspot.com >>> E-Mail: unixconsole at yahoo.com >>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- >>> *-*-*-*-* >>> >>> >>> >>> ----- Original Message ---- >>> From: Kris Kasner <kris.kasner at qualcomm.com> >>> To: "ldoms-discuss at opensolaris.org" <ldoms-discuss at opensolaris.org> >>> Sent: Friday, May 1, 2009 11:54:25 AM >>> Subject: [ldoms-discuss] Find name of ldom from within ldom? >>> >>> >>> Hi Folks. >>> >>> Does anyone know if there is a way to find the name of the guest >>> ldom from the OS running within the guest ldom? The assumption might >>> be that the OS running in the ldom will be named the same as the >>> ldom (as viewed from 'ldm ls'), but all it takes is one OS rename >>> from within the LDOM to break the mapping between the physical host >>> and the ldoms that reside on it. >>> >>> I'm looking to accomplish one of two things, with a slight >>> preference for the first one.. >>> 1: Find the name of the ldom from the running OS. I want the running >>> OS to be able to populate a database with it's ldom name so we can >>> find it on our farm without having to worry about a manual mapping. >>> >>> 2: Find the name of Guest ldom OSes from the primary/control domain. >>> Getting the names of the ldoms is easy (ldm ls), but getting the OS >>> names seems like it would require some ugly screen scraping from >>> telnetting to the console port for each running ldom. >>> >>> >>> Any pointers/suggestions? >>> >>> >>> Thanks Much! >>> Kris Kasner >>> Qualcomm Inc. >>> _______________________________________________ >>> ldoms-discuss mailing list >>> ldoms-discuss at opensolaris.org >>> http://mail.opensolaris.org/mailman/listinfo/ldoms-discuss >>> >>> >>> >>> >>> _______________________________________________ >>> ldoms-discuss mailing list >>> ldoms-discuss at opensolaris.org >>> http://mail.opensolaris.org/mailman/listinfo/ldoms-discuss >> > -- ----------------------------------------------------------------------- ______ Joseph Balenzano /_____/\ ISV Engineering /____ \\ \ Sun Microsystems Inc. /_____\ \\ / joseph.balenzano at sun.com /_____/ \/ / / Phone/Fax 203.653.4186 /_____/ / \//\ \_____\//\ / / \_____/ / /\ / \_____/ \\ \ \_____\ \\ \_____\/ ----------------------------------------------------------------------
