Exercise for Server Operating Systems

Exercise for Server Operating Systems

 1 dedicated CPU  A limit of maximum 1000 Light-weight Processes (LWPs)  100MB of main memory  512MB of swap memory  Fair Share Scheduler  2GB of hard disk space  Network with a dedicated IP address The following sections will illustrate how to configure and boot the zone, and also certain post-boot DNS configurations. We will also go over the steps to uninstall and delete a non-global zone.  A non-global zone can only be configured from the global zone by a privileged user (root in this case). Therefore, before we embark on the journey to create a new non-global zone, we should verify that we are in fact in the global zone. The following command is used to display the name of the zone..

Since we would like to limit the available disk space (to 2GB) for the zone, it is necessary to have a dedicated file system for the zone. Following steps illustrate how this can be achieved: We now have a UFS file system that is limited to 2GB. However, before we can use this as a zone’s root file system, we have to set the appropriate permissions:  The following set of commands is used to create a non-global zone with the previously mentioned resource constraints.  This is where the zone will be created. The above mentioned path points to the file system we mounted earlier. This restricts the zone size to the size of this file system (i.e. 2GB in this case).

The maximum number of LWPs that can be created in this zone. zonecfg:my-zone> add dedicated-cpu zonecfg:my-zone:dedicated-cpu> set ncpus=1 zonecfg:my-zone:dedicated-cpu> end One CPU is dedicated to this zone. Please note that the zone cannot be booted if a dedicated CPU is not available. Also, on a multi-processor machine, only 1 CPU will be visible to the zone.  zonecfg:my-zone> add capped-memory zonecfg:my-zone:capped-memory> set physical=100m zonecfg:my-zone:capped-memory> set swap=512m zonecfg:my-zone:capped-memory> end

The ip-type parameter supports two types i.e. shared and explicit. Here, we will consider the shared type. For the shared ip-type, the IP layer configuration and state is shared between the non-global and the global zone. By adding a network resource, we have provided the zone with a unique IP address, so that the zone can be uniquely identified from the outside world. That is, even though the IP layer state and configuration are shared with the global zone, traffic can still be routed explicitly to the non-global zone.  The verify command is used to ensure correctness of the configuration. However, certain aspects (e.g. path to the file system) can only be verified during zone installation. Please note that these paths must have been created prior to installing the zone.

We can how set a password for this non-global zone’s root use. Please note that this root is not associated with the global zone’s root in anyway: The following command can be used to safely shut down a running non-global zone from the global zone:  The non-global zone should now be in the installed state. The following command can be used to verify the zone’s state: Solaris Containers-Resource Management and Oracle Solaris Zones :

http://download.oracle.com/docs/cd/E19455-01/817-1592/index.html

Part II of the guide is a detailed administration guide for Zones. “Consolidating Applications with Oracle Solaris Containers”  Solaris Man pages are available for every command used in this tutorial. For detailed information regarding the command, please refer to the corresponding man page. E.g. man zonecfg

Cours gratuitTélécharger le document complet

Télécharger aussi :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *