Amazon Ad

Featured Post

Thursday, July 23, 2009

How to quickly create a Solaris zone?

sh-3.00# zonecfg -z web1-zone
web1-zone: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:web1-zone> create
zonecfg:web1-zone> set zonepath=/export/home/zones/web1-zones
zonecfg:web1-zone> set autoboot=true
zonecfg:web1-zone> add net
zonecfg:web1-zone:net> set address=10.1.70.233
zonecfg:web1-zone:net> set address=10.1.70.233/24
zonecfg:web1-zone:net> set physical=bge1
zonecfg:web1-zone:net> end
zonecfg:web1-zone> set pool=email-pool
zonecfg:web1-zone> verify
zonecfg:web1-zone> commit
zonecfg:web1-zone> exit
sh-3.00#

Install the zone:

sh-3.00# zoneadm -z web1-zone install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <2528> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1023> packages on the zone.
Initialized <1023> packages on zone.
Zone is initialized.
Installation of these packages generated warnings:
The file
contains a log of the zone installation.

Reboot the zone:

[root@cookie:~]>zoneadm -z web1-zone boot

Connect to the zone:

sh-3.00# zlogin -C web1-zone

2 comments:

unixfoo.blogspot.com said...

Clear & Crisp steps. Thanks

John Rapa said...

great, these commands for creating the zones will ease my tasks...