Help Center/ ModelArts/ API Reference/ Node Management/ Migrating Nodes in Batches
Updated on 2026-01-30 GMT+08:00

Migrating Nodes in Batches

Function

This API is used to batch migrate nodes between resource pools. Nodes are migrated from one resource pool to another. Use this API when nodes in a resource pool are unevenly distributed, during cluster maintenance, or for service expansion. It allows you to move specific nodes between resource pools. Make sure the resource pool has at least two nodes and enough resources like IP addresses before migrating them with this API. The API returns an error if the resource pool has only one node, lacks sufficient cluster resources, the node cannot migrate, or you lack operation permissions.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v2/{project_id}/pools/{pool_name}/nodes/batch-migrate

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: User project ID. For details, see Obtaining a Project ID and Name.

Constraints: N/A

Range: N/A

Default Value: N/A

pool_name

Yes

String

Resource pool name. The value is the same as the metadata.name value of the resource pool.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

migrateNodeNames

No

Array of strings

Names of the nodes to be migrated.

fromClusterName

Yes

String

Name of the source cluster.

toClusterName

Yes

String

Name of the destination cluster.

toPoolName

No

String

Name of the target resource pool.

resourceSpec

No

MigrateResourceSpec object

Configurations of the node to be migrated in the target resource pool. This parameter is mandatory when a node is migrated across resource pools.

Table 3 MigrateResourceSpec

Parameter

Mandatory

Type

Description

flavor

Yes

String

Resource flavor name. This parameter is mandatory for cross-resource-pool migration.

creatingStep

No

CreatingStep object

Resource step information. When the entire cabinet or supernode is migrated, the step information needs to be specified.

nodePool

No

String

Name of the target node pool to which resources are migrated.

rootVolume

No

RootVolume object

System disk information of the target node pool. This parameter is valid only when a node pool is created.

dataVolumes

No

Array of DataVolumeItem objects

Data disk information of the target node pool. This parameter is valid only when a node pool is created.

volumeGroupConfigs

No

Array of VolumeGroupConfig objects

Advanced disk configurations. This parameter is mandatory when a custom data disk exists. This parameter is valid when a node pool is created.

labels

No

Map<String,String>

Kubernetes label, in the format of a key-value pair. This parameter cannot be specified for a non-privileged pool. This parameter is valid when a node pool is created.

taints

No

Array of Taints objects

Taints to be added to nodes to set anti-affinity. This parameter cannot be specified for a non-privileged pool. This parameter is valid when a node pool is created.

tags

No

Array of UserTags objects

Resource tag. This parameter is valid when a node pool is created.

network

No

NodeNetwork object

Network configuration. This parameter cannot be specified for a non-privileged pool. This parameter is valid when a node pool is created.

extendParams

No

ResourceExtendParams object

Custom configuration, for example, setting dockerSize for the node. This parameter is valid when a node pool is created.

Table 4 CreatingStep

Parameter

Mandatory

Type

Description

step

No

Integer

Definition: Step of a supernode.

Constraints: N/A

Range: Only the step contained in the resource specification details is supported.

Default Value: N/A

type

No

String

Definition: Batch creation type.

Constraints: N/A

Range:

  • hyperinstance: supernode

Default Value: N/A

Table 5 RootVolume

Parameter

Mandatory

Type

Description

volumeType

Yes

String

Definition: Disk type..

Range:

  • SSD: Ultra-high I/O disk

  • GPSSD: General-purpose SSD

  • SAS: High I/O disk

size

Yes

String

Definition: Disk size, in GiB.

Range: N/A.

Table 6 DataVolumeItem

Parameter

Mandatory

Type

Description

volumeType

Yes

String

Definition: Disk type..

Range:

  • SSD: Ultra-high I/O disk

  • GPSSD: General-purpose SSD

  • SAS: High I/O disk

size

Yes

String

Definition: Disk size, in GiB.

Range: N/A.

count

No

Integer

Definition: Number of disks.

Range: N/A.

extendParams

Yes

VolumeExtendParams object

Definition: Custom disk configuration.

Table 7 VolumeExtendParams

Parameter

Mandatory

Type

Description

volumeGroup

Yes

String

Definition: Name of a disk group, which is used to divide storage space.

Range:

  • vgpaas: container disk.

  • default: common data disk, which is mounted in default mode.

  • vguser: common data disk, which is mounted to a specified path. The group name varies depending on the path, for example, vguser1 and vguser2.

  • vg-everest-localvolume-persistent: common data disk, which is used as the persistent storage volume.

  • vg-everest-localvolume-ephemeral: common data disk, which is used as a temporary storage volume.

Table 8 VolumeGroupConfig

Parameter

Mandatory

Type

Description

volumeGroup

Yes

String

Definition: Disk group name. Index of the volume group in the dataVolumes.

Range: N/A.

dockerThinPool

No

Integer

Definition: Percentage of data disks designated as container disks. This parameter can be specified only when volumeGroup is vgpaas (container disk).

Range: N/A.

lvmConfig

No

LvmConfig object

Definition: LVM configuration management.

types

No

Array of strings

Definition: Storage type. Options:

  • volume: Cloud hard disk. When dataVolumes is specified, the default value is used.

  • local: Local disk. This parameter must be specified when a local disk is used.

Table 9 LvmConfig

Parameter

Mandatory

Type

Description

lvType

Yes

String

Definition: LVM write mode.

Range:

  • linear: Linear mode.

  • striped: Striped mode in which multiple disks are used to form a strip to improve disk performance.

path

No

String

Definition: Disk mount path. This parameter takes effect only in user configuration. The value is an absolute path. Digits, letters, periods (.), hyphens (-), and underscores (_) are allowed.

Range: N/A.

Table 10 Taints

Parameter

Mandatory

Type

Description

key

Yes

String

Definition: Key.

Range: N/A

value

No

String

Value.

effect

Yes

String

Effect.

Table 11 UserTags

Parameter

Mandatory

Type

Description

key

Yes

String

Definition: Key. The value cannot start with CCE- or __type_baremetal.

Range: N/A

value

Yes

String

Value.

Table 12 NodeNetwork

Parameter

Mandatory

Type

Description

vpc

No

String

  • Definition: VPC ID.

Range: N/A.

subnet

No

String

Definition: Subnet ID.

Range: N/A.

securityGroups

No

Array of strings

Definition: Security group ID set.

Table 13 ResourceExtendParams

Parameter

Mandatory

Type

Description

dockerBaseSize

No

String

Definition: Container image space of a node.

Range:

  • Specified: The default value of dockerBaseSize ranges from 50 to 500. However, the actual value is restricted by the container data disk size of the node.

  • Unlimited: *dockerBaseSize="0, indicating that the container image space is not limited.

postInstall

No

String

Definition: Post-installation script. The entered value must be encoded using Base64.

Range: N/A.

runtime

No

String

Definition: Container runtime.

Range:

  • docker: Container runtime. It is the most commonly used container engine, which is used to create and manage container instances based on container images.

  • containerd: Industrial-grade container runtime. It focuses on container lifecycle management and is one of the core components at the bottom layer of Docker. It can also be deployed independently.

labelPolicyOnExistingNodes

No

String

Definition: Kubernetes label update policy of existing nodes. If the value is empty, the existing nodes are updated by default.

Range:

  • refresh: Update.

  • ignore: Do not update.

taintPolicyOnExistingNodes

No

String

Definition: Kubernetes taint update policy of existing nodes. If the value is empty, the existing nodes are updated by default.

Range:

  • refresh: Update.

  • ignore: Do not update.

tagPolicyOnExistingNodes

No

String

Definition: Resource tag update policy of existing nodes. If the value is empty, the existing nodes are updated by default.

Range:

  • refresh: Update.

  • ignore: Do not update.

XParameterPlaneSubnet

No

String

Definition: Subnet ID used for data transmission on the parameter plane between physical clusters. The value cannot be the same as the node subnet or container subnet.

Range: N/A.

nodePoolName

No

String

Definition: Name of the node pool specified by you. The value is a string of 2 to 50 characters, consisting of lowercase letters, hyphens (-), and digits. It must start with a lowercase letter and cannot end with a hyphen (-) or -default.

Range: N/A.

Response Parameters

Status code: 200

Table 14 Response body parameters

Parameter

Type

Description

job_id

String

Definition: ID of an asynchronous task.

Range: N/A

Status code: 404

Table 15 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

POST /v2/{project_id}/pools/{pool_name}/nodes/batch-migrate

{
  "migrateNodeNames" : [ "os-node-created-zrxm7" ],
  "fromClusterName" : "lite-cluster-1dc682c4-e04d-11ee-bda6-0255ac1001ba",
  "toClusterName" : "lite-cluster-d3a65087-38e4-11ef-a12c-0255ac100b03",
  "toPoolName" : "pool-9d3f-6f5da086876d4cd084d36f8bd3346036",
  "resourceSpec" : {
    "flavor" : "modelarts.vm.2u4g"
  }
}

Example Responses

Status code: 200

Request succeeded.

{
  "job_id" : "66798666-6778-443f-9f8a-56c9ea6d719c"
}

Status code: 404

Not found.

{
  "error_code" : "ModelArts.50015001",
  "error_msg" : "pool not found"
}

Status Codes

Status Code

Description

200

Request succeeded.

404

Not found.

Error Codes

See Error Codes.