Add Availability Set to VMSS Flex migration cmdlets #222
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implements 5 new cmdlets for Availability Set to Virtual Machine Scale Set (VMSS) Flex migration as outlined in the design review issue.
New Cmdlets:
Convert-AzAvailabilitySet- Creates new VMSS Flex and migrates all VMs (no downtime)Start-AzAvailabilitySetMigration- Initiates migration to existing VMSS FlexTest-AzAvailabilitySetMigration- Validates VMs can be migratedStop-AzAvailabilitySetMigration- Cancels in-progress migrationMove-AzVirtualMachineToVmss- Migrates individual VM with optional zone/fault domain/size targetingCmdlet names follow PowerShell conventions per reviewer feedback (e.g.,
Migrate-→Move-,Cancel-→Stop-,Validate-→Test-).Usage Example:
Requires subscription feature flag:
Microsoft.Compute/MigrateToVmssFlexMandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
1n8vsblobprodwus2184.vsblob.vsassets.io/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)40vvsblobprodwus2135.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)6yfvsblobprodwus2121.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)7q7vsblobprodwus2144.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)84hvsblobprodwus2148.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)8wdvsblobprodwus2137.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)9yyvsblobprodwus2157.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)b53vsblobprodwus2154.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)ba0vsblobprodwus2130.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)balvsblobprodwus2129.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)cbvvsblobprodwus2131.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)cffvsblobprodwus218.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)d94vsblobprodwus2119.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)ezcvsblobprodwus2170.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)faxvsblobprodwus2122.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)g3xvsblobprodwus2151.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)i01vsblobprodwus216.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)isvvsblobprodwus2147.vsblob.vsassets.io/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)jhgvsblobprodwus2167.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)k4pvsblobprodwus2140.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)ldhvsblobprodwus2153.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)mt2vsblobprodwus2110.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)nudvsblobprodwus214.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)p2tvsblobprodwus2189.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)s8nvsblobprodwus2158.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)tn2vsblobprodwus2124.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)wlnvsblobprodwus2188.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)wztvsblobprodwus2155.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)x0dvsblobprodwus2111.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)y5lvsblobprodwus2179.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)yf8vsblobprodwus212.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)/usr/bin/dotnet dotnet restore src/Compute/Compute/Compute.csproj --verbosity quiet(dns block)zt8vsblobprodwus2176.vsblob.vsassets.io/usr/bin/dotnet dotnet build src/Compute/Compute/Compute.csproj(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>Compute- Migration</issue_title>
<issue_description>
Guidelines
The purpose of the Azure PowerShell design review is to ensure that the cmdlets follow the same pattern across the Azure modules. An early design review reduces the risk of unnecessary implementation changes caused by a cmdlet syntax design change.
Please ensure your cmdlets comply with the design guidelines outlined in the PowerShell Design Guidelines document.
Please generate cmdlets syntax using
GenerateCmdletDesignMarkdown.ps1for review if your cmdlet is generated from API spec directly by Autorest.PowerShell.If you just add parameter to existing cmdlets and parameter definition complies with guideline, the design review is not expected.
Have you read above statement?
YesService Release Details
Is this an Embargoed Preview, A Public Preview, or a General Release?
What is the expected service release date?
08/15/2025Which Powershell module are these changes being made in?
Az.ComputeContact Information
Main developer contacts (emails + github aliases)
soshekarPM contact (email + github alias)
mimckittOther people who should attend a design review (email)
srcharugHigh Level Scenarios
Describe how your feature is intended to be used by customers.
`These APIs provide 2 ways for the user to migrate an Availability Set to a VMSS.
Option 1 : AvailabilitySet.ConvertToVirtualMachineScaleSet`
Option 2: This option requires triggering multiple commands to move each VM individually.
AvailabilitySet.ValidateMigrationToVirtualMachineScaleSet
AvailabilitySet.StartMigrationToVirtualMachineScaleSet
'
Piping scenarios / how these cmdlets are used with existing cmdlets
{ SCENARIOS OUTLINED HERE }Sample of end-to-end usage
Please provide comprehensive examples that don't assume additional setup. It helps the audience understand your feature.
` Example to Convert an Availability Set to Vmss :
Convert-AzAvailabilitySet ` [-ResourceGroupName] "MyResourceGroup" [-Name] "MyAvailabilitySet" [-VirtualMachineScaleSetName] "MyScaleSet"
-Example to Migrate an Availability Set with 2 VMs to a VMSS Flex
Start-AzAvailabilitySetMigration [-ResourceGroupName] "MyResourceGroup" [-Name] "MyAvailabilitySet" [-VirtualMachineScaleSetFlexibleId] "/subscriptions//resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/MyFlexibleVMSS"
Migrate-AzVM [-ResourceGroupName] "MyResourceGroup" [-Name] "VM1" [-TargetZone] "1" [-TargetFaultDomain] 0 [-TargetVMSize] "Standard_DS2_v2"
Syntax changes
Indicate if you are requesting an edit to existing cmdlets, adding new cmdlets, or both. Then edit the corresponding section below.
New Cmdlet
List the new cmdlet names.
List the parameters for the new cmdlet(s) and the parameter types.
Please describe the business logic of the cmdlet and parameters here.
Link to cmdlet help markdown file generated by platyPS or sample syntax. The below is an example.:
Specific test cases
Please provide a link to the API tests that exist for this feature.
{ ENTER LINK HERE }Additional information
Link to the OpenAPI (swagger) spec
Link to any other Github work related to this request
Indicate any...
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.