azure-vm-agents-plugin icon indicating copy to clipboard operation
azure-vm-agents-plugin copied to clipboard

Unable to validate template when specifying existing storage account with custom image URI

Open timja opened this issue 8 years ago • 6 comments

I am using a groovy file to populate the settings field of the plugin.

I am getting an error that states "The storage account name already exists. Use a different name." when I attempt to prepopulate with a Custom Image URI.

If I specify a different storage account, I get "The reference image should be in the same storage account as the one declared in the template."

Azure requires that a VHD for a custom image be in the same resource group as a VM getting created from one, if the plugin validation requires the resource group to have previously existed however, then we get a bit of a "chicken-and-egg" scenario.

Attached is a version of the groovy file I am using to populate the plugin fields (minus sensitive data of course).

I am using a jar compiled from commit 26cd3fabaad549e5ac70b583f1e448a8c273a546 (May 9th)

 

[JENKINS-44566] created by scarvel8

timja avatar May 30 '17 22:05 timja

Took a look through the code,

https://github.com/jenkinsci/azure-vm-agents-plugin/blob/06d92b941073b3d05e105ab4042d278e39380849/src/main/java/com/microsoft/azure/vmagent/AzureVMManagementServiceDelegate.java#L1574

Storage account is in the same resource group, still showing same errors

by scarvel8

timja avatar May 31 '17 15:05 timja

I finally got passed the validation 

If you need more info, let me know.

by joeystevense

timja avatar Jun 13 '17 16:06 timja

I am able to work around the issue by working around the validation, for now that works for me so I will close this issue

by scarvel8

timja avatar Jun 14 '17 21:06 timja

Joey Stevense I'm getting the "The reference image should be in the same storage account as the one declared in the template." while image pointed by "Custom Image URI" belongs to a storage account within selected Resource Group Name.

There are no records under the Use existing list. 

What would you suggest?

by kentzo

timja avatar Nov 28 '17 02:11 timja

I see "The reference image should be in the same storage account as the one declared in the template." while image pointed by "Custom Image URI" belongs to a storage account within selected Resource Group Name.

I am getting no records under the 'Use Exist List' too.

Are there any fixes/work-arounds for this? 

 

by captainwhippet

timja avatar Mar 19 '18 17:03 timja

Hi, we are suddenly getting the following error: "The storage account name already exists. Use a different name."

We haven't change the storage account we use and the custom URL image is located in that storage account.

Any ideas on what could be the problem?

by roni

timja avatar Nov 28 '18 09:11 timja