Skip to content

{Compute} az vm/ vmss create: Support Ephemeral OS disk with full caching with --ephemeral-os-disk-enable-full-caching#33292

Open
william051200 wants to merge 7 commits intoAzure:devfrom
william051200:32351-full-caching
Open

{Compute} az vm/ vmss create: Support Ephemeral OS disk with full caching with --ephemeral-os-disk-enable-full-caching#33292
william051200 wants to merge 7 commits intoAzure:devfrom
william051200:32351-full-caching

Conversation

@william051200
Copy link
Copy Markdown
Member

Let's merge PR first before merging this PR

Related command

az vm create
az vm show
az vmss create
az vmss show

Description

Resolve #32351

aaz Azure/aaz#995

Testing Guide

Refer to vm\tests\latest\test_vm_commands.py - test_vm_vmss_ephemeral_os_disk_full_caching

History Notes

[Compute] az vm/ vmss create: Support Ephemeral OS disk with full caching with --ephemeral-os-disk-enable-full-caching


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

Copilot AI review requested due to automatic review settings April 30, 2026 00:41
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 30, 2026

❌AzureCLI-FullTest
🔄acr
🔄latest
🔄3.12
🔄3.13
🔄acs
🔄latest
🔄3.12
🔄3.13
🔄advisor
🔄latest
️✔️3.12
🔄3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
🔄apim
🔄latest
🔄3.12
🔄3.13
🔄appconfig
🔄latest
️✔️3.12
🔄3.13
❌appservice
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_linux_webapp_quick_create_cd self = <azure.cli.testsdk.base.ExecutionResult object at 0x7ff0cb8e5fa0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7ff0cc724ce0>
command = 'webapp create -g clitest.rg000001 -n webapp-linux-cd000002 --plan plan-quick-linux-cd -u https://github.com/yugangw-msft/azure-site-test.git&nbsp;-r&nbsp;"NODE
20-lts"'
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:157: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                       _ 

ex = ValidationError("Linux Runtime 'NODE
Failed test_win_webapp_quick_create_cd The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:174
Failed test_win_webapp_quick_create_runtime The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:156
Failed test_download_win_web_log The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:480
Failed test_webapp_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:732
Failed test_linux_webapp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1261
Failed test_linux_webapp_remote_ssh The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1366
Failed test_acr_integration The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1427
Failed test_webapp_linux_acr_use_identity The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2592
Failed test_webapp_deployment_source_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3368
Failed test_webapp_deployment_source_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3381
Failed test_webapp_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3307
Failed test_webapp_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3320
❌3.13
Type Test Case Error Message Line
Failed test_linux_webapp_quick_create_cd self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f9439e16c10>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f943ac9e990>
command = 'webapp create -g clitest.rg000001 -n webapp-linux-cd000002 --plan plan-quick-linux-cd -u https://github.com/yugangw-msft/azure-site-test.git&nbsp;-r&nbsp;"NODE
20-lts"'
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.13/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:157: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                       _ 

ex = ValidationError("Linux Runtime 'NODE
Failed test_win_webapp_quick_create_cd The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:174
Failed test_win_webapp_quick_create_runtime The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:156
Failed test_download_win_web_log The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:480
Failed test_webapp_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:732
Failed test_linux_webapp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1261
Failed test_linux_webapp_remote_ssh The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1366
Failed test_acr_integration The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1427
Failed test_webapp_linux_acr_use_identity The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2592
Failed test_webapp_deployment_source_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3368
Failed test_webapp_deployment_source_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3381
Failed test_webapp_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3307
Failed test_webapp_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3320
🔄aro
🔄latest
🔄3.12
🔄3.13
❌backup
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_backup_CrossZonalRestore self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f2fd13090a0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f2fd376cad0>
command = 'vm create -n clitest-vm000004 -g AzureBackupRG_clitest_000001 --image Win2022Datacenter --admin-username clitest-vm00...ssword %j^VYw9Q3Z@Cu$*h --tags MabUsed=Yes Owner=sisi Purpose=CLITest DeleteBy=12-2099 AutoShutdown=No --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.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:157: 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:
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/decorators.py:40: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:50: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:50: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:50: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:39: in preparer_wrapper
    parameter_update = self.create_resource(
src/azure-cli/azure/cli/command_modules/backup/tests/latest/preparers.py:147: in create_resource
    execute(self.cli_ctx, cmd)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in in_process_execute
    raise ex.exception
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
                           _ 

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

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
                raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
            else:
>               raise CLIError(ex)
E               knack.util.CLIError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_CrossZonalRestore.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000004?$expand=instanceView&api-version=2025-11-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/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000004?$expand=instanceView&api-version=2025-04-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/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000004?api-version=2025-04-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/backup/tests/latest/test_backup_commands.py:779
Failed test_backup_container self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f2fd1396030>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f2fd397fdd0>
command = 'vm create -n clitest-vm000003 -g AzureBackupRG_clitest_000001 --image Win2022Datacenter --admin-username clitest-vm00...ssword %j^VYw9Q3Z@Cu$*h --tags MabUsed=Yes Owner=sisi Purpose=CLITest DeleteBy=12-2099 AutoShutdown=No --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.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:157: 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:
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:50: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:50: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:39: in preparer_wrapper
    parameter_update = self.create_resource(
src/azure-cli/azure/cli/command_modules/backup/tests/latest/preparers.py:147: in create_resource
    execute(self.cli_ctx, cmd)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in in_process_execute
    raise ex.exception
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
                             _ 

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

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
                raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
            else:
>               raise CLIError(ex)
E               knack.util.CLIError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_container.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?$expand=instanceView&api-version=2025-11-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/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?$expand=instanceView&api-version=2025-04-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/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?api-version=2025-04-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/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?api-version=2025-04-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/backup/tests/latest/test_backup_commands.py:218
Failed test_backup_disk_exclusion self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f2fd8540650>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f2fd35c4a10>
command = 'vm create -n clitest-vm000003 -g AzureBackupRG_clitest_000001 --image Win2022Datacenter --admin-username clitest-vm00...ssword %j^VYw9Q3Z@Cu$*h --tags MabUsed=Yes Owner=sisi Purpose=CLITest DeleteBy=12-2099 AutoShutdown=No --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.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:157: 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:
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:50: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:50: in preparer_wrapper
    fn(test_class_instance, **kwargs)
src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/preparers.py:39: in preparer_wrapper
    parameter_update = self.create_resource(
src/azure-cli/azure/cli/command_modules/backup/tests/latest/preparers.py:147: in create_resource
    execute(self.cli_ctx, cmd)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in in_process_execute
    raise ex.exception
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
                             _ 

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

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
                raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
            else:
>               raise CLIError(ex)
E               knack.util.CLIError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/backup/tests/latest/recordings/test_backup_disk_exclusion.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?$expand=instanceView&api-version=2025-11-01>)&nbsp;was&nbsp;found.
E               Found 8 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?$expand=instanceView&api-version=2025-04-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/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?api-version=2025-04-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/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?api-version=2025-04-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/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?api-version=2025-04-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None
E               
E               5 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?api-version=2025-04-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None
E               
E               6 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?api-version=2025-04-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None
E               
E               7 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?api-version=2025-04-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               _custom_request_query_matcher - assertion failure :
E               None
E               
E               8 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureBackupRG_clitest_000001/providers/Microsoft.Compute/virtualMachines/clitest-vm000003?api-version=2025-04-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/backup/tests/latest/test_backup_commands.py:1049
Failed test_backup_item The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:368
Failed test_backup_job The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:965
Failed test_backup_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:253
Failed test_backup_protection The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:478
Failed test_backup_restore The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:666
Failed test_backup_restore_when_storage_in_different_rg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:820
Failed test_backup_rg_mapping The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1458
Failed test_backup_rp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:453
Failed test_backup_scenario The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:46
Failed test_backup_softdelete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1005
Failed test_vault_soft_delete_with_items The error message is too long, please check the pipeline log for details. azure/cli/command_modules/backup/tests/latest/test_backup_commands.py:1593
🔄3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
🔄billing
🔄latest
🔄3.12
🔄3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
🔄cdn
🔄latest
🔄3.12
🔄3.13
🔄cloud
🔄latest
🔄3.12
🔄3.13
🔄cognitiveservices
🔄latest
️✔️3.12
🔄3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
🔄configure
🔄latest
️✔️3.12
🔄3.13
🔄consumption
🔄latest
️✔️3.12
🔄3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
🔄containerapp
🔄latest
🔄3.12
🔄3.13
🔄core
🔄latest
️✔️3.12
🔄3.13
🔄cosmosdb
🔄latest
🔄3.12
🔄3.13
🔄databoxedge
🔄latest
🔄3.12
🔄3.13
🔄dls
🔄latest
🔄3.12
🔄3.13
🔄dms
🔄latest
️✔️3.12
🔄3.13
🔄eventgrid
🔄latest
🔄3.12
🔄3.13
🔄eventhubs
🔄latest
🔄3.12
🔄3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
🔄find
🔄latest
🔄3.12
🔄3.13
🔄hdinsight
🔄latest
️✔️3.12
🔄3.13
🔄identity
🔄latest
🔄3.12
🔄3.13
🔄iot
🔄latest
️✔️3.12
🔄3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
🔄maps
🔄latest
️✔️3.12
🔄3.13
🔄marketplaceordering
🔄latest
🔄3.12
🔄3.13
🔄monitor
🔄latest
🔄3.12
🔄3.13
🔄mysql
🔄latest
️✔️3.12
🔄3.13
🔄netappfiles
🔄latest
️✔️3.12
🔄3.13
❌network
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_network_nic_convenience_commands self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fdd42206c90>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fdd4a8d23c0>
command = 'vm create -g cli_nic_convenience_test000001 -n conveniencevm1 --image Canonical:UbuntuServer:18.04-LTS:latest --admin...ername --admin-password aBcD1234!@#$ --authentication-type password --subnet subnet1 --vnet-name vnet1 --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.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:157: 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 = <azure.cli.command_modules.network.tests.latest.test_network_commands.NetworkNicConvenienceCommandsScenarioTest testMethod=test_network_nic_convenience_commands>
resource_group = 'cli_nic_convenience_test000001'

    @AllowLargeResponse(size_kb=99999)
    @ResourceGroupPreparer(name_prefix='cli_nic_convenience_test')
    def test_network_nic_convenience_commands(self, resource_group):
        self.kwargs.update({
            'vm': 'conveniencevm1',
            'subnet': 'subnet1',
            'vnet': 'vnet1'
        })
    
>       self.cmd('vm create -g {rg} -n {vm} --image Canonical:UbuntuServer:18.04-LTS:latest --admin-username myusername --admin-password aBcD1234!@#$ --authentication-type password --subnet {subnet} --vnet-name {vnet} --nsg-rule None')

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

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

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
                raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
            else:
>               raise CLIError(ex)
E               knack.util.CLIError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_nic_convenience_commands.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_nic_convenience_test000001/providers/Microsoft.Compute/virtualMachines/conveniencevm1?$expand=instanceView&api-version=2025-11-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/cli_nic_convenience_test000001/providers/Microsoft.Compute/virtualMachines/conveniencevm1?$expand=instanceView&api-version=2025-04-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_nic_convenience_test000001/providers/Microsoft.Compute/virtualMachines/conveniencevm1?api-version=2025-04-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
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:5104
Failed test_network_watcher_packet_capture self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fdd42206c90>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fdd49de3b60>
command = 'vm create -g cli_test_nw_packet_capture000001 -n vm1 --image Canonical:UbuntuServer:16.04-LTS:latest --authentication...ploy --admin-password PassPass10!) --nsg vm1 --subnet subnet1 --vnet-name vnet1 --nsg-rule None --size Standard_D2s_v3'
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:157: 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 = <azure.cli.command_modules.network.tests.latest.test_network_commands.NetworkWatcherScenarioTest testMethod=test_network_watcher_packet_capture>
resource_group = 'cli_test_nw_packet_capture000001'
resource_group_location = 'westus2'

    @mock.patch('azure.cli.command_modules.vm.actions.get_thread_count', mock_thread_count)
    @ResourceGroupPreparer(name_prefix='cli_test_nw_packet_capture', location='westus2')
    @AllowLargeResponse()
    def test_network_watcher_packet_capture(self, resource_group, resource_group_location):
    
        self.kwargs.update({
            'loc': resource_group_location,
            'vm': 'vm1',
            'capture1': 'capture1',
            'capture2': 'capture2',
            'subnet': 'subnet1',
            'vnet': 'vnet1'
        })
    
>       self.cmd('vm create -g {rg} -n {vm} --image Canonical:UbuntuServer:16.04-LTS:latest --authentication-type password --admin-username deploy '
                 '--admin-password PassPass10!) --nsg {vm} --subnet {subnet} --vnet-name {vnet} --nsg-rule None --size Standard_D2s_v3')

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

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

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
                raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
            else:
>               raise CLIError(ex)
E               knack.util.CLIError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_watcher_packet_capture.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_nw_packet_capture000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2025-11-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_nw_packet_capture000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2025-04-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_nw_packet_capture000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2025-04-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_nw_packet_capture000001/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2025-04-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_nw_packet_capture000001/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2025-04-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
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:7805
Failed test_network_watcher_packet_capture_vmss_as_target The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:7837
Failed test_network_watcher_vm The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:7773
Failed test_nw_connection_monitor_output self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fdd424c0aa0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fdd48453a70>
command = 'vm create -g connection_monitor_v2_test_000001 --name vm1 --image Canonical:UbuntuServer:18.04-LTS:latest --nsg vm1 --generate-ssh-keys --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.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:157: 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 = <azure.cli.command_modules.network.tests.latest.test_nw_connection_monitor.NWConnectionMonitorScenarioTest testMethod=test_nw_connection_monitor_output>
resource_group = 'connection_monitor_v2_test_000001'
resource_group_location = 'eastus'

    @ResourceGroupPreparer(name_prefix='connection_monitor_v2_test
', location='eastus')
    @AllowLargeResponse()
    def test_nw_connection_monitor_output(self, resource_group, resource_group_location):
>       self.prepare_connection_monitor_v2_env(resource_group, resource_group_location)

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_connection_monitor.py:282: 
 
 
                                      
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_connection_monitor.py:39: in prepare_connection_monitor_v2_env
    vm1_info = self.prepare_vm(resource_group, 'vm1')
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_connection_monitor.py:21: in prepare_vm
    vm_info = self.cmd(vm_create_cmd_tpl.format(rg=resource_group, vm=vm)).get_output_in_json()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in in_process_execute
    raise ex.exception
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:812: in run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
                               _ 

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

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
                raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
            else:
>               raise CLIError(ex)
E               knack.util.CLIError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_nw_connection_monitor_output.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/connection_monitor_v2_test_000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2025-11-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/connection_monitor_v2_test_000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2025-04-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/connection_monitor_v2_test_000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2025-04-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
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_connection_monitor.py:278
Failed test_nw_connection_monitor_output_type_as_workspace The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_connection_monitor.py:300
Failed test_nw_connection_monitor_v2_creation The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_connection_monitor.py:58
Failed test_nw_connection_monitor_v2_endpoint The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_nw_connection_monitor.py:81
🔄3.13
🔄policyinsights
🔄latest
️✔️3.12
🔄3.13
🔄postgresql
🔄latest
🔄3.12
🔄3.13
🔄privatedns
🔄latest
🔄3.12
🔄3.13
🔄profile
🔄latest
🔄3.12
🔄3.13
🔄rdbms
🔄latest
️✔️3.12
🔄3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
🔄relay
🔄latest
️✔️3.12
🔄3.13
🔄resource
🔄latest
🔄3.12
🔄3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
🔄search
🔄latest
️✔️3.12
🔄3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
🔄servicebus
🔄latest
️✔️3.12
🔄3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
🔄signalr
🔄latest
🔄3.12
🔄3.13
🔄sql
🔄latest
️✔️3.12
🔄3.13
❌sqlvm
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_sqlvm_create_and_delete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/sqlvm/tests/latest/test_sqlvm_commands.py:364
Failed test_sqlvm_mgmt The error message is too long, please check the pipeline log for details. azure/cli/command_modules/sqlvm/tests/latest/test_sqlvm_commands.py:180
Failed test_sqlvm_mgmt_assessment The error message is too long, please check the pipeline log for details. azure/cli/command_modules/sqlvm/tests/latest/test_sqlvm_commands.py:114
Failed test_sqlvm_update_license_and_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/sqlvm/tests/latest/test_sqlvm_commands.py:463
Failed test_sqlvm_aad_auth_negative The error message is too long, please check the pipeline log for details. azure/cli/command_modules/sqlvm/tests/latest/test_sqlvm_commands.py:723
Failed test_sqlvm_add_and_remove The error message is too long, please check the pipeline log for details. azure/cli/command_modules/sqlvm/tests/latest/test_sqlvm_commands.py:661
🔄3.13
🔄storage
🔄latest
🔄3.12
🔄3.13
🔄synapse
🔄latest
️✔️3.12
🔄3.13
🔄telemetry
🔄latest
️✔️3.12
🔄3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
🔄vm
🔄latest
🔄3.12
🔄3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 30, 2026

⚠️AzureCLI-BreakingChangeTest
⚠️vm
rule cmd_name rule_message suggest_message
⚠️ 1001 - CmdAdd sig identity wait cmd sig identity wait added
⚠️ 1006 - ParaAdd vm create cmd vm create added parameter ephemeral_os_disk_enable_full_caching
⚠️ 1006 - ParaAdd vmss create cmd vmss create added parameter ephemeral_os_disk_enable_full_caching

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 30, 2026

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

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 enabling ephemeral OS disk full caching during VM/VMSS creation, and updates the VM/VMSS AAZ command schemas to a newer Compute API version so the new enableFullCaching field can be surfaced in show/wait output.

Changes:

  • Introduces --ephemeral-os-disk-enable-full-caching (with alias) for az vm create / az vmss create and plumbs it into diffDiskSettings.enableFullCaching.
  • Updates AAZ-generated VM/VMSS create/show/update/wait schemas to Compute API 2025-11-01, including read/write schema for enableFullCaching.
  • Adds a scenario test validating enableFullCaching for both VM and VMSS.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py Adds live scenario coverage for VM/VMSS create with full caching enabled and validates enableFullCaching in show output.
src/azure-cli/azure/cli/command_modules/vm/custom.py Updates create_vm/create_vmss function signatures to accept the new argument.
src/azure-cli/azure/cli/command_modules/vm/_params.py Adds the new CLI argument/aliases for VM/VMSS create.
src/azure-cli/azure/cli/command_modules/vm/_validators.py Passes the new argument into storage profile normalization.
src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py Writes diffDiskSettings.enableFullCaching into the normalized disk info for ephemeral OS disk.
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_create.py Bumps API version and updates AAZ schema to include enableFullCaching support (plus other generated fields).
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_show.py Bumps API version and updates output schema to include enableFullCaching (plus other generated fields).
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_update.py Bumps API version and schema to include enableFullCaching (plus other generated fields).
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/_wait.py Bumps API version and schema to include enableFullCaching (plus other generated fields).
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_create.py Bumps API version and schema to include enableFullCaching (plus other generated fields/args).
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_show.py Bumps API version and output schema to include enableFullCaching (plus other generated fields).
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_update.py Bumps API version and schema to include enableFullCaching (plus other generated fields/args).
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_wait.py Bumps API version and schema to include enableFullCaching (plus other generated fields).
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/sig/identity/init.py Exposes the generated sig identity wait command via __init__.

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

diff_disk_settings = cls._args_schema.virtual_machine_profile.storage_profile.os_disk.diff_disk_settings
diff_disk_settings.enable_full_caching = AAZBoolArg(
options=["enable-full-caching"],
help="Specifies whether or not to enable full caching for this VM which will cache the OS disk locally on the host and make this VM more resilient to storage outages",
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

This help string is in the VMSS command but says "enable full caching for this VM". Please update it to refer to the scale set (VMSS) to avoid confusing users (and ideally end the sentence with a period for consistency with other help text).

Suggested change
help="Specifies whether or not to enable full caching for this VM which will cache the OS disk locally on the host and make this VM more resilient to storage outages",
help="Specifies whether or not to enable full caching for this scale set, which will cache the OS disk locally on the host and make the scale set more resilient to storage outages.",

Copilot uses AI. Check for mistakes.
if ephemeral_os_disk_placement:
info['os']['diffDiskSettings']['placement'] = ephemeral_os_disk_placement
if ephemeral_os_disk_enable_full_caching is not None:
info['os']['diffDiskSettings']['enableFullCaching'] = ephemeral_os_disk_enable_full_caching
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

enableFullCaching appears to require Compute API version 2025-11-01 (per issue/spec), but the ARM template builder still uses apiVersion: 2025-04-01 for Microsoft.Compute/virtualMachines and virtualMachineScaleSets. As-is, adding diffDiskSettings.enableFullCaching here is likely to be rejected during template deployment. Please update the template resource apiVersion(s) to 2025-11-01 (or conditionally bump when this flag is set) so VM/VMSS create actually works.

Suggested change
info['os']['diffDiskSettings']['enableFullCaching'] = ephemeral_os_disk_enable_full_caching
raise CLIError(
'--ephemeral-os-disk-enable-full-caching requires the ARM template '
'resource apiVersion for Microsoft.Compute/virtualMachines and '
'Microsoft.Compute/virtualMachineScaleSets to be 2025-11-01 or later. '
'Update the template resource apiVersion before enabling this property.'
)

Copilot uses AI. Check for mistakes.
Comment on lines +1203 to +1205
c.argument('ephemeral_os_disk_enable_full_caching', arg_type=get_three_state_flag(),
options_list=['--ephemeral-os-disk-enable-full-caching', '--ephemeral-full-caching'],
help='Specifies whether or not to enable full caching for this VMSS which will cache the OS disk locally on the host and make this VMSS more resilient to storage outages')
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

This new argument is available for both vm create and vmss create, but (1) it is missing a min_api gate even though the feature requires 2025-11-01, and (2) the help text says "this VMSS" even when used with az vm create. Please add an appropriate min_api (likely 2025-11-01) and adjust the help to refer to "VM/VMSS" (or "VM or VMSS").

Suggested change
c.argument('ephemeral_os_disk_enable_full_caching', arg_type=get_three_state_flag(),
options_list=['--ephemeral-os-disk-enable-full-caching', '--ephemeral-full-caching'],
help='Specifies whether or not to enable full caching for this VMSS which will cache the OS disk locally on the host and make this VMSS more resilient to storage outages')
c.argument('ephemeral_os_disk_enable_full_caching', arg_type=get_three_state_flag(), min_api='2025-11-01',
options_list=['--ephemeral-os-disk-enable-full-caching', '--ephemeral-full-caching'],
help='Specifies whether or not to enable full caching for this VM/VMSS, which will cache the OS disk locally on the host and make the VM/VMSS more resilient to storage outages')

Copilot uses AI. Check for mistakes.
Comment on lines 18 to 22
_aaz_info = {
"version": "2025-04-01",
"version": "2025-11-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}", "2025-04-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}", "2025-11-01"],
]
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The PR title/description is scoped to ephemeral OS disk full caching, but this file also bumps the VMSS API version to 2025-11-01 and introduces multiple new public CLI arguments (e.g., --external-health-policy, --lifecycle-hooks-profile, operation recovery settings, additional enum values). Please confirm these extra surface-area changes are intentional; if so, update the PR description/history notes accordingly or split them into a separate PR to keep review and release notes accurate.

Copilot uses AI. Check for mistakes.
diff_disk_settings = cls._args_schema.virtual_machine_profile.storage_profile.os_disk.diff_disk_settings
diff_disk_settings.enable_full_caching = AAZBoolArg(
options=["enable-full-caching"],
help="Specifies whether or not to enable full caching for this VM which will cache the OS disk locally on the host and make this VM more resilient to storage outages",
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

This help string is in the VMSS command but says "enable full caching for this VM". Please update it to refer to the scale set (VMSS) to avoid confusing users (and ideally end the sentence with a period for consistency with other help text).

Suggested change
help="Specifies whether or not to enable full caching for this VM which will cache the OS disk locally on the host and make this VM more resilient to storage outages",
help="Specifies whether or not to enable full caching for this scale set, which will cache the OS disk locally on the host and make this scale set more resilient to storage outages.",

Copilot uses AI. Check for mistakes.
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 Compute az vm/vmss/image/disk/snapshot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AzCLI support for Ephemeral OS disk with full caching during VM/VMSS create/update

5 participants