While using existing storage account deployment fails for creating VM with ARM Template #375
Comments
@parth618 Thanks for reporting the issue. We'll look into it soon and get back to you. |
Hello @parth618, I've tried to create a new vm for existing resource group and storage account using the ARM clients. I see that it is able to create the vm with the existing storage account. Please refer the following sample code and let us know your feedback. In the following code method create_vm method is aligned with the one document at azure_mgmt_compute. Please replace the necessary parameters in the below code according to your azure account. The current version of azure_mgmt_* gems are 0.2.1.
|
Hello @vishrutshah |
Hi @parth618, Thanks for the response. Could you please give us some isolated sample code & error/exception stack trace that you are running to help us reproduce your scenario? That'd help us in investigation. Thanks, |
Hii @vishrutshah , "Failed to redeploy the virtual machine 'VMName'. Error: Blob http://storagexxx.blob.core.windows.net/containerxx/Linux.vhd already exists. Please provide a different blob URI as target for disk 'Test1'." It seems that even on deleting the VM the Blob storage was still present and thus virtual hard disk remain attached and storage URI showed that it already exists due to which the deployment was failing again and again. Will like to know more on this if possible. Thanks |
@ravbhatnagar can you comment on why this isn't idempotent? |
@ravbhatnagar or @rjmax is the expected behavior? |
@parth618 - Can you please share the template/sample code you were using when you ran into this issue? It should be idempotent. You can refer to this template for creating a VM which uses a storage account for the vhd - https://github.com/Azure/azure-quickstart-templates/blob/master/101-vm-simple-windows/azuredeploy.json As a side note, you can also try to use the newOrExisting pattern as described in this sample - https://github.com/rjmax/ArmExamples/blob/master/NewOrExistingTemplate.json |
All the other resources mentioned for creating ARM works fine and are provisioned but at last it generates failure error as shown below.
/usr/local/rvm/gems/ruby-2.1.8/gems/ms_rest_azure-0.1.1/lib/ms_rest_azure/azure_service_client.rb:72:in `get_put_operation_result': Long running operation failed with status Failed (MsRestAzure::AzureOperationError).
Also, the status as displayed on Azure portal was 'failed'
I tried redeploying from the portal but it gives error as: "Failed to redeploy the virtual machine. Error: Blob already exists. Please provide a different blob URI as target for disk 'Test1'."
Reference: http://stackoverflow.com/questions/36155624/failure-in-vm-deployment-with-arm-template-while-using-existing-storage-account
The text was updated successfully, but these errors were encountered: