Azure CustomScriptExtension – Are there limits?

Yes, another in a series of disjointed short notes about Azure.

I’ve been buildings PowerShell scripts to automate the build of SQL Server AzureVMs. Part of that effort has been using the Azure Custom Script Extension to help get stuff installed.

The gist of this tool is that, through a simple call in your PowerShell VM Build script, you can pass a file (or multiple files) into your nice fresh AzureVM and have one of them run when they are all downloaded. For example, you could use it to send a SQL Server installation configuration file and a simple PoSh script to complete the installation.

Sounds great. Particularly the “multiple files” bit. However, there does seem to be a snag, in that it doesn’t appear to be hugely reliable when passing in more than a few files.

Scenario: A shiny new SQL Server, and a load of very useful First Aid diagnostic scripts from the lovely Brent Ozar [Brent Ozar blog|@BrentOzarULTD] and his PLF chums. Seven SQL scripts, and one (short and sweet) PowerShell script to run the lot.

Except…

The CustomScriptExtension extension failed to download all the scripts. Repeatedly. With the error message

“Failed to download all specified files. Exiting. Error Message: The process cannot access the file ‘C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.4\\Downloads\\6\\sp_Blitz.sql’ because it is being used by another process.”

Yeah. You were the only thing access that file. Where’s that “You had one job” meme when you need it?

CustomScriptExtension Limits?

So, are there any limits to the CustomScriptExtension? I don’t think I had reached any sort of size limit, as I put all of Brent’s Blitz queries into one big script and that worked just fine.

In fact, definitely not a size issue – I’ve used the CustomScriptExtension to transfer a 3GB ISO.

I don’t think it’s an issue with multiple file types – as referenced above, I can shift a TXT, ISO and PS1 file in one call.

So. Is there a limit on the number of files that can be (reliably) passed using Set-AzureVMCustomScriptExtension?

Advertisements
This entry was posted in SQLServerPedia Syndication and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s