| Solaris |
|
|
Last Updated: April 2010
Maintained by Jeff Victor, Penny Cotten, et al.
Dozens of contributors
This page is a list of Questions, some Frequently Asked, some Not So. It also includes Frequently Requested Web Links. It is intended for use by anyone interested in learning more about Oracle Solaris Zones and Oracle Solaris Containers.
If you would like to provide feedback on this FAQ, please send it to zones-discuss AT opensolaris DOT org.
A date appearing after an answer provides the most recent date the answer has been updated. Answers with old dates, or no date at all, might not provide the most recent information. All answers without dates were current on June 14, 2005.
A: A zone is a virtual operating system abstraction that provides a protected environment in which applications run. The applications are protected from each other to provide software fault isolation. To ease the labor of managing multiple applications and their environments, they co-exist within one operating system instance, and are usually managed as one entity.
The original operating environment, before any zones are created, is also called the "global zone" to distinguish it from non-global zones, The global zone is the operating system instance.
A: A native, default zone on the Oracle Solaris 10 OS is called a container. The other containers that run on Oracle Solaris 10 include Oracle Solaris 8 Containers and Oracle Solaris 9 Containers. Many people use the terms "zone" and "container" interchangeably.
A: It is possible to create non-global zones that run the same OS as the global zone, which is the OS running on the system. It is also possible to create a non-global zone that runs a different operating environment from the global zone. The branded zone (BrandZ) framework extends the zones infrastructure to include the creation of brands that contain alternative sets of runtime behaviors. The following types of non-global zones are available:
A: After installing Oracle Solaris 10 on a system, but before creating any zones, all processes run in the global zone. After you create a zone, it has processes that are associated with that zone and no other zone. Any process created by a process in a non-global zone is also associated with that non-global zone.
Any zone which is not the global zone is called a non-global zone. Most people call non-global zones simply "zones." Some people call them "local zones" but this is discouraged.
The default native zone file system model on Oracle Solaris 10 is called "sparse-root." This model emphasizes efficiency and security at the cost of some configuration flexibility. Sparse-root zones optimize physical memory and disk space usage by sharing some directories, like /usr and /lib. Sparse-root zones have their own private file areas for directories like /etc and /var. Whole-root zones increase configuration flexibility but increase resource usage. They do not use shared file systems for /usr, /lib, and a few others.
There is no supported way to convert an existing sparse-root zone to a whole-root zone. Creating a new zone is required. [August 2010]
A: The original design of Solaris Containers assumes that those four directories are either all shared ("inherited") or all not shared. Sharing some and not others will lead to undefined and/or unpredictable behavior. [August 2010]
A: Oracle Solaris 10 includes all of the programs and files needed to use zones (and Containers). Operating systems based on the OpenSolaris code base, including OpenSolaris 2009.06, may elect to include support for zones. [August 2010]
A: Zones and resource management are all software features of Oracle Solaris and other operating systems based on the OpenSolaris code base. As software features, they do not depend upon any specific hardware platform. Any hardware that runs a Solaris distro (Oracle Solaris 10, OpenSolaris, or another) will be able to have these features.
A: Most Oracle Solaris software will run unmodified in a zone, without needing to re-compile. Unprivileged software (programs that do not run as root nor with specific non-default privileges) typically run unmodified in a zone once they can be successfully installed. Installation software must not assume that it can write into shared, read-only file systems, e.g. /usr. This can be circumvented by adding a writable file system to the zone (e.g. at /usr/local) or using a whole-root zone.
However, there are a few applications which need non-default privileges to run - privileges not normally available in a zone, such as the ability to set the system?s time-of-day clock. For these situations, the feature named "configurable privileges" has been added. This feature allows the global zone administrator - the person who manages zones on a system - to assign additional, non-default privileges to a zone. The zone?s administrator can then allow individual users to use those non-default privileges.
An application that requires privileges that cannot be added to a zone might need modification to run properly in a zone.
Here are some guidelines:
For more details, read the white paper "Bringing Your Application Into the Zone". Note that changes have been made to privileges, IP types, and other areas used with zones since this paper was published. For current information, also see the administration guide. [November 2007]
A: See the document Qualification Best Practices for Application Support in Non-Global Zones." [March 2006]
A: Supportability of an application running in a container is evaluated by the ISV. Some software vendors treat zones as just another feature set of Oracle Solaris, and do not feel a need to specifically certify their software to use zones. Others have specifically certified their software to use zones. Applications that have been reported to be officially supported include those in the following list. For more details see the section "Application-specific Information"
A: Explorer 5.0 can be run on Oracle Solaris 10 in a global zone. It can be used to collect information on containers (non-global zones) with the -w option.
A: See the OpenSolaris project page for changes made since the initial release. [September 2006]
A: New features include the following:
[Oct 2008]
A: If configured with default parameters, a zone requires about 100MB of free disk space per zone when the global zone has been installed with the "All" metacluster of Oracle Solaris 10 packages. Additional packages installed in the global zone will require additional space in the non-global zones. ZFS quotas or SVM soft partitions can be used to enforce per-zone disk space constraints. When performing capacity planning, 100MB of additional RAM per zone is suggested (in addition to the needs of its workload). An application does not use any "extra" RAM because it is running in a zone.
A zone installed using the "full-root model" will take up as much space as the initial Oracle Solaris 10 installation, which will be more than 500MB in most cases. [August 2010]
A: While the theoretical limit is over 8,000, the practical limit depends on:
Consider these examples which worked:
A: All of the zones use a single underlying kernel. The version of the kernel determines the version of every container in that domain. However, the Oracle Solaris 8 Containers and Oracle Solaris 9 Containers products provide the appropriate system calls so that binaries compiled for Oracle Solaris 8 or Oracle Solaris 9 work correctly. [August 2010]
A: We are not aware of any. [August 2010]
A: Yes, but not without adding additional cluster management software. As of this writing, Sun is developing extensions to its Sun Cluster software, so that Resource Groups can be placed within non-global zones. <Veritas/Symantec> has also announced support for Zones in the Veritas Cluster product.
A: No, this is prohibited. This would violate several security principles. [August 2010]
A: No, the model is strictly two-level: one global zone and zero or more non-global zones. Only the global zone can create non-global zones, and each non-global zone must be contained within the global zone. [August 2010]
A: Yes, after a zone has been installed, copy a sysidcfg(4) file to the zone’s /etc/sysidcfg before the first boot of that zone.
[August 2010]
A: Yes. Each non-global zone has its own copy of /etc/default/init, which contains the timezone setting. You can change the line starting with "TZ=". The recognized names of timezones are in /usr/share/lib/zoneinfo. For example, Eastern Standard Time in the USA is defined in the file /usr/share/lib/zoneinfo/US/Eastern. To set a non-global zone’s timezone to that timezone, the line in /etc/default/init would look like this:
TZ=US/Eastern
[August 2010]
A: Although different zones can ’be’ in different time zones, each zone gets its date and time clock from the same source. This means that the time zone setting gets applied after the current time data is obtained from the kernel.
If you would like the ability to have different clock sources per zone, please add a call record to RFE 5033497. [August 2010]
A: Yes. After logging into the zone, enter this command:
zone% /bin/echo "\033]0;Zone `/bin/zonename`\007\c"
[August 2010]
A:See Jeff’s Blog for step-by-step instructions. [May 2008]
A: There are four methods. The following list uses UFS examples, but other types of file systems, such as ZFS, HSFS and VxFS, can be used in the zonecfg "fs" resource type property or attached by mount(1M).
See the administration guide for instructions to use these methods. [September 2006]
A: Use one of the methods above, for example:
global# mkdir -p /path/to/some/storage/local/twilight global# zonecfg -z twilight zonecfg:twilight> add fs zonecfg:twilight:fs> set dir=/usr/local zonecfg:twilight:fs> set special=/path/to/some/storage/local/twilight zonecfg:twilight:fs> set type=lofs zonecfg:twilight:fs> end zonecfg:twilight> commit zonecfg:twilight> exit global#
[August 2010]
A: With Solaris 10 1/06, you can directly assign an SVM meta-device into a non-global zone, using the same method you would with most other devices. However, see the answer to the next question.
Symantec supports the assignment of a Veritas Volume into a non-global zone. For more information, see this guide. [June 2009]
A: The Solaris Zones feature set provides the global zone administrator with the ability to allow a non-global zone to access a raw device. There are many situations where this will be the best approach to solve a problem. There are even situations which require such use.
First, however, it is important to stress that there are usually other solutions that do not require direct device access. Let’s discuss this first.
With regard to importing VxVM devices into a zone: this is possible with VxVM 5.0MP3 and up. For earlier versions, your options depend on the goal. If the goal is to make a file system available in the zone, the solution is to create the file system in the global zone, and LOFS or direct mount the file system in the zone. On the other hand, if the goal is to make a mirrored block device available in the zone, the only solution is to upgrade to VxVM 5.0MP3 or higher.
If you want to make a file system available in the zone, create the file system in the global zone, and use LOFS to make the file system available in the zone. On the other hand, if the goal is to make a mirrored block device available in the zone, another solution must be found.
In any situation, if direct device access is required within a zone, you must perform careful failure analysis and evaluation of the possible outcomes of "catastrophic application failure. If the non-global zone will use COTS software, and will be managed by trustworthy people, then the risks will be small. Fortunately, in most cases there are also other solutions which do not use direct device access from a zone.
Here are two extreme examples:
global# zonecfg -z zonename zonecfg:zonename> add device zonecfg:zonename:device> set match=/dev/sound/* zonecfg:zonename:device> end zonecfg:zonename> exit
The zone will have access to sound devices, but will not have access to any other devices.
2. A zone will be created for the purpose of teaching students about a database program that requires access to raw disk partitions. The instructor knows how to use Unix, but does not have a background in Unix system administration. Further, the instructor will require use of the root account to assist students. It is possible that the instructor could make a mistake, or a malicious student could abuse the raw disk access, leading to a crash of the kernel. This would also stop all of the other non-global zones, as well as the global zone. If the other zones are running production software, this request for raw disk access in a zone should not be fulfilled. Other solutions should be pursued, such as creating an RBAC role for the instructor which only gives the necessary privileges to the isntructor’s Unix account.
Other examples must be judged by their particulars, e.g. a production database program which needs raw access. Factors to consider include:
For more information on this topic, see the section "SECURITY AND DATA INTEGRITY" of the man page for sgen(7d).
[August 2010]
A: Yes, in fact, that is the default model. Each container is assigned its own IP address, but usually multiple containers will share one NIC. Further, multiple zones may be assigned separate file systems accessed through one HBA. [August 2010]
A: Both shared-IP and exclusive-IP zones can communicate via the network. In general, a zone is assigned to use one or more network ports (aka NICs), and network traffic to or from other computers uses the assigned NIC(s), following standard IP rules.
Network traffic between two zones on the same system may require extra planning. If a zone is an "exclusive-IP" zone, its network packets will always leave the computer, and inbound packets will always come from outside the computer. Further, an exclusive-IP zone performs all of its own network configuration, including routing and IP filtering.
Before Solaris 10 10/08, network traffic between two shared-IP zones always stayed in the computer, i.e. it didn’t traverse the physical network. This provided very high bandwidth, low latency transmission. However, starting with Solaris 10 10/08, traffic between two shared-IP zones stays in the computer unless a default router is used for one or both zones. Traffic from a zone with a default router will go out to the router before coming back to the destination zone. For more information on default routers for zones, see the documentation and Steffen’s blog.
Full IP-level functionality is available in an exclusive-IP zone. Exclusive-IP zones always communicate with each other over the physical network. That communication can be restriced using IP Filter from within such zones, just as it can for a separate system.
For shared-IP zones in one computer that communicate using IP networking,the following applies:
It is possible to configure routing to block traffic between specific zones completely.
For more information on IP types, see the System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.
Further, OpenSolaris 2009.06 added the features "virtual NICs" and "virtual switches" - part of "Project Crossbow." They allow you to configure an entire internetwork in a system, using VNICs, vSwitches, and zones that are configured as routers. [August 2010]
A: For shared-IP zones, the ifconfig(1M) command can be used in the global zone to modify that zone’s existing network configuration or to add new logical interfaces to a zone. Here are some examples that add, and then delete a logical interface assigned to a zone:
global# ifconfig bge0 addif 192.168.200.202 zone myzone global# ifconfig bge0 removeif 192.168.200.202
[August 2010]
A: Yes.
Exclusive-IP zones can use IPMP. IPMP is configured the same way in an exclusive-IP zone as it is on a system not using zones.
For shared-IP zones, IPMP can be configured in the global zone. Failover of a network link (e.g. hme0) that is protected by IPMP will bring the associated logical interfaces (e.g. hme0:3) for the zones over to the secondary link (e.g. bge0).
For more information, see the section "Using IP Network Multipathing on a Solaris System With Zones Installed" in System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.
Take extra care with IPMP and the defrouter setting. See this blog entry. [August 2010]
A: Yes. The global zone can configure IP Filter rules for shared-IP zones. An exclusive-IP zone can configure IP Filter rules for itself.
For shared-IP zones, the IPFilter features in Solaris 10 can be used to filter traffic passing between one non-global zone and other computers on the network. This includes the ability to use NAT features, i.e., redirect traffic destined for the global zone to non-global zones.
[August 2010]
A: Yes. A zone does not need a network interface in order to operate. If you don’t specify a network interface when you create the zone, it will still boot correctly. If an existing zone has been given access to a network interface, you can use zonecfg(1M) to remove that access, but if the zone is running you must also either re-boot the zone or use ifconfig(1M) to remove access until the next re-boot.
It is also possible to allow a shared-IP zone to access the network, but not communicate with other zones on the same system. One method is to set up a pair of routes using the "-reject" argument to the route(1) command. For example, if one zone has an IP address of <Addr1> and the second zone has an address of <Addr2>, then the following commands will prevent network traffic from passing between the two zones. [August 2010]
global# route add <Addr1> <Addr2> -interface -reject global# route add <Addr2> <Addr1> -interface -reject
A: Yes. For a shared-IP zone, the VLAN interface must be plumbed in the global zone. LAN and VLAN separation are available in an exclusive-IP non-global zone.
A: For a shared-IP configuration: All routes, including default routes, must be configured by the global zone administrator. By default, such zones use the global zone’s default router. Starting with Solaris 10 10/08, each shared-IP zone can be assigned its own default router with the "defrouter" setting in zonecfg. For more information on default routers for zones, see the documentation and Steffen’s blog.
For an exclusive-IP configuration: The zone administrator can configure IP on those data-links with the same flexibility and options as in the global zone.
[August 2010]
A: The global zone administrator configures each zone’s access to zero or more NICs. A shared-IP zone can be the only zone using a NIC.
Exclusive-IP zones have more separation which reaches down to the data-link layer. One or more data-link names, which can be a NIC or a VLAN on a NIC, are assigned to an exclusive-IP zone by the global administrator. The zone administrator can configure IP on those data-links with the same options as in the global zone. [August 2010]
A: All accesses to entries in lofs mounted file systems map to their underlying file system. Therefore, if a mount point is made available in multiple locations via lofs and it is in use in any of those locations (as a mount point, a current working directory, etc.), an attempt to mount a file system at that mount point will fail unless the overlay flag has been specified. [November 2007]
A: Create a directory in the global zone, and remount it into each non-global zone using lofs. This will allow reading and writing from both zones without corrupting. It’s the same mechanism used by the automounter in certain cases.
A: By default a zone shares /usr and a few other directories with the global zone. If a zone needs its own separate copy of /usr, et al., you must tell zonecfg to not use the default configuration. To do this, use the "-b" option on the "create" sub-command of the zonecfg(2) command.
If you do this, you must specify each existing file system that you do want to share with this new zone. [August 2010]
Each zone uses space in at least one disk partition - its root directory and several others (e.g. /etc) live there. All of these files are part of Solaris. In addition, each zone can be given access to one or more file systems and/or one or more raw disks. By planning carefully, you can configure one zone so that all of its files and devices are accessible through one HBA, and all of the storage of another zone is accessible through a different HBA. [August 2010]
A: No. This may be addressed in the future. However, the shared file system can also be LOFS-mounted into the local zone, and, if necessary, the global zone can export the same file system via NFS so that other computers can also access those files. [August 2010]
A: Solaris 10 release:
Placing a zone’s root directory (i.e. its PATHNAME) on ZFS is supported starting with Solaris 10 10/08, and you can then upgrade with Live Upgrade going forward. There are still issues with placing a zone on ZFS on a release prior to Solaris 10 10/08 and then trying to upgrade.
[August 2010]
A: A global zone can be an NFS server. A non-global zone cannot use the Solaris NFS server features. However, non-Solaris NFS server software (i.e. "userland" NFS server software) has been shown to work correctly in a non-global zone. Such software works because it does not run in the kernel, unlike the Solaris NFS server software which runs in the Solaris kernel in order to maximize performance.
[August 2010]
A: A global zone can be a DHCP server.
Starting with Solaris 10 11/06, a non-global zone can be a DHCP server. This ability became more flexible with Solaris 10 8/07, which added a feature called IP Instances. [August 2010]
A: Yes.
A1: A zone can be an NTP server.
A2: The NTP client software sets the system time clock shared by all zones, including the global zone. By default, non-global zones cannot do this. However, the global zone administrator can give a zone the ability to change the system time clock with the "sys_time" privilege. Be aware that this changes the time clock for all zones.
See http://blogs.sun.com/JeffV/entry/shrink_wrap_security1 for an example. (August 2010)
A: Yes, yes, and yes.
A: Yes, yes, and yes.
A: A zone can be an ftp server, but it is not possible to use ftpconfig(1M) to set up a zone to be an anonymous ftp server. This is because ftpconfig attempts to set up certain device special files, and a zone does not have the necessary privileges. [December 2005]
A: Yes.
A: There are a few different methods to use X windows with zones:
A: Use the resource management features of Solaris. This requires using some combination of the Fair Share Scheduler, CPU caps, assigned (’dedicated’) CPUs, and/or [Dynamic] Resource Pools features.
Fair Share Scheduler: FSS guarantees a minimum amount of CPU utilization, so it doesn’t waste CPU cycles. Excessive CPU use is only prevented if there is contention for CPU resources. Minima are specified by "shares" and enforced by the Fair Share Scheduler. You can assign 100 shares to each of two workloads, 200 shares to a third workload, and 400 shares to the global zone. The first two workloads will get at least 1/8 of the CPUs' capacity, if they need it, and the global zone will get at least 1/2 of the CPUs' capacity, if it needs it. If only one Container wants to use the CPUs, it will be able to use all of the processing capacity of the system.
You should give the global zone a quantity of shares similar to the largest quantity given to any Container, to ensure that you can manage the Containers.
Starting with Solaris 10 5/08, you can use the capped-cpu resource type. Starting with Solaris 10 8/07, you can use the dedicated-cpu resource type to automatically create a temporary pool when the zone boots. See Non-Global Zone Configuration (Overview).
Alternatively, you can create a processor set with one or more CPUs and bind it to a resource pool. Then create a zone and bind it to the same resource pool. Run the application in that zone. The application will only "see" that set of processors. For more information, see Resource Pools (Overview) and Resource Pools (Tasks).
Web Links:
Non-Global Zone Configuration (Overview)
Fair Share Scheduler (Overview)
CPU Caps
Dynamic Resource Pools (Overview)
[January 2010]
A: Fair Share Scheduler: Arbitrary, i.e. one-thousandth of a CPU or smaller. For example, CPU share assignments could be 1, 1000, 999, resulting in utilization minima of 0.05%, 50%, and (practically speaking) 50%.
CPU Cap: number of CPUs, in hundredths of a CPU. One zone can be capped at 4.01 CPUs, and another can be capped at 4.02 CPUs. Dedicated CPU: CPU range, in integer number of CPUs. For systems with multiple hardware threads per CPU core, Solaris considers each core to be a "CPU." For systems with multiple threads per CPU core (including Nehalem, SPARC CMT and SPARC64-VII) Solaris considers each hardware thread to be a "CPU." August 2010
A: You can use the Resource Capping Daemon (rcapd) for all Solaris 10 releases. Starting with Solaris 10 8/07, you can use the capped-memory resource to set limits for physical, swap, and locked memory. Determine values for this resource if you plan to cap memory for the zone by using rcapd from the global zone. The physical property of the capped-memory resource is used by rcapd as the max-rss value for the zone.
Web Links:
Non-Global Zone Configuration (Overview)
Administering the Resource Capping Daemon
[January 2009]
prctl -n zone.cpu-shares -r -v $SHARES `pgrep -z $ZONENAME init`
where $SHARES is the new number of shares and $ZONENAME is the name of the zone.
In Solaris 10, starting with 5/08, similar methods can be used to change the CPU cap, RAM cap, VM cap and shared memory cap.
Web Links:
Resource Controls
Using the prctl Command
Fair Share Scheduler (Overview)
prctl(1)
[August 2010]
A: The entire swap partition is treated as a single global resource to processes running in both global and non-global zones. Before Solaris 10 8/07, you couldn’t limit the amount of swap used by a zone on a per-zone basis. You can globally limit the size of the swap-based file systems (e.g. /tmp) by using the "size" mount option in the container’s /etc/vfstab file, e.g. "size=200m". This allows you to decrease the effect of many and/or large files created in /tmp.
Starting with Solaris 10 8/07, you can use the 'swap' property of the capped-memory resource to cap the amount of virtual memory (VM) that a zone uses. This can also be set dynamically with the resource control zone.max-swap.
[August 2010]
A: Yes, use the IPQoS features in Solaris 10. You must manage this from the global zone for the containers.
A: CPU overhead of containers is hardly measurable (i.e. <1%) for a few zones or even dozens of zones, depending somewhat on the applications.
A: Yes. Here is an example:
prctl -n project.cpu-shares -v 10 -r -i project group.staff
The prctl utility allows the examination and modification of the resource controls associated with an active process, task or project on the system. It allows access to the basic and privileged limits on the specified entity.
-n specifies the name of the resource to get or set
-r specifies a replace operation
-v specifies the new value for the resource
-i specifies the owning process, task or project of the resource.
A: Yes, but in Solaris 10 8/07 and later, it’s much easier to use the ’dedicated-cpus’ feature.
To bind a zone’s processes to a pool, first create the pool, then use zonecfg(1M) to bind a zone to it.
poolcfg -c ’create pset pset_zone (uint pset.min = 3; uint pset.max = 3)’
poolcfg -c ’create pool pool_zone (string pool.scheduler="FSS")’
poolcfg -c ’associate pool pool_zone (pset pset_zone)’
5. Use pooladm -c to commit the configuration at /etc/pooladm.conf.
See the administration guide.
The command to perform the binding, from the global zone, would be:
zonecfg -z zone1 set pool=pool_zone
If the zone was running, you must re-boot it for the binding to take effect, unless you also dynamically assign the zone to the pool, as described in the question "Can projects/zones be reassigned to a different resource pool while they are running?". [August 2010]
A: Yes. Here is an example:
poolbind -p web_app -i zoneid myzone
The poolbind command binds zones, projects, tasks and processes to a pool.
-p is the name of the pool to bind
-i specifies the process id, zone id, task id or project id to be bound to the pool.
A: Yes, you can. Here is the command(s) you would use:
If you want to move a specific CPU(s) here is the command:
poolcfg -dc "transfer to pset pset2 (CPU 0, CPU 1)"
which will move CPUs 0 and 1 to pset2.
A: For manual mounts, use the option "-o size=sz" where sz is the size limit you want. Ending the size in ’k’ means kilobytes, ending it in ’m’ means megabytes. Example: "-o size=500m". This option can also be added into /etc/vfstab. For more details, view the man pages for mount_tmpfs(1M) and vfstab(4).
With Solaris 10 8/07, you can use the resource control, zone.max-swap. (The swap property of the capped-memory resource is the preferred way to set this control.)
A: A locked memory cap in a zone can be set using the 'locked' property of the zonecfg capped-memory resource. Applications generally do not lock significant amounts of memory, but you might decide to set locked memory if the zone’s applications are known to lock memory.
If a Container locks down enough memory, it can cause other Containers to page excessively. For that reason, setting the 'locked' property is recommended, because each Container can use locked memory.
If the zone administrator is less than trusted or if DOS exploits are of concern, you can also consider setting the locked memory cap to 10% of the system’s physical memory or to the zone’s physical memory cap.
[August 2010]
A: Here are just a few of the software tools - some free, some not free - which will help you manage Solaris Zones:
[August 2010]
A: First gather some information, then use the Solaris Container Manager GUI or the commands shown below. This is the simplest possible creation of a zone that has network access. You will need this information (example values in parentheses):
Using the sample information in the appropriate commands, which will take about 10 minutes on a small system with a new installation of OpenSolaris or Solaris 10:
global# zonecfg -z my-zone zonecfg:my-zone> create zonecfg:my-zone> set zonepath=/zones/zone_roots/my-zone zonecfg:my-zone> add net zonecfg:my-zone:net> set address=10.1.1.1 zonecfg:my-zone:net> set physical=hm0 zonecfg:my-zone:net> end zonecfg:my-zone> commit zonecfg:my-zone> exit global# zoneadm -z my-zone install global# zoneadm -z my-zone boot
Also, see the two chapters on installing and uninstalling zones at docs.sun.com. [August 2010]
A: Use these commands, substituting the correct names for <bracketed> text.
global# zoneadm -z <zonename> uninstall global# zonecfg -z <zonename> delete
Also, see the two chapters on installing and uninstalling zones at docs.sun.com. [August 2010]
A: No, if you use VLANs you can have one per VLAN per port. To use the same base ’bge0’ for multiple dhcp zones, in the case of VLANs you would assign bge1000 to zoneA, bge2000 to zoneB, etc. The VNIC component of Crossbow allows multiple virtual NICs on a port without any VLANs. You can try this out at Crossbow project. [August 2010]
A: The new keyword nfs4_domain was added to the sysidcfg file to allow "no-hands" reboot in SX CE and Solaris 10 8/07.
A: See the Patching and Packaging sections in the guide at docs.sun.com. Note that a recent (2009) zones parallel patching enhancement to the standard Solaris 10 patch utilities increases the patching tools performance on systems with multiple zones by allowing parallel patching of the non-global zones. See "Zones Parallel Patching" on the Solaris Containers (Zones) page on OTN: http://www.oracle.com/technetwork/systems/containers/index.html
A: There are two parts to the answer: 1) There is only one kernel running on the system, so all zones must be at the same patch level with respect to the kernel and other Solaris system components. Such patches can only be applied from the global zone, and they affect the global and all local zones equally. The KU is an example of such a patch.
2) Software which is not part of Solaris can be patched on a per-zone basis. If the software can be installed in the non-global zone then it must be patchable from the local zone as well, regardless of the zone type, whole-root or sparse-root.
A: Yes. See Migrating a Non-Global Zone to a Different Machine. For information on migrating a Solaris 8 or Solaris 9 container, see System Administration Guide: Solaris 8 Containers and System Administration Guide: Solaris 9 Containers.
[August 2010]
A: Yes, the global zone sees all audit records. Each non-global zone only sees its own audit records.
A: Yes, use pgkadd -G. Note that if the SUNW_PKG_THISZONE package parameter is set to true, you do not have to use the -G option. See packaging and patching chapters
[September 2010]
A: That depends on the settings used when the package was created. See the Packaging sections at docs.sun.com.
A: Most Unix commands and programs work correctly, without alteration or re-compilation.
However, the implementation of the security isolation boundary limits the functionality of several system calls and libraries. That, in turn, limits the functionality of several system commands. In other words, some Solaris commands behave differently when run inside a zone, or do not work at all inside a zone.
See the sections 6.1 System Calls, 6.2 Library Functions, 6.3 Commands, and 6.4 Device and Interface Special Files in http://www.sun.com/bigadmin/features/articles/zones_partition.html#limitations.
For information on the status of privileges in zones, see Table 26-1 Status of Privileges in Zones
[November 2006]
A: The zones autoboot property determines whether the zone is booted when the system boots. The global zone adminstrator can set the autoboot property to "true" or "false." The zones service svc:/system/zones:default must also be enabled. [August 2010]
A: There is no need to do this. In fact, the package and patch tools will perform their operations on all zones that are running, as well as all zones that are not currently running but are capable of being booted (e.g. they are at least in the "installed" state). The running zones are operated on first, and then for each zone that is not running but can be booted, the zone is booted, the operation is performed, and the zone is then halted.
A: By default the syslog output from a zone goes only into the zone’s syslog file. If you would like the output to also appear in the global zone’s log files, configure the non-global zone’s loghost to be the global zone.
A: This bug (4963368) was corrected in Solaris 10 8/07. For release before that, the workaround is: after using zonecfg to remove the device, manually remove the corresponding entry in {ZONEPATH}/dev.
A: Information about how to upgrade your Solaris 10 system to a later release if you are running zones is available in the System Administration Guide: Solaris Containers--Resource Management and Solaris Zones, Chapter 27 Upgrading a Solaris 10 System That Has Installed Non-Global Zones.
Full upgrade for a Solaris 10 system that has zones installed began in Solaris 10 8/07. You can use Solaris Live Upgrade, the standard Solaris interactive installation program, or the custom JumpStart installation program to upgrade your Solaris system with zones installed. See the installation documentation. Limited upgrade via standard upgrade with limitations and limited JumpStart keywords was available in Solaris 10 11/06.
| Solaris Release | Traditional Upgrade w/ Zones | Live Upgrade w/ Zones |
|---|---|---|
| Solaris 10 3/05 | N/A | N/A |
| Solaris 10 1/06 | Yes | No |
| Solaris 10 6/06 | Yes | No |
| Solaris 10 11/06 | Yes* | No |
| Solaris 10 8/07 onward | Yes* | Yes |
The zones upgrade failed and the system needs to be restored from backup. More details can be found in the file /var/sadm/install_data/upgrade_log on the upgrade root file system.
The error message is incorrect: although this error message states that the system must be restored from backup, the system is actually fine, and it can be upgraded successfully using the workaround.
Workaround: 1. Reboot your system with the installed OS. 2. Reconfigure the zones, removing the "fs" resources defined with a type of "lofs." 3. After removing these resources, upgrade the system to Solaris 10 11/06. 4. Following the upgrade, you can again reconfigure your zones to restore the additional "fs" resources that you removed.
This problem is being tracked as CR 6454140: "Zones With an "fs" Resource Defined With a Type of "lofs" Cannot Be Upgraded to Solaris 10 11/06" and is also described in the Solaris 10 11/06 Release Notes.
[November 2006]
A: There are a number of considerations when using Live Upgrade (LU) on a system with zones installed. It is critical to avoid zone state transitions during lucreate and lumount operations.
Because a non-global zone can be controlled by a non-global zone administrator as well as the global zone administrator, it is best to have all zones halted during lucreate or lumount.
It is important to note that when LU operations are underway, non-global zone administrator involvement is critical. The upgrade affects their work as administrators, and they will be dealing with the changes that occur as a result of the upgrade. They should make sure that any local packages are stable throughout the sequence, handle any post-upgrade tasks (such as configuration file tweaking), and generally schedule around the system outage.
Here is an example of a problem that could occur if these guidelines are not followed. If this sequence of actions takes place:
When the system comes back up, the non-global zone users will notice that they no longer have the FooBar feature added by the package.
[January 2008]
A: Not yet, but it is being investigated. Live Upgrade can be used on Solaris 10 10/08 systems that have zones configured with the zonepath on ZFS.
[November 2008]
A: On Solaris 10 systems, the traditional open configuration is installed.
You can switch the zone to either networking configuration by using the netservices command, or enable and disable specific services by using SMF commands. [September 2006]
A: Yes. It is normal and expected that a migrated zone and a newly installed zone would have different patches. The update on attach feature looks at the zone you are migrating and determines which packages need to be updated to match the new host. Only those packages are updated. By definition, the rest of the packages (with their patches) are allowed to vary from zone to zone. You can think of this as setting up a number of zones and then, over time, the zone administrators for those zones install and remove packages and apply different patch streams to the packages that they are allowed to change in their zones.
The update on attach feature for zone migration was added in the Solaris 10 10/08 release.
[August 2010]
A: Collect a system dump and submit it to Oracle for analysis. You can reboot the global zone.
[August 2010]
Back to Top
A: Only through IP connections, e.g. telnet, rlogin.
A: No, this would violate the security implementation of zones. In this context, think of zones as separate computers - you can’t ’su’ from one Unix computer to another.
You can use the zlogin(1) command to login to a non-global zone from the global zone. You must have all privileges(5) to use zlogin.
A: Because each container has its own namespace, each container has its own root account. Each zone’s root account is unable to access other containers in any way.
A: A great deal of design work was done to prevent containers from affecting each other. By default it is very difficult for one local zone to affect another zone, but it is possible. It is also easy for the global zone administer to configure containers unsafely. Consider these factors:
A: A ’fork bomb’ is a process which creates (forks) as many child processes as possible, attempting to use up all of the virtual memory or PIDs in a system, resulting in a Denial of Service to other users. If you would like to prevent someone from doing this in a non-global zone, add this to a zone’s configuration, using zonecfg(1M):
set max-lwps=1000
That will prevent a zone’s processes from having a total of more than 1000 LWPs simultaneously. [August 2010]
A: In Solaris, Oracle uses ISM (Intimate Shared Memory) or DISM (Dynamic ISM). DISM is preferred because it provides more flexibility.
ISM can be used in a Solaris Container, for any release of Solaris 10.
Because we keep improving Containers, there are slightly different answers to the question "can DISM be used," depending on the particular release of Solaris 10.
global# zonecfg -z myzone add capped-memory set locked=4g end exit
Note that common memory-size suffixes can be used: k or K (kilobytes), m or M (MB), g or G (GB), etc. See zonecfg(1M) for more details.
In Solaris 10 8/07 you should set that limit with the following command:
global# zonecfg -z myzone set max-locked-memory=4g exit
2. Solaris 10 11/06: Yes, Oracle can use DISM in a Container. To enable the use of DISM, the global zone administrator must add the privilege "proc_lock_memory" to the Container. To do this, use zonecfg(1M) to add the line
set limitpriv=default,proc_lock_memory
to the Container’s configuration.
3. Solaris 10, Releases 3/05, 1/06, 6/06: A Container can only use ISM. It cannot use DISM. This is a side-effect of the implementation of the security boundary which protects zones from each other.
[September 2008]
A: There are currently (June 2006) two distinct concerns regarding the use of FSS in a Container when running Oracle databases:
A: This is really three questions: (1) does it work (2) in what configurations does Sun support the Solaris components (3) in what configurations does Oracle support this? The short answers are:
The Sun BluePrint "Deploying Oracle Real Application Clusters (RAC) on Solaris Zone Clusters" describes the installation and use of Oracle RAC in Solaris Zone Clusters. [May 2009]
A: Yes. To use Veritas Volume Manager Volumes from non-global zones, see this document.
Sun is not responsible for the availability of third-party web sites mentioned in this FAQ. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources.
A: Solaris Zones have many strengths relative to other server virtualization solutions, including:
A: They are only vaguely similar. Both technologies are very useful for consolidating servers. However, the basic model is different: Containers form isolated application environments that share one OS instance, while VMware hosts multiple OS instances. The differences also include:
A: Containers are not similar to either except in purpose: server consolidation. However, the differences include:
A: They are only vaguely similar. Both technologies are very useful for consolidating servers. However, the differences include:
A: The basic model used to implement the Solaris 10 Containers feature set and the Linux vServers project are fairly similar. However, the implementation is different. (More coming soon!) [Updated August 2005]
A:
Note that pkg_image-update is not fully supported. You can use detach and attach -u as a workaround. Detach the zone before running pkg_image-update, and use attach -u after running pkg_image-update. [Added June 2009]
A: IPS is a new model for software management, and zones have to change to utilize this model.[Added June 2009]
A: The sparse root type of zone describes a fundamental interaction between zones and the package management system, and IPS doesn’t support this concept. BUT, we’re working on providing the positive attributes of sparse root zones in different ways:
[Added June 2009]
A: No, zones are a work in progress and things will continue to evolve as development continues. [Added June 2009]
A: Use the -e option to zoneadm install. [Added June 2009]
A: Eventually, we want to support beadm inside zones for pkg_image-update, just as you can do in the global zone. To accomplish this, the zone’s root dataset must be controlled inside the zone. [Added June 2009]
A: Ready the zone, which will mount the correct zone root dataset. [Added June 2009]
A: OpenSolaris zones are a little different from Solaris 10 zones. When a zone is in the 'installed' state, its ZFS file system is not mounted. To mount the zone's root file system before booting the zone, use this command:
global# zoneadm -z <zonename> ready
Then edit <zonepath>/root/etc/sysidcfg. After that, you can finish booting the zone. If the sysidcfg file was correct, configuration questions will not be sent to the zone's console, and it will complete the boot process.
A: No, existing zones from this release cannot be used. [Added June 2009]
A: The most common problem is that the zone doesn’t have its system identification information yet. You can determine if this is the problem by running "ps -fz " in the global zone. If the output only shows zsched, init, and a (3-6) processes related to SMF (/lib/svc/..., /usr/sbin/svccfg) then system identification is not complete. To complete this, attach to the zone’s console by running "zlogin -C " in the global zone, pressing once, and following the instructions. [March 2006]
A: This resulted from a bug that was fixed in Solaris Express 4/06. It will be corrected in Solaris 10 11/06 as well.
Updated information on privileges and zones has been added to the System Administration Guide: Solaris Containers--Resource Management and Solaris Zones. See documentation for a list of the Solaris privileges and the status of each privilege with respect to zones. To alter privileges in zones, use the limitpriv property in zonecfg. [September 2006]
A: Although this error message states that the system must be restored from backup, the system is actually fine, and it can be upgraded successfully. See "How do I upgrade a system with zones installed? Does Live Upgrade work?" for more information and a workaround you can use to upgrade your system.
Terms of Use
|
Privacy
|
Trademarks
|
Copyright Policy
|
Site Guidelines
|
Site Map
|
Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
© 2012, Oracle Corporation and/or its affiliates.