Skip to content

Added in Migration for NVA#33766

Open
Jordang3177 wants to merge 1 commit into
Azure:devfrom
Jordang3177:NVA_AZ_CLI_Migration_Changes
Open

Added in Migration for NVA#33766
Jordang3177 wants to merge 1 commit into
Azure:devfrom
Jordang3177:NVA_AZ_CLI_Migration_Changes

Conversation

@Jordang3177

Copy link
Copy Markdown
Contributor

Related command

az network virtual-appliance migration prepare
az network virtual-appliance migration execute
az network virtual-appliance migration commit
az network virtual-appliance migration abort

Description

Adds a new az network virtual-appliance migration command group to support migrating a Network Virtual Appliance (NVA) to the new internal load balancer (ILB) architecture. The migration is a phased, long-running workflow that maps to the new NFV RP operations (prepareMigration, executeMigration, commitMigration, abortMigration) on the Microsoft.Network/networkVirtualAppliances resource (API version 2025-09-01):

  • prepare – Phase 1. Validates eligibility and stages the resources required for the migration. Accepts --migration-type (MigrateToNewILBArchitecture | MigrateToNewOSVersion) and, for OS-version migrations, --marketplace-version.
  • execute – Phase 2. Applies the new infrastructure to the NVA. Must run after prepare.
  • commit – Phase 3. Finalizes the new architecture and discards the previous configuration.
  • abort – Rolls back an in-progress (prepared/executed but not committed) migration; migration type is inferred from the resource and the command prompts for confirmation.

All commands are async (LRO) and support --no-wait. No existing commands are changed.

Testing Guide

# Prerequisite: an existing NVA attached to a Standard vhub (feature flag enabled on the subscription)
az network virtual-appliance create -n MyNva -g MyRG --vhub MyVhub --vendor "checkpoint" --scale-unit 2 -v latest --asn 64512

# Phase 1 – prepare migration to the new ILB architecture
az network virtual-appliance migration prepare -n MyNva -g MyRG --migration-type MigrateToNewILBArchitecture

# Phase 2 – execute
az network virtual-appliance migration execute -n MyNva -g MyRG --migration-type MigrateToNewILBArchitecture

# Phase 3 – commit to finalize
az network virtual-appliance migration commit -n MyNva -g MyRG --migration-type MigrateToNewILBArchitecture

# Alternatively, roll back an in-progress (not yet committed) migration
az network virtual-appliance migration abort -n MyNva -g MyRG

Verify progress between phases with az network virtual-appliance show -n MyNva -g MyRG (check provisioningState is Succeeded). A live scenario test, NetworkVirtualApplianceMigrationScenarioTest.test_network_virtual_appliance_migration (@live_only), covers the prepare → execute → commit flow.

History Notes

[Network] az network virtual-appliance migration prepare/execute/commit/abort: Add commands to migrate a Network Virtual Appliance to the new internal load balancer (ILB) architecture


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings July 22, 2026 07:00
@Jordang3177
Jordang3177 requested review from a team as code owners July 22, 2026 07:00
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @Jordang3177,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Jul 22, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution @Jordang3177! We will review the pull request and get back to you soon.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new az network virtual-appliance migration command group (prepare/execute/commit/abort) backed by NVA RP migration operations (API 2025-09-01), and introduces a live-only scenario test that exercises the prepare → execute → commit flow.

Changes:

  • Add AAZ-generated network virtual-appliance migration command group with --no-wait support.
  • Add a live-only scenario test covering the multi-phase migration workflow.
  • Update HISTORY.rst with a Network release note for the new commands.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/azure-cli/HISTORY.rst Adds release history entry for the new NVA migration commands.
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py Adds a live-only scenario test for NVA migration phases.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/virtual_appliance/migration/_prepare.py Adds AAZ command for migration prepare (POST prepareMigration).
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/virtual_appliance/migration/_execute.py Adds AAZ command for migration execute (POST executeMigration).
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/virtual_appliance/migration/_commit.py Adds AAZ command for migration commit (POST commitMigration).
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/virtual_appliance/migration/_abort.py Adds AAZ command for migration abort (POST abortMigration) with confirmation prompt.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/virtual_appliance/migration/init.py Exposes the migration subcommands/command group for loading.
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/virtual_appliance/migration/__cmd_group.py Registers the network virtual-appliance migration command group and help.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/azure-cli/HISTORY.rst
* `az network ddos-custom-policy`: Support specifying frontend IP configuration associations (#33413)
* `az network traffic-manager profile create/update`: Add `--record-type` parameter to support record type filtering (#33503)
* `az network private-endpoint-connection`: Add provider `Microsoft.HorizonDB/clusters` (#33644)
* `az network virtual-appliance migration prepare/execute/commit/abort`: Add commands to migrate a Network Virtual Appliance to the new internal load balancer (ILB) architecture
Comment on lines +8757 to +8766
# Variables to use in the test
subscriptionId = self.get_subscription_id()
self.kwargs.update({
'vwan': 'clitestvwan', # Virtual WAN name
'vhub': 'clivhub', # Virtual Hub name
'nva_name': 'clivirtualappliancemigration', # NVA name
'rg': resource_group,
'subscription': subscriptionId,
'migration_type': 'MigrateToNewILBArchitecture',
})
Comment on lines +8784 to +8789
while routing_state != 'Provisioned':
if retry_count == 20:
break
retry_count += 1
sleep(360)
routing_state = self.cmd('network vhub show -g {rg} -n {vhub}').get_output_in_json()['routingState']
@yonzhan
yonzhan requested a review from necusjz July 22, 2026 07:35
@yonzhan

yonzhan commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

network

@a0x1ab

a0x1ab commented Jul 22, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Command 'run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants