Go to main content

Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: April 2019
 
 

Additional zoneadm Subcommand Options

Where appropriate, the zoneadm CLI subcommands have been enhanced with options specific to ZFS storage pool management.

Options for Installing, Cloning, and Attaching Zones

For the install, clone, and attach subcommands of zoneadm, three available options are discussed in the following sections:

–x force-zpool-import Option

This option applies to all zpool resources specified in the zone configuration and instructs the zones framework to forcibly import any ZFS storage pools that might appear to be in use, such as by another system. This mimics the behavior of zpool import -f command.

This option facilitates importing ZFS storage pools onto a new system during zone migration when the ZFS storage pools were never properly exported on another system, for example, by using the zoneadm detach or zoneadm uninstall commands. In these situations, the forcible import must be applied to all ZFS storage pools configured for a particular zone.

–x force-zpool-create= Option

This option instructs the zones framework to forcibly create a new ZFS storage pool, either over an existing old pool or onto a device that appears to be currently in use for other purposes. This mimics the behavior of the zpool create -f command syntax.

This option's scope is limited to the ZFS storage pools specified in a comma-separated list of zpool names or specified by using the option multiple times, for example:

-x force-zpool-create=rpool,pool2,pool3
-x force-zpool-create=pool1 -x force-zpool-create=pool2

The ZFS storage pool name to be used here is the name property of the corresponding zpool resource in the zone configuration. To specify the ZFS storage pool described by the rootzpool resource, use the name rpool.

–x force-zpool-create-all Option

This option instructs the zones framework to forcibly create new ZFS storage pools for all zpool and rootzpool resources specified in the zone configuration.

Options for Uninstalling Zones

For the zoneadm uninstall subcommand, the following three options are available:

–x force-zpool-destroy=zpoolname Option

This option instructs the zones framework to destroy a ZFS storage pool while uninstalling a zone. This mimics the behavior of zpool destroy poolname command. This option takes a zpoolname list:

force-zpool-destroy=zpoolname{,zpoolname,zpoolname,...}

The scope of this option is limited to the ZFS storage pools specified in the comma-separated list of zpool names, or specified by using the option multiple times, for example:

-x force-zpool-destroy=rpool,pool2,pool3
-x force-zpool-destroy=pool1 -x force-zpool-destroy=pool2

The name arguments correspond to the name property specified in the zone configuration for the desired zpool resource. The name rpool is used to specify the ZFS storage pool associated with the rootzpool resource.

–x force-zpool-destroy-all Option

This option instructs the zones framework to destroy the ZFS storage pools of all zpool and rootzpool resources specified in the zone configuration when uninstalling the zone.

Note that the options to force the zones framework to destroy ZFS storage pools when uninstalling a zone should be used with caution. Even though you might want to uninstall a zone in the current, active boot environment (BE), there could be other zone boot environments (ZBEs) within this ZFS storage pool that belong to currently inactive boot environments. Destroying the ZFS storage pool associated with a rootzpool resource will make the zone unavailable to all boot environments that carry this zone in the installed state. For more information about zone boot environments, refer to the beadm(1M) man page.

–x force-storage-destroy-all Option

Specify this option to destroy storage. Note that not all storage URI types support this operation. You can destroy storage referenced by file or NFS storage URIs, but not storage referenced by dev, iSCSI, or lu storage URIs.

Restrictions in the Use of the zoneadm Command

For zones configured with a rootzpool resource, the zoneadm move command syntax is restricted to only permit renaming the zonepath. It is not possible to move a zone with a rootzpool resource out of its corresponding ZFS storage pool into a different place in the file system hierarchy or into another ZFS storage pool.