Donnerstag, 20. September 2007

Zones in Solaris 10

The zones are virtual servers in a single machine, a powerful Sun technology that I had to prove for running another services in a different place but the same machine. All this over sun4u sparc SUNW, Sun-Fire-280R.

# First we create the path for the solaris container and change the permission for root only
mkdir -p /export/home/desarrollo
chmod 700 /export/home/desarrollo

# Next with the zonecfg command we create the zone
zonecfg:desarrollo> create
zonecfg:desarrollo> set autoboot=true
zonecfg:desarrollo> set zonepath=/export/home/desarrollo

# and set up the ne
zonecfg:desarrollo> add net
zonecfg:desarrollo:net> set address=192.168.1.15
zonecfg:desarrollo:net> set physical=pcn1
zonecfg:desarrollo:net> end

# if we want add cdrom or another device
zonecfg:desarrollo> add fs
zonecfg:desarrollo:fs> set dir=/mount
zonecfg:desarrollo:fs> set special=/cdrom
zonecfg:desarrollo:fs> set type=lofs
zonecfg:desarrollo:fs> add options [ro,nodevices]
zonecfg:desarrollo:fs> end

# do the verify and commit
zonecfg:desarrollo> verify
zonecfg:desarrollo> commit
zonecfg:desarrollo> exit

# this create xml file called desarrollo.xml in /etc/zones/ the next
zoneadm -z desarrollo install
zoneadm -z desarrollo boot

# we log in the zone and make tipical configs (hostname, autentification, root password...)
zlogin -C desarrollo

finally we create a user for the new zone or permit root login for ssh connections and we have the new zone running xD !!

0 Kommentare:

Kommentar veröffentlichen