How to find the parent global zone

A few nights ago I encountered a problem which required me to find the host name of my parent zone. Solaris Zones (a.k.a. Solaris Containers) intentionally isolate zones from each other and from the root hardware which hosts the zone. But if the zones and the host are on the same network, there is a way. All zones which are hosted by a particular global zone will typically share the physical hardware address as the global zone. So:

ping the broadcast address of your local network.

arp -a | grep {the hostname of your zone}
Now arp -a | grep {the physical address you found}
This gives the list of the global zone and all of the hosted zones with the same physical network address.

Comments:

This only works if you have a shared nic. Using exclusive networking via virtual nics from crossbow or a dedicated hardware defeats this.

Posted by Chris Gerhard on February 04, 2009 at 04:04 AM GMT+00:00 #

Thanks for the comment,

Yes it only works in some circumstances, fortunately it worked for me! It would also work for most people trying OpenSolaris on a typical small X86 server environment that they previously ran GNU/Linux on.

Crossbow is great. I don't think Linux has anything like that yet. The Linux solution to network scaling is to add more NICs until your box is full, then add more PCs. This worked fine when money and oil were plentiful and cheap.

Posted by bnitz on February 04, 2009 at 04:14 AM GMT+00:00 #

I like this method, of course the global zone admin has to set it up...

http://www.opensolaris.org/jive/thread.jspa?threadID=77200&tstart=0

zonecfg -z myzone
add fs
set type=lofs
set options=ro
set special=/etc/nodename
set dir=/etc/globalname
end
verify
commit
exit

Next time the zone boots, /etc/globalname will be a file that has the
same contents as the global zone's /etc/nodename. It is not
modifiable in the non-global zone.

Posted by Alex on February 04, 2009 at 06:58 AM GMT+00:00 #

I hope your method becomes a standard setup procedure for cases where you want the child zone to know of its parent. It looks good.

Posted by bnitz on February 10, 2009 at 04:46 PM GMT+00:00 #

Post a Comment:
Comments are closed for this entry.
About

bnitz

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today