Azure-docs: Cannot build in cloud shell due to missing DSC binaries

Created on 11 Dec 2019  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-docs

Doesn't work in the cloud shell as DSC for Linux is not installed


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 assigned-to-author azure-policsvc doc-bug in-progress triaged

Most helpful comment

Cloud shell is running PS 6.2. DSC Compilation on Linux requires 7 preview 5. Even then, we are working out a couple of issues.

All 7 comments

make sure that you're using the 'POWERSHELL' version of Azure Cloud Shell, and not the BASH Version.

Yep I am - having massive issues following this one through - need to add in that PSDscResources is a prereq as well

But the error I'm getting is below

Get-DscResource : Exception calling "LoadDefaultCimKeywords" with "2" argument(s): "Unable to find DSC schema store at /etc/opt/omi/conf/dsc/configuration. Please ensure PS DSC for Linux is installed."At /home/anthony/.local/share/powershell/Modules/GuestConfiguration/1.18.0.0/helpers/GuestConfigurationPolicy.psm1:140 char:18+     $resources = Get-DscResource -Module GuestConfiguration
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Get-DscResource], MethodInvocationException
+ FullyQualifiedErrorId : DirectoryNotFoundException,Get-DscResource

Cloud shell is running a Linux container anyway - getting the same errors in the AzureSDK container image

@anwather Thanks for the feedback! We are currently investigating and will update you shortly.

@DCtheGeek Can you please look into this ?

I’ll test it shortly. @mgreenegit can you look, too?

Cloud shell is running PS 6.2. DSC Compilation on Linux requires 7 preview 5. Even then, we are working out a couple of issues.

@anwather Thanks for bringing this up. I've added language to clarify that the module works in Azure PowerShell and Cloud Shell, but that the DSC compliations currently must be in Windows PS 5.1. I've also changed the DSC specific code fences to be just 'powershell' and not Cloud Shell. When the change finishes and merges, this issue will automatically close. Thanks again!

@MicrosoftDocs/azure-cxp-triage Please remove label 'product-question, add label 'doc-bug', and #in-progress.

Was this page helpful?
0 / 5 - 0 ratings