Skip to content

[Compute] az vmss: Support Open Capacity Reservation - #33929

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

[Compute] az vmss: Support Open Capacity Reservation#33929
William (william051200) wants to merge 23 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 ❌ 127/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 0x7f0f8a5beea0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0f8d9a2d50>
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:521: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:553: in execute_operations
    self.VirtualMachineScaleSetsGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:573: 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 0x7f0f89891970>
 = 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 0x7f0f8a5beea0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0f8d9a2d50>
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 0x7f0f8a7e3530>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0f8d9a21b0>
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:521: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:553: in execute_operations
    self.VirtualMachineScaleSetsGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:573: 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 0x7f0f8986ff50>
 = 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 0x7f0f8a7e3530>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0f8d9a21b0>
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 0x7f6993214190>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f6996c37c50>
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:1669: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:1701: in execute_operations
    self.VirtualMachineScaleSetsGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:1721: 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 0x7f69967c3110>
 = 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 0x7f6993214190>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f6996c37c50>
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 0x7f699320c050>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f6996b287d0>
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:1669: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:1701: in execute_operations
    self.VirtualMachineScaleSetsGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/__cmds.py:1721: 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 0x7f69967c2b70>
 = 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 0x7f699320c050>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f6996b287d0>
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
❌3.14
Type Test Case Error Message Line
Failed test_image_build_shared_image self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f94608f0550>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f94688d5a90>
command = 'vm create --name custom-vm -g img_tmpl_sig000001 --image /subscriptions/00000000-0000-0000-0000-000000000000/resource...s/Microsoft.Compute/galleries/ib_sig000003/images/image1/versions/1.0.0 --generate-ssh-keys --admin-username azureuser'
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_image_builder_commands.ImageTemplateTest testMethod=test_image_build_shared_image>
resource_group = 'img_tmpl_sig000001', resource_group_location = 'eastus'

    @ResourceGroupPreparer(name_prefix='img_tmpl_sig', location='eastus')
    def test_image_build_shared_image(self, resource_group, resource_group_location):
        self.identity_role(resource_group)
    
        self.kwargs.update({
            'loc': resource_group_location,
            'img_src': LINUX_IMAGE_SOURCE,
            'gallery': self.create_random_name("ib_sig", 10),
            'sig1': 'image1',
            'tmpl': 'template01',
            'tmpl_2': 'template02',
            'script': TEST_SHELL_SCRIPT_URL,
            'vm': 'custom-vm'
        })
    
        self.cmd('sig create -g {rg} --gallery-name {gallery}', checks=self.check('name', self.kwargs['gallery']))
        self.cmd('sig image-definition create -g {rg} --gallery-name {gallery} --gallery-image-definition {sig1} '
                 '--os-type linux -p publisher1 -f offer1 -s sku1')
    
        self.cmd('image builder create -n {tmpl} -g {rg} --scripts {script} --image-source {img_src} --identity {ide} --defer')
        self.cmd('image builder output add -n {tmpl} -g {rg} --gallery-name {gallery} --gallery-image-definition {sig1}'
                 ' --gallery-replication-regions eastus --defer',
                 checks=[
                     self.check('properties.distribute[0].replicationRegions[0]', 'eastus'),
                     self.check('properties.distribute[0].runOutputName', '{sig1}')
                 ])
    
        # send put request using cached template object
        self.cmd('image builder update -n {tmpl} -g {rg}', checks=[
            self.check('distribute[0].replicationRegions[0]', 'eastus'),
            self.check('distribute[0].runOutputName', '{sig1}')
        ])
    
        # Takes a long time to build a SIG based image template.
        self.cmd('image builder run -n {tmpl} -g {rg}')
    
        output = self.cmd('image builder show-runs -n {tmpl} -g {rg} --output-name {sig1}',
                          checks=self.check('provisioningState', 'Succeeded')
                          ).get_output_in_json()
    
        self.kwargs['image_id'] = output['artifactId']
    
        # check that vm successfully created from template.
>       self.cmd('vm create --name {vm} -g {rg} --image {image_id} --generate-ssh-keys --admin-username azureuser')

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:553: 
 
 
 
                                     
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_image_build_shared_image.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/img_tmpl_sig000001/providers/Microsoft.Compute/virtualMachines/custom-vm?$expand=instanceView&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/img_tmpl_sig000001/providers/Microsoft.Compute/virtualMachines/custom-vm?$expand=instanceView&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/img_tmpl_sig000001/providers/Microsoft.Compute/virtualMachines/custom-vm?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_image_builder_commands.py:509
Failed test_vm_reimage self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f946271a990>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f9468164a50>
command = 'vm create -g cli_test_vm_reimage_000001 -n vm --image "OpenLogic:CentOS:7.5:latest" --admin-username centosadmin --ad...password --os-disk-delete-option Delete --subnet mysubnet --vnet-name myvnet --public-ip-address pubip --nsg-rule NONE'
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.VmReimageTest testMethod=test_vm_reimage>
resource_group = 'cli_test_vm_reimage_000001'

    @AllowLargeResponse()
    @ResourceGroupPreparer(name_prefix='cli_test_vm_reimage
')
    def test_vm_reimage(self, resource_group):
    
        self.kwargs.update({
            'vm': 'vm',
            'subnet': 'mysubnet',
            'vnet': 'myvnet',
            'pubip': 'pubip',
        })
    
        # Create a public IP resource with service tag
        self.cmd('network public-ip create --name {pubip} -g {rg} --ip-tags FirstPartyUsage=/NonProd')
    
>       self.cmd('vm create -g {rg} -n {vm} --image "OpenLogic:CentOS:7.5:latest" --admin-username centosadmin --admin-password testPassword0 '
                 '--authentication-type password --os-disk-delete-option Delete --subnet {subnet} --vnet-name {vnet} --public-ip-address {pubip} --nsg-rule NONE')

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:84: 
 
                                       
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_vm_reimage.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_reimage_000001/providers/Microsoft.Compute/virtualMachines/vm?$expand=instanceView&api-version=2026-04-01>)&nbsp;was&nbsp;found.
E               Found 3 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_reimage_000001/providers/Microsoft.Compute/virtualMachines/vm?$expand=instanceView&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/cli_test_vm_reimage_000001/providers/Microsoft.Compute/virtualMachines/vm?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               3 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_reimage_000001/providers/Microsoft.Compute/virtualMachines/vm?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:69
Failed test_vm_open_port self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f94617e6270>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f9462bab750>
command = 'vm create -g cli_test_open_port000001 -l westus -n vm1 --admin-username ubuntu --image Canonical:UbuntuServer:14.04.4...min-password @PasswordPassword1! --public-ip-address-allocation dynamic --authentication-type password --nsg-rule NONE'
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.VMOpenPortTest testMethod=test_vm_open_port>
resource_group = 'cli_test_open_port000001'

    @record_only()
    @ResourceGroupPreparer(name_prefix='cli_test_open_port')
    def test_vm_open_port(self, resource_group):
    
        self.kwargs.update({
            'vm': 'vm1'
        })
    
>       self.cmd('vm create -g {rg} -l westus -n {vm} --admin-username ubuntu --image Canonical:UbuntuServer:14.04.4-LTS:latest --admin-password @PasswordPassword1! --public-ip-address-allocation dynamic --authentication-type password --nsg-rule NONE')

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:162: 
 
 
                                      
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_vm_open_port.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_open_port000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2026-04-01>)&nbsp;was&nbsp;found.
E               Found 4 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_open_port000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&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/cli_test_open_port000001/providers/Microsoft.Compute/virtualMachines/vm1?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               3 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port000001/providers/Microsoft.Compute/virtualMachines/vm1?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               4 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_open_port000001/providers/Microsoft.Compute/virtualMachines/vm1?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:153
Failed test_vm_show_list_sizes_list_ip_addresses The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:184
Failed test_vm_capture_zone_resilient_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:433
Failed test_vm_generalize The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:371
Failed test_vm_generalize_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:402
Failed test_vm_windows_license_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:473
Failed test_vm_custom_image_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:624
Failed test_vm_custom_image_debian2 The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:678
Failed test_vm_custom_image_management The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:778
Failed test_vm_create_with_specialized_unmanaged_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:897
Failed test_vm_create_with_unmanaged_data_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:926
Failed test_vm_redeploy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:970
Failed test_vm_convert The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:991
Failed test_vm_create_by_attach_unmanaged_os_and_data_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:1135
Failed test_vm_set_os_disk_size The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:1231
Failed test_vm_data_disk_creation_from_copy_and_restore The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:1402
Failed test_vm_disk_from_restore_point The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:1344
Failed test_vm_managed_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:1259
Failed test_vm_force_deallocate The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:1956
Failed test_vm_user_update_win The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:1974
Failed test_vm_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:2032
Failed test_vm_create_no_wait The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2079
Failed test_vm_avset_migrate The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2224
Failed test_vm_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:2357
Failed test_vm_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:2425
Failed test_vm_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:2506
Failed test_vm_extension_list The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2473
Failed test_vm_create_ubuntu The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2584
Failed test_vm_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:2625
Failed test_vm_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:2663
Failed test_vm_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:2776
Failed test_vm_update_size The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2721
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_vm_nic_add_remove_set_aaz The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2942
Failed test_vm_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:3028
Failed test_vm_create_with_monitor The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3067
Failed test_vm_metric_tail The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3089
Failed test_vm_create_with_workspace_linux The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3122
Failed test_vm_create_with_workspace_windows The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3167
Failed test_vm_boot_diagnostics The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3323
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_create_auth The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3712
Failed test_vm_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:3644
Failed test_vm_create_provision_vm_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:3685
Failed test_vm_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:3753
Failed test_vm_create_custom_ip The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3811
Failed test_vm_disk_attach_detach The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3841
Failed test_vm_disk_attach_detach_api The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3969
Failed test_vm_disk_attach_multiple_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:4026
Failed test_vm_disk_force_detach The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:3899
Failed test_vm_disk_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:4084
Failed test_vm_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:4168
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_vm_data_unmanaged_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:4339
Failed test_vm_data_unmanaged_disk_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:4393
Failed test_vm_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:4450
Failed test_vm_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:4478
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_vm_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:5645
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_vm_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:5685
Failed test_vm_create_windows_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:5721
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_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:6484
Failed test_vm_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:6315
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_vm_create_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:6734
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_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:6949
Failed test_vm_run_command_with_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:6931
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_vm_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:7114
Failed test_vm_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:7174
Failed test_vmss_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: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_disk_encryption_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7320
Failed test_vm_disk_encryption_with_encryption_identity_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:7340
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_community_gallery_operations The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:9186
Failed test_create_image_version_with_allow_replicated_location_deletion The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8522
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_gallery_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8214
Failed test_gallery_image_version_vhd The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8367
Failed test_gallery_soft_delete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:9039
Failed test_image_update_add_set The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8316
Failed test_image_version_create_for_diff_source The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8128
Failed test_image_version_create_os_vhd The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8413
Failed test_image_version_end_of_life_date The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8557
Failed test_replication_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:9140
Failed test_shared_gallery The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8015
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_capacity_reservation_operations The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13279
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.

@azure-pipelines

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

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.

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