Create Zone From Template operation
The Create Zone From Template operation enables you to create a Zone from an existing Zone configuration template.
The following figure shows an <items> XML template for the Create Zone From Template operation:
<items> XML template for the Create Zone From Template operation
<item>
<parameters>
<template></template>
</parameters>
</item>
</items>
The following table describes the elements for the adapter request:
Adapter request elements for the Create Zone From Template operation
Element | Definition | Required |
|---|---|---|
<operation-type> | Defines the type of operation: Configure_Zone | Yes |
<operation-name> | Defines the name of operation: Create_Zone_From_Template | Yes |
<zone-name> | Specifies the name of the Zone that you want to create | Yes |
<template> | Specifies the Zone configuration template for the new Zone that you want to create | Yes |
<host> | Specifies the host 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 complete 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 |
The following figure shows the sample adapter request for the Create Zone From Template operation:
Sample adapter request for the Create Zone From Template operation
<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>Create_Zone_From_Template</operation-name>
<zone-name>mygridzone1</zone-name>
<parameters>
<template>/zone/master</template>
</parameters>
</solaris-zones-request>
The following figure shows the response for the sample adapter request:
Sample adapter response for the Create Zone From Template operation
<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 "mygridzone1" -f "/zone/master"</command>
<line-count>1</line-count>
<execution-milliseconds>86</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">Operation Create_Zone_From_Template executed
successfully!!</line>
</output>
</operation-output>
</target-output>
</solaris-zones-response>