Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating image from blob fails with "Required parameter 'hyperVGeneration' is missing" #4891

Closed
vmwalex opened this issue Apr 17, 2019 · 4 comments · Fixed by #4931
Closed
Labels
Compute - Images Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@vmwalex
Copy link

vmwalex commented Apr 17, 2019

Creating image from blob fails with "Required parameter 'hyperVGeneration' is missing". The problem started sometime after Apr 9th (same code worked before).

from azure.mgmt.compute import ComputeManagementClient
from azure.common.client_factory import get_client_from_cli_profile
compute_client = get_client_from_cli_profile(ComputeManagementClient)
compute_client.images.create_or_update(
    'myresourcegroup',
    'myimage',
    {
        "location": 'centralus',
        "storage_profile": {
  	    "os_disk": {
                "os_type": "Linux",
                "os_state": "Generalized",
                "blob_uri": 'https://myblobs.blob.core.windows.net/images/myimage.vhd',
                "caching": "ReadWrite"
             }
        }
    })

Error:

Traceback (most recent call last):
  File "<stdin>", line 11, in <module>
  File "/usr/local/lib/python2.7/dist-packages/azure/mgmt/compute/v2019_03_01/operations/images_operations.py", line 123, in create_or_update
    **operation_config
  File "/usr/local/lib/python2.7/dist-packages/azure/mgmt/compute/v2019_03_01/operations/images_operations.py", line 79, in _create_or_update_initial
    raise exp
msrestazure.azure_exceptions.CloudError: Azure Error: InvalidParameter
Message: Required parameter 'hyperVGeneration' is missing (null).
Target: hyperVGeneration

Versions:

$ pip freeze |grep azure
azure-cli-core==2.0.62
azure-cli-nspkg==3.0.3
azure-cli-telemetry==1.0.2
azure-common==1.1.18
azure-mgmt-compute==4.6.0
azure-mgmt-nspkg==3.0.2
azure-mgmt-resource==2.1.0
azure-mgmt-storage==3.1.1
azure-nspkg==3.0.2
azure-storage==0.36.0
msrestazure==0.6.0
@kurtzeborn kurtzeborn added Compute - Images Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team. labels Apr 19, 2019
@kurtzeborn
Copy link
Member

Thank you for opening this issue! We are routing it to the appropriate team for follow up.

@lmazuel
Copy link
Member

lmazuel commented Apr 22, 2019

Hi @vmwalex There was indeed an update to this call, but it was supposed to be backward compatible. I'm contacting right now the "image/disk" team to get the details.

In the meantime, you can use 4.4.0, before the update to this API version.

Thanks,

@lmazuel
Copy link
Member

lmazuel commented Apr 22, 2019

Hi @vmwalex
I just check with the team, and indeed there was a change of API and the information didn't went well between the RestAPI team and us. I will revert back this change in a 4.6.1 to bring the old behavior as expected following semantic versioning.
Sorry about this :/

@darrens280
Copy link

I ran into exact same error when trying to create a new azurerm_image from VHD files including a datadisk. Code was working previously, then this week started failing with the "hypervgeneration" missing nonsense.

I eventually found that the Terraform Azure Provider had been updated just two days ago (as per their Changelog), so I pinned the provider version to a few versions prior to the latest, and then all worked again.

Def a problem in the latest v1.34.0. I pinned my code to 1.32.0 and all is ok

Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Compute - Images Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants