One quick method that is mentioned frequently here and one we use very
successfully is to create a readonly lofs to /etc/nodename. We add the
following to all our zonecfgs
add options [ro, nodevices]
so when your in a ngz you can cat /etc/GLOBAL to get the global host name.
On Thu, Aug 5, 2010 at 7:00 AM, Richard L. Hamilton <rlha...@smart.net>wrote:
> > Hi,
> > i'm new here and i have a question:
> > Is it possible to determine from the zone as the
> > global zone is called?
> > Is there a command in the zone like zoneadm list ,
> > which show me the name of the global-zone.
> > I need it for a script in the zone.
> AFAIK, there is no standard way to do that.
> Some people create zones with a file containing the
> hostname of the global zone.
> Others might put that in oem-banner, or use sneep
> to put it in nvramrc, along with hardware serial numbers
> and such. http://wikis.sun.com/display/sneep/Home
> But none of those are a built-in solution.
> I like the idea of putting it in nvram better than putting it
> in a file, since if the zone is moved to another server, it should
> then show the new location without having to update a file.
> This message posted from opensolaris.org
> zones-discuss mailing list
zones-discuss mailing list