[BUG] Missing optional parameter HyperVGeneration fails Image creation
See original GitHub issueCreating 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:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Apologies for the delay here but to update, we are currently working on a fix.