Virtual Machines - migrate To VM Scale Set
Migrate a virtual machine from availability set to Flexible Virtual Machine Scale Set.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/migrateToVirtualMachineScaleSet?api-version=2024-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
vm
|
path | True |
string |
The name of the virtual machine. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
Name | Type | Description |
---|---|---|
targetFaultDomain |
integer (int32) |
The target compute fault domain of VM migration to Flexible Virtual Machine Scale Set. |
targetVMSize |
string |
The target Virtual Machine size of VM migration to Flexible Virtual Machine Scale Set. |
targetZone |
string |
The target zone of VM migration to Flexible Virtual Machine Scale Set. |
Responses
Name | Type | Description |
---|---|---|
202 Accepted |
Resource operation accepted. Headers
|
|
Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Migrate a Virtual Machine to Flexible Virtual Machine Scale Ser.
Sample request
POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVMName/migrateToVirtualMachineScaleSet?api-version=2024-11-01
{
"targetFaultDomain": 0,
"targetVMSize": "Standard_D1_v2"
}
Sample response
Location: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2024-11-01
Definitions
Name | Description |
---|---|
Api |
Api error. |
Api |
Api error base. |
Cloud |
An error response from the Compute service. |
Inner |
Inner error details. |
Migrate |
The input of virtual machine migration from Availability Set to Flexible Virtual Machine Scale Set. |
ApiError
Api error.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
details |
The Api error details |
|
innererror |
The Api inner error |
|
message |
string |
The error message. |
target |
string |
The target of the particular error. |
ApiErrorBase
Api error base.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
message |
string |
The error message. |
target |
string |
The target of the particular error. |
CloudError
An error response from the Compute service.
Name | Type | Description |
---|---|---|
error |
Api error. |
InnerError
Inner error details.
Name | Type | Description |
---|---|---|
errordetail |
string |
The internal error message or exception dump. |
exceptiontype |
string |
The exception type. |
MigrateVMToVirtualMachineScaleSetInput
The input of virtual machine migration from Availability Set to Flexible Virtual Machine Scale Set.
Name | Type | Description |
---|---|---|
targetFaultDomain |
integer (int32) |
The target compute fault domain of VM migration to Flexible Virtual Machine Scale Set. |
targetVMSize |
string |
The target Virtual Machine size of VM migration to Flexible Virtual Machine Scale Set. |
targetZone |
string |
The target zone of VM migration to Flexible Virtual Machine Scale Set. |