Summary:
Creates a new Virtuozzo Container.
This is a logged operation.
Request specification:
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
|
Ignore pool problems and forcibly create a Container. |
|
|
Container configuration parameters. When creating a Virtuozzo Container, use |
|
|
|
|
A list of configuration parameters that should be set to default values. Use this option when you are using a sample configuration file but would like to use the default values for some of the parameters. If you are specifying all of the parameters manually, you can also use this list to set some of the parameters to defaults. |
|
|
|
|
|
|
|
The names of the configuration parameter to set to default values. |
|
|
|
|
|
|
|
|
Returns:
Name |
Min/Max |
Type |
Description |
|
|
The new server information. |
Description:
To create new Virtuozzo Containers, use vzaenvm
, which is a Parallels Virtuozzo implementation of this interface. The configuration parameters (the config
element) must also be passed using the venv_configType
, which is a Virtuozzo implementation of the generic env_configType
structure.
The Container configuration parameters can be passed explicitly by specifying the parameters and values or they can be passed by specifying the ID of a sample configuration file. Using a sample configuration file is a standard way of creating a Container. All of the parameters in the venv_configType
structure are optional. You can pass just the sample configuration ID and that might be enough to create a Container if the configuration file contains all the necessary parameters. Some of those mandatory parameters are the OS template name, QoS counters, and some others. Some configuration parameters can only be set manually. For example, parameters like computer name, hostname, IP addresses will never have default values in a sample configuration file, so if you want to set them, you have to populate the appropriate elements of the configuration structure manually.
Example 1:
Creating a Virtuozzo Container using the following parameters:
Parameter |
Value |
Description |
|
|
The sample configuration ID. To retrieve a list of sample configurations from the Hardware Node, use |
|
|
OS template name. To retrieve the list of the available OS template, use |
|
|
Computer name. |
|
|
Hostname. |
|
|
Container ID. |
|
|
Start the Container automatically on system boot. |
|
|
Turn the offline-management feature on for the Container. |
|
|
IP address. We will assign the address to the default The |
Input:
<packet version="4.0.0" id="2">
<target>vzaenvm</target>
<data>
<vzaenvm>
<create>
<config >
<name>Test-VE5</name>
<hostname>Host-105</hostname>
<base_sample_id>e89373d0-d13c-1741-a0e5-212d7cd3ae61</base_sample_id>
<veid>106</veid>
<on_boot>true</on_boot>
<offline_management>true</offline_management>
<os_template>
<name>redhat-as3-minimal</name>
</os_template>
<net_device>
<id>venet0</id>
<ip_address>
<ip>10.17.3.125</ip>
</ip_address>
<host_routed/>
</net_device>
</config>
</create>
</vzaenvm>
</data>
</packet>
Output:
The output contains the new Container information, including the Server ID (EID).
<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns4="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/envm" xmlns:ns3="http://www.swsoft.com/webservices/vza/4.0.0/vzatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="fc468cd97at5f90redc" time="2007-07-05T14:33:42+0000" priority="4000" version="4.0.0">
<ns1:origin>vzaenvm</ns1:origin>
<ns1:target>vzclient3-cfa5a2f6-4bc8-9140-88a2-15b1eae98cac</ns1:target>
<ns1:dst>
<ns1:director>gend</ns1:director>
</ns1:dst>
<ns1:data>
<ns2:vzaenvm>
<ns2:env xsi:type="ns3:envType">
<ns4:parent_eid>00000000-0000-0000-0000-000000000000</ns4:parent_eid>
<ns4:eid>78c510e9-6e4f-5349-9e22-48841e709fea</ns4:eid>
<ns4:status xsi:type="ns4:env_statusType">
<ns4:state>1</ns4:state>
</ns4:status>
<ns4:alert>0</ns4:alert>
<ns4:config xsi:type="ns4:env_configType"/>
<ns4:virtual_config xsi:type="ns3:venv_configType">
<base_sample_id>e89373d0-d13c-1741-a0e5-212d7cd3ae61</base_sample_id>
<veid>106</veid>
<on_boot>true</on_boot>
<offline_management>true</offline_management>
<os_template>
<name>redhat-as3-minimal</name>
</os_template>
<net_device>
<id>venet0</id>
<ip_address>
<ip>10.17.3.125</ip>
</ip_address>
<host_routed/>
</net_device>
<ns4:architecture>i386</ns4:architecture>
<ns4:address>
<ns4:ip>0.0.0.0</ns4:ip>
</ns4:address>
<ns4:qos>
<ns4:id>avnumproc</ns4:id>
<ns4:hard>40</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>cpuunits</ns4:id>
<ns4:hard>1000</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>dcachesize</ns4:id>
<ns4:hard>1097728</ns4:hard>
<ns4:soft>1048576</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>dgramrcvbuf</ns4:id>
<ns4:hard>132096</ns4:hard>
<ns4:soft>132096</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>diskinodes</ns4:id>
<ns4:hard>220000</ns4:hard>
<ns4:soft>200000</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>diskspace</ns4:id>
<ns4:hard>1153434</ns4:hard>
<ns4:soft>1048576</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>kmemsize</ns4:id>
<ns4:hard>2936012</ns4:hard>
<ns4:soft>2752512</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>lockedpages</ns4:id>
<ns4:hard>32</ns4:hard>
<ns4:soft>32</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>numfile</ns4:id>
<ns4:hard>2048</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>numflock</ns4:id>
<ns4:hard>110</ns4:hard>
<ns4:soft>100</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>numiptent</ns4:id>
<ns4:hard>128</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>numothersock</ns4:id>
<ns4:hard>80</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>numproc</ns4:id>
<ns4:hard>65</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>numpty</ns4:id>
<ns4:hard>16</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>numsiginfo</ns4:id>
<ns4:hard>256</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>numtcpsock</ns4:id>
<ns4:hard>80</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>oomguarpages</ns4:id>
<ns4:hard>2147483647</ns4:hard>
<ns4:soft>6144</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>othersockbuf</ns4:id>
<ns4:hard>336896</ns4:hard>
<ns4:soft>132096</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>physpages</ns4:id>
<ns4:hard>2147483647</ns4:hard>
<ns4:soft>0</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>privvmpages</ns4:id>
<ns4:hard>24576</ns4:hard>
<ns4:soft>22528</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>quotatime</ns4:id>
<ns4:hard>0</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>shmpages</ns4:id>
<ns4:hard>8192</ns4:hard>
</ns4:qos>
<ns4:qos>
<ns4:id>slmmemorylimit</ns4:id>
<ns4:hard>33521664</ns4:hard>
<ns4:soft>33521664</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>tcprcvbuf</ns4:id>
<ns4:hard>524288</ns4:hard>
<ns4:soft>319488</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>tcpsndbuf</ns4:id>
<ns4:hard>524288</ns4:hard>
<ns4:soft>319488</ns4:soft>
</ns4:qos>
<ns4:qos>
<ns4:id>vmguarpages</ns4:id>
<ns4:hard>2147483647</ns4:hard>
<ns4:soft>6144</ns4:soft>
</ns4:qos>
<ns3:origin_sample>basic</ns3:origin_sample>
<ns4:name>Test-VE5</ns4:name>
<ns4:hostname>Host-105</ns4:hostname>
</ns4:virtual_config>
</ns2:env>
</ns2:vzaenvm>
</ns1:data>
<ns1:src>
<ns1:director>gend</ns1:director>
</ns1:src>
</ns1:packet>
Example 2:
The following example creates a Container on a Windows platform. As in the Linux example above, we also use a sample configuration file and setting some of the parameters manually, including computer name, hostname, Container ID (veid), the "on-boot" parameter, and the IP address for the default venet0
network adapter.
Input
<packet version="4.0.0" id="2">
<target>vzaenvm</target>
<data>
<vzaenvm>
<create>
<config >
<name>Test-VE5</name>
<hostname>Host-105</hostname>
<base_sample_id>46413905-b2d7-4f41-bcd6-e2662e63cd63</base_sample_id>
<veid>105</veid>
<on_boot>true</on_boot>
<net_device>
<id>venet0</id>
<ip_address>
<ip>10.17.3.125</ip>
</ip_address>
<host_routed/>
</net_device>
</config>
</create>
</vzaenvm>
</data>
</packet>