How To Find The Solaris Global Zone From Local Zone Using Script - UnixArena
How To Find The Solaris Global Zone From Local Zone Using Script - UnixArena
to find the Solaris global zone from local zone using script UnixArena
Monday , February 23 2015 About Contact Us Privacy Policy Hire US Table of Contents Search... ὐ
VMware Cloud Oracle Solaris Free-EBooks Tutorials LINUX Frequently Asked Advertise with us
Home / Solaris 10 / How to find the Solaris global zone from local zone using script
How to find the Solaris global zone from local zone using script Follow UnixArena
May 10, 2013 in Solaris 10 , Unix admin scripts , Zones
Lingeswaran R
Many of the Solaris administrators will break their head to find Solaris global zone name from localzone. These kind
of questions may asked in interviews too.How do you find it ? The answer is No.There is no simple command to find Follow
it.Because Oracle (Sun microsystems ) designed the Solaris zones in such a way for that, you can’t find the global
zone from local zone due to security reason. But you can add cronjob to write the global zone name on all local zones
from global periodically to identify the global.
But there are some other alternatives that you can find the global zone name from local zone using MAC address.Here
we will see about that and we will see the permanent fix for that issue.
Subscribe 33 697
Assumpations:Here i am having local zone “sol1″ is running on Global‐zone To RSS Feed Followers Fans
Keep the “globalzonename.s”h in /root and make is executable. What is VMware vCloud ? How it
works ?
Global-Zone# cat globalzonename.sh September 28, 2014
#!/usr/bin/bash
for i in `/usr/sbin/zoneadm list -v | /usr/bin/egrep -v "ID|global" |/usr/bin/awk ' { print $4 } '`; do echo `uname -n` > $i/root/etc/GLOBALZ; done
SMF-Service Management facility:Service
information
May 23, 2013
http://www.unixarena.com/2013/05/howtofindsolarisglobalzonefrom.html 1/3
9/3/2015 How to find the Solaris global zone from local zone using script UnixArena
Verifying our work after an hour,
If you want to find the zone type, you can just type “zonename” command.If its a global zone ,you will get output as
“global” otherwise you will get hostname.
How to identify the zone type ? whole root zone or sparse root zone ?
Use “pkgcond ‐n is_what” command to determine the zone type. This command output shows the below values. (1=
True 0=False )
is_whole_root_nonglobal_zone=1
is_whole_root_nonglobal_zone=0
is_whole_root_nonglobal_zone=0
Refer the here for more information about pkgcond use.
Thank you for reading this article.Please leave a comment if you have any doubt.I will get back to you.
« Previous:
Solaris Process controlling – proc
tools
Next:
Solaris Process Inspection Commands »
You may also Like
2 comments
eahmedshendy
July 14, 2014 at 8:59 pm
Hi Lingeswaran R,
I just wonder, Why System Admin should need to know the name of global zone if it always has the name ‘global’ ?
Lingeswaran R
July 15, 2014 at 12:21 am
http://www.unixarena.com/2013/05/howtofindsolarisglobalzonefrom.html 2/3
9/3/2015 How to find the Solaris global zone from local zone using script UnixArena
July 15, 2014 at 12:21 am
Global zone name will be updated on the local zone not in global itself.If you connect local zone, you can easily
determine , the global zone name.
Regards
Lingeswaran
UnixArena.
Reply
Leave a Reply
Your email address will not be published. Required fields are marked *
Name *
Email *
Website
Post Comment
UnixArena © Copyright 2014, All Rights Reserved Powered by WordPress | Designed by Tielabs
http://www.unixarena.com/2013/05/howtofindsolarisglobalzonefrom.html 3/3