question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Missing optional parameter HyperVGeneration fails Image creation

See original GitHub issue

Creating Image resource without providing the HyperVGeneration properties fails with the following error: InvalidParameter Message: Required parameter ‘hyperVGeneration’ is missing (null).

The HyperVGeneration is an optional parameter and creation call should succeed without specifying it (and be defaulted to its default value ‘V1’)

To Reproduce Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)

var image = new Image
            {
                Location = "southeastasia",
                StorageProfile = new ImageStorageProfile
                {
                    OsDisk = new ImageOSDisk
                    {
                        OsType = OperatingSystemTypes.Windows,
                        OsState = OperatingSystemStateTypes.Generalized,
                        BlobUri = "https://myblob.blob.core.windows.net/uploads/some.vhd",
                        Caching = CachingTypes.ReadWrite
                    }
                }
            };

var result = await computeClient.Images.CreateOrUpdateAsync("rg", "name", image);

Environment:

  • Microsoft.Azure.Management.Compute - fails with 31.1.0, 32.0.0, was working with 23.2.0
  • OS and .NET runtime version: Windows 10 .NET Framework 4.7.2]
  • IDE and version : Visual Studio 16.4.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Vaibhav-Agarcommented, Aug 6, 2020

Hi @joerage, The requirement to provide the hyperVGeneration property is enforced when an image is created from a blob or a disk resource (where we can’t determine the hyperVGeneration). This enforcement was done using a new api-version that started supporting Gen2 VMs. So, in this case you can specify the hyperVGeneration property when creating the image or update DiskRP resource with the hyperVGeneration property.

Our API docs and error message doesn’t reflect the right messaging and we are rolling out updates to fix them both shortly.

0reactions
Vaibhav-Agarcommented, Jul 23, 2020

Apologies for the delay here but to update, we are currently working on a fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Required parameter 'hyperVGeneration' is missing (null) ...
Message: Required parameter 'hyperVGeneration' is missing (null) while creating a Managed Disk image from blob storage ... Describe the bug ...
Read more >
Disks - Create Or Update - REST API (Azure Compute)
Creates or updates a disk. In this article. URI Parameters; Request Body; Responses; Security; Examples; Definitions. HTTP
Read more >
Powershell errors when Generalizing VM OS Disk to ...
I get this error: Stop-AzVM: GenericArguments[0], 'Microsoft.Azure.Management.Compute.Models.VirtualMachine', on 'T MaxInteger[T]' ...
Read more >
OpenShift Container Platform 4.12 release notes
In OpenShift Container Platform 4.12, the propagateUserTags parameter is a flag that directs in-cluster Operators to include the specified user ...
Read more >
azure-cli 2.3.0
Fix #8323: Add missing parameters to create storage custom endpoint. Fix regression bug: Reverting the changes which overrides the default ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found