Monday, August 2, 2010

creating solaris zones

This is the basic set of commands to create a whole-root zone (a zone that does not share drives with the global)
[root@stamp zones]# zonecfg -z dplweb
dplweb: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:dplweb> create -b
zonecfg:dplweb> set zonepath=/opt/zones/dplweb
zonecfg:dplweb> set autoboot=true
zonecfg:dplweb> add net
zonecfg:dplweb:net> set address=xxx.xxx.xxx.xxx
zonecfg:dplweb:net> set physical=eth0
zonecfg:dplweb:net> set defrouter=xxx.xxx.xxx.xxx
zonecfg:dplweb:net> end
zonecfg:dplweb> verify
zonecfg:dplweb> commit

Plumb the nic for the zone
ifconfig nge1 plumb

Then use zoneadm to install the zone
zoneadm -z dplweb install

Then start that puppy up.
zoneadm -z dplweb boot

Then you'll have to login to the console to finish installation.
zlogin -C dplweb

No comments: