Hi Alvaro, I tried to check with our azure admin account to understand more of the error and we got to know that this is expected as we cannot create VMs with OS disk type Premium SSD. Earlier we were able to do so hence it was working fine but now as the policy are changed by our admins hence we are unable to create the Packer Intermediate VM so it's failing.
Is there any chance to avoid this error and make the temporary VM with standard OS disk type always instead of primary. I don't know why it is trying to create VM with OS disk type Primary SSD. Kindly suggest. Thanks Rahul Negi On Saturday, November 12, 2022 at 2:45:09 PM UTC+5:30 [email protected] wrote: > Hello > > I can see you are using the right setting > > > - > > managed_image_storage_account_type > > <https://developer.hashicorp.com/packer/plugins/builders/azure/arm#managed_image_storage_account_type> > (string) > - Specify the storage account type for a managed image. Valid values are > Standard_LRS and Premium_LRS. The default is Standard_LRS. > > So my suggestion will be > > - try with a different base image for a test > - work with your azure admin account to understand more the error > > > > On Mon, Nov 7, 2022 at 7:01 AM Rahul Negi <[email protected]> wrote: > >> Hi Alvaro, Please check the configuration of packer-nft.json file as >> below >> >> "builders": [ { "type": "azure-arm", "use_azure_cli_auth": "True", >> "os_type": "Linux", "os_disk_size_gb": "64", "shared_image_gallery": { >> "subscription": "{{user `subscription_id`}}", "resource_group": "{{user >> `sig_gallery_resource_group`}}", "gallery_name": "{{user >> `sig_gallery_name`}}", "image_name": "{{user `sig_image_name`}}", >> "image_version": "{{user `sig_source_image_version`}}" }, >> "shared_image_gallery_destination": { "subscription": "{{user >> `subscription_id`}}", "resource_group": "{{user >> `sig_gallery_resource_group`}}", "gallery_name": "{{user >> `sig_gallery_name`}}", "image_name": "{{user `sig_image_name`}}", >> "image_version": "{{user `sig_dest_image_version`}}", >> "replication_regions": ["{{user `location`}}"] }, >> "temp_resource_group_name": "{{user `temp_resource_group_name`}}", >> "temp_compute_name": "{{user `temp_compute_name`}}", >> "private_virtual_network_with_public_ip": true, "polling_duration_timeout": >> "0h30m0s", "ssh_username": "{{user `ssh_username`}}", >> "ssh_private_key_file": "{{user `ssh_private_key_file`}}", "ssh_pty": >> "true", "location": "{{user `location`}}", "vm_size": "{{user `vm_size`}}", >> "managed_image_name": "{{user `managed_image_name`}}", >> "managed_image_storage_account_type": "Standard_LRS", "disk_caching_type": >> "None", "managed_image_resource_group_name": "{{user >> `sig_gallery_resource_group`}}", "shared_image_gallery_timeout": "2h5m2s", >> "azure_tags": { "packer": "true" } } ], >> >> Thanks and Regards, >> Rahul Negi >> On Saturday, November 5, 2022 at 1:21:47 AM UTC+5:30 [email protected] >> wrote: >> >>> please share template >>> >>> On Wed, Nov 2, 2022 at 8:59 AM Rahul Negi <[email protected]> wrote: >>> >>>> Hi Team, I am using packer with azure-arm template to build up managed >>>> images and store them in Share Image Gallery or Azure Compute Gallery. >>>> >>>> While creating the temporary vm resource, I am getting below error. >>>> Below error is related to OS Disk type which is by default picking Premium >>>> SSD type while that has been disallowed by our team so it’s failing like >>>> below. >>>> >>>> ==> azure-arm: Validating deployment template … >>>> ==> azure-arm: → ResourceGroupName : ‘packer-rg-bo’ >>>> ==> azure-arm: → DeploymentName : ‘pkrdpu4fs7gzjif’ >>>> ==> azure-arm: Deploying deployment template … >>>> ==> azure-arm: → ResourceGroupName : ‘packer-rg-bo’ >>>> ==> azure-arm: → DeploymentName : ‘pkrdpu4fs7gzjif’ >>>> ==> azure-arm: Code=“DeploymentFailed” Message=“At least one resource >>>> deployment operation failed. Please list deployment operations for >>>> details. >>>> Please see Deployment history - Azure Resource Manager | Microsoft >>>> Learn <https://aka.ms/DeployOperations> for usage details.” >>>> Details=[{“code”:“Conflict”,“message”:“{\r\n "status": "Failed",\r\n >>>> "error": {\r\n "code": "ResourceDeploymentFailure",\r\n "message": "The >>>> resource operation completed with terminal provisioning state >>>> ‘Failed’.",\r\n "details": [\r\n {\r\n "code": >>>> "RequestDisallowedByPolicy",\r\n "message": "Resource ‘pkrosu4fs7gzjif’ >>>> was >>>> disallowed by policy. Reasons: ‘INFORMATION : THE USE OF PREMIUM SSD IS >>>> DENIED. PLEASE ENSURE THAT ON DISKS TAB EITHER STANDARD HDD OR STANDARD >>>> SSD >>>> IS SELECTED OR DEPLOYMENT MAY FAIL.\nPLEASE READ DEP DOCUMENTATION FOR >>>> MORE >>>> INFORMATION’. See error details for policy resource IDs. Target: >>>> ‘/subscriptions/xxxxxxxxxxxx/resourceGroups/packer-rg-bo/providers/Microsoft.Compute/disks/pkrosu4fs7gzjif’."\r\n >>>> >>>> }\r\n ]\r\n }\r\n}”}] >>>> ==> azure-arm: >>>> ==> azure-arm: Deleting individual resources … >>>> ==> azure-arm: Could not retrieve OS Image details: unable to obtain a >>>> OS disk for “slazpckrbo01”, please check that the instance has been created >>>> >>>> Kindly suggest us any option parameter to using in builders section or >>>> packer-nft.json to choose Standard HDD as OS Disk type. >>>> >>>> Thanks and Regards >>>> Rahul Negi >>>> >>>> -- >>>> This mailing list is governed under the HashiCorp Community Guidelines >>>> - https://www.hashicorp.com/community-guidelines.html. Behavior in >>>> violation of those guidelines may result in your removal from this mailing >>>> list. >>>> >>>> GitHub Issues: https://github.com/hashicorp/packer/issues >>>> IRC: #packer-tool on Freenode >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "Packer" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/packer-tool/f0eb6943-95cb-4ef9-a1e9-3aa070627688n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/packer-tool/f0eb6943-95cb-4ef9-a1e9-3aa070627688n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> >>> >>> -- >>> Alvaro >>> >>> -- >> This mailing list is governed under the HashiCorp Community Guidelines - >> https://www.hashicorp.com/community-guidelines.html. Behavior in >> violation of those guidelines may result in your removal from this mailing >> list. >> >> GitHub Issues: https://github.com/hashicorp/packer/issues >> IRC: #packer-tool on Freenode >> --- >> You received this message because you are subscribed to the Google Groups >> "Packer" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/packer-tool/ee4794a5-5688-47f9-a487-8421ea0d979bn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/packer-tool/ee4794a5-5688-47f9-a487-8421ea0d979bn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Alvaro > > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/hashicorp/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/7a55e44a-b0c9-47f1-8420-baefca315467n%40googlegroups.com.
