doc-exports/docs/ecs/api-ref/en-us_topic_0132905656.html
Zaoxu, Li 4edaa4a4cc ECS API 20231016 version
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com>
Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
2024-04-29 11:04:13 +00:00

116 lines
10 KiB
HTML

<a name="EN-US_TOPIC_0132905656"></a><a name="EN-US_TOPIC_0132905656"></a>
<h1 class="topictitle1">Cold Migrating an ECS</h1>
<div id="body1537867762981"><div class="section" id="EN-US_TOPIC_0132905656__en-us_topic_0092803065_en-us_topic_0067161469_en-us_topic_0057973179_section16588975"><h4 class="sectiontitle">Function</h4><ul id="EN-US_TOPIC_0132905656__ul1222171486"><li id="EN-US_TOPIC_0132905656__li122116114820">An ECS deployed on a DeH can be migrated to another DeH.</li><li id="EN-US_TOPIC_0132905656__li6221111685">An ECS deployed on a DeH can be migrated to a public resource pool.</li><li id="EN-US_TOPIC_0132905656__li152212113819">An ECS deployed in a public resource pool can be migrated to a DeH.</li></ul>
<p id="EN-US_TOPIC_0132905656__p1123713811551">This API is an asynchronous API. After the cold migration request is successfully delivered, a job ID is returned. This does not mean the cold migration is complete. You need to call the API by referring to <a href="en-us_topic_0022225398.html">Querying Task Execution Status</a> to query the job status. The SUCCESS status indicates that the cold migration is successful.</p>
<div class="note" id="EN-US_TOPIC_0132905656__note865118116539"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0132905656__p465120119534">If the migration does not cross NUMA nodes, the migration may fail due to insufficient resources on a single NUMA node.</p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0132905656__section10197106104013"><h4 class="sectiontitle">Constraints</h4><ul id="EN-US_TOPIC_0132905656__ul2178142918719"><li id="EN-US_TOPIC_0132905656__li37200620222">Currently, this API applies only to dedicated hosts.</li><li id="EN-US_TOPIC_0132905656__li31785299713">Only a stopped ECS can be cold migrated.</li><li id="EN-US_TOPIC_0132905656__li171971829134110">Existing constraints of the native cold migration API are inherited.</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0132905656__section48412952"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0132905656__p40996912155429">POST /v1/{project_id}/cloudservers/{server_id}/migrate</p>
<div class="p" id="EN-US_TOPIC_0132905656__p04861525154918"><a href="#EN-US_TOPIC_0132905656__table29396722">Table 1</a> describes the parameters in the URI.
<div class="tablenoborder"><a name="EN-US_TOPIC_0132905656__table29396722"></a><a name="table29396722"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0132905656__table29396722" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0132905656__row15658103"><th align="left" class="cellrowborder" valign="top" width="16.79%" id="mcps1.3.3.3.2.2.4.1.1"><p id="EN-US_TOPIC_0132905656__p60346796">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.16%" id="mcps1.3.3.3.2.2.4.1.2"><p id="EN-US_TOPIC_0132905656__p56252285">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="66.05%" id="mcps1.3.3.3.2.2.4.1.3"><p id="EN-US_TOPIC_0132905656__p60141268">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0132905656__row39604502"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0132905656__p53848109">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.16%" headers="mcps1.3.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0132905656__p66729601">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="66.05%" headers="mcps1.3.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0132905656__p37593705">Specifies the project ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0132905656__row59061958"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0132905656__p19289328">server_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.16%" headers="mcps1.3.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0132905656__p18931763">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="66.05%" headers="mcps1.3.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0132905656__p57077814">Specifies the <span id="EN-US_TOPIC_0132905656__text16158726165319">ECS</span> ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0132905656__section33063388"><h4 class="sectiontitle">Request</h4><div class="p" id="EN-US_TOPIC_0132905656__p0474165644912"><a href="#EN-US_TOPIC_0132905656__table6742880">Table 2</a> describes the request parameters.
<div class="tablenoborder"><a name="EN-US_TOPIC_0132905656__table6742880"></a><a name="table6742880"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0132905656__table6742880" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0132905656__row13072760"><th align="left" class="cellrowborder" valign="top" width="16.73%" id="mcps1.3.4.2.2.2.5.1.1"><p id="EN-US_TOPIC_0132905656__p52260639">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.29%" id="mcps1.3.4.2.2.2.5.1.2"><p id="EN-US_TOPIC_0132905656__p5253358">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.98%" id="mcps1.3.4.2.2.2.5.1.3"><p id="EN-US_TOPIC_0132905656__p22868878">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.2.2.5.1.4"><p id="EN-US_TOPIC_0132905656__p40439847">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0132905656__row54402144"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.2.2.5.1.1 "><p id="EN-US_TOPIC_0132905656__p44497505">migrate</p>
</td>
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.4.2.2.2.5.1.2 "><p id="EN-US_TOPIC_0132905656__p47528147">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.98%" headers="mcps1.3.4.2.2.2.5.1.3 "><p id="EN-US_TOPIC_0132905656__p24574685">Object</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.2.5.1.4 "><p id="EN-US_TOPIC_0132905656__p63988077">Specifies the ECS to be migrated. For details, see <a href="#EN-US_TOPIC_0132905656__table7657338">Table 3</a>.</p>
<p id="EN-US_TOPIC_0132905656__p069552312476">This parameter is <strong id="EN-US_TOPIC_0132905656__b4720810135318">null</strong> when you migrate an ECS from a dedicated host to a public resource pool.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0132905656__table7657338"></a><a name="table7657338"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0132905656__table7657338" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0132905656__b15534214517">migrate</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0132905656__row17725233"><th align="left" class="cellrowborder" valign="top" width="19.3%" id="mcps1.3.4.2.3.2.5.1.1"><p id="EN-US_TOPIC_0132905656__p212320319517">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.62%" id="mcps1.3.4.2.3.2.5.1.2"><p id="EN-US_TOPIC_0132905656__p141231538517">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.19%" id="mcps1.3.4.2.3.2.5.1.3"><p id="EN-US_TOPIC_0132905656__p01231137517">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.89%" id="mcps1.3.4.2.3.2.5.1.4"><p id="EN-US_TOPIC_0132905656__p101231038519">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0132905656__row4862529914328"><td class="cellrowborder" valign="top" width="19.3%" headers="mcps1.3.4.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0132905656__p39963283143216">dedicated_host_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.62%" headers="mcps1.3.4.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0132905656__p6216169514328">No</p>
</td>
<td class="cellrowborder" valign="top" width="13.19%" headers="mcps1.3.4.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0132905656__p193254814328">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.4.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0132905656__p10407151510462">Specifies the DeH ID.</p>
<p id="EN-US_TOPIC_0132905656__p2231868514328">This parameter takes effect when an ECS is migrated from a public resource pool to a DeH or between DeHs.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0132905656__section29135036"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0132905656__p17425743">See <a href="en-us_topic_0022067714.html">Responses (Task)</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0132905656__section1791154205019"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0132905656__p146913253322">Migrate the ECS from the public resource pool to the DeH whose ID is <strong id="EN-US_TOPIC_0132905656__b1668920218508">459a2b9d-804a-4745-ab19-a113bb1b4ddc</strong>.</p>
<pre class="screen" id="EN-US_TOPIC_0132905656__screen10956347143412">POST https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/migrate
{
"migrate": {
"dedicated_host_id": "459a2b9d-804a-4745-ab19-a113bb1b4ddc"
}
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0132905656__section20192755104713"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0132905656__screen115418310429">{
"job_id": "ff80808288d41e1b018990260955686a"
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0132905656__section27037160"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0132905656__p23224207">See <a href="en-us_topic_0022067716.html">Returned Values for General Requests</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0132905656__section85821649202813"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0132905656__p7233105282813">See <a href="en-us_topic_0022067717.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0020212691.html">Status Management</a></div>
</div>
</div>