Skip to content

Customer feedback | az container create | New required options for az container create command #30496

@dbradish-microsoft

Description

@dbradish-microsoft

Type of issue

Other (describe below)

Reference command name

az container create

Feedback

This GitHub issue is being moved from MicrosoftDocs/azure-docs-cli 4812.


Type of issue

Outdated article

Feedback

We ran into multiple errors this morning while rolling out routine updates to our Azure Container instances. We use the command az container create to deploy new sets of containers, and an example of this is below.

  az container create \
    --resource-group  \
    --name \
    --image \
    --restart-policy \
    --location \
    --command-line \
    --environment-variables \
    --memory \
    --registry-username \
    --registry-password \
    --only-show-errors

This morning we got errors for multiple new items needing to be added, which are not documented as required.

--os-type

ERROR: (InvalidOsType) The 'osType' for container group '<null>' is invalid. The value must be one of 'Windows,Linux'.
Code: InvalidOsType
Message: The 'osType' for container group '<null>' is invalid. The value must be one of 'Windows,Linux'.

--cpu

ERROR: (ResourceSomeRequestsNotSpecified) The 'Cpu' request is not specified in 'MemoryInGB '6' Cpu ''' in container 'vergesense-analytics-backend-staging-sidekiq-1' of contain group 'vergesense-analytics-backend-staging-sidekiq-1'. It is required since API version '2017-07-01-preview'.
Code: ResourceSomeRequestsNotSpecified
Message: The 'Cpu' request is not specified in 'MemoryInGB '6' Cpu ''' in container 'vergesense-analytics-backend-staging-sidekiq-1' of contain group 'vergesense-analytics-backend-staging-sidekiq-1'. It is required since API version '2017-07-01-preview'.

It's worth noting that I was able to run these commands with Azure CLI 2.65.0 without issue, but once upgraded to 2.67.0 I encountered both errors.

Page URL

https://learn.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest#az_container_create

Content source URL

https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/latest/docs-ref-autogen/container.yml

Author

No response

Document Id

ba32e12d-8283-f980-e1d0-1ca2a75a5152

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botContainer Instancesaz containerService AttentionThis issue is responsible by Azure service team.needs-triageThis is a new issue that needs to be triaged to the appropriate team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions