Summary:
Sets the server configuration parameters.
Request specification (uses explicit config):
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
Server ID. |
|
|
|
Server configuration. When modifying Virtuozzo Container configuration, use |
|
|
|
|
Ignore possible pool problems and forcibly assign the IP address. |
|
|
|
Use this element to specify a list of configuration parameters for which you want to use the default values. |
|
|
|
|
|
|
|
Parameter name. |
|
|
|
|
|
|
|
Specifies the operation mode:
|
Request specification (uses sample config):
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
Server ID. |
|
|
|
|
|
|
|
|
|
|
|
Sample configuration ID. |
|
|
|
|
A list of the parameters to set. See The template and network specific parameters cannot be changed ( |
|
|
|
A list of parameter categories. If you would like to set an entire category (or multiple categories) of the parameters, specify it here. The list of applicable categories can be retrieved from the Agent vocabulary (see Example 2 below). |
|
|
|
A flag indicating that the server configuration has been customized after the server was created. Set this element to true to save the flag in the configuration file for future reference. |
|
|
|
|
|
|
|
Specifies the operation mode:
|
} |
|
|
|
Returns:
Name |
Min/Max |
Type |
Description |
|
|
The updated configuration information. |
Description:
The call modifies the server configuration parameters. The configuration parameters can be passed explicitly by specifying the parameters and values in the request (syntax #1 above) or they can be passed by specifying the ID of the sample configuration (syntax #2). In the second case, the values will be read from the sample configuration file. You can apply the entire sample configuration to the server or you can modify the values of individual parameters by specifying their names in the request.
The new values are applied to the server immediately and are saved in the configuration file, making the configuration changes permanent.
To modify the configuration parameters for a Virtuozzo Container, use the vzanevm
interface.
Example 1:
Assigning a new hostname and adding a search domain to a Virtuozzo Container. Also adding two DNS servers to the default venet0
virtual network adapter.
Input
<packet version="4.0.0">
<target>vzaenvm</target>
<data>
<vzaenvm>
<set>
<eid>3288bb6b-8a49-4230-b565-6ad5521182aa</eid>
<config>
<hostname>myhost</hostname>
<search_domain>ts6.com</search_domain>
<net_device>
<id>venet0</id>
<nameserver>192.168.1.51</nameserver>
<nameserver>192.168.1.52</nameserver>
</net_device>
</config>
</set>
</vzaenvm>
</data>
</packet>
Example 2:
Setting QoS parameters using the values from a sample configuration file. The QoS parameters belong to the "qos" category in the file, therefore if we specify the category name, the values of all QoS parameters will be set using the values from the specified sample configuration.
Input
<packet version="4.0.0" id="654">
<target>vzaenvm</target>
<data>
<vzaenvm>
<set>
<eid>6dbd99dc-f212-45de-a5f4-ddb78a2b5280</eid>
<apply_config>
<sample_conf>f8e96630-7fd8-4eee-93b2-3ad7b6b53916</sample_conf>
<category>qos</category>
</apply_config>
</set>
</vzaenvm>
</data>
</packet>
To retrieve the list of the applicable categories from the vocabulary, use the following request:
<packet version="4.0.0">
<data>
<system>
<get_vocabulary>
<name>generic</name>
<category>applicable_conf</category>
</get_vocabulary>
</system>
</data>
</packet>
Example 3:
Modifying the IP address for venet0
network adapter, which is the default virtual adapter inside a Virtuozzo Container. This modification works in such a way that the existing IP addresses are first removed from the adapter's configuration and then the passed addresses are added. To add an IP address, first retrieve the existing addresses, then add the new address (or addresses) to the list, and then include the entire list in the request. On Linux, when modifying the default venet0
adapter, the host_routed
element must be present in the request. Configuring a non-default virtual network adapter is similar with one exception: you cannot use the host_routed
mode, so you have to attach the adapter to an existing Virtuozzo virtual network by including the network_id
element containing the ID of the virtual network.
Input
<packet version="4.0.0">
<target>vzaenvm</target>
<data>
<vzaenvm>
<set>
<eid>72145bf0-7562-43d4-b707-cc33d37e3f10</eid>
<config>
<net_device>
<id>venet0</id>
<ip_address>
<ip>10.130.1.1</ip>
</ip_address>
<ip_address>
<ip>10.130.1.2</ip>
</ip_address>
<ip_address>
<ip>10.130.1.3</ip>
</ip_address>
<host_routed/>
</net_device>
</config>
</set>
</vzaenvm>
</data>
</packet>
Example 4:
This example is a Windows version of the previous example (modifying the IP address configuration for the default venet0
network adapter). The difference here is that you may or may not have to include the host_routed
element depending on the following conditions:
host_routed
mode.bridged
mode. When using the bridged
mode, you must also specify the virtual network ID to connect the adapter to by populating the network_id
field. See net_vethType
for more information. venet0
adapter.In our example, we are switching the adapter to the bridged
mode and attaching it to the specified Virtuozzo virtual network. For more information on Virtuozzo virtual networks, see the vzanetworkm
interface.
Input
<packet version="4.0.0">
<target>vzaenvm</target>
<data>
<vzaenvm>
<set>
<eid>72145bf0-7562-43d4-b707-cc33d37e3f10</eid>
<config>
<net_device>
<id>venet0</id>
<ip_address>
<ip>10.130.1.1</ip>
</ip_address>
<ip_address>
<ip>10.130.1.2</ip>
</ip_address>
<ip_address>
<ip>10.130.1.3</ip>
</ip_address>
<network_id>dnpuZXQx</network_id>
</net_device>
</config>
</set>
</vzaenvm>
</data>
</packet>