Resources also have properties to configure. The following properties are associated with the resource types shown.
ncpus, importance
Specify the number of CPUs and, optionally, the relative importance of the pool. The following example specifies a CPU range for use by the zone lx-zone. importance is also set.
zonecfg:lx-zone> add dedicated-cpu zonecfg:lx-zone:dedicated-cpu> set ncpus=1-3 zonecfg:lx-zone:dedicated-cpu> set importance=2 zonecfg:lx-zone:dedicated-cpu> end |
ncpus
Specify the number of CPUs. The following example specifies a CPU limit of 3.5 CPUs for use by the zone lx-zone.
zonecfg:lx-zone> add capped-cpu zonecfg:lx-zone:capped-cpu> set ncpus=3.5 zonecfg:lx-zone:capped-cpu> end |
physical, swap, locked
This resource groups the properties used when capping memory for the zone. The following example specifies the memory limits for the zone lx-zone. Each limit is optional, but at least one must be set.
zonecfg:my-zone> add capped-memory zonecfg:lx-zone:capped-memory> set =50m zonecfg:lx-zone:capped-memory> set swap=100m zonecfg:lx-zone:capped-memory> set locked=30m zonecfg:lx-zone:capped-memory> end |
dir, special, raw, type, options
The lines in the following example add read-only access to CD or DVD media in a non-global zone. The file system is loopback mounted with the options ro,nodevices (read-only and no devices) in the non-global zone.
zonecfg:lx-zone> add fs zonecfg:lx-zone:fs> set dir=/cdrom zonecfg:lx-zone:fs> set special=/cdrom zonecfg:lx-zone:fs> set type=lofs zonecfg:lx-zone:fs> add options [ro,nodevices] zonecfg:lx-zone:fs> end |
Note that section 1M man pages are available for mount options that are unique to a specific file system. The names of these man pages have the form mount_filesystem.
address, physical
In the following example, IP address 192.168.0.1 is added to a zone. An bge0 card is used for the physical interface.
zonecfg:lx-zone> add net zonecfg:lx-zone:net> set physical=bge0 zonecfg:lx-zone:net> set address=192.168.0.1 zonecfg:lx-zone:net> end |
To determine which physical interface to use, type ifconfig -a on your system. Each line of the output, other than loopback driver lines, begins with the name of a card installed on your system. Lines that contain LOOPBACK in the descriptions do not apply to cards.
name, value
Available zone-wide resource controls are described in Zone-Wide Resource Controls in an lx Branded Zone.
zonecfg:lx-zone> add rctl zonecfg:lx-zone:rctl> set name=zone.cpu-shares zonecfg:lx-zone:rctl> add value (priv=privileged,limit=10,action=none) zonecfg:lx-zone:rctl> end |
zonecfg:lx-zone> add rctl zonecfg:lx-zone:rctl> set name=zone.max-lwps zonecfg:lx-zone:rctl> add value (priv=privileged,limit=100,action=deny) zonecfg:lx-zone:rctl> end |
name, type, value
In the following example, a comment about a zone is added.
zonecfg:lx-zone> add attr zonecfg:lx-zone:attr> set name=comment zonecfg:lx-zone:attr> set type=string zonecfg:lx-zone:attr> set value="Production zone" zonecfg:lx-zone:attr> end |
You can use the export subcommand to print a zone configuration to standard output. The configuration is saved in a form that can be used in a command file.