Update Zone Configuration operation
The Update Zone Configuration operation enables you to modify configuration parameters for a Zone. You can use this operation to add, update, or remove a hard disk, a CD-ROM, or an ethernet adapter from a Zone.
The following figure shows the <items> XML template for the Update Zone Configuration operation:
<items> XML template for the Update Zone Configuration operation
<item>
<parameters>
<remove-resources>
<autoboot/>
<cpu-shares></cpu-shares>
<pool/>
<boot-arguments/>
<dedicated-cpu>
<no-of-cpu></no-of-cpu>
</dedicated-cpu>
<privileges/>
<scheduling-class/>
<capped-memory>
<physical></physical>
</capped-memory>
<file-systems>
<file-system>
<dir></dir>
</file-system>
</file-systems>
<datasets>
<dataset>
<name></name>
</dataset>
</datasets>
<inherit-packages>
<inherit-pkg>
<dir></dir>
</inherit-pkg>
</inherit-packages>
<ip-type/>
<network-interfaces>
<network-interface>
<address></address>
</network-interface>
</network-interfaces>
<devices>
<device>
<match></match>
</device>
</devices>
<ma-sem-ids/>
<attributes>
<attribute>
<name></name>
</attribute>
</attributes>
</remove-resources>
<add-resources>
<autoboot></autoboot>
<cpu-shares></cpu-shares>
<pool></pool>
<boot-arguments ></boot-arguments>
<dedicated-cpu>
<no-of-cpu></no-of-cpu>
<cpu-importance></cpu-importance>
</dedicated-cpu>
<privileges></privileges>
<scheduling-class></scheduling-class>
<capped-memory>
<physical></physical>
<swap></swap>
<locked></locked>
</capped-memory>
<file-systems>
<file-system>
<dir></dir>
<special></special>
<type></type>
</file-system>
</file-systems>
<datasets>
<dataset>
<name></name>
</dataset>
</datasets>
<inherit-packages>
<inherit-pkg>
<dir></dir>
</inherit-pkg>
</inherit-packages>
<ip-type></ip-type>
<network-interfaces>
<network-interface>
<address></address>
<physical></physical>
<default-router></default-router>
</network-interface>
</network-interfaces>
<devices>
<device>
<match></match>
</device>
</devices>
<ma-sem-ids></ma-sem-ids>
<attributes>
<attribute>
<name></name>
<type></type>
<value></value>
</attribute>
</attributes>
</add-resources>
<update-resources>
<zone-path></zone-path>
<autoboot></autoboot>
<cpu-shares></cpu-shares>
<pool></pool>
<boot-arguments ></boot-arguments>
<dedicated-cpu>
<no-of-cpu></no-of-cpu>
<cpu-importance></cpu-importance>
</dedicated-cpu>
<privileges></privileges>
<scheduling-class></scheduling-class>
<capped-memory>
<physical></physical>
<swap></swap>
<locked></locked>
</capped-memory>
<file-systems>
<file-system>
<dir></dir>
<special></special>
<type></type>
</file-system>
</file-systems>
<datasets>
<dataset name>
<name></name>
</dataset>
</datasets>
<inherit-packages>
<inherit-pkg>
<dir></dir>
</inherit-pkg>
</inherit- packages>
<ip-type></ip-type>
<network-interfaces>
<network-interface>
<address></address>
<physical></physical>
<default-router></default-router>
</network-interface>
</network-interfaces>
<devices>
<device match>
<match></match>
</device>
</devices>
<max-sem-ids></max-sem-ids>
<attributes>
<attribute name>
<name></name>
<type></type>
<value></value>
</attribute>
</attributes>
</update-resources>
</parameters>
<item>
</items>
The following table describes the elements for the adapter request:
Adapter request elements for the Update Zone Configuration operation
Element | Definition | Required |
|---|---|---|
<operation-type> | Specifies the type of operation: Configure_Zone | Yes |
<operation-name> | Specifies the operation: Update_Zone_Configuration | Yes |
<zone-name> | Specifies the name of the Zone whose configuration parameters you want to update | Yes |
<host> | Specifies the name of the Solaris computer hosting Solaris Zones | No |
<port> | Specifies the port on which the SSH service is running on the host computer | No |
<operation-timeout-secs> | Specifies the time, in seconds, to wait for the operation to finish on the target server | No |
<user-name> | Specifies the user name for the Solaris computer | No |
<password> | Specifies the password corresponding to the user name | Conditional |
<add-resources> | Contains resources to add to the Zone configuration Note Global parameters cannot have multiple entries with a zone. Therefore, when you use the <add-resource> element, if a resource is already present within a zone, the value of the resource is updated; otherwise, its value is added to the configuration. For information about the child elements, see Child elements for the <add-resources>, <remove-resources>, and <update-resources> elements. | No |
<autoboot> | Specifies whether the Zone is booted when the associated Global Zone is booted
| No |
<cpu-shares> | Specifies the number of Fair Share Scheduler (FSS) shares to update in the specified Zone | No |
<pool> | Specifies the configured pool name for the new Zone to bind | No |
<boot-arguments> | Specifies persistent boot arguments for the Zone | No |
<dedicated-cpu> | Specifies the number of dedicated CPUs for the Zone | No |
<no-of-cpu> | Sets the number of CPUs for the Zone | Conditional |
<cpu-importance> | Sets the importance for the CPU | No |
<privileges> | Specifies the privileges to revise the default set of privileges | No |
<scheduling-class> | Provides different CPU access characteristics to threads, based on algorithmic logic
| No |
<capped-memory> | Sets the memory capacity for the Zone; enables you to place a soft restriction on the amount of memory that the Zone can use | No |
<physical> | Sets the physical memory capacity for the Zone; enables you to restrict the amount of physical memory that the Zone can use | Conditional |
<swap> | Sets the swap memory capacity for the Zone; enables you to restrict the amount of virtual memory that the Zone can use | Conditional |
<locked> | Sets the locked memory capacity for the Zone; enables you to place a locked memory cap on the amount of physical memory that the Zone can use | Conditional |
<file-systems> | Contains file systems to add to the Zone | No |
<file-system> | Specifies a file system to add to the Zone | Conditional |
<dir> | Sets the mount point for the file system | Conditional |
<special> | Sets the special file system for the Zone | Conditional |
<type> | Specifies the type of file system for <file-system> | Conditional |
<datasets> | Contains Zettabyte File System (ZFS) datasets in the storage pool | No |
<dataset> | Specifies a ZFS dataset to add to the Zone | Conditional |
<name> | Specifies path for the ZFS dataset | Conditional |
<inherit-packages> | Contains file systems that are loopback mounted from the Global Zone | No |
<inherit-pkg> | Adds a shared file system that is loopback mounted from the Global Zone | Conditional |
<dir> | Specifies the directory on the Global Zone to mount in the read-only mode | Conditional |
<ip-type> | Sets the Internet protocol type for the Zone to Exclusive-IP | No |
<network-interfaces> | Contains network interfaces | No |
<network-interface> | Specifies a network interface to add to the Zone | Conditional |
<address> | Sets the IP address for the network interface | Conditional |
<physical> | Sets the physical device type for the network interface | Conditional |
<default-router> | Sets the default router for the network interface | No |
<devices> | Contains network devices | No |
<device> | Specifies a device to add to the Zone | Conditional |
<match> | Sets the device match | Conditional |
<max-sem-ids> | Sets the maximum number of semaphore IDs for the Zone | No |
<attributes> | Contains properties for the Zone | No |
<attribute> | Specifies an attribute to add for the Zone | Conditional |
<name> | Specifies the name for the attribute | Conditional |
<type> | Specifies the type of the attribute | Conditional |
<value> | Contains the value for the attribute | Conditional |
<remove-resources> | Contains resources to remove from the Zone configuration | No |
<update-resources> | Contains one or more resources to update in the Zone configuration | No |
The following table describes the child elements of the <add-resources>, <remove-resources>, and <update-resources> elements:
Child elements for the <add-resources>, <remove-resources>, and <update-resources> elements
Element | Definition | Required |
|---|---|---|
<resource> | Specifies the resource to add, remove, or update from the Zone configuration | Conditional |
<name> | Specifies the name of the resource to add, remove, or update | Conditional |
<value> | Specifies the value for the resource | Conditional |
The following figure shows a sample adapter request for the Update Zone Configuration operation for adding, updating, and deleting virtual devices:
Sample adapter request for the Update Zone Configuration operation for adding, updating, and deleting virtual devices
<target>
<host>vm-sol-abc<host>
<user-name>admin<user-name>
<password>adminpass</password>
<port>8888</port>
</target>
<operation-type>Configure_Zone</operation-type>
<operation-name>Update_Zone_Configuration</operation-name>
<zone-name>testzone</zone-name>
<parameters>
<add-resources>
<autoboot>false</autoboot>
<cpu-shares>80</cpu-shares>
</add-resources>
<update-resources>
<cpu-shares>60</cpu-shares>
</update-resources>
<remove-resources>
<cpu-shares>60</cpu-shares>
</remove-resources>
</parameters>
</solaris-zones-request>
The following figure shows the response for the sample adapter request:
Sample adapter response for the Update Zone Configuration operation for adding, updating, and deleting virtual devices
<metadata>
<status>success</status>
</metadata>
<target-output host="10.118.14.6">
<metadata>
<os-id>SunOS</os-id>
<os-version>5.10</os-version>
<status>success</status>
</metadata>
<operation-output>
<metadata>
<command>zonecfg -z "zone1" "set autoboot=false;
add dedicated-cpu;set ncpus=1; set importance=8; end; add
capped-memory;set physical=1M; set swap=51M; set locked=9; end;
set bootargs=\"-m verbose1\"; select net address=10.118.218.3;
set address=10.118.218.2; set physical=vnet0; end; "</command>
<line-count>1</line-count>
<execution-milliseconds>797</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Operation Update_Zone_Configuration
executed successfully!!</line>
</output>
</operation-output>
</target-output>
</solaris-zones-response>
The following figure shows a sample adapter request for adding a virtual device:
Sample adapter request for adding a virtual device
<operation-type>Configure_Zone</operation-type>
<operation-name>Update_Zone_Configuration</operation-name>
<operation-timeout-secs>300</operation-timeout-secs>
<zone-name>testingzoneOneTwo</zone-name>
<parameters>
<add-resources>
<autoboot>false</autoboot>
<cpu-shares>80</cpu-shares>
</add-resources>
<update-resources />
<remove-resources />
</parameters>
</solaris-zones-request>
The following figure shows the response for the sample adapter request for adding a virtual device:
Sample adapter response for the Update Zone Configuration operation for adding a virtual device
<metadata>
<status>success</status>
</metadata>
<target-output host="vm-sol-abc">
<metadata>
<os-id>SunOS</os-id>
<os-version>5.10</os-version>
<status>success</status>
</metadata>
<operation-output>
<metadata>
<command>zonecfg -z "testingzoneOneTwo"
"set autoboot=false; set cpu-shares=80; "</command>
<line-count>1</line-count>
<execution-milliseconds>1031</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Operation Update_Zone_Configuration
executed successfully!!</line>
</output>
</operation-output>
</target-output>
</solaris-zones-response>
The following figure shows a sample adapter request for updating a virtual device:
Sample adapter request for updating a virtual device
<operation-type>Configure_Zone</operation-type>
<operation-name>Update_Zone_Configuration</operation-name>
<operation-timeout-secs>300</operation-timeout-secs>
<zone-name>testingzoneOneTwo</zone-name>
<parameters>
<add-resources>
<autoboot>false</autoboot>
</add-resources>
<update-resources>
<cpu-shares>60</cpu-shares>
</update-resources>
<remove-resources />
</parameters>
</solaris-zones-request>
The following figure shows the response for the sample adapter request for updating a virtual device:
Sample adapter response for the Update Zone Configuration operation for updating a virtual device
<metadata>
<status>success</status>
</metadata>
<target-output host="vm-sol-abc">
<metadata>
<os-id>SunOS</os-id>
<os-version>5.10</os-version>
<status>success</status>
</metadata>
<operation-output>
<metadata>
<command>zonecfg -z "testingzoneOneTwo"
"set autoboot=false; set cpu-shares=60; "</command>
<line-count>1</line-count>
<execution-milliseconds>703</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Operation Update_Zone_Configuration
executed successfully!!</line>
</output>
</operation-output>
</target-output>
</solaris-zones-response>
The following figure shows a sample adapter request for deleting a virtual device:
Sample adapter request for deleting a virtual device
<solaris-zones-request>
<operation-type>Configure_Zone</operation-type>
<operation-name>Update_Zone_Configuration</operation-name>
<operation-timeout-secs>300</operation-timeout-secs>
<zone-name>testingzoneOneTwo</zone-name>
<parameters>
<add-resources>
<autoboot>false</autoboot>
</add-resources>
<update-resources />
<remove-resources>
<cpu-shares>60</cpu-shares>
</remove-resources>
</parameters>
</solaris-zones-request>
The following figure shows the response for the sample adapter request for deleting a virtual device:
Sample adapter response for the Update Zone Configuration operation for deleting a virtual device
<metadata>
<status>success</status>
</metadata>
<target-output host="vm-sol-abc">
<metadata>
<os-id>SunOS</os-id>
<os-version>5.10</os-version>
<status>success</status>
</metadata>
<operation-output>
<metadata>
<command>zonecfg -z "testingzoneOneTwo" "clear
cpu-shares; set autoboot=false; "</command>
<line-count>1</line-count>
<execution-milliseconds>844</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Operation Update_Zone_Configuration
executed successfully!!</line>
</output>
</operation-output>
</target-output>
</solaris-zones-response>