Share via

az vm create fails with "ERROR: Extra data: line 1 column 4 (char 3)" across multiple Azure CLI versions

Koteru Reddy (LTIMindtree Limited) 85 Reputation points Microsoft External Staff
2026-04-08T06:39:32.7533333+00:00

We are seeing consistent provisioning failures when running az vm create, returning the following error:

ERROR: Extra data: line 1 column 4 (char 3)
  • This error started appearing suddenly and is now blocking our automated infrastructure provisioning and validation pipelines.
  • The failure occurs inside Azure CLI itself (JSON parsing stage) and exits with a non‑zero return code, causing downstream failures.
  • The issue is reproducible across multiple Azure CLI versions, so this does not appear to be version-specific.

Validated versions:

  "azure-cli": "2.84.0"
  
  "azure-cli": "2.85.0"

What Tried:

  • Tested with multiple Azure CLI versions (upgrade / downgrade).
  • Used --only-show-errors.
  • Separated stdout and stderr in scripts.
  • Implemented retry logic.
  • Verified the issue is not related to quota, SKU availability, or capacity constraints.

None of the above mitigations resolved the issue.

Observations:

The failure happens consistently when running commands similar to:

az vm create ... --vmss vmss

This indicates a CLI-side parsing failure, not a scripting or parameter issue.

Impact:

  • Blocks VM provisioning.
  • Breaks CI/CD validation pipelines.
  • Affects multiple Kubernetes distros (k3s, microk8s, RKE, etc.).
  • High operational impact.

Request/Help Needed:

We are looking for official guidance or a concrete fix for this scenario, specifically:

  1. Is this a known Azure CLI issue related to:
    • az vm create --vmss usage with VMSS Flexible orchestration?
    1. Is there a recommended alternative (for example):
      • VMSS‑only provisioning
        • Explicit orchestration mode requirements
          • A CLI fix or workaround we should adopt
          1. Are there known backend/ARM response changes that could cause duplicate or malformed JSON responses?

Any confirmation, mitigation guidance, or fix recommendation would be extremely helpful, as this is currently blocking production validation workflows.

Azure Cloud Services
Azure Cloud Services

An Azure platform as a service offer that is used to deploy web and cloud applications.


Answer accepted by question author
  1. Jilakara Hemalatha 12,100 Reputation points Microsoft External Staff Moderator
    2026-04-09T05:59:06.0733333+00:00

    Thank you all for your support and guidance during the investigation.

    The failure was confirmed to be unrelated to VMSS orchestration mode, capacity constraints, or backend (CRP) behavior. This was further validated with the Compute Resource Provider (CRP) team, who confirmed that no issues were observed from the service side and that the platform was functioning as expected.

    Upon reviewing the debug logs, it was observed that the failure was occurring within Azure CLI during the image alias resolution phase. Specifically, a JSON parsing error (Extra data: line 1 column 4 (char 3)) was triggered before the VM provisioning request could be completed.

    For this scenario, the issue was observed when using the image alias "Ubuntu2204", which may have led to inconsistent parsing of the alias metadata within Azure CLI. As a workaround, the image reference was updated to the fully qualified URN "Canonical:0001-com-ubuntu-server-jammy:22_04-lts:latest". Following this change, the command executed successfully, and VM provisioning completed without any errors.

    Additionally, we would like to highlight that similar behaviors are being tracked in the Azure CLI GitHub repository:

    We recommend monitoring the above threads for further updates or fixes from the Azure CLI team

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Koteru Reddy (LTIMindtree Limited) 85 Reputation points Microsoft External Staff
    2026-04-08T13:45:40.7+00:00

    The issue got resolved after updated the vm size from Ubuntu2204 to 

     

    Canonical:0001-com-ubuntu-server-jammy:22_04-lts:latest

     

    Let me do remaining distro validations and confirm you.

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.