dsc

Set-AzureVMDscExtension with large package leads to extreme memory usage in PowerShell DSC Extension

倖福魔咒の 提交于 2019-12-12 02:06:51
问题 I finally managed to automate our release process using Desired State Configuration with the Azure PowerShell SDK methods, in particular the Publish-AzureVMDscConfiguration -> Set-AzureVMDscExtension -> Update-AzureVM combo. After thinking for a while in a way to send my build outputs somewhere accessible by the VM, I ended up with the strategy of appending my build drops in the configuration package that gets uploaded to Azure Storage. My problem now is that as soon as the PowerShell DSC

Securely pass credentials to DSC Extension from ARM Template

懵懂的女人 提交于 2019-12-12 01:57:08
问题 According to https://docs.microsoft.com/en-gb/azure/virtual-machines/windows/extensions-dsc-template, the latest method for passing credentials from an ARM template to a DSC extension is by placing the whole credential within the configurationArguments of the protectedSettings section, as shown below: "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", "typeHandlerVersion": "2.24", "autoUpgradeMinorVersion": true, "settings": { "wmfVersion": "latest", "configuration": { "url":

Trouble Accessing Newly attached disk in DSC on an azure VM

风流意气都作罢 提交于 2019-12-11 16:57:13
问题 I have an issue with a DSC config i'm trying to use to install and run a mongo service on an Azure VM. When the DSC runs on the initial deployment of the VM, the secondary disk 'F' is attached and formatted successfully, however... i receive an error when trying to create directories on the new disk: Error message: \"DSC Configuration 'Main' completed with error(s). Cannot find drive. A drive with the name 'F' does not exist. The PowerShell DSC resource '[Script]SetUpDataDisk' with SourceInfo

DSC Configuration Keeps Restarting

眉间皱痕 提交于 2019-12-11 11:27:02
问题 I have my LocalConfigurationManager set up as follows: [DSCLocalConfigurationManager()] Configuration LCMConfig { Node localhost { Settings { RebootNodeIfNeeded = $true ActionAfterReboot = 'ContinueConfiguration' AllowModuleOverwrite = $true DebugMode = 'All' } } } LCMConfig Set-DscLocalConfigurationManager -Path .\LCMConfig -Verbose -Force Then I kick off a DSC Configuration via Start-DscConfiguration -Path .\RDS -Verbose -Wait This configuration sets up an RemoteApp server which involves a

Passing credentials to DSC script from arm template

你说的曾经没有我的故事 提交于 2019-12-11 06:26:29
问题 I am trying to deploy a VM with a DSC extension from an ARM template. According to various sources, and even this SO question, I am following the correct way to pass a credential object to my script: "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", "typeHandlerVersion": "2.19", "autoUpgradeMinorVersion": true, "settings": { "modulesUrl": "[concat(parameters('_artifactsLocation'), '/', variables('ConfigureRSArchiveFolder'), '/', variables('ConfigureRSArchiveFileName'), '/',

DSC Push mode - best way to copy DSC resources

空扰寡人 提交于 2019-12-10 15:28:30
问题 I'm exploring DSC and wondering what's the best way to copy DSC resources to target host ? When I try to push my configuration to the target host, It complain of missing DSC resource. The PowerShell DSC resource xWebAdministration does not exist at the PowerShell module path nor is it registered as a WMI DSC resource. + CategoryInfo : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException + FullyQualifiedErrorId : DscResourceNotFound + PSComputerName : server1.appman

How do I get feedback about DSC execution on an Azure VM?

ぃ、小莉子 提交于 2019-12-10 11:34:56
问题 I just finished the initial tests phase on automating our product release to Azure Virtual Machines using DSC, particularly with the commands described in this article, which are part of the Azure PowerShell SDK. I can push a DSC configuration fine using PowerShell, but since this process is automated, I wanted to get feedback on how the configuration process progressed. When I call Update-AzureVM , I get an ok but the DSC configuration happens after that, asynchronously, and I don't know how

How do I transfer my build output files to an Azure VM using PowerShell DSC?

陌路散爱 提交于 2019-12-10 11:17:41
问题 I've been toying around with DSC and I think it's an awesome platform. I made a few tests to automate the deployment of our TFS build outputs and to automatically install the web applications and configure an environment. This was relatively easy, as I could pass my drop folder path to the DSC script using a file share on our internal network, and use relative paths inside the configuration to select each of our modules. My problem now is in how to expand this to Azure virtual machines. We

Azure ARM DSC scale set deployment - cannot locate script

江枫思渺然 提交于 2019-12-08 13:22:41
问题 I am trying to deploy Virtual Machine Scale Set to Azure using ARM Template and Desired State Configuration (DSC). I have created DSC configuraiton and validated it on a separate VM that it is working. In ARM template I have following definition of DSC extension: { "name": "Microsoft.Powershell.DSC", "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", "typeHandlerVersion": "2.9", "autoUpgradeMinorVersion": true, "settings": { "configuration": { "url": "publicstoragebloburi/DSC

Cannot create a folder on the partition that was just created within a DSC script

天涯浪子 提交于 2019-12-08 07:04:31
I'm trying to use DSC to format drives and create a certain folder structure on newly formatted drives. Right after I've created a partition, formatted a disk and gave it a drive letter I'm trying to create a folder using the new disk path however I'm receiving Cannot find drive. A drive with the name 'K' does not exist types of errors on New-Item call. This code is an example of one executed within a Script DSC: $someDiskNumber = 3 # for the sake of testing Initialize-Disk -Number $someDiskNumber -PartitionStyle GPT -PassThru $partition = New-Partition -DiskNumber $someDiskNumber