Products | Versions |
---|---|
TIBCO DataSynapse GridServer | - |
Not Applicable | - |
Resolution:
Solaris 10 comes with a feature called Zones. A Zone is a virtual machine that will run Solaris 10. The Global Zone can share all the deployed packages, and each Zone can have they own package installed which then will not interfere with the other Zones. To manage Zone, you can use the following tools:
zoneadm - Use to administer the Zone.
zonecfg - Use to Configure the Zone.
zlogin - Use to Log in to the Zone.
A Zone once configured and running will behave as a brand new machine on your network.
How To Create a Zone
Create the definition of a Zone
global# zonecfg -z zone3
zonecfg:zone3> create
/* default is sparse root model, You can create Templates, refer to the link at the bottom of the page.*/
zonecfg:zone3> set zonepath=/export/home/zone3
zonecfg:zone3> add net
zonecfg:zone3:net> set address=10.0.0.1
zonecfg:zone3:net> set physical=eri0
zonecfg:zone3:net> end
zonecfg:zone3> verify
zonecfg:zone3> commit
zonecfg:zone3> ^D
Install the Zone:
Note: The directory /export/home/zone3 must be only rwx for the root user. Also, it needs to have enough disk space.
global# zoneadm -z zone3 install
Boot the Zone:
global# zoneadm -z zone3 boot
You will now need to login to the zone with
global# zlogin -C zone3
and finish to install Solaris 10. Once logged in as root, you can allow the user root to SSH to the Zone by editing the file /etc/ssh/sshd_config and changing line
PermitRootLogin no
to
PermitRootLogin yes
How To Manage Zones
The Zone can have the following states:
* configured - our zone is configured, but it's yet to have its initial boot
* incomplete - zoneadm command sets a zone's state to this value while installing and uninstalling a zone. When the operation is completed, zone's status is changed.
* installed - zone is fully configured, OS packages have been installed. It's a ready-to-use zone, all you have to do is to boot it. The zone has no virtual platform associated yet.
* ready - the zone is ready. It already has a virtual platform established, the kernel has created a zsched process, all the network interfaces are plumbed, devices are configured and file systems are mounted. No processes have been started yet, but since the zone is ready it already has a unique ID assigned to it. We normally don't see a zone in this state, and it always moves one to the next one - running.
* running - the zone is up and running. You can connect to the zone. It's a fully working environment now.
* shutting down and down are short-term states which are shown when the zone is being halted. Upon completion of halt, the zone gets back into installed state.
The command to change the state of the zone is zoneadm and it is used as follow:
zoneadm -z <ZoneName> <State/Action>
The State/Action commands are:
* list - By default, all running zones are listed. If you use this subcommand with the zoneadm -z zonename option, it lists only the specified zone, regardless of its state. In this case, the -i and -c options are disallowed.
* halt - Halt the specified zones. halt bypasses running the shutdown scripts inside the zone. It also removes run time resources of the zone. You should always log on to the Zone and call the shutdown command.
* reboot -Restart the zones. This is equivalent to a halt boot sequence. This subcommand fails if the specified zones are not active.
* ready - Prepares a zone for running applications but does not start any user processes in the zone.
* boot - Boot (or activate) the specified zones.
* verify - Check to make sure the configuration of the specified zone can safely be installed on the machine.
* install - Install the specified zone on the system. This subcommand automatically attempts to verify first. It refuses to install if the verify step fails. See the verify subcommand.
* uninstall - Uninstall the specified zone from the system. Use this subcommand with caution. It removes all of the files under the zonepath of the zone in question. You can use the -F flag to force the action.
For a more detailed explanation, you can refer to the articles Zones partition (http://www.sun.com/bigadmin/features/articles/zones_partition.html) and Solaris Zones (http://www.sun.com/bigadmin/features/articles/solaris_zones.html).