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
<items> <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 |
---|---|---|
|
Specifies the type of operation: |
Yes |
|
Specifies the operation: |
Yes |
|
Specifies the name of the Zone whose configuration parameters you want to update |
Yes |
|
Specifies the name of the Solaris computer hosting Solaris Zones |
No |
|
Specifies the port on which the SSH service is running on the host computer |
No |
|
Specifies the time, in seconds, to wait for the operation to finish on the target server |
No |
|
Specifies the user name for the Solaris computer |
No |
|
Specifies the password corresponding to the user name |
Conditional |
|
Contains resources to add to the Zone configuration Note Global parameters cannot have multiple entries with a zone. Therefore, when you use the |
No |
|
Specifies whether the Zone is booted when the associated Global Zone is booted
|
No |
|
Specifies the number of Fair Share Scheduler (FSS) shares to update in the specified Zone |
No |
|
Specifies the configured pool name for the new Zone to bind |
No |
|
Specifies persistent boot arguments for the Zone |
No |
|
Specifies the number of dedicated CPUs for the Zone |
No |
|
Sets the number of CPUs for the Zone |
Conditional |
|
Sets the importance for the CPU |
No |
|
Specifies the privileges to revise the default set of privileges |
No |
|
Provides different CPU access characteristics to threads, based on algorithmic logic
|
No |
|
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 |
|
Sets the physical memory capacity for the Zone; enables you to restrict the amount of physical memory that the Zone can use |
Conditional |
|
Sets the swap memory capacity for the Zone; enables you to restrict the amount of virtual memory that the Zone can use |
Conditional |
|
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 |
|
Contains file systems to add to the Zone |
No |
|
Specifies a file system to add to the Zone |
Conditional |
|
Sets the mount point for the file system |
Conditional |
|
Sets the special file system for the Zone |
Conditional |
|
Specifies the type of file system for |
Conditional |
|
Contains Zettabyte File System (ZFS) datasets in the storage pool |
No |
|
Specifies a ZFS dataset to add to the Zone |
Conditional |
|
Specifies path for the ZFS dataset |
Conditional |
|
Contains file systems that are loopback mounted from the Global Zone |
No |
|
Adds a shared file system that is loopback mounted from the Global Zone |
Conditional |
|
Specifies the directory on the Global Zone to mount in the read-only mode |
Conditional |
|
Sets the Internet protocol type for the Zone to Exclusive-IP |
No |
|
Contains network interfaces |
No |
|
Specifies a network interface to add to the Zone |
Conditional |
|
Sets the IP address for the network interface |
Conditional |
|
Sets the physical device type for the network interface |
Conditional |
|
Sets the default router for the network interface |
No |
|
Contains network devices |
No |
|
Specifies a device to add to the Zone |
Conditional |
|
Sets the device match |
Conditional |
|
Sets the maximum number of semaphore IDs for the Zone |
No |
|
Contains properties for the Zone |
No |
|
Specifies an attribute to add for the Zone |
Conditional |
|
Specifies the name for the attribute |
Conditional |
|
Specifies the type of the attribute |
Conditional |
|
Contains the value for the attribute |
Conditional |
|
Contains resources to remove from the Zone configuration |
No |
|
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 |
---|---|---|
|
Specifies the resource to add, remove, or update from the Zone configuration |
Conditional |
|
Specifies the name of the resource to add, remove, or update |
Conditional |
|
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
<solaris-zones-request> <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>
Note
You must specify the elements in the <target>
block of the adapter request only if you want to override the elements specified in the adapter configuration.
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
<solaris-zones-response> <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
<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> <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
<solaris-zones-response> <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
<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> <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
<solaris-zones-response> <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> <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
<solaris-zones-response> <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>
Comments