• Bez kategorii

04.01 Installation of container st1

Creation of container named st1, without resource control, with inherited standard directories and additionally inherited /usr/local dir (read only mode). Configured two network Quad Fast Ethernet cards: qfe4 and qfe5 in shared mode. Added ZFS pool (zpool) named studmail.

root@feniks:/home/soft/SKEL/cfg# cat st1.cfg
create -b
set zonepath=/zones/st1
set brand=native
set autoboot=true
set ip-type=shared
add inherit-pkg-dir
set dir=/lib
add inherit-pkg-dir
set dir=/platform
add inherit-pkg-dir
set dir=/sbin
add inherit-pkg-dir
set dir=/usr
add inherit-pkg-dir
set dir=/usr/local
add net
set address=155.158.XX.XX
set physical=qfe4
add net
set address=192.168.XX.XX
set physical=qfe5
add dataset
set name=studmail

Setting up zone configuration with file

root@feniks:/home/soft/SKEL/cfg# zonecfg -z st1 -f st1.cfg

Installation of container st1

root@feniks:/home/soft/SKEL/cfg# zoneadm -z st1 install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <3507> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <374> packages on the zone.
Initialized <374> packages on zone.                                
Zone  is initialized.
Installation of <3> packages was skipped.
The file  contains a log of the zone installation.

Initial run of zone and entering zone console

root@feniks:/home/soft/SKEL/cfg# cd
root@feniks:~# zoneadm -z st1 boot                  
root@feniks:~# zlogin -C -e+ st1
[Connected to zone 'st1' console]

I intentionally redefined escape character (-e+), because default is ~., which caused either disconnect from my Linux terminal which I use to connect to server. The construction +. will disconnect zone console without breaking my terminal connection. You can omit the initial setup of zone, when you create /etc/sysidcfgfile with all needed data and put it in the zone before first boot. More about sysidcfg you will find in documentation. To get benefits of /etc/sysidcfg file you need to set up zone to ready state, copy file to proper location and then boot zone.

root@feniks:~# zoneadm -z st1 ready
root@feniks:~# cp sysidcfg /zones/st1/root/etc
root@feniks:~# zoneadm -z st1 boot                  
root@feniks:~# zlogin -C -e+ st1

When you finish system identification with use of file or by hand, you will see message like this:

System identification is completed.

rebooting system due to change(s) in /etc/default/init

[NOTICE: Zone rebooting]

SunOS Release 5.10 Version Generic_141444-09 64-bit
Copyright 1983-2009 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Hostname: st1
Reading ZFS config: done.
Mounting ZFS filesystems: (4/4)

You can now finish console session

st1 console login: +.
[Connection to zone 'st1' console closed]

And next login to zone with zlogin command.

root@feniks:~# zlogin st1
[Connected to zone 'st1' pts/4]
Sun Microsystems Inc.	SunOS 5.10	Generic	January 2005

Możesz również polubić…

Leave a Reply

Witryna wykorzystuje Akismet, aby ograniczyć spam. Dowiedz się więcej jak przetwarzane są dane komentarzy.