Thursday, July 16, 2009

Cloning Solaris zones

If you intend to create many zones, here's a quick and safe way to do it :

- Configure a template zone
zonecfg -z template
create
set zonepath= (ex. /zones/template_zone)
add net
set address= (ex. 192.168.0.1/24)
set physical= (ex. e1000g0)
end
commit
exit

- Install the template zone

zoneadm -z template install

- Configure new zone using the template zone.

zonecfg -z zone1
create -a template
commit
exit

- Clone the new zone using the template zone.

zoneadm -z zone1 clone template

That's it.

No comments: