Project

General

Profile

Actions

Bug #31656

open

Unable to provision OS in Azure when image definition is set to "Specialized

Added by Chris Roberts over 3 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Linux VM Issues
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Creating an image definition with the "operating system state" defined to generalized it works.

Traceback:

New error: osProfile is not allowed

Failed to create a compute test_raleigh (Azure Resource Manager) instance testvm.example.com: { "message": "MsRestAzure::AzureOperationError: InvalidParameter: Parameter 'osProfile' is not allowed.", "request": { "base_uri": "https://management.azure.com", "path_template": "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", "method": "put", "path_params": { "resourceGroupName": "Images-SC", "vmName": "testvm", "subscriptionId": "xxxxxxxxxxxxxxxxxxxxxx" }, "skip_encoding_path_params": null, "query_params": { "api-version": "2019-03-01" }, "skip_encoding_query_params": null, "headers": { "Content-Type": "application/json; charset=utf-8", "Accept": "application/json", "accept-language": "en-US", "x-ms-client-request-id": "50783a49-5407-4559-8528-460227b6dca6" }, "body": "{\"location\":\"southcentralus\",\"properties\":{\"hardwareProfile\":{\"vmSize\":\"Standard_D2s_v4\"},\"storageProfile\":{\"imageReference\":{\"id\":\"/subscriptions/xxxxxxxxxxxxxxxxxxxxxx/resourceGroups/Images-SC/providers/Microsoft.Compute/galleries/RedHat/images/RHEL8\"},\"osDisk\":{\"osType\":\"Linux\",\"name\":\"testvm-osdisk\",\"createOption\":\"FromImage\",\"managedDisk\":{\"storageAccountType\":\"Premium_LRS\"}},\"dataDisks\":[{\"lun\":1,\"name\":\"testvm-data-disk0\",\"createOption\":\"Empty\",\"diskSizeGB\":\"128\",\"managedDisk\":{}}]},\"osProfile\":{\"computerName\":\"testvm\",\"adminUsername\":\"Admin\",\"adminPassword\":\"Redhat1234\",\"linuxConfiguration\":{\"disablePasswordAuthentication\":false,\"ssh\":{\"publicKeys\":[{\"path\":\"/home/admin/.ssh/authorized_keys\",\"keyData\":\"ssh-rsa food\"}]}}},\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/subscriptions/xxxxxxxxxxxxxxxxxxxxxx/resourceGroups/Images-SC/providers/Microsoft.Network/networkInterfaces/testvm-nic0\",\"properties\":{\"primary\":true}}]}}}", "middlewares": [ [ "MsRest::RetryPolicyMiddleware", { "times": 3, "retry": 0.02 } ], [ "cookie_jar" ] ], "log": null }, "response": { "body": "{\r\n \"error\": {\r\n \"code\": \"InvalidParameter\",\r\n \"message\": \"Parameter 'osProfile' is not allowed.\",\r\n \"target\": \"osProfile\"\r\n }\r\n}", "headers": { "Cache-Control": "no-cache", "Pragma": "no-cache", "Content-Length": "140", "Content-Type": "application/json; charset=utf-8", "Expires": "-1", "x-ms-ratelimit-remaining-resource": "Microsoft.Compute/PutVM3Min;239,Microsoft.Compute/PutVM30Min;1199", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "x-ms-request-id": "7da71ccb-2c9e-4e02-9cdc-00e43989ed4e", "Server": "Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0", "x-ms-ratelimit-remaining-subscription-writes": "1199", "x-ms-correlation-request-id": "6e4b6d36-7559-43e9-8d4c-f7a87196e498", "x-ms-routing-request-id": "WESTUS2:20210114T141741Z:6e4b6d36-7559-43e9-8d4c-f7a87196e498", "X-Content-Type-Options": "nosniff", "Date": "Thu, 14 Jan 2021 14:17:41 GMT" }, "status": 400 } }

Actions #1

Updated by Chris Roberts over 3 years ago

  • Bugzilla link set to 1916846
Actions #2

Updated by Chris Roberts about 3 years ago

  • Status changed from New to Rejected
  • Triaged changed from No to Yes

Actually, not a bug, found out with some debugging that this will happen if the image does not have a version. I was able to add both a generalized and specialized image once they had a version. I was able to reproduce the customer issue by creating a specialized image definition but not creating a version with it.

Actions #3

Updated by Chris Roberts about 3 years ago

  • Category set to Linux VM Issues
  • Status changed from Rejected to New
  • Triaged changed from Yes to No
  • Fixed in Releases 2.2.0 added
Actions #4

Updated by Chris Roberts about 3 years ago

  • Fixed in Releases deleted (2.2.0)
Actions #5

Updated by Chris Roberts about 3 years ago

  • Target version set to 2.2.2
Actions #6

Updated by Chris Roberts about 3 years ago

  • Target version changed from 2.2.2 to 2.2.3
Actions #7

Updated by Chris Roberts about 3 years ago

  • Target version changed from 2.2.3 to 2.2.4
Actions #8

Updated by Chris Roberts about 3 years ago

  • Target version changed from 2.2.4 to 2.2.5
Actions #9

Updated by Chris Roberts about 3 years ago

  • Target version changed from 2.2.5 to 2.2.6
Actions #10

Updated by The Foreman Bot almost 3 years ago

  • Pull request https://github.com/theforeman/foreman_azure_rm/pull/138 added
Actions #11

Updated by Chris Roberts almost 3 years ago

  • Status changed from New to Ready For Testing
  • Triaged changed from No to Yes
Actions #12

Updated by Chris Roberts over 1 year ago

  • Status changed from Ready For Testing to New
  • Assignee deleted (Chris Roberts)
  • Target version changed from 2.2.6 to Backlog
Actions

Also available in: Atom PDF