Skip to content

{Compute} az vmss: Support Open Capacity Reservation - #33929

Open
William (william051200) wants to merge 31 commits into
Azure:devfrom
william051200:vmss-ocr
Open

{Compute} az vmss: Support Open Capacity Reservation#33929
William (william051200) wants to merge 31 commits into
Azure:devfrom
william051200:vmss-ocr

Conversation

@william051200

@william051200 William (william051200) commented Aug 19, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ❌ Action needed

Breaking Changes Tests
⚠️ None ❌ 126/130
⚠️AzureCLI-BreakingChangeTest
⚠️vm
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd capacity reservation group create cmd capacity reservation group create added parameter reservation_type
⚠️ 1006 - ParaAdd capacity reservation group update cmd capacity reservation group update added parameter reservation_type
⚠️ 1006 - ParaAdd vm create cmd vm create added parameter disable_capacity_reservation_assignment
⚠️ 1006 - ParaAdd vm update cmd vm update added parameter disable_capacity_reservation_assignment
⚠️ 1006 - ParaAdd vmss create cmd vmss create added parameter disable_capacity_reservation_assignment
⚠️ 1006 - ParaAdd vmss update cmd vmss update added parameter disable_capacity_reservation_assignment
❌AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.14
🔄acs
🔄latest
🔄3.12
️✔️3.14
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.14
️✔️ams
️✔️latest
️✔️3.12
️✔️3.14
🔄apim
🔄latest
🔄3.12
️✔️3.14
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.14
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.14
🔄aro
🔄latest
🔄3.12
️✔️3.14
️✔️backup
️✔️latest
️✔️3.12
️✔️3.14
️✔️batch
️✔️latest
️✔️3.12
️✔️3.14
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.14
️✔️billing
️✔️latest
️✔️3.12
️✔️3.14
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.14
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.14
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.14
️✔️config
️✔️latest
️✔️3.12
️✔️3.14
️✔️configure
️✔️latest
️✔️3.12
️✔️3.14
🔄consumption
🔄latest
🔄3.12
🔄3.14
️✔️container
️✔️latest
️✔️3.12
️✔️3.14
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.14
️✔️core
️✔️latest
️✔️3.12
️✔️3.14
🔄cosmosdb
🔄latest
🔄3.12
️✔️3.14
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.14
️✔️dls
️✔️latest
️✔️3.12
️✔️3.14
️✔️dms
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.14
🔄eventhubs
🔄latest
🔄3.12
️✔️3.14
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.14
️✔️find
️✔️latest
️✔️3.12
️✔️3.14
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.14
🔄identity
🔄latest
🔄3.12
️✔️3.14
️✔️iot
️✔️latest
️✔️3.12
️✔️3.14
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.14
️✔️lab
️✔️latest
️✔️3.12
️✔️3.14
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.14
🔄maps
🔄latest
🔄3.12
🔄3.14
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.14
❌monitor
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_monitor_autoscale_basic self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f7352524080>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f73563944d0>
command = 'vmss show -g cli_test_monitor_autoscale000001 -n vmss1'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:335: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:362: in handler
    show_exception_handler(ex)
src/azure-cli-core/azure/cli/core/commands/arm.py:476: in show_exception_handler
    raise ex
src/azure-cli-core/azure/cli/core/commands/command_operation.py:360: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/custom.py:4280: in get_vmss_by_aaz
    return VMSSShow(cli_ctx=cmd.cli_ctx)(command_args=command_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/command.py:154: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:5552: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:5584: in execute_operations
    self.VirtualMachineScaleSetsGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:5604: in call
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/client.py:107: in send_request
    session = self.pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/mgmt/core/policies/base.py:95: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/policies/redirect.py:205: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/policies/retry.py:545: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/http_policy.py:112: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:130: in send
    self.sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/transport/requests_basic.py:375: in send
    response = self.session.request(  # type: ignore
env/lib/python3.12/site-packages/requests/sessions.py:592: in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/requests/sessions.py:706: in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/requests/adapters.py:645: in send
    resp = conn.urlopen(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:788: in urlopen
    response = self.make_request(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:534: in make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         

self = <VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_basic.yaml(host='management.azure.com', port=443) at 0x7f7351dc24b0>
 = False, kwargs = {}

    def getresponse(self, =False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response, self.vcr_request.uri)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_basic.yaml') in your current record mode (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.12/site-packages/vcr/stubs/init.py:279: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.monitor.tests.latest.test_monitor_autoscale.TestMonitorAutoscaleScenario testMethod=test_monitor_autoscale_basic>
resource_group = 'cli_test_monitor_autoscale000001'

    @AllowLargeResponse()
    @ResourceGroupPreparer(name_prefix='cli_test_monitor_autoscale')
    def test_monitor_autoscale_basic(self, resource_group):
        self.kwargs.update({
            'vmss': 'vmss1'
        })
        self.cmd('vmss create -g {rg} -n {vmss} --image Ubuntu2204 --admin-username testadmin --admin-password TestTest12#$')
>       self.kwargs['vmss_id'] = self.cmd('vmss show -g {rg} -n {vmss}').get_output_in_json()['id']
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:20: 
 
 
 
 
 
 
 
 
                                
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f7352524080>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f73563944d0>
command = 'vmss show -g cli_test_monitor_autoscale000001 -n vmss1'
expect_failure = False

    def _in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
            self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_basic.yaml') in your current record mode (RecordMode.ONCE: 'once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E           Found 1 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:308: AssertionError
azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:12
Failed test_monitor_autoscale_fixed self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f7352ac6ae0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f7356396ba0>
command = 'vmss show -g cli_test_monitor_autoscale_fixed000001 -n vmss1'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:335: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:362: in handler
    show_exception_handler(ex)
src/azure-cli-core/azure/cli/core/commands/arm.py:476: in show_exception_handler
    raise ex
src/azure-cli-core/azure/cli/core/commands/command_operation.py:360: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/custom.py:4280: in get_vmss_by_aaz
    return VMSSShow(cli_ctx=cmd.cli_ctx)(command_args=command_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/command.py:154: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:5552: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:5584: in execute_operations
    self.VirtualMachineScaleSetsGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:5604: in call
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/client.py:107: in send_request
    session = self.pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/mgmt/core/policies/base.py:95: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/policies/redirect.py:205: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/policies/retry.py:545: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/http_policy.py:112: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:130: in send
    self.sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/transport/requests_basic.py:375: in send
    response = self.session.request(  # type: ignore
env/lib/python3.12/site-packages/requests/sessions.py:592: in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/requests/sessions.py:706: in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/requests/adapters.py:645: in send
    resp = conn.urlopen(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:788: in urlopen
    response = self.make_request(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:534: in make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         

self = <VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_fixed.yaml(host='management.azure.com', port=443) at 0x7f7351f957f0>
 = False, kwargs = {}

    def getresponse(self, =False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response, self.vcr_request.uri)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_fixed.yaml') in your current record mode (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.12/site-packages/vcr/stubs/init.py:279: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.monitor.tests.latest.test_monitor_autoscale.TestMonitorAutoscaleScenario testMethod=test_monitor_autoscale_fixed>
resource_group = 'cli_test_monitor_autoscale_fixed000001'

    @AllowLargeResponse()
    @ResourceGroupPreparer(name_prefix='cli_test_monitor_autoscale_fixed')
    def test_monitor_autoscale_fixed(self, resource_group):
        self.kwargs.update({
            'vmss': 'vmss1',
            'sched': 'Christmas'
        })
        self.cmd('vmss create -g {rg} -n {vmss} --image Ubuntu2204 --admin-username testadmin --admin-password TestTest12#$')
>       self.kwargs['vmss_id'] = self.cmd('vmss show -g {rg} -n {vmss}').get_output_in_json()['id']
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:282: 
 
 
 
 
 
 
 
 
                                
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f7352ac6ae0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f7356396ba0>
command = 'vmss show -g cli_test_monitor_autoscale_fixed000001 -n vmss1'
expect_failure = False

    def _in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
            self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_fixed.yaml') in your current record mode (RecordMode.ONCE: 'once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E           Found 1 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:308: AssertionError
azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:273
Failed test_monitor_autoscale_predictive_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:367
Failed test_monitor_autoscale_recurring The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:307
Failed test_monitor_autoscale_refined The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:53
Failed test_monitor_autoscale_rule_with_dimensions The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:192
Failed test_monitor_autoscale_rules The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:100
Failed test_monitor_autoscale_show_predictive_metric The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:401
❌3.14
Type Test Case Error Message Line
Failed test_monitor_autoscale_basic self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fa09508c410>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fa098b9fd90>
command = 'vmss show -g cli_test_monitor_autoscale000001 -n vmss1'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.14/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:335: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:362: in handler
    show_exception_handler(ex)
src/azure-cli-core/azure/cli/core/commands/arm.py:476: in show_exception_handler
    raise ex
src/azure-cli-core/azure/cli/core/commands/command_operation.py:360: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/custom.py:4280: in get_vmss_by_aaz
    return VMSSShow(cli_ctx=cmd.cli_ctx)(command_args=command_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/command.py:154: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:359: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:391: in execute_operations
    self.VirtualMachineScaleSetsGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:411: in call
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/client.py:107: in send_request
    session = self.pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/mgmt/core/policies/base.py:95: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/policies/redirect.py:205: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/policies/retry.py:545: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/http_policy.py:112: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:130: in send
    self.sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/transport/requests_basic.py:375: in send
    response = self.session.request(  # type: ignore
env/lib/python3.14/site-packages/requests/sessions.py:592: in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/requests/sessions.py:706: in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/requests/adapters.py:645: in send
    resp = conn.urlopen(
env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen
    response = self.make_request(
env/lib/python3.14/site-packages/urllib3/connectionpool.py:534: in make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         

self = <VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_basic.yaml(host='management.azure.com', port=443) at 0x7fa09845ef30>
 = False, kwargs = {}

    def getresponse(self, =False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response, self.vcr_request.uri)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_basic.yaml') in your current record mode (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.14/site-packages/vcr/stubs/init.py:279: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.monitor.tests.latest.test_monitor_autoscale.TestMonitorAutoscaleScenario testMethod=test_monitor_autoscale_basic>
resource_group = 'cli_test_monitor_autoscale000001'

    @AllowLargeResponse()
    @ResourceGroupPreparer(name_prefix='cli_test_monitor_autoscale')
    def test_monitor_autoscale_basic(self, resource_group):
        self.kwargs.update({
            'vmss': 'vmss1'
        })
        self.cmd('vmss create -g {rg} -n {vmss} --image Ubuntu2204 --admin-username testadmin --admin-password TestTest12#$')
>       self.kwargs['vmss_id'] = self.cmd('vmss show -g {rg} -n {vmss}').get_output_in_json()['id']
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:20: 
 
 
 
 
 
 
 
 
                                
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fa09508c410>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fa098b9fd90>
command = 'vmss show -g cli_test_monitor_autoscale000001 -n vmss1'
expect_failure = False

    def _in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
            self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_basic.yaml') in your current record mode (RecordMode.ONCE: 'once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E           Found 1 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:308: AssertionError
azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:12
Failed test_monitor_autoscale_fixed self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fa0950842d0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fa098a9c910>
command = 'vmss show -g cli_test_monitor_autoscale_fixed000001 -n vmss1'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.14/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:335: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:362: in handler
    show_exception_handler(ex)
src/azure-cli-core/azure/cli/core/commands/arm.py:476: in show_exception_handler
    raise ex
src/azure-cli-core/azure/cli/core/commands/command_operation.py:360: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/custom.py:4280: in get_vmss_by_aaz
    return VMSSShow(cli_ctx=cmd.cli_ctx)(command_args=command_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/command.py:154: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:359: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:391: in execute_operations
    self.VirtualMachineScaleSetsGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:411: in call
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/client.py:107: in send_request
    session = self.pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/mgmt/core/policies/base.py:95: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/policies/redirect.py:205: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/policies/retry.py:545: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/http_policy.py:112: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:130: in send
    self.sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/transport/requests_basic.py:375: in send
    response = self.session.request(  # type: ignore
env/lib/python3.14/site-packages/requests/sessions.py:592: in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/requests/sessions.py:706: in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/requests/adapters.py:645: in send
    resp = conn.urlopen(
env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen
    response = self.make_request(
env/lib/python3.14/site-packages/urllib3/connectionpool.py:534: in make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         

self = <VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_fixed.yaml(host='management.azure.com', port=443) at 0x7fa09845ed50>
 = False, kwargs = {}

    def getresponse(self, =False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response, self.vcr_request.uri)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_fixed.yaml') in your current record mode (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.14/site-packages/vcr/stubs/init.py:279: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.monitor.tests.latest.test_monitor_autoscale.TestMonitorAutoscaleScenario testMethod=test_monitor_autoscale_fixed>
resource_group = 'cli_test_monitor_autoscale_fixed000001'

    @AllowLargeResponse()
    @ResourceGroupPreparer(name_prefix='cli_test_monitor_autoscale_fixed')
    def test_monitor_autoscale_fixed(self, resource_group):
        self.kwargs.update({
            'vmss': 'vmss1',
            'sched': 'Christmas'
        })
        self.cmd('vmss create -g {rg} -n {vmss} --image Ubuntu2204 --admin-username testadmin --admin-password TestTest12#$')
>       self.kwargs['vmss_id'] = self.cmd('vmss show -g {rg} -n {vmss}').get_output_in_json()['id']
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:282: 
 
 
 
 
 
 
 
 
                                
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fa0950842d0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fa098a9c910>
command = 'vmss show -g cli_test_monitor_autoscale_fixed000001 -n vmss1'
expect_failure = False

    def _in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
            self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_autoscale_fixed.yaml') in your current record mode (RecordMode.ONCE: 'once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E           Found 1 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_autoscale_fixed000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:308: AssertionError
azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:273
Failed test_monitor_autoscale_predictive_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:367
Failed test_monitor_autoscale_recurring The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:307
Failed test_monitor_autoscale_refined The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:53
Failed test_monitor_autoscale_rule_with_dimensions The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:192
Failed test_monitor_autoscale_rules The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:100
Failed test_monitor_autoscale_show_predictive_metric The error message is too long, please check the pipeline log for details. azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py:401
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.14
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.14
🔄network
🔄latest
🔄3.12
🔄3.14
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.14
🔄postgresql
🔄latest
🔄3.12
️✔️3.14
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.14
️✔️profile
️✔️latest
️✔️3.12
️✔️3.14
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.14
️✔️redis
️✔️latest
️✔️3.12
️✔️3.14
️✔️relay
️✔️latest
️✔️3.12
️✔️3.14
️✔️resource
️✔️latest
️✔️3.12
️✔️3.14
️✔️role
️✔️latest
️✔️3.12
️✔️3.14
️✔️search
️✔️latest
️✔️3.12
️✔️3.14
️✔️security
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.14
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.14
🔄signalr
🔄latest
🔄3.12
️✔️3.14
️✔️sql
️✔️latest
️✔️3.12
️✔️3.14
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.14
🔄storage
🔄latest
🔄3.12
️✔️3.14
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.14
🔄telemetry
🔄latest
🔄3.12
🔄3.14
️✔️util
️✔️latest
️✔️3.12
️✔️3.14
❌vm
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_vm_avset_migrate self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f2178028500>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f217b0e5790>
command = 'vmss show -g cli_test_vm_avset_migrate000001 -n vms000006'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:335: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:362: in handler
    show_exception_handler(ex)
src/azure-cli-core/azure/cli/core/commands/arm.py:476: in show_exception_handler
    raise ex
src/azure-cli-core/azure/cli/core/commands/command_operation.py:360: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/custom.py:4280: in get_vmss_by_aaz
    return VMSSShow(cli_ctx=cmd.cli_ctx)(command_args=command_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/command.py:154: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:6448: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:6480: in execute_operations
    self.VirtualMachineScaleSetsGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:6500: in call
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/client.py:107: in send_request
    session = self.pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/mgmt/core/policies/base.py:95: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/policies/redirect.py:205: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/policies/retry.py:545: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/http_policy.py:112: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:130: in send
    self.sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/transport/requests_basic.py:375: in send
    response = self.session.request(  # type: ignore
env/lib/python3.12/site-packages/requests/sessions.py:592: in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/requests/sessions.py:706: in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/requests/adapters.py:645: in send
    resp = conn.urlopen(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:788: in urlopen
    response = self.make_request(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:534: in make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         

self = <VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_avset_migrate.yaml(host='management.azure.com', port=443) at 0x7f2177be6270>
 = False, kwargs = {}

    def getresponse(self, =False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response, self.vcr_request.uri)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_avset_migrate.yaml') in your current record mode (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_avset_migrate000001/providers/Microsoft.Compute/virtualMachineScaleSets/vms000006?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_avset_migrate000001/providers/Microsoft.Compute/virtualMachineScaleSets/vms000006?api-version=2025-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.12/site-packages/vcr/stubs/init.py:279: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <latest.test_vm_commands.VMAvailSetLiveScenarioTest testMethod=test_vm_avset_migrate>
resource_group = 'cli_test_vm_avset_migrate000001'

    @ResourceGroupPreparer(name_prefix='cli_test_vm_avset_migrate', location='eastus2euap')
    def test_vm_avset_migrate(self, resource_group):
        self.kwargs.update({
            'avset1': self.create_random_name('avset', 15),
            'avset2': self.create_random_name('avset', 15),
            'vm1': self.create_random_name('vm', 10),
            'vm2': self.create_random_name('vm', 10),
            'vmss': self.create_random_name('vms', 10),
            'new_vmss': self.create_random_name('newvmss', 15),
        })
    
        self.cmd('vm availability-set create -g {rg} -n {avset1} --platform-fault-domain-count 2 --platform-update-domain-count 2', checks=[
            self.check('name', '{avset1}'),
            self.check('platformFaultDomainCount', 2)
        ])
        self.cmd('vm create -g {rg} -n {vm1} --image OpenLogic:CentOS:7.5:latest --admin-username vmtest --nsg-rule NONE --size Standard_B2ms --availability-set {avset1}')
        self.cmd('vmss create -g {rg} -n {vmss} --image OpenLogic:CentOS:7.5:latest --admin-username vmsstest --vm-sku Standard_B2ms')
>       vmss = self.cmd('vmss show -g {rg} -n {vmss}').get_output_in_json()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2242: 
 
 
 
 
 
 
 
 
                                
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f2178028500>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f217b0e5790>
command = 'vmss show -g cli_test_vm_avset_migrate000001 -n vms000006'
expect_failure = False

    def _in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
            self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_avset_migrate.yaml') in your current record mode (RecordMode.ONCE: 'once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_avset_migrate000001/providers/Microsoft.Compute/virtualMachineScaleSets/vms000006?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E           Found 1 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_avset_migrate000001/providers/Microsoft.Compute/virtualMachineScaleSets/vms000006?api-version=2025-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:308: AssertionError
azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2224
Failed test_vm_vmss_ephemeral_os_disk_full_caching The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2823
Failed test_vmss_extension The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3376
Failed test_vmss_extension_debian The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3446
Failed test_vmss_extension_instance_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3505
Failed test_diagnostics_extension_install The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3573
Failed test_vm_vmss_update_ultra_ssd_enabled The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4252
Failed test_vmss_ultra_ssd_storage_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4230
Failed test_vmss_create_and_modify The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4552
Failed test_vmss_scale_extended_location The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4654
Failed test_vmss_scale_in_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4638
Failed test_vmss_lifecycle_hook The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4680
Failed test_vmss_create_ephemeral_os_disk The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4955
Failed test_vmss_create_ephemeral_os_disk_placement The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5025
Failed test_vmss_create_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4769
Failed test_vmss_create_with_policy_setting The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4820
Failed test_vmss_update_ephemeral_os_disk The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4989
Failed test_vmss_update_instance_disks The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5079
Failed test_vmss_with_max_surge The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4917
Failed test_vmss_with_resiliency_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4843
Failed test_vmss_create_none_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5141
Failed test_vmss_create_with_app_gateway The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5160
Failed test_vmss_create_with_nat_rule_v2 The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5214
Failed test_vmss_single_placement_group_default_to_std_lb The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5196
Failed test_vmss_zone_balance The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5274
Failed test_vmss_public_ip_per_vm_custom_domain_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5299
Failed test_vmss_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5332
Failed test_vmss_update_enable_auto_os_upgrade The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5429
Failed test_vmss_update_ephemeral_os_disk_placement The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5594
Failed test_vmss_update_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5381
Failed test_vmss_update_security_type The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5497
Failed test_vmss_update_vm_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5548
Failed test_vmss_accelerated_networking The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5634
Failed test_vmss_asg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5667
Failed test_vmss_create_linux_secrets The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5762
Failed test_vmss_create_existing_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5794
Failed test_vmss_create_existing_ids_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5852
Failed test_vmss_resiliency_view The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5902
Failed test_vmss_vms The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5956
Failed test_vmss_vms_debian The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6000
Failed test_spot_restore_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6091
Failed test_vmss_simulate_eviction The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6047
Failed test_vmss_create_custom_data The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6115
Failed test_vmss_create_user_data The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6144
Failed test_vmss_update_custom_data The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6129
Failed test_vmss_with_ilb The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6266
Failed test_vm_msi_no_scope The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6443
Failed test_vmss_explicit_msi The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6556
Failed test_vmss_msi The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6377
Failed test_vmss_update_zones The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6884
Failed test_vmss_run_command_v2 The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7058
Failed test_vmss_encryption_identity_for_disk_encryption self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f2178ed05f0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f2179eef2f0>
command = 'vmss create -g test_vmss_encryption_identity_for_disk_encryption000001 -n vmss1 --image Win2022Datacenter --instance-...rosoft.ManagedIdentity/userAssignedIdentities/id1 --assign-identity id1 --orchestration-mode Uniform --lb-sku Standard'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = CLIError(CannotOverwriteExistingCassetteException("Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cl...', 'scheme', 'host', 'port', 'path']\nMatchers failed :\n_custom_request_query_matcher - assertion failure :\nNone\n"))
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception CLIError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <latest.test_vm_commands.VMSecurityProfileTestForDiskEncryption testMethod=test_vmss_encryption_identity_for_disk_encryption>
resource_group = 'test_vmss_encryption_identity_for_disk_encryption000001'
resource_group_location = 'westus'

    @AllowLargeResponse(size_kb=99999)
    @ResourceGroupPreparer(name_prefix='test_vmss_encryption_identity_for_disk_encryption', location='westus')
    def test_vmss_encryption_identity_for_disk_encryption(self, resource_group, resource_group_location):
        self.kwargs.update({
            'vmss': 'vmss1',
            'subnet': 'subnet1',
            'emsi': 'id1',
            'vnet': 'vnet1'
        })
    
        emsi_result = self.cmd('identity create -g {rg} -n {emsi} --tags tag1=d1', checks=[
            self.check('name', '{emsi}'),
            self.check('tags.tag1', 'd1')]).get_output_in_json()
    
        encryptionIdentityId = emsi_result['id']
    
        self.kwargs.update({
            'encryptionIdentityId' : encryptionIdentityId,
        })
    
>       self.cmd('vmss create -g {rg} -n {vmss} --image Win2022Datacenter --instance-count 1 --admin-username clitester1 --admin-password Test123456789! --encryption-identity {encryptionIdentityId} --assign-identity {emsi} --orchestration-mode Uniform --lb-sku Standard')

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7227: 
 
 
                                      
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in in_process_execute
    raise ex.exception
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
                                   

ex = CannotOverwriteExistingCassetteException("Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/c...d', 'scheme', 'host', 'port', 'path']\nMatchers failed :\n_custom_request_query_matcher - assertion failure :\nNone\n")

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
                raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
            else:
>               raise CLIError(ex)
E               knack.util.CLIError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_encryption_identity_for_disk_encryption.yaml') in your current record mode (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_vmss_encryption_identity_for_disk_encryption000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_vmss_encryption_identity_for_disk_encryption000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_vmss_encryption_identity_for_disk_encryption000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None

src/azure-cli-core/azure/cli/core/commands/arm.py:114: CLIError
azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7206
Failed test_vmss_null_encryption_identity_for_disk_encryption The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7265
Failed test_vm_encryption_at_host The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7761
Failed test_create_vm_with_community_gallery_image The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:9256
Failed test_create_vm_with_shared_gallery_image The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8957
Failed test_ppg_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:9672
Failed test_ppg_with_related_resources The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:9631
Failed test_vmss_os_image_notification The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:10185
Failed test_vmss_scheduled_events_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:10199
Failed test_vmss_terminate_notification The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:10133
Failed test_vmss_create_disk_iops_mbps The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11280
Failed test_vmss_create_disbale_automatic_repairs_of_zone_balancing The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11456
Failed test_vmss_update_automatic_repairs_with_health_extension The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11418
Failed test_vmss_update_automatic_repairs_with_health_probe The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11381
Failed test_vmss_create_sku_profile_prioritized The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11519
Failed test_vmss_create_sku_profile_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11501
Failed test_create_flexible_vmss_with_priority_mix_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11854
Failed test_quick_create_flexible_vmss The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11830
Failed test_vmss_complex_orchestration_mode The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11695
Failed test_vmss_linux_patch_mode The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12157
Failed test_vmss_security_posture_reference The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12191
Failed test_vmss_security_posture_reference_overridable The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12213
Failed test_guest_attestation_extension_and_msi The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12562
Failed test_guest_attestation_extension_and_msi2 The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12636
Failed test_vm_vmss_extension_autoupgrade The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12735
Failed test_vm_vmss_proxy_agent The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12804
Failed test_vm_vmss_proxy_agent_control_profile_reference The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12878
Failed test_vmss_trusted The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12551
Failed test_vm_list_filter The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12990
Failed test_vmss_extended_location The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13041
Failed test_vm_vmss_application_enable_automatic_upgrade The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13662
Failed test_vmss_add_application The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13574
Failed test_vmss_add_application_empty_version_ids The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13558
Failed test_vmss_add_application_with_config_override The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13618
Failed test_vmss_add_application_with_order_application The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13595
Failed test_vmss_zone_placement_policy_with_combined_parameters The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14634
Failed test_vmss_zone_placement_policy_with_exclude_zones The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14543
Failed test_vmss_zone_placement_policy_with_include_zones The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14512
Failed test_vmss_zone_placement_policy_with_max_instance_percent The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14604
Failed test_vmss_zone_placement_policy_with_max_zone_count The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14574
Failed test_vmss_update_combined_zone_allocation_policies The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14865
Failed test_vmss_update_max_instance_percent_per_zone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14806
Failed test_vmss_update_max_zone_count The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14772
Failed test_vmss_update_zone_placement_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14919
❌3.14
Type Test Case Error Message Line
Failed test_vm_avset_migrate self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f8d43f31350>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f8d42904050>
command = 'vmss show -g cli_test_vm_avset_migrate000001 -n vms000006'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.14/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:335: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:362: in handler
    show_exception_handler(ex)
src/azure-cli-core/azure/cli/core/commands/arm.py:476: in show_exception_handler
    raise ex
src/azure-cli-core/azure/cli/core/commands/command_operation.py:360: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/custom.py:4280: in get_vmss_by_aaz
    return VMSSShow(cli_ctx=cmd.cli_ctx)(command_args=command_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/command.py:154: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:2480: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:2512: in execute_operations
    self.VirtualMachineScaleSetsGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:2532: in call
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/client.py:107: in send_request
    session = self.pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/mgmt/core/policies/base.py:95: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/policies/redirect.py:205: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/policies/retry.py:545: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/http_policy.py:112: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:130: in send
    self.sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/transport/requests_basic.py:375: in send
    response = self.session.request(  # type: ignore
env/lib/python3.14/site-packages/requests/sessions.py:592: in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/requests/sessions.py:706: in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/requests/adapters.py:645: in send
    resp = conn.urlopen(
env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen
    response = self.make_request(
env/lib/python3.14/site-packages/urllib3/connectionpool.py:534: in make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         

self = <VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_avset_migrate.yaml(host='management.azure.com', port=443) at 0x7f8d43fcd5c0>
 = False, kwargs = {}

    def getresponse(self, =False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response, self.vcr_request.uri)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_avset_migrate.yaml') in your current record mode (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_avset_migrate000001/providers/Microsoft.Compute/virtualMachineScaleSets/vms000006?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_avset_migrate000001/providers/Microsoft.Compute/virtualMachineScaleSets/vms000006?api-version=2025-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.14/site-packages/vcr/stubs/init.py:279: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <latest.test_vm_commands.VMAvailSetLiveScenarioTest testMethod=test_vm_avset_migrate>
resource_group = 'cli_test_vm_avset_migrate000001'

    @ResourceGroupPreparer(name_prefix='cli_test_vm_avset_migrate', location='eastus2euap')
    def test_vm_avset_migrate(self, resource_group):
        self.kwargs.update({
            'avset1': self.create_random_name('avset', 15),
            'avset2': self.create_random_name('avset', 15),
            'vm1': self.create_random_name('vm', 10),
            'vm2': self.create_random_name('vm', 10),
            'vmss': self.create_random_name('vms', 10),
            'new_vmss': self.create_random_name('newvmss', 15),
        })
    
        self.cmd('vm availability-set create -g {rg} -n {avset1} --platform-fault-domain-count 2 --platform-update-domain-count 2', checks=[
            self.check('name', '{avset1}'),
            self.check('platformFaultDomainCount', 2)
        ])
        self.cmd('vm create -g {rg} -n {vm1} --image OpenLogic:CentOS:7.5:latest --admin-username vmtest --nsg-rule NONE --size Standard_B2ms --availability-set {avset1}')
        self.cmd('vmss create -g {rg} -n {vmss} --image OpenLogic:CentOS:7.5:latest --admin-username vmsstest --vm-sku Standard_B2ms')
>       vmss = self.cmd('vmss show -g {rg} -n {vmss}').get_output_in_json()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2242: 
 
 
 
 
 
 
 
 
                                
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f8d43f31350>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f8d42904050>
command = 'vmss show -g cli_test_vm_avset_migrate000001 -n vms000006'
expect_failure = False

    def _in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
            self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_avset_migrate.yaml') in your current record mode (RecordMode.ONCE: 'once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_avset_migrate000001/providers/Microsoft.Compute/virtualMachineScaleSets/vms000006?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E           Found 1 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_avset_migrate000001/providers/Microsoft.Compute/virtualMachineScaleSets/vms000006?api-version=2025-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:308: AssertionError
azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2224
Failed test_vm_vmss_ephemeral_os_disk_full_caching The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2823
Failed test_vmss_extension The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3376
Failed test_vmss_extension_debian The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3446
Failed test_vmss_extension_instance_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3505
Failed test_diagnostics_extension_install The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3573
Failed test_vm_vmss_update_ultra_ssd_enabled The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4252
Failed test_vmss_ultra_ssd_storage_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4230
Failed test_vmss_create_and_modify The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4552
Failed test_vmss_scale_extended_location The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4654
Failed test_vmss_scale_in_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4638
Failed test_vmss_lifecycle_hook The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4680
Failed test_vmss_create_ephemeral_os_disk The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4955
Failed test_vmss_create_ephemeral_os_disk_placement The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5025
Failed test_vmss_create_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4769
Failed test_vmss_create_with_policy_setting The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4820
Failed test_vmss_update_ephemeral_os_disk The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4989
Failed test_vmss_update_instance_disks The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5079
Failed test_vmss_with_max_surge The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4917
Failed test_vmss_with_resiliency_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:4843
Failed test_vmss_create_none_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5141
Failed test_vmss_create_with_app_gateway The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5160
Failed test_vmss_create_with_nat_rule_v2 The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5214
Failed test_vmss_single_placement_group_default_to_std_lb The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5196
Failed test_vmss_zone_balance The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5274
Failed test_vmss_public_ip_per_vm_custom_domain_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5299
Failed test_vmss_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5332
Failed test_vmss_update_enable_auto_os_upgrade The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5429
Failed test_vmss_update_ephemeral_os_disk_placement The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5594
Failed test_vmss_update_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5381
Failed test_vmss_update_security_type The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5497
Failed test_vmss_update_vm_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5548
Failed test_vmss_accelerated_networking The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5634
Failed test_vmss_asg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5667
Failed test_vmss_create_linux_secrets The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5762
Failed test_vmss_create_existing_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5794
Failed test_vmss_create_existing_ids_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5852
Failed test_vmss_resiliency_view The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5902
Failed test_vmss_vms The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:5956
Failed test_vmss_vms_debian The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6000
Failed test_spot_restore_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6091
Failed test_vmss_simulate_eviction The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6047
Failed test_vmss_create_custom_data The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6115
Failed test_vmss_create_user_data The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6144
Failed test_vmss_update_custom_data The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6129
Failed test_vmss_with_ilb The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6266
Failed test_vm_msi_no_scope The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6443
Failed test_vmss_explicit_msi The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6556
Failed test_vmss_msi The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6377
Failed test_vmss_update_zones The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:6884
Failed test_vmss_run_command_v2 The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7058
Failed test_vmss_encryption_identity_for_disk_encryption self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f8d407d8f50>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f8d429074d0>
command = 'vmss create -g test_vmss_encryption_identity_for_disk_encryption000001 -n vmss1 --image Win2022Datacenter --instance-...rosoft.ManagedIdentity/userAssignedIdentities/id1 --assign-identity id1 --orchestration-mode Uniform --lb-sku Standard'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.14/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = CLIError(CannotOverwriteExistingCassetteException("Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cl...', 'scheme', 'host', 'port', 'path']\nMatchers failed :\n_custom_request_query_matcher - assertion failure :\nNone\n"))
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception CLIError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <latest.test_vm_commands.VMSecurityProfileTestForDiskEncryption testMethod=test_vmss_encryption_identity_for_disk_encryption>
resource_group = 'test_vmss_encryption_identity_for_disk_encryption000001'
resource_group_location = 'westus'

    @AllowLargeResponse(size_kb=99999)
    @ResourceGroupPreparer(name_prefix='test_vmss_encryption_identity_for_disk_encryption', location='westus')
    def test_vmss_encryption_identity_for_disk_encryption(self, resource_group, resource_group_location):
        self.kwargs.update({
            'vmss': 'vmss1',
            'subnet': 'subnet1',
            'emsi': 'id1',
            'vnet': 'vnet1'
        })
    
        emsi_result = self.cmd('identity create -g {rg} -n {emsi} --tags tag1=d1', checks=[
            self.check('name', '{emsi}'),
            self.check('tags.tag1', 'd1')]).get_output_in_json()
    
        encryptionIdentityId = emsi_result['id']
    
        self.kwargs.update({
            'encryptionIdentityId' : encryptionIdentityId,
        })
    
>       self.cmd('vmss create -g {rg} -n {vmss} --image Win2022Datacenter --instance-count 1 --admin-username clitester1 --admin-password Test123456789! --encryption-identity {encryptionIdentityId} --assign-identity {emsi} --orchestration-mode Uniform --lb-sku Standard')

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7227: 
 
 
                                      
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in in_process_execute
    raise ex.exception
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
                                   

ex = CannotOverwriteExistingCassetteException("Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/c...d', 'scheme', 'host', 'port', 'path']\nMatchers failed :\n_custom_request_query_matcher - assertion failure :\nNone\n")

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
                raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
            else:
>               raise CLIError(ex)
E               knack.util.CLIError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_encryption_identity_for_disk_encryption.yaml') in your current record mode (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_vmss_encryption_identity_for_disk_encryption000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2026-04-01>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_vmss_encryption_identity_for_disk_encryption000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_vmss_encryption_identity_for_disk_encryption000001/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1?api-version=2025-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None

src/azure-cli-core/azure/cli/core/commands/arm.py:114: CLIError
azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7206
Failed test_vmss_null_encryption_identity_for_disk_encryption The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7265
Failed test_vm_encryption_at_host The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7761
Failed test_create_vm_with_community_gallery_image The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:9256
Failed test_create_vm_with_shared_gallery_image The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8957
Failed test_ppg_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:9672
Failed test_ppg_with_related_resources The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:9631
Failed test_vmss_os_image_notification The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:10185
Failed test_vmss_scheduled_events_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:10199
Failed test_vmss_terminate_notification The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:10133
Failed test_vmss_create_disk_iops_mbps The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11280
Failed test_vmss_create_disbale_automatic_repairs_of_zone_balancing The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11456
Failed test_vmss_update_automatic_repairs_with_health_extension The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11418
Failed test_vmss_update_automatic_repairs_with_health_probe The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11381
Failed test_vmss_create_sku_profile_prioritized The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11519
Failed test_vmss_create_sku_profile_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11501
Failed test_create_flexible_vmss_with_priority_mix_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11854
Failed test_quick_create_flexible_vmss The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11830
Failed test_vmss_complex_orchestration_mode The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:11695
Failed test_vmss_linux_patch_mode The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12157
Failed test_vmss_security_posture_reference The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12191
Failed test_vmss_security_posture_reference_overridable The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12213
Failed test_guest_attestation_extension_and_msi The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12562
Failed test_guest_attestation_extension_and_msi2 The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12636
Failed test_vm_vmss_extension_autoupgrade The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12735
Failed test_vm_vmss_proxy_agent The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12804
Failed test_vm_vmss_proxy_agent_control_profile_reference The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12878
Failed test_vmss_trusted The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12551
Failed test_vm_list_filter The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:12990
Failed test_vmss_extended_location The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13041
Failed test_vm_vmss_application_enable_automatic_upgrade The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13662
Failed test_vmss_add_application The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13574
Failed test_vmss_add_application_empty_version_ids The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13558
Failed test_vmss_add_application_with_config_override The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13618
Failed test_vmss_add_application_with_order_application The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13595
Failed test_vmss_zone_placement_policy_with_combined_parameters The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14634
Failed test_vmss_zone_placement_policy_with_exclude_zones The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14543
Failed test_vmss_zone_placement_policy_with_include_zones The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14512
Failed test_vmss_zone_placement_policy_with_max_instance_percent The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14604
Failed test_vmss_zone_placement_policy_with_max_zone_count The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14574
Failed test_vmss_update_combined_zone_allocation_policies The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14865
Failed test_vmss_update_max_instance_percent_per_zone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14806
Failed test_vmss_update_max_zone_count The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14772
Failed test_vmss_update_zone_placement_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:14919

Related command

az vmss create/ update/ show/ get-instance-view

Description

Resolve #33868

aaz Azure/aaz#1067

Testing Guide

History Notes

[Compute] az vmss create/ update: Add new parameter --disable-capacity-reservation-assignment to support Open Capacity Reservation


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

Copilot AI lite review requested due to automatic review settings August 19, 2026 03:15
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi William (@william051200),
Since the current milestone time is less than 7 days, this pr may not catch up with this release.

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 Azure CLI support for Open Capacity Reservation scenarios across VMSS and capacity reservation resources, aligning compute API usage to 2026-04-01 and surfacing new response fields needed by az vmss show/get-instance-view.

Changes:

  • Adds --disable-capacity-reservation-assignment/--no-cap-reservation support for VM/VMSS create/update and enforces mutual exclusivity with --capacity-reservation-group.
  • Surfaces capacity reservation details in VMSS VM model-view and instance-view outputs (including capacityReservationType).
  • Updates large sets of scenario-test recordings to newer Compute RP API versions (primarily 2026-04-01), plus adds a live-only Open Capacity Reservation test.

Reviewed changes

Copilot reviewed 132 out of 132 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py Adds a live-only scenario test for Open Capacity Reservation on VMs.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_windows_patch_mode.yaml Updates recorded Compute VM GET api-version to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_simple_orchestration_mode.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_linux_patch_mode.yaml Updates recorded Compute VM GET api-version to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_zone_movement_preserved.yaml Updates recorded Compute VM GET/PUT api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_vmss_non_persisted_tpm.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_trusted_launch_update.yaml Updates recorded Compute VM GET/PUT api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_ssh_key.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_ssh_key_ed25519.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_restore_point_instant_access.yaml Updates recorded Compute VM GET/PUT api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_resize_changes_size.yaml Updates recorded Compute VM GET/PUT api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_priority_eviction_billing.yaml Updates recorded Compute VM GET/PUT api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_list_filter.yaml Updates recorded Compute VM list api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_install_patches.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_extended_location.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_encryption_at_host.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_disk_encryption_with_key.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_disk_encryption_with_incorrect_encryption_identity_e2e.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_create_ultrassd_data_disk_iops_mbps.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_create_special_name.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_create_nsg_rule.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_create_existing_nic.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_create_auto_create_subnet.yaml Updates recorded Compute VM list/get api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_auto_shutdown.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_add_application.yaml Updates recorded Compute VM GET/PUT api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_add_application_with_order_application.yaml Updates recorded Compute VM GET/PUT api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_add_application_empty_version_ids.yaml Updates recorded Compute VM GET/PUT api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_shared_gallery.yaml Updates recorded api-versions for gallery and VM operations (note: includes gallery api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_restore_point.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_restore_point_encryption_remote.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_restore_point_encryption_local.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_restore_point_collection.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_replication_mode.yaml Updates recorded api-versions for gallery and VM operations (note: includes gallery api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_ppg_with_related_resources.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_ppg_update.yaml Updates recorded Compute VM GET/PUT api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_os_disk_security_encryption.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_linux_vm_patch_mode.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_version_end_of_life_date.yaml Updates recorded api-versions for gallery and VM operations (note: includes gallery api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_version_create_os_vhd.yaml Updates recorded api-versions for gallery and VM operations (note: includes gallery api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_version_create_for_diff_source.yaml Updates recorded api-versions for gallery and VM operations (note: includes gallery api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_update_add_set.yaml Updates recorded api-versions for gallery and VM operations (note: includes gallery api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_image_build_managed_image.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_soft_delete.yaml Updates recorded api-versions for gallery and VM operations (note: includes gallery api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_image_version_vhd.yaml Updates recorded api-versions for gallery and VM operations (note: includes gallery api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_e2e.yaml Updates recorded api-versions for gallery and VM operations (note: includes gallery api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_disk_trusted_launch.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_create_vm_with_community_gallery_image.yaml Updates recorded api-versions for community gallery flows (note: includes gallery/share api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_create_image_version_with_allow_replicated_location_deletion.yaml Updates recorded api-versions for gallery and VM operations (note: includes gallery api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_copy_vm_restore_point.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_community_gallery_operations.yaml Updates recorded api-versions for community gallery flows (note: includes gallery/share api-version changes).
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_capacity_reservation_operations.yaml Updates recorded capacity reservation api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_capacity_reservation_list_query_params.yaml Updates recorded capacity reservation list api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/operations/vmss.py Extends snake_case conversion to include capacity reservation opt-out and interconnect block profile.
src/azure-cli/azure/cli/command_modules/vm/operations/vmss_vms.py Surfaces and snake_case-converts VMSS VM capacity reservation model-view fields.
src/azure-cli/azure/cli/command_modules/vm/operations/vm.py Adds snake_case conversion for VM capacity reservation opt-out field.
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/vms/instance_view/_show.py Bumps VMSS VM instance-view API version to 2026-04-01 and surfaces new instance-view fields.
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/capacity/reservation/group/_update.py Bumps API version to 2026-04-01 and adds reservation type + richer instance-view schema.
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/capacity/reservation/group/_show.py Bumps API version to 2026-04-01 and adds reservation type + richer instance-view schema.
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/capacity/reservation/group/_create.py Bumps API version to 2026-04-01 and adds reservation type + richer instance-view schema.
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/capacity/reservation/_show.py Bumps API version to 2026-04-01 and expands schema (scheduleProfile/systemData/utilization counts).
src/azure-cli/azure/cli/command_modules/vm/_validators.py Adds VMSS update validation for --instance-id vs opt-out flag and enforces mutual exclusivity with capacity reservation group.
src/azure-cli/azure/cli/command_modules/vm/_template_builder.py Adds disableCapacityReservationAssignment support and bumps VM/VMSS ARM template apiVersion to 2026-04-01.
src/azure-cli/azure/cli/command_modules/vm/_params.py Adds new args for disable capacity reservation assignment and reservation type.
src/azure-cli/azure/cli/command_modules/vm/_help.py Adds help examples for disabling capacity reservation assignment and creating Open reservation groups.
src/azure-cli/azure/cli/command_modules/sqlvm/tests/latest/recordings/test_sqlvm_update_license_and_sku.yaml Updates recorded Compute VM GET api-version to 2026-04-01.
src/azure-cli/azure/cli/command_modules/sqlvm/tests/latest/recordings/test_sqlvm_mgmt.yaml Updates recorded Compute VM GET api-version to 2026-04-01.
src/azure-cli/azure/cli/command_modules/sqlvm/tests/latest/recordings/test_sqlvm_mgmt_assessment.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/sqlvm/tests/latest/recordings/test_sqlvm_create_and_delete.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/sqlvm/tests/latest/recordings/test_sqlvm_add_and_remove.yaml Updates recorded Compute VM GET api-version to 2026-04-01.
src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_resource_patch.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_invoke_action.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_nw_connection_monitor_v2_endpoint.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_nw_connection_monitor_v2_creation.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_nw_connection_monitor_output.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_nw_connection_monitor_output_type_as_workspace.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_watcher_packet_capture.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_nic_convenience_commands.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_metrics_list_by_sub.yaml Updates recorded Compute VM GET api-version to 2026-04-01.
src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_clone_vm_metric_alerts_scenario.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_single_scope.yaml Updates recorded Compute VM GET api-version to 2026-04-01.
src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_multiple_scopes.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_for_rg_and_sub.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_condition_create.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_dynamic_metric_alert_multiple_scopes.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_dynamic_metric_alert_basic.yaml Updates recorded Compute VM GET api-version to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_vault_soft_delete_with_items.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_softdelete.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_scenario.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_rp.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_rg_mapping.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_restore.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_restore_when_storage_in_different_rg.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_protection.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_policy.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_job.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_item.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_CrossZonalRestore.yaml Updates recorded Compute VM GET api-version(s) to 2026-04-01.
Suppressed comments (2)

src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_create_vm_with_community_gallery_image.yaml:248

  • This recording uses api-version=2021-07-01 for sig share enable-community (POST .../share). The current sig share AAZ command targets 2023-07-03, so playback will fail due to URI mismatch. Please re-record or update the api-version(s) in this recording to match the command implementation.
    src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_community_gallery_operations.yaml:248
  • This recording uses api-version=2021-07-01 for sig share enable-community (POST .../share). The current sig share AAZ command targets 2023-07-03, so playback will fail due to URI mismatch. Please re-record or update the api-version(s) in this recording to match the command implementation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

- AZURECLI/2.85.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/galleries/gellery000005?api-version=2025-03-03
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/galleries/gellery000005?api-version=2021-07-01
- AZURECLI/2.86.0 azsdk-python-core/1.39.0 Python/3.12.10 (Windows-11-10.0.26200-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_community_gallery_operations_000001/providers/Microsoft.Compute/galleries/gellery000003?api-version=2025-03-03
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_community_gallery_operations_000001/providers/Microsoft.Compute/galleries/gellery000003?api-version=2021-07-01
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@a0x1ab Aditya Pujara (a0x1ab) added the Azure Client Tools Agent Requested Request Azure Client Tools Agent testing and review label Aug 19, 2026
@azure-client-tools-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

FAIL (exit 1)

Selectors: test_vm_commands (module)
PR head ref: vmss-ocr
PR head sha: 987bb6976531605726e63a1a9320841f11d040c5
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/32217882020

Live-test recordings: 1 regenerated — archived in workflow artifact live-test-pr-33929 (recordings/).

ℹ️ This PR is from a fork, so recordings were not pushed automatically. Download them from the artifact and commit to your branch.

Recording files
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_image_list_by_alias.yaml
Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13705: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'

test index updated: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: test_vm_commands

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: forked-1.7.5, xdist-3.8.0
collecting ... collected 378 items

azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py::VMImageListByAliasesScenarioTest::test_vm_image_list_by_alias FAILED [  0%]

=================================== FAILURES ===================================
_________ VMImageListByAliasesScenarioTest.test_vm_image_list_by_alias _________
self = <latest.test_vm_commands.VMImageListByAliasesScenarioTest testMethod=test_vm_image_list_by_alias>

    def test_vm_image_list_by_alias(self):
        result = self.cmd('vm image list --offer ubuntu').get_output_in_json()
        self.assertTrue(len(result) >= 1)
        self.assertEqual(result[-1]['publisher'], 'Canonical')
>       self.assertTrue('lts' in result[-1]['sku'])
E       AssertionError: False is not true

azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:58: AssertionError
------------------------------ Captured log call -------------------------------
WARNING  cli.azure.cli.command_modules.vm.custom:custom.py:2736 You are viewing an offline list of images, use --all to retrieve an up-to-date list
- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
=========================== short test summary info ============================
FAILED azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py::VMImageListByAliasesScenarioTest::test_vm_image_list_by_alias - self = <latest.test_vm_commands.VMImageListByAliasesScenarioTest testMethod=test_vm_image_list_by_alias>

    def test_vm_image_list_by_alias(self):
        result = self.cmd('vm image list --offer ubuntu').get_output_in_json()
        self.assertTrue(len(result) >= 1)
        self.assertEqual(result[-1]['publisher'], 'Canonical')
>       self.assertTrue('lts' in result[-1]['sku'])
E       AssertionError: False is not true

azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:58: AssertionError
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
============================== 1 failed in 4.66s ===============================

Posted by agent-assist live-test workflow.

@a0x1ab

Copy link
Copy Markdown
Member

William (@william051200) Please fix the issues identified from testing and failures.

@azure-client-tools-agent azure-client-tools-agent Bot 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.

The following CI checks are failing:

  • Azure.azure-cli Full Test
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance1)
  • Azure.azure-cli
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance2)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance1)
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance7)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance7)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance2)
  • Azure.azure-cli (Check the Format of Pull Request Title and Content)
  • Live test run failed (see the dispatched live-test.yml workflow run for details).

@azure-client-tools-agent azure-client-tools-agent Bot added azure-client-tools-agent Pull request reviewed by Azure Client Tools Agent and removed Azure Client Tools Agent Requested Request Azure Client Tools Agent testing and review labels Aug 19, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-observability-squad.

@william051200

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@william051200 William (william051200) changed the title [Compute] az vmss: Support Open Capacity Reservation {Compute} az vmss: Support Open Capacity Reservation Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad Auto-Assign Auto assign by bot azure-client-tools-agent Pull request reviewed by Azure Client Tools Agent Compute az vm/vmss/image/disk/snapshot Reservations az reservations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compute] Surface VMSS VM capacity reservation details

4 participants