PRIMECLUSTER Global Link Services Configuration and Administration Guide: Redundant Line Control Function 4.1 (for Solaris(TM) Operating System)
Contents Index PreviousNext

Chapter 3 Environment configuration> 3.2 System Setup

3.2.4 Zone setup for Solaris container

This section describes how to create a Solaris zone.

image

If you use a virtual interface of the redundant line control function in a Solaris zone, be sure to check that the environment setting of the redundant line control function is completed on the global zone and that the virtual interface is enabled. For information on how to set up the environment of the redundant line control function, see "3.3 Additional system setup".

(1) Create a zone

The following example shows how to create a zone. Note that the zone name is "zone0", the IP address is 192.168.10.100", and the interface name is "sha0".

# zonecfg -z zone0
zone0: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone0> create
zonecfg:zone0> set zonepath=/zones/zone0  <- Specify a root path of the zone.
zonecfg:zone0> add net  <- Set up a network interface
zonecfg:zone0:net> set address=192.168.10.100/24
zonecfg:zone0:net> set physical=sha0  <- Specify a virtual interface for fast switching mode.
zonecfg:zone0:net> end
zonecfg:zone0> export  <- Check the setting.
create -b
set zonepath=/zones/zone0
set autoboot=false
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add net
set address=192.168.10.100/24
set physical=sha0
end
zonecfg:zone0> verify  <- Check integrity.
zonecfg:zone0> commit  <- Register a zone.
zonecfg:zone0> exit    <- Zone setting is completed.
# zoneadm list -vc     <- Check if the zone is properly registered.
  ID NAME             STATUS         PATH
   0 global           running        /
   - zone0            configured     /zones/zone0

image

When you set a network interface for fast switching mode, specify "shaX" for the virtual interface name. For NIC switching mode, specify a physical interface name of the primary server of the redundant physical interface (e.g. hmeX). Also, specify the IP address that is the same as that of the physical interface.

(2) Install the zone

You can install a zone using the following steps;

# zoneadm -z zone0 install
Preparing to install zone <zone0>.
Creating list of files to copy from the global zone.
Copying <3370> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1150> packages on the zone.
Initializing package <40> of <1150>: percent complete: 3%
. . . . . . . .
Initialized <1150> packages on zone.
Zone <zone0> is initialized.
Installation of <2> packages was skipped.
Installation of these packages generated warnings: <SUNWvtsr>
The file </zones/zone0/root/var/sadm/system/logs/install_log> contains a log of
the zone installation.
# zoneadm list -vc  <- Check if the zone is installed properly.
  ID NAME             STATUS         PATH
   0 global           running        /
   - zone0            installed      /zones/zone0

image

When a zone is booted for the first time after installation, the zone is in an unconfigured state. Therefore, it is necessary to define an internal zone configuration. Please refer to the manual of Solaris for the definition methods.

(3) Start the zone

Start the zone using the following steps. Before starting it, be sure to check the virtual interface is activated. If it is not activated, you cannot start the zone.

# /opt/FJSVhanet/usr/sbin/dsphanet
[IPv4,Patrol]
 Name       Status   Mode CL  Device
+----------+--------+----+----+------------------------------------------------+
 sha0       Active    t   OFF  hme0(ON),hme1(ON)  <- Check the status.
[IPv6]
 Name       Status   Mode CL  Device
+----------+--------+----+----+------------------------------------------------+
# 
# zoneadm -z zone0 boot  <- Start the zone.
# zoneadm list vc
  ID NAME             STATUS         PATH
   0 global           running        /
   1 zone0            running        /zones/zone0  <- Check if the zone is started properly.

(4) Log in to the zone

You can log in to the zone using the following steps:

# zlogin -l root zone0
[Connected to zone 'zone0' pts/4]
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
# 

(5) Check the interface state

If you check the interface state on the zone, it will be displayed as follows:

# ifconfig -a
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
sha0:1: flags=1000843<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST,IPv4> mtu 1500 index 5
        inet 192.168.10.100 netmask ffffff00 broadcast 192.168.10.255

(6) Log out of the zone

You can log out of the zone using the following steps:

# exit

[Connection to zone 'zone0' pts/4 closed]

(7) Stop the zone

You can stop the zone using the following steps:

# zoneadm -z zone0 halt
# zoneadm list -vc
  ID NAME             STATUS         PATH
   0 global           running        /
   - zone0            installed      /zones/zone0

(8) Change the network setting

You can change the network setting using the following steps. In the following example, you are supposed to select the resource that is set "192.168.10.100" for the IP address, then change the interface name to "zone0", and the IP address to "192.168.20.123".

# zonecfg -z zone0
zonecfg:zone0> select net address=192.168.10.100  <- Select the resource.
zonecfg:zone0:net> set physical=hme0              <- Change the interface
zonecfg:zone0:net> set address=192.168.20.123     <- Change the IP address
zonecfg:zone0:net> end
zonecfg:zone0> export
create -b
set zonepath=/zones/zone0
set autoboot=false
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add net
set address=192.168.20.123  <- IP address changed
set physical=hme0           <- Interface name changed
end
zonecfg:zone0> verify
zonecfg:zone0> commit
zonecfg:zone0> exit

(9) Uninstall the zone

You can uninstall the zone using the following steps:

# zoneadm -z zone0 uninstall -F
# zoneadm list -vc
  ID NAME             STATUS         PATH
   0 global           running        /
   - zone0            configured     /zones/zone0

(10) Delete the zone

You can delete the zone using the following steps:

# zonecfg -z zone0 delete -F
# zoneadm list -vc
  ID NAME             STATUS         PATH
   0 global           running        /

image

For further details, see the "Solaris 10 OS" manual.


Contents Index PreviousNext

All Rights Reserved, Copyright (C) FUJITSU LIMITED 2005