Mike Gerdts wrote:
> 1. Let's pretend that a zone is a virtual machine.  I could make the
> same argument using longer sentences if that makes someone happy.
> 2. For example, if you know all global zones are on the
> subnet, the following will give you a pretty good clue.  Other zones
> on the same machine will be false positives - but naming standards and
> dedicated subnets will often times help you find what you are looking
> for.
> #! /bin/bash
> for ip in 192.168.2.{1..255} ; do
>      route get $ip | grep 8232 >/dev/null && echo Global zone: $ip
> done

The other way that the global zone identity normally leaks through to the 
non-global zones is through the system's hostid.  So if you compare the output 
of `/usr/bin/hostid` with `for e in $allglobalzones ; do ssh $e /usr/bin/hostid 
; done`, you can easily see which global zone matches your local.

That's also a way for your application administrators (using application-level 
clustering) to verify that they are not running on the same physical node.  If 
their hostids are different, they're different.

A small matter of programming would put the global zones' hostids into an 
accessible web page for public review and matching.

Personally, we've defined a DNS alias for <zonename>-vh to point to the global 
zone for each of our local zones.  That way we can `ssh www-zh zoneadm -z www 
reboot` easily.


zones-discuss mailing list

Reply via email to