0
votes

I'm trying to create a software distribution point to deploy internal applications to azure virtual machines with Azure Automation DSC.

These msi based applications then gets copied to the local vm by the DSC File Resource and installed by the Package DSC Resource

I've tried to do so with an Azure Storage Account. The Storage File Feature provides an UNC Share which is accessible by username and password and therefore would seem like an easy solution to create a software dist point.

These are the crucial parts of my DSC Configuration ( *.file just used for sample reason )

$storageCredential = Get-AutomationPSCredential -Name "PackageStorage"

LocalConfigurationManager
        {
            #DebugMode = 'All'
            RebootNodeIfNeeded = $true
        }


File CopyPackagesFolder
        {
            DestinationPath = "C:\packages"
            Credential = $storageCredential
            Ensure = "Present"
            SourcePath = "\\*.file.core.windows.net\packages\"
            Type = "Directory"
            Recurse = $true
        }

This only works the very first time it is executed by LCM. After the first successful execution is fails with the following message:

A specified logon session does not exist. It may already have been terminated. An error occurs when accessing the network share with the specified credential. Please make sure the credential is correct and the network share is accessible. Note that Credential should not be specified with the local path. The related file/directory is: \*.file.core.windows.net\packages.

What do I miss?

1

1 Answers

0
votes

Can you verify that the account has not changed before second DSC run by doing "net use" directly on the share using these credentials?