Skip to content

Command az vm list-skus --location germanywestcentral Killed on low memory machine #30389

@nfaust-edb

Description

@nfaust-edb

Describe the bug

I'm running the command az vm list-skus --size Standard_D2_v4 --location germanywestcentral --verbose inside an Azure container instance with 1GB memory. The process is being killed with exit code 137. Looking through the azure-cli code, the client.resource_skus.list() isn't providing a filter to the REST API method.

I ended up successfully using az rest --method GET --url "https://management.azure.com/subscriptions/$(az account show | jq -r .id)/providers/Microsoft.Compute/skus?api-version=2019-04-01&\$filter=location eq 'germanywestcentral'" | jq -r '.value[] | select(.name == "Standard_D2_v4")' as a work around since the location filtering is being done on the API server before everything is being returned to my azure-cli client.

Ref:

Related command

az vm list-skus  --size Standard_D2_v4 --location germanywestcentral --verbose

Errors

Killed
Exit code 137

Issue script & Debug output

user@SandboxHost-638676532362232980:~$  az vm list-skus --all --size Standard_D2_v4 --location germanywestcentral --verbose
Killed
user@SandboxHost-638676532362232980:~$ echo $?
137

Expected behavior

I expect to get a json list of vm sku information matching my location and vm size.

results like this.
% az rest --method GET --url "https://management.azure.com/subscriptions/$(az account show | jq -r .id)/providers/Microsoft.Compute/skus?api-version=2019-04-01&\$filter=location eq 'germanywestcentral'" | jq -r '.value[] | select(.name == "Standard_D2_v4")'

{
  "capabilities": [
    {
      "name": "MaxResourceVolumeMB",
      "value": "0"
    },
    {
      "name": "OSVhdSizeMB",
      "value": "1047552"
    },
    {
      "name": "vCPUs",
      "value": "2"
    },
    {
      "name": "MemoryPreservingMaintenanceSupported",
      "value": "True"
    },
    {
      "name": "HyperVGenerations",
      "value": "V1,V2"
    },
    {
      "name": "MemoryGB",
      "value": "8"
    },
    {
      "name": "MaxDataDiskCount",
      "value": "4"
    },
    {
      "name": "CpuArchitectureType",
      "value": "x64"
    },
    {
      "name": "LowPriorityCapable",
      "value": "True"
    },
    {
      "name": "PremiumIO",
      "value": "False"
    },
    {
      "name": "VMDeploymentTypes",
      "value": "IaaS"
    },
    {
      "name": "vCPUsAvailable",
      "value": "2"
    },
    {
      "name": "ACUs",
      "value": "195"
    },
    {
      "name": "vCPUsPerCore",
      "value": "2"
    },
    {
      "name": "CombinedTempDiskAndCachedIOPS",
      "value": "19000"
    },
    {
      "name": "CombinedTempDiskAndCachedReadBytesPerSecond",
      "value": "120586240"
    },
    {
      "name": "CombinedTempDiskAndCachedWriteBytesPerSecond",
      "value": "120586240"
    },
    {
      "name": "CachedDiskBytes",
      "value": "53687091200"
    },
    {
      "name": "UncachedDiskIOPS",
      "value": "3200"
    },
    {
      "name": "UncachedDiskBytesPerSecond",
      "value": "48000000"
    },
    {
      "name": "EphemeralOSDiskSupported",
      "value": "False"
    },
    {
      "name": "EncryptionAtHostSupported",
      "value": "False"
    },
    {
      "name": "CapacityReservationSupported",
      "value": "True"
    },
    {
      "name": "AcceleratedNetworkingEnabled",
      "value": "True"
    },
    {
      "name": "RdmaEnabled",
      "value": "False"
    },
    {
      "name": "MaxNetworkInterfaces",
      "value": "2"
    }
  ],
  "family": "standardDv4Family",
  "locationInfo": [
    {
      "location": "GermanyWestCentral",
      "zoneDetails": [],
      "zones": [
        "2",
        "1",
        "3"
      ]
    }
  ],
  "locations": [
    "GermanyWestCentral"
  ],
  "name": "Standard_D2_v4",
  "resourceType": "virtualMachines",
  "restrictions": [],
  "size": "D2_v4",
  "tier": "Standard"
}

Environment Summary

azure-cli 2.67.0

core 2.67.0
telemetry 1.1.0

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location '/usr/bin/python3'
Extensions directory '/home/tsh-helper-user/.azure/cliextensions'

Python (Linux) 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Running ubuntu:22.04 image with Azure Container Instance resource specs

% jq '.containers[].resources' <<<$aci
{
  "limits": {
    "cpu": 1.0,
    "gpu": null,
    "memoryInGb": 1.0
  },
  "requests": {
    "cpu": 1.0,
    "gpu": null,
    "memoryInGb": 1.0
  }
}

Additional context

Metadata

Metadata

Labels

Auto-AssignAuto assign by botComputeaz vm/vmss/image/disk/snapshotService AttentionThis issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions