You are on page 1of 2

the zoneadm -z zone boot command on a zone in Restore zone configuration using command file

Solaris Zones the running state will have the zone be booted into
the running state
zonecfg -z zone install

List zones
Zones are virtual process environments in Solaris 10 Create zone
(and newer) that allow system administrator to List available zones
isolate process in one zone from processes in another Create sparse root model zone (default)
zone. Zones have their own (chroot) storage zoneadm list -cv
zonecfg -z zone
environment which again separates data between zonecfg:zone> create Look at zone configuration
zones.
zonecfg -z zone info
Create whole root model zone
zonecfg -z zone Check current zone
This quick reference list the most commonly used zonecfg:zone> create -b zonename
commands involved managing Solaris zones. For a
Create zone using custom template
zones overview see the solaris_zones_intro quick
reference at http://www2.petervg.nl/quick_reference zonecfg -z zone -f template.zone
Log in and
run commands
Zone states Manage zone
Log in on zone's console (from global zone)
Undefined Create zone's root file system structure zlogin -C zone
zonecfg -z zone zonecfg -z zone zoneadm -z zone install Log in on zone (from global zone)
↓ zone: > create ↑
delete
Boot zone in ready mode zlogin zone
Configured zoneadm -z zone ready Log in on zone (from anywhere)
↓zoneadm -z zone install zoneadm -z uninstall ↑ Into running mode ssh zone_host_name
Installed zoneadm -z zone boot Run command in zone (from global zone)
↓zoneadm -z zone ready ↑ Reboot zone(from global zone) zlogin -c command zone
zoneadm -z zone boot Run command in zone (from anywhere)
Ready
↓zoneadm -z zone boot zoneadm -z zone halt ↑ Halt zone (from global zone) ssh zone cmd

Running This will not run the shutdown procedures!! Run command in zone ( from anywhere)
↓ zoneadm -z zone reboot zoneadm -z zone halt rsh zone command

Running Reboot zone (from global zone)


● A running zone cannot be brought back to the ready This will not run the shutdown procedures
state. A halt on a running zone will bring the zone Manage processes
zoneadm -z zone reboot
to the installed state.
Backup zone configuration Display zone name with running process
● A zone doesn't have to be booted into the ready ps -e -Z
zonecfg -z zone -f /backup/zone.cmd
state before it can enter the running state. Issuing
Display processes running in zone (from global zone) Create resource pool
ps -z zone poolcfg -dc 'create pool zone_pool'
Display zone statistics Associate processor set with pool
prstat -Z poolcfg -dc 'associate pool zone_pool (pset
two_cpu)'
Kill process by name in zone
pkill -z zone process_name Enable pool facility
pooladm -e
Find process by name in zone
pgrep -z zone process_name Save active pool configuration
pooladm -s /etc/pooladm.conf
List process tree in zone
ptree -z zone Activate the /etc/pooladm.conf configuration
pooladm -c
Install packages and
patches
Memory capping
Install package in current zone only
pkgadd -G pkg_name To manage the memory usage of zone's you can use the
so-called memory capping feature in Solaris.
Install patch in current zone only
patchadd -G path_name Setup project
projadd -c "Project Description" -G users -p 101
Backup zone configuration users
zonecfg -z zone export > /backup/zone.cmd projmod -s -K rcap.max-rss=1000k users

Enable resource capping


rcapadm -E
Dynamic resource pool
Check status
management rcapstat
Dynamic resource pools are not part of the zone
framework. I have listed the command here for your
convenience. Colophon
Author Peter van Gemert
View current pool configuration Name solaris_zones_commands.pdf
poolcfg -dc info Location http://www2.petervg.nl/quick_reference
Created 16 July 2007
Read pool configuration file
Modified 16 July 2007
poolcfg -c info /etc/pooladm.conf
Create processor set (with 2 CPUs)
poolcfg -dc 'create pset two_cpu ( uint
pst.min = 1 ; uint pset.max = 2 )'

You might also like