Azure-rest-api-specs: VMSS complains `ImageReference is null` during an update of the data disks

Created on 3 Aug 2020  路  9Comments  路  Source: Azure/azure-rest-api-specs

Here is the request URL:

PATCH /subscriptions/REDACTED/resourceGroups/vmss-update/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss?api-version=2019-12-01 HTTP/1.1

And the request body:

{
    "properties": {
        "upgradePolicy": {
            "mode": "Manual"
        },
        "virtualMachineProfile": {
            "storageProfile": {
                "dataDisks": [
                    {
                        "lun": 1,
                        "caching": "ReadOnly",
                        "writeAcceleratorEnabled": false,
                        "createOption": "Empty",
                        "diskSizeGB": 20,
                        "managedDisk": {
                            "storageAccountType": "Standard_LRS"
                        }
                    }
                ]
            },
            "networkProfile": {
                "networkInterfaceConfigurations": [
                    {
                        "name": "example",
                        "properties": {
                            "primary": true,
                            "enableAcceleratedNetworking": false,
                            "dnsSettings": {
                                "dnsServers": []
                            },
                            "ipConfigurations": [
                                {
                                    "name": "internal",
                                    "properties": {
                                        "subnet": {
                                            "id": "/subscriptions/REDACTED/resourceGroups/vmss-update/providers/Microsoft.Network/virtualNetworks/test-network/subnets/internal"
                                        },
                                        "primary": true,
                                        "privateIPAddressVersion": "IPv4",
                                        "applicationGatewayBackendAddressPools": [],
                                        "applicationSecurityGroups": [],
                                        "loadBalancerBackendAddressPools": [],
                                        "loadBalancerInboundNatPools": []
                                    }
                                }
                            ],
                            "enableIPForwarding": false
                        }
                    }
                ]
            }
        }
    }
}

And the update request returns an error:

compute.VirtualMachineScaleSetsClient#Update: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidParameter" Message="Required parameter 'imageReference' is missing (null)." Target="imageReference"
Compute - VMSS Service Attention question

All 9 comments

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @avirishuv.

@avirishuv, could you take a look at this issue?

@ArcturusZhang This error does not repro - I was able to add data disk without having to provide image ref in the request body for the PATCH API call.
Are you using a marketplace image or custom image ? And are you seeing this behavior for any specific PS or CLI cmdlet ?

@avirishuv I am using a shared image version created by myself.

This is the steps that I reproduce this issue:

  1. create a VMSS using the shared image version without data disks.
  2. update the VMSS by adding those data disks.

Please find more details for reproduce in this issue

@ArcturusZhang thanks for the repro steps. I can confirm the behavior. For a SIG custom image, while updating the data disks, image reference is required (cannot be null).

馃憢 out of interest, why is this tagged as a Question and not a Regression given this didn't need to be specified in previous API versions?

@ArcturusZhang and @tombuildsstuff we recently had a build released that should fix this issue. Would you mind checking if you are still seeing this or not ?

@ArcturusZhang , @tombuildsstuff if no open other questions, can we close the issue ?

Closing, please feel free to reopen if you have additional questions on this issue.

Was this page helpful?
0 / 5 - 0 ratings