Summary:
Migrates a physical server to a Virtuozzo Container.
Request specification:
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
Migration options. |
|
|
|
The parameters that will be used to connect to the physical server that will be migrated to a Virtuozzo Container. The user authentication will be performed using the Agent authentication mechanism. The following parameters must be specified:
|
|
|
|
|
|
Returns:
Name |
Min/Max |
Type |
Description |
|
|
Server ID of the new Virtuozzo Container. |
Description:
The migrate_p2v
call allows to migrate a standalone physical server running Linux, Windows Server 2003, or Windows 2000 system to a Virtuozzo Container. The migration process includes copying the entire contents of the physical server, including all files, folders, network settings, etc.
Virtuozzo Containers for Linux requirements and restrictions:
For additional information, requirements, and limitations, please also see the Migrating Physical Server to Container section in the Virtuozzo Containers User's Guide.
Virtuozzo Containers for Windows requirements and restrictions:
For additional information, requirements, and limitations, please also see the Migrating Physical Server to Container section in the Virtuozzo Containers for Windows User's Guide.
Prior to executing the
migrate_p2v
call, you have to take the following preliminary steps:
system/distribute
call to accomplish this task. calc_env_config
call. Please note that the call returns the configuration information using the env_configType
data type but you must use its subtype, the venv_configType
type to pass this data to the migrate_p2v
call (see code examples below).Not all of the configuration parameters returned by the calc_env_config
call can be effectively used to create the new Container. Most notably, the IP address contained in the address
element of the returned XML packet is a read-only field and has no effect when creating a new Conatiner. If you would like to specify an IP address for the new Container, use the net_device
element of the venv_configType
structure instead. You might also want to specify the Virtuozzo-level Container ID and an OS template values. Once you are done editing the Container configuration, include it in the request using the options/config
parameter (see the Request Specification subsection above).
On successful migration, the source physical server will be automatically stopped to avoid possible conflicts with the new Container.
Example:
1. The first step is to distribute the core Agent components to the source server (see distribute
for code example).
2. The second step is to calculate the Container configuration based on the source server (see calc_env_config
for code example). In the example below, we've modified the calculated configuration by adding the veid
, os_template
, and net_device
parameters containing the Virtuozzo-level Container ID, OS template name, and network interface/IP address information.
Now that all of the necessary preliminary steps are completed, we are ready to execute the migrate_p2v
call.
Input
<packet xmlns:ns3="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns2="http://www.swsoft.com/webservices/vza/4.0.0/vzarelocator" xmlns:ns4="http://www.swsoft.com/webservices/vza/4.0.0/vzatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.0.0">
<target>vzarelocator</target>
<data>
<vzarelocator>
<migrate_p2v>
<options>
<exclude>
<path>/vz</path>
</exclude>
<keep_dst/>
<ns2:config xsi:type="ns4:venv_configType">
<ns3:qos>
<ns3:id>avnumproc</ns3:id>
<ns3:hard>94</ns3:hard>
<ns3:soft>94</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>cpuunits</ns3:id>
<ns3:hard>1000</ns3:hard>
</ns3:qos>
<ns3:qos>
<ns3:id>dcachesize</ns3:id>
<ns3:hard>1270579</ns3:hard>
<ns3:soft>1270579</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>dgramrcvbuf</ns3:id>
<ns3:hard>132096</ns3:hard>
<ns3:soft>132096</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>diskinodes</ns3:id>
<ns3:hard>69369</ns3:hard>
<ns3:soft>63063</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>diskspace</ns3:id>
<ns3:hard>2156412</ns3:hard>
<ns3:soft>1960375</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>kmemsize</ns3:id>
<ns3:hard>7750533</ns3:hard>
<ns3:soft>7750533</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>lockedpages</ns3:id>
<ns3:hard>1261</ns3:hard>
<ns3:soft>1261</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>numfile</ns3:id>
<ns3:hard>3008</ns3:hard>
<ns3:soft>3008</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>numflock</ns3:id>
<ns3:hard>110</ns3:hard>
<ns3:soft>100</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>numiptent</ns3:id>
<ns3:hard>128</ns3:hard>
<ns3:soft>128</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>numothersock</ns3:id>
<ns3:hard>94</ns3:hard>
<ns3:soft>94</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>numproc</ns3:id>
<ns3:hard>94</ns3:hard>
<ns3:soft>94</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>numpty</ns3:id>
<ns3:hard>255</ns3:hard>
<ns3:soft>255</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>numsiginfo</ns3:id>
<ns3:hard>256</ns3:hard>
<ns3:soft>256</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>numtcpsock</ns3:id>
<ns3:hard>80</ns3:hard>
<ns3:soft>80</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>oomguarpages</ns3:id>
<ns3:hard>2147483647</ns3:hard>
<ns3:soft>0</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>othersockbuf</ns3:id>
<ns3:hard>372736</ns3:hard>
<ns3:soft>132096</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>physpages</ns3:id>
<ns3:hard>2147483647</ns3:hard>
<ns3:soft>0</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>privvmpages</ns3:id>
<ns3:hard>27074</ns3:hard>
<ns3:soft>22562</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>quotatime</ns3:id>
<ns3:hard>0</ns3:hard>
</ns3:qos>
<ns3:qos>
<ns3:id>quotaugidlimit</ns3:id>
<ns3:hard>1024</ns3:hard>
</ns3:qos>
<ns3:qos>
<ns3:id>shmpages</ns3:id>
<ns3:hard>8192</ns3:hard>
<ns3:soft>8192</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>tcprcvbuf</ns3:id>
<ns3:hard>270336</ns3:hard>
<ns3:soft>65536</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>tcpsndbuf</ns3:id>
<ns3:hard>270336</ns3:hard>
<ns3:soft>65536</ns3:soft>
</ns3:qos>
<ns3:qos>
<ns3:id>vmguarpages</ns3:id>
<ns3:hard>2147483647</ns3:hard>
<ns3:soft>0</ns3:soft>
</ns3:qos>
<ns3:distribution>
<ns3:version>5</ns3:version>
<ns3:name>rhel</ns3:name>
</ns3:distribution>
<ns3:hostname>dhcp0-36.sw.ru</ns3:hostname>
<ns3:search_domain>sw.ru</ns3:search_domain>
<ns3:nameserver>192.168.1.1</ns3:nameserver>
<veid>201</veid>
<os_template>
<name>redhat-as3-minimal</name>
</os_template>
<net_device>
<id>venet0</id>
<ip_address>
<ip>10.17.3.123</ip>
</ip_address>
<host_routed/>
</net_device>
</ns2:config>
</options>
<src>
<protocol>SSL</protocol>
<address>192.168.0.36</address>
<login>
<name>cm9vdA==</name>
<realm>00000000-0000-0000-0000-000000000000</realm>
</login>
<password>bXlwYXNz</password>
<port>4434</port>
</src>
</migrate_p2v>
</vzarelocator>
</data>
</packet>
Output
<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns2="http://www.swsoft.com/webservices/vza/4.0.0/vzarelocator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="2ac465c3671t1547rc38" time="2007-05-25T09:04:46+0000" priority="4000" version="4.0.0">
<ns1:origin>vzarelocator</ns1:origin>
<ns1:target>vzclient25-1df4b04e-0d55-f246-b718-89bbc62fd371</ns1:target>
<ns1:dst>
<ns1:director>gend</ns1:director>
</ns1:dst>
<ns1:data>
<ns2:vzarelocator>
<ns2:eid>0cb73fc2-9925-0841-809a-8bf04794856d</ns2:eid>
</ns2:vzarelocator>
</ns1:data>
<ns1:src>
<ns1:director>gend</ns1:director>
</ns1:src>
</ns1:packet>