Global zone name from local zone | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Global zone name from local zone

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-10-2009
fugitive fugitive is offline
Registered User
 
Join Date: Apr 2009
Last Activity: 23 May 2013, 1:33 PM EDT
Posts: 341
Thanks: 2
Thanked 6 Times in 6 Posts
Global zone name from local zone

How to check the global zone name from local zone.
Sponsored Links
    #2  
Old 07-10-2009
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 20 November 2014, 8:12 PM EST
Location: Paris
Posts: 4,449
Thanks: 17
Thanked 475 Times in 428 Posts
The global zone name is always "global" so there is no need to check.

If you mean the global zone nodename/hostname, there is no direct way by design.
Sponsored Links
    #3  
Old 07-10-2009
fugitive fugitive is offline
Registered User
 
Join Date: Apr 2009
Last Activity: 23 May 2013, 1:33 PM EDT
Posts: 341
Thanks: 2
Thanked 6 Times in 6 Posts
i mean if i 'm in a local zone and have no idea which global zone i belong to how can i see that or get my global zone name /hostname ?
    #4  
Old 07-10-2009
22blaze 22blaze is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 20 December 2012, 1:34 PM EST
Location: NorCal
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Posted Solution

As long as the Global Zone has not been renamed, you can find it.
Please check my previous post.
Sponsored Links
    #5  
Old 07-10-2009
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 20 November 2014, 8:12 PM EST
Location: Paris
Posts: 4,449
Thanks: 17
Thanked 475 Times in 428 Posts
22blaze: Did you check that method ? I never had any success with it.
fugitive: As I already wrote, what you are asking for cannot be done by design. Non global zones are independent and shouldn't know anything about other zones. If they can, this is a bug and will be fixed.
Of course, nothing forbids you to create a file (eg: <zonepath>/root/etc/globalname) or to populate the /etc/inet/hosts file in each non global zone from the global one to tell them its hostname.
Sponsored Links
    #6  
Old 07-10-2009
fugitive fugitive is offline
Registered User
 
Join Date: Apr 2009
Last Activity: 23 May 2013, 1:33 PM EDT
Posts: 341
Thanks: 2
Thanked 6 Times in 6 Posts
I do not know but i saw somewhere you can find it via a primitive method ..

arp -a | grep SP and then login to those servers .. and it shows the global zone but that will not in case if i 'm using exclusive IP for a zone
Sponsored Links
    #7  
Old 07-13-2009
22blaze 22blaze is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 20 December 2012, 1:34 PM EST
Location: NorCal
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
The code finds pkginfo files in /var in the sparse zone.
Based on a quick review of my basic find output with no awks, the info gets parsed from the PATCH_INFO.
So, quite possibly, if the system has not been patched after the base install it may not return as expected.
Here is base code to start with and a single return of grep for my GZ name.


Code:
$ find /var -type f -name 'pkginfo' |xargs grep "From: " | grep <my GZ name here> 

RETURNS - 

/var/sadm/pkg/SUNWcsr/save/pspool/SUNWcsr/pkginfo:PATCH_INFO_125476-02=Installed: Tue Apr  1 17:19:43 PDT 2008 From: <my GZ name here>

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Non Global Zone processes fugitive Solaris 1 05-27-2009 04:40 PM
Not able to ping global zone from local zone kumarmani Solaris 12 02-09-2009 03:26 AM
Solaris Zone : Non global Zone check failed jegaraman Solaris 7 10-22-2008 04:31 AM
can not access global zone tahir23 UNIX for Advanced & Expert Users 2 09-11-2008 04:50 AM



All times are GMT -4. The time now is 12:19 AM.