Availability Sets - Validate Migration To Virtual Machine Scale Set

Validates that the Virtual Machines in the Availability Set can be migrated to the provided Virtual Machine Scale Set.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/validateMigrationToVirtualMachineScaleSet?api-version=2026-03-01

URI Parameters

Name In Required Type Description
availabilitySetName
path True

string

The name of the availability set.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
virtualMachineScaleSetFlexible True

SubResource

Specifies information about the Virtual Machine Scale Set that the Availability Set should be migrated to. Minimum api‐version: 2024‐11‐01.

Responses

Name Type Description
204 No Content

There is no content to send for this request, but the headers may be useful.

Other Status Codes

CloudError

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

AvailabilitySet_ValidateMigrationToVirtualMachineScaleSet

Sample request

POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet/validateMigrationToVirtualMachineScaleSet?api-version=2026-03-01

{
  "virtualMachineScaleSetFlexible": {
    "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
  }
}

Sample response

Definitions

Name Description
ApiError

Api error.

ApiErrorBase

Api error base.

CloudError

An error response from the Compute service.

InnerError

Inner error details.

MigrateToVirtualMachineScaleSetInput

Describes the Virtual Machine Scale Set to migrate from Availability Set.

SubResource

ApiError

Api error.

Name Type Description
code

string

The error code.

details

ApiErrorBase[]

The Api error details

innererror

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

ApiError

Api error.

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

MigrateToVirtualMachineScaleSetInput

Describes the Virtual Machine Scale Set to migrate from Availability Set.

Name Type Description
virtualMachineScaleSetFlexible

SubResource

Specifies information about the Virtual Machine Scale Set that the Availability Set should be migrated to. Minimum api‐version: 2024‐11‐01.

SubResource

Name Type Description
id

string

Resource Id