This document describes:
Your machine must be running the Solaris Express: Community Release. The following primary machine considerations are associated with the use of lx branded zones.
There are no limits on how much disk space can be consumed by a zone. The global administrator is responsible for space restriction. The global administrator must ensure that local storage is sufficient to hold a non-global zone's root file system. Even a small uniprocessor system can support a number of zones running simultaneously.
If you intend to install a Linux zone from a standard distribution, whether from CD media or the associated ISO images, please be aware that the lx brand installer currently only supports Red Hat Enterprise Linux 3.x and the equivalent CentOS distributions.
If you intend to install a Linux zone from a filesystem tarball other than the one available on the OpenSolaris site, please be aware that the lx brand emulates the 2.4.21 kernel and glibc 2.3, as modified by Red Hat. Distros based on other versions of either may or may not work.3. Installing the BrandZ Solaris Build Now that BrandZ has integrated into Solaris, this whole section has been obsoleted.
This section describes the information you must collect before you can configure a zone, and covers the format of the zonecfg command.
You must choose a name and a path for your zone.
The zone name identifies the zone to the configuration utility. The following rules apply to zone names:
The zonepath property is the path to the zone root. The system creates the directory with the correct permissions.
Each zone that requires network connectivity has one or more unique IP addresses. You must assign an IPv4 address or manually configure and assign an IPv6 address for the zone.
The IP address must be specified in the slash format. For example, for an address of 10.6.10.233 with a netmask of 255.255.255.0, you would specify the address as 10.6.10.233/24.
The zonecfg command is used to create the zone configuration.
The zonecfg prompt is of the following form:
zonecfg:zonename>
When you are configuring a specific resource type, such as a network interface resource, that resource type is also included in the prompt:
zonecfg:zonename:net>
You must be the global administrator in the global zone to perform this procedure. Note that steps 5-8 are optional. These steps only need to be performed if you want to add a network interface to the zone.
global# **zonecfg -z myzone**
If this is the first time you have configured this zone, you will see the following system message:
myzone: No such zone configured Use 'create' to begin configuring a new zone.
zonecfg:my-zone> **create -t SUNWlx**
zonecfg:myzone> **set zonepath=/export/myzone_root**
zonecfg:myzone> **add net**
1* Set the address in the form < ip address of zone>/<netmask>. In this procedure, 10.6.10.233/24 is used.
zonecfg:myzone:net> **set address=****10.6.10.233/24**
1* Set the physical device type for the network interface, the bge device in this procedure.
zonecfg:myzone:net> **set physical=bge0**
1* End the net specification.
zonecfg:myzone:net> **end**
zonecfg:myzone> **add attr** zonecfg:myzone:attr> **set name="audio"** zonecfg:myzone:attr> **set type=boolean** zonecfg:myzone:attr> **set value=true** zonecfg:myzone:attr> **end**
zonecfg:myzone> **commit**
zonecfg:myzone:net> **exit**
Note that even if you did not explicitly type commit at the prompt, a commit is automatically attempted when you type exit or an EOF occurs.
Tip: The zonecfg command also supports multiple subcommands, quoted and separated by semicolons, from the same shell invocation. Type as one line.
global# **zonecfg -z myzone "create -t SUNWlx; set zonepath=/export/myzone_root"**
You must be the global administrator in the global zone to perform this procedure.
Steps
global# **svcadm enable svc:/system/filesystem/volfs:default**
global# **svcs | grep volfs**
You will see a display similar to the following:
online 17:30 svc:/system/filesystem/volfs:default
global# **zoneadm -z myzone install -d **//<path to tarball>//
A tarball based on the CentOS Linux distribution is available on the OpenSolaris website in opensolaris.org/os/community/brandz/downloads.
1* Install the zone from Red Hat or CentOS CDs, for example, /cdrom/cdrom0:
global# **zoneadm -z myzone install -d** **/cdrom/cdrom0**
1* Install the zone from ISO images of Red Hat or CentOS install media:
global# **zoneadm -z myzone install -d** //<path to directory containing ISO images>//
You will see system messages as the non-global zone is installed.
Note: When installing from CD or ISO images, you can install a subset of the packages available on the install media. The available subsets are: core, server, desktop, developer, and all. Each cluster in this list includes the packages in all previous clusters. So, the 'desktop' cluster includes everything in 'core' and 'server', as well as the packages useful for a developer.
For example, to install the server packages, type:
global# **zoneadm -z myzone install -d** //<install path>// **server**
global# **zoneadm list -iv**
You will see a display similar to the following:
ID NAME STATUS PATH BRAND 0 global running / native 1 myzone installed /export/zones/myzone lx
You must be the global administrator in the global zone to perform this procedure.
Steps
global# **zoneadm -z myzone boot**
global# **zoneadm list -iv**
You will see a display similar to the following:
ID NAME STATUS PATH BRAND 0 global running / native 1 myzone running /export/zones/myzone lx
You must be the global administrator in the global zone to perform this procedure.
Steps
global# **zlogin myzone**
You will see a display similar to the following:
[Connected to zone 'myzone' pts/2] You have mail. #
[root@myzone root]# **uname -a**
You will see a display similar to the following:
Linux myzone 2.4.21 BrandZ fake linux i686 i686 i386 GNU/Linux
# **exit**
You will see a display similar to the following:
[Connection to zone 'myzone' pts/2 closed]
When you install an lx branded zone, networking is disabled. To enable networking, edit the /etc/sysconfig/network file in the zone as follows:
NETWORKING=yes HOSTNAME=//<hostname>//
To set up a NIS domain, add a line similar to the following:
NISDOMAIN=//<Grp.South.Sun.COM>//
If you are not using NIS, modify the /etc/nsswitch.conf file to use files or the DNS naming services for hostname lookups.