• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to verify non-global solaris zone is installed

by admin

It is important that the zone is in the appropriate installed state before one can boot it up. The configured zone has to be installed with the operating environment. That is, the zone configuration has to be instantiated and packages have to be installed under the zone’s root path. The zone status should be marked as installed.

To check the current status of the zone, run the zoneadm command with the subcommand list together with the -cv switches. The following zoneadm output confirms that the zone002 has been installed.

# zoneadm list -cv 
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   - zone002          installed  /zones/zone002                 native   shared

If the zone is not yet installed, the status will be indicated as configured.

# zoneadm list -cv 
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   - zone002          configured /zones/zone002                 native   shared

In this case, the zone is either detached or will have to be installed by running the zoneadm -z install command.

To check whether the zone is in state detached, check the content of the zonepath. If you find the directories dev and root and SUNWdetached.xml, then you can try to attach the zone to the system

# ls -l /zones/zone002
total 12
drwxr-xr-x  12 root     sys           50 Aug 18 14:40 dev
drwxr-xr-x   2 root     root           2 Feb  4  2014 lu
drwxr-xr-x  19 root     root          21 Aug 14 15:30 root
-rw-r--r--   1 root     root     4511578 Aug 18 14:41 SUNWdetached.xml
# zoneadm -z zone002 attach -U
Getting the list of files to remove
Removing 4 files
Remove 9 of 9 packages
Installing 6103 files
Add 10 of 10 packages
Updating editable files

The file /var/sadm/system/logs/update_log within the zone contains a log of the zone update. If the zonepath is empty, then the zone needs to be installed using zoneadm -z [zone_name] install
Example:

# zoneadm -z zone002 install 
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying [2552] files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize [1026] packages on the zone.
Initialized [1026] packages on zone.
Zone is initialized.
The file contains a log of the zone  installation.

Once the zone is installed, the zoneadm list -cv output will indicate the zone as installed.

Filed Under: Solaris, Zones

Some more articles you might also be interested in …

  1. Script for finding the process using a specific port in Solaris
  2. How To Change Timezone for Oracle Grid Infrastructure
  3. What is SUID, SGID and Sticky bit ?
  4. How to configure Solaris 10 Probe based IPMP
  5. How to set OBP Variables from the ALOM/ILOM
  6. A beginners guide to Service Management Facility (SMF) in Solaris
  7. How to measure NIC Performance/Throughput in Solaris 11 using iftop
  8. Resource management in solaris zones : CPU shares, capped CPU, Dedicated CPU assignment
  9. Solaris Interview Questions and Answers
  10. How to setup a chroot ssh/sftp for specific users in Solaris 10

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright