Resource Type: zone

NOTE: This page was generated from the Puppet source code on 2018-08-28 15:52:20 -0700

zone

Description

Manages Solaris zones.

Autorequires: If Puppet is managing the directory specified as the root of the zone’s filesystem (with the path attribute), the zone resource will autorequire that directory.

Attributes

zone { 'resource title':
  name         => # (namevar) The name of the...
  ensure       => # The running state of the zone.  The valid states 
  autoboot     => # Whether the zone should automatically boot....
  clone        => # Instead of installing the zone, clone it from...
  create_args  => # Arguments to the `zonecfg` create command.  This 
  dataset      => # The list of datasets delegated to the non-global 
  id           => # The numerical ID of the zone.  This number is...
  inherit      => # The list of directories that the zone inherits...
  install_args => # Arguments to the `zoneadm` install command....
  ip           => # The IP address of the zone.  IP addresses...
  iptype       => # The IP stack type of the zone.  Valid values are 
  path         => # The root of the zone's filesystem.  Must be a...
  pool         => # The resource pool for this...
  provider     => # The specific backend to use for this `zone...
  realhostname => # The actual hostname of the...
  shares       => # Number of FSS CPU shares allocated to the...
  sysidcfg     => # The text to go into the `sysidcfg` file when the 
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the zone.

(↑ Back to zone attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The running state of the zone. The valid states directly reflect the states that zoneadm provides. The states are linear, in that a zone must be configured, then installed, and only then can be running. Note also that halt is currently used to stop zones.

Default: running

Allowed values:

  • absent
  • configured
  • installed
  • running.

(↑ Back to zone attributes)

autoboot

(Property: This attribute represents concrete state on the target system.)

Whether the zone should automatically boot.

Default: true

Allowed values:

  • true
  • false

(↑ Back to zone attributes)

clone

Instead of installing the zone, clone it from another zone. If the zone root resides on a zfs file system, a snapshot will be used to create the clone; if it resides on a ufs filesystem, a copy of the zone will be used. The zone from which you clone must not be running.

(↑ Back to zone attributes)

create_args

Arguments to the zonecfg create command. This can be used to create branded zones.

(↑ Back to zone attributes)

dataset

(Property: This attribute represents concrete state on the target system.)

The list of datasets delegated to the non-global zone from the global zone. All datasets must be zfs filesystem names which are different from the mountpoint.

(↑ Back to zone attributes)

id

The numerical ID of the zone. This number is autogenerated and cannot be changed.

(↑ Back to zone attributes)

inherit

(Property: This attribute represents concrete state on the target system.)

The list of directories that the zone inherits from the global zone. All directories must be fully qualified.

(↑ Back to zone attributes)

install_args

Arguments to the zoneadm install command. This can be used to create branded zones.

(↑ Back to zone attributes)

ip

(Property: This attribute represents concrete state on the target system.)

The IP address of the zone. IP addresses must be specified with an interface, and may optionally be specified with a default router (sometimes called a defrouter). The interface, IP address, and default router should be separated by colons to form a complete IP address string. For example: bge0:192.168.178.200 would be a valid IP address string without a default router, and bge0:192.168.178.200:192.168.178.1 adds a default router to it.

For zones with multiple interfaces, the value of this attribute should be an array of IP address strings (each of which must include an interface and may include a default router).

(↑ Back to zone attributes)

iptype

(Property: This attribute represents concrete state on the target system.)

The IP stack type of the zone.

Default: shared

Allowed values:

  • shared
  • exclusive

(↑ Back to zone attributes)

path

(Property: This attribute represents concrete state on the target system.)

The root of the zone’s filesystem. Must be a fully qualified file name. If you include %s in the path, then it will be replaced with the zone’s name. Currently, you cannot use Puppet to move a zone. Consequently this is a readonly property.

(↑ Back to zone attributes)

pool

(Property: This attribute represents concrete state on the target system.)

The resource pool for this zone.

(↑ Back to zone attributes)

provider

The specific backend to use for this zone resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to zone attributes)

realhostname

The actual hostname of the zone.

(↑ Back to zone attributes)

shares

(Property: This attribute represents concrete state on the target system.)

Number of FSS CPU shares allocated to the zone.

(↑ Back to zone attributes)

sysidcfg

The text to go into the sysidcfg file when the zone is first booted. The best way is to use a template:

# $confdir/modules/site/templates/sysidcfg.erb
system_locale=en_US
timezone=GMT
terminal=xterms
security_policy=NONE
root_password=<%= password %>
timeserver=localhost
name_service=DNS {domain_name=<%= domain %> name_server=<%= nameserver %>}
network_interface=primary {hostname=<%= realhostname %>
  ip_address=<%= ip %>
  netmask=<%= netmask %>
  protocol_ipv6=no
  default_route=<%= defaultroute %>}
nfs4_domain=dynamic

And then call that:

zone { 'myzone':
  ip           => 'bge0:192.168.0.23',
  sysidcfg     => template('site/sysidcfg.erb'),
  path         => '/opt/zones/myzone',
  realhostname => 'fully.qualified.domain.name',
}

The sysidcfg only matters on the first booting of the zone, so Puppet only checks for it at that time.

(↑ Back to zone attributes)

Providers

solaris

Provider for Solaris Zones.

  • Required binaries: /usr/sbin/zoneadm, /usr/sbin/zonecfg
  • Default for osfamily == solaris.

NOTE: This page was generated from the Puppet source code on 2018-08-28 06:48:02 -0700