You are here: TWiki > Guides Web > Solaris > SolarisZones r3 - 03 Mar 2006 - 17:04 - JesseSuen


Start of topic | Skip to actions

Solaris Zone Administration

Creating Zones

  • Create a directory location for your zone
# mkdir /bigapps
# chmod 700 /bigapps
  • Configure a new zone. Here we are creating the zone bigapps, which has not yet been configured.
# zonecfg -z bigapps
bigapps: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:bigapps> create
zonecfg:bigapps> set zonepath=/bigapps
zonecfg:bigapps> set autoboot=true
zonecfg:bigapps> add net
zonecfg:bigapps:net> set address=10.5.21.226
zonecfg:bigapps:net> set physical=ipge0
zonecfg:bigapps:net> end
zonecfg:bigapps> remove inherit-pkg-dir dir=/lib
zonecfg:bigapps> remove inherit-pkg-dir dir=/platform
zonecfg:bigapps> remove inherit-pkg-dir dir=/sbin
zonecfg:bigapps> remove inherit-pkg-dir dir=/usr
zonecfg:bigapps> verify
zonecfg:bigapps> commit
zonecfg:bigapps> exit
  • Check to see if the zone settings are correct.
# zonecfg -z bigapps info
zonepath: /bigapps
autoboot: true
pool:
net:
        address: 10.5.21.226
        physical: ipge0
  • Verify and then start the installation.
# zoneadm -z bigapps verify
# zoneadm -z bigapps install
Preparing to install zone <bigapps>.
Creating list of files to copy from the global zone.
Copying <2556> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1046> packages on the zone.
Initialized <1046> packages on zone.
Zone <bigapps> is initialized.
Installation of these packages generated errors: <SUNWcsr SUNWtftpr SUNWdtdmr SUNWmdu SUNWbsr SUNWnfssr SUNWsndmr SUNWcctpx SUNWvolr SUNWjhrt SUNWsmbar SUNWsacom SUNWaccr SUNWapch2r SUNWapchr SUNWjato SUNWjatodoc SUNWjatodmo SUNWbnur SUNWjhdev SUNWmconr SUNWmctag SUNWmcon SUNWmcos SUNWmcosx>
Installation of these packages generated warnings: <SUNWj3rt SUNWjmf SUNWj3irt SUNWjds-registration SUNWjmfmp3 SUNWjre-config SUNWjai SUNWjai-imageio SUNWj3dev SUNWj3dmo SUNWj3rtx SUNWj3dvx SUNWj3man SUNWj3jmp>
The file </bigapps/root/var/sadm/system/logs/install_log> contains a log of the zone installation.
  • Your zone should be set up.
# zoneadm list -iv
  ID NAME             STATUS         PATH
   0 global           running        /
   2 zone1            running        /vmzone/zone1
   - bigapps          installed      /bigapps
  • Boot the zone
# zoneadm -z bigapps boot
# zoneadm list -iv
  ID NAME             STATUS         PATH
   0 global           running        /
   2 zone1            running        /vmzone/zone1
  11 bigapps          running        /bigapps
# zlogin -C bigapps

Deleting Zones

# zoneadm list -iv
  ID NAME             STATUS         PATH
   0 global           running        /
   2 zone1            running        /vmzone/zone1
   4 bigapps          running        /bigapps
# zlogin bigapps halt
# zoneadm list -iv
  ID NAME             STATUS         PATH
   0 global           running        /
   2 zone1            running        /vmzone/zone1
   - bigapps          installed      /bigapps
# zoneadm -z bigapps uninstall -F
# zonecfg -z bigapps delete -F

-- JesseSuen - 02 Mar 2006

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback