Tuesday, October 12, 2010

Solaris: How to get global zone information from non-global zone

Due to a variety of reasons like integration with monitoring, asset management, some notion that knowing the real box name will make things better :-) or a need to do something from the global zone like run dtrace, adjust resource allocations etc. you might sometime would like to know what is the Global Zone' where this container resides or the physical servers's IP address where this virtual container resides.

Just see if you can do a 'prtdiag' ; if so you are on a physical server else you are on a non-global zone.

Step 1: Log into the virtual container or non-global zone in question

Step 2 : NonGZ02# arp -a | grep NonGZ02 (grep the hostname/ ip address)
e1000g0 NonGZ02 255.255.255.255 SPLA 00:14:4f:0e:9f:b8

step 3 : NonGZ02## arp -a | grep 00:14:4f:0e:9f:b8

It will list you a set of arp entries matching that MAC address.

After this to save time either naming convention/ experience with the environment usually help.

If it is in Veritas, I also do a -

cat /etc/VRTSvcs/.vcshost , to get somewhat closer.

step 4: I logged in to GlobalZone01.perflab.com

And I find it in that list :

GlobalZone01# zoneadm list -iv | grep running
0 global running / native shared
1 NonGZ02 running /zones/NonGZ02 native shared
2 Proxy02 running /zones/Proxy02 native shared
.....
.....

And I see my non-global host running from there.

Hope it helps!!

DEBA




No comments:

Post a Comment

8c tips for Freshers / NCG's

I have been having a great company with some of the very talented NCG’s ( New College Hires/ Grads ) last ~2yrs.  I work for Intuit I...