Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

'ContosoDc/DcPromoDsc' fails  #18

@ukaeufe

Description

@ukaeufe

Describe the bug

I try to deploy this project using PowerShell on Windows 10 ( I am outside a VPN )

I ran the ARM templates from powershell and ran into an issue which I think is
Related to the setup and not to my local dev machine. I have a Choco installed. Also tried with admin console.

I complains in the DSC step that a VM cannot find a Choco executable.

I think this is not about my local choco setup which works.

PS C:\Users\VZB3LFW\source\repos\DefendTheFlag> New-AzResourceGroupDeployment -Verbose -ResourceGroupName rg-cg_dtf -TemplateFile .\azuredeploy.json
VERBOSE: Performing the operation "Creating Deployment" on target "rg-cg_dtf".
VERBOSE: 09:06:36 - Template is valid.
VERBOSE: 09:06:38 - Create template deployment 'azuredeploy'
VERBOSE: 09:06:38 - Checking deployment status in 5 seconds
VERBOSE: 09:06:43 - Checking deployment status in 5 seconds
VERBOSE: 09:06:48 - Resource Microsoft.Network/networkInterfaces 'Nic4' provisioning status is succeeded
VERBOSE: 09:06:48 - Resource Microsoft.Storage/storageAccounts 'w7j7pl3j2abxqsa4' provisioning status is succeeded
VERBOSE: 09:06:48 - Resource Microsoft.Network/virtualNetworks 'DefendTheFlag-vNet' provisioning status is succeeded
VERBOSE: 09:06:48 - Resource Microsoft.Network/publicIPAddresses 'PublicIp4' provisioning status is succeeded
VERBOSE: 09:06:48 - Checking deployment status in 5 seconds
VERBOSE: 09:06:53 - Resource Microsoft.Compute/virtualMachines 'ContosoDc' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Storage/storageAccounts 'w7j7pl3j2abxqsa3' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Network/networkInterfaces 'Nic0' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Network/networkInterfaces 'Nic2' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Network/networkInterfaces 'Nic5' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Storage/storageAccounts 'w7j7pl3j2abxqsa0' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Network/networkInterfaces 'Nic3' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Storage/storageAccounts 'w7j7pl3j2abxqsa5' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Storage/storageAccounts 'w7j7pl3j2abxqsa2' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Network/networkInterfaces 'Nic1' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Storage/storageAccounts 'w7j7pl3j2abxqsa1' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Network/publicIPAddresses 'PublicIp0' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Network/publicIPAddresses 'PublicIp2' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Network/publicIPAddresses 'PublicIp3' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Network/publicIPAddresses 'PublicIp5' provisioning status is succeeded
VERBOSE: 09:06:53 - Resource Microsoft.Network/publicIPAddresses 'PublicIp1' provisioning status is succeeded
VERBOSE: 09:06:53 - Checking deployment status in 15 seconds
New-AzResourceGroupDeployment : 09:07:08 - Resource Microsoft.Compute/virtualMachines/extensions
'ContosoDc/DcPromoDsc' failed with message '{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'DcPromoDsc'. Error message: "DSC
Configuration 'CreateADForest' completed with error(s). Following are the first few: The term 'Choco' is not
recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
a path was included, verify that the path is correct and try again. The PowerShell DSC resource
'[cChocoInstaller]InstallChoco' with SourceInfo 'C:\Packages\Plugins\Microsoft.Powershell.DSC\2.83.1.0\DSCWork\Pr
ovisionDcDsc.0\ProvisionDcDsc.ps1::217::3::cChocoInstaller' threw one or more non-terminating errors while running
the Set-TargetResource functionality. These errors are logged to the ETW channel called
Microsoft-Windows-DSC/Operational. Refer to this channel for more details. The SendConfigurationApply function did not
succeed. LCM failed to start desired state configuration manually."\r\n\r\nMore information on troubleshooting is
available at https://aka.ms/VMExtensionDSCWindowsTroubleshoot "
}
]
}
}'
At line:1 char:2

  • New-AzResourceGroupDeployment -Verbose -ResourceGroupName rg-cg_dtf ...
  •  + CategoryInfo          : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
    loymentCmdlet
    
    

New-AzResourceGroupDeployment : 09:07:09 - VM has reported a failure when processing extension 'DcPromoDsc'. Error
message: "DSC Configuration 'CreateADForest' completed with error(s). Following are the first few: The term 'Choco' is
not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again. The PowerShell DSC resource
'[cChocoInstaller]InstallChoco' with SourceInfo 'C:\Packages\Plugins\Microsoft.Powershell.DSC\2.83.1.0\DSCWork\Provisio
nDcDsc.0\ProvisionDcDsc.ps1::217::3::cChocoInstaller' threw one or more non-terminating errors while running the
Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational.
Refer to this channel for more details. The SendConfigurationApply function did not succeed. LCM failed to start
desired state configuration manually."
More information on troubleshooting is available at https://aka.ms/VMExtensionDSCWindowsTroubleshoot
At line:1 char:2

  • New-AzResourceGroupDeployment -Verbose -ResourceGroupName rg-cg_dtf ...
  •  + CategoryInfo          : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
    loymentCmdlet
    
    

New-AzResourceGroupDeployment : 09:07:09 - Template output evaluation skipped: at least one resource deployment
operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage
details.
At line:1 char:2

  • New-AzResourceGroupDeployment -Verbose -ResourceGroupName rg-cg_dtf ...
  •  + CategoryInfo          : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
    loymentCmdlet
    
    

New-AzResourceGroupDeployment : 09:07:09 - Template output evaluation skipped: at least one resource deployment
operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage
details.
At line:1 char:2

  • New-AzResourceGroupDeployment -Verbose -ResourceGroupName rg-cg_dtf ...
  •  + CategoryInfo          : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
     + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
    loymentCmdlet
    
    
    
    

DeploymentName : azuredeploy
ResourceGroupName : rg-cg_dtf
ProvisioningState : Failed
Timestamp : 21.05.2021 07:07:00
Mode : Incremental
TemplateLink :
Parameters :
Name Type Value
============================== ========================= ==========
builtinAdministratorAccount String ContosoAdmin
builtinAdministratorPassword SecureString
userPrincipalName String seccxp.ninja
domainName String Contoso.Azure
netBiosName String CONTOSO
jeffLPassword SecureString
samiraAPassword SecureString
ronHdPassword SecureString
lisaVPassword SecureString
julianIPassword SecureString
meganBPassword SecureString
aatpServicePassword SecureString
linuxAdminAccount String Cookies
linuxAdminPassword SecureString

Outputs :
DeploymentDebugLogLevel :

To Reproduce
Steps to reproduce the behavior:

  1. Start Powershell, Do AZLogin, select wanted subscription
  2. AZLogin
  3. Switch to correct subscription
  4. run: New-AzResourceGroupDeployment -Verbose -ResourceGroupName rg-cg_dtf -TemplateFile .\azuredeploy.json
  5. Should produce error above in step ContosoDc/DcPromoDsc

Expected behavior
Whole deployment should run through

Screenshots
Shell output as ascii above

Desktop (please complete the following information):

  • OS: Win10
  • PowerShell 5.1.18362.1474
  • Version [e.g. 22]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions