GithubHelp home page GithubHelp logo

azure / cloudshell Goto Github PK

View Code? Open in Web Editor NEW
239.0 22.0 100.0 439 KB

Container Image for Azure Cloud Shell (https://azure.microsoft.com/en-us/features/cloud-shell/)

Home Page: https://shell.azure.com

License: MIT License

Shell 2.21% Dockerfile 7.04% PowerShell 90.75%
container cloudshell azure

cloudshell's Introduction

Microsoft Azure Cloud Shell Image

Azure Cloud Shell is an interactive, authenticated, browser-accessible shell for managing Azure resources. As a web-based environment, Cloud Shell provides immediate management access to any device with a network connection. Azure Cloud Shell provides a host of tools, including Azure CLI, Azure PowerShell, Ansible, Terraform, Puppet Bolt, kubectl, and many more.

For more details, check out Overview of Azure Cloud Shell.

Roadmap of planned development

Azure Cloud Shell is continually working with customers to improve Azure resource management by focusing on the experience and tools most needed by our customers. We invite everyone to view and provide feedback to our roadmap and future investigations. The Azure Cloud Shell team respects and enjoys engaging with our customers, please share our roadmap and provide feedback here in Discussions or Issues.

About this repository

When you connect to Azure Cloud Shell, we start a container hosting a wide variety of tools, and

connect your browser to a shell process running inside that container. This repository contains the Docker files used to build that container image. It does not contain the code used for the rest of

the Azure Cloud Shell service. The code in this repository may not match exactly to what is running in the Cloud Shell service at any given time. The service is updated periodically and changes are gradually rolled out to different regions over time. There may be a lag of up to 3-4 weeks for changes made here to be reflected in all Cloud Shell regions.

This repository has several uses:

  1. Running the Cloud Shell image locally. If you want a curated set of up-to-date command-line tools suitable for managing an Azure environment, but you want to run the tools locally on your own computer instead of in Cloud Shell, you can build the image and run it yourself.

  2. Contributing to Cloud Shell. If you would like to propose a new tool for inclusion in Cloud Shell, you can create an issue or submit a Pull Request to request the tool be added. Please ensure that the PR actually builds within GitHub Actions.

The repository does not provide an out-of-the-box replacement for the Azure Cloud Shell service. Azure Cloud Shell provide a user interface integrated into the Azure portal, a web service that manages the infrastructure on which the containers run, and some additional code used inside the container to connect the shell process to the user interface via a websocket.

Running the Cloud Shell image locally

Differences between running locally and in Cloud Shell

  1. No identity endpoint. In Cloud Shell, we provide a way to automatically obtain tokens for the user connected to the shell. We can't provide this when you run locally, so you have to authenticate explicitly before you can access Azure resources. When using AZ CLI, run az login; for PowerShell, run Connect-AzAccount.

  2. No cloud drive. We don't mount the Cloud Drive from your Azure Cloud Shell, so you won't have access to files stored there.

  3. Root instead of cloud shell user. In Azure Cloud Shell you always run as a regular user. When running the image locally, you run as root.

Understanding the base.Dockerfile and tools.Dockerfile

The repository contains two Docker configuration files: base and tools. Normally you just have one Dockerfile and rely on the container registry to cache the layers that haven't changed. However, we need to cache the base image explicitly to ensure a fast startup time. Tools is built on top of the base file and starts from an internal repository where the base image is cached, so that we know when we need to update the base.

When building or using the image locally, you don't need to worry about that. Just build using the instructions below, and be aware that changes to the base layer will take longer to release than changes to the tools.

Layer Job
Base Contains large, infrequently changing packages. Changes every 3-4 months.
Tools Contains frequently changing packages. Changes every 2-3 weeks

Building and Testing the image

Building the images

Note

Cloud Shell publishes an image on each update to the master branch. If you would like to use the pre-built image, then you can skip this step by downloading the latest base image layer here and the latest tools image layer here. You can find all previously built image layers here.

Required software:

  • Docker
  • Bash terminal / Powershell

Building base.Dockerfile image from the root repository

docker build -t base_cloudshell -f linux/base.Dockerfile .

Building tools.Dockerfile image

docker build -t tools_cloudshell --build-arg IMAGE_LOCATION=base_cloudshell -f linux/tools.Dockerfile .

Testing the images

Running bash in the tools.Dockerfile based image:

docker run -it tools_cloudshell /bin/bash

Running pwsh in the tools.Dockerfile based image:

docker run -it tools_cloudshell /usr/bin/pwsh

Testing the Cloud Shell image:

docker run --volume /path/to/CloudShell/folder/tests:/tests -it tools_cloudshell /tests/test.sh

For more information about bind mounts, please see the Docker documentation. We do expect all test cases to pass if you want your changes to be merged.

Contribution Guidelines

Types of issues

Issue Type Action
Package is out of date Create a Pull Request or Issue
New desired package Create a Pull Request or Issue
New desired Cloud Shell feature Create an Discussion
Issue with one of the packages* Talk to package owner & create a PR on their repo.
Issue with how package interacts with Cloud Shell Create a Pull Request OR GitHub Issue
Security bug See https://www.microsoft.com/en-us/msrc/faqs-report-an-issue
Issue with Cloud Shell in Azure Portal (can't log in, for example) Open a support ticket

* For example, if you have an issue within Azure CLI, don't open up an issue in the Cloud Shell repo, open an issue within the Azure CLI repo.

Types of tools

Cloud Shell aims to provide a core set of tools for Azure and Microsoft 365 devops scenarios, but we can't include everything. If you just want to use a tool yourself, you can install most utilities into your own home directory inside Cloud Shell. You only need to update the image if you want every Cloud Shell admin to have the tool available.

For a tool to be included in Cloud Shell, it has to be:

  • widely useful to Azure administrators
  • well-maintained and supported,
  • released under a license which permits us to include it
  • lightweight in terms of CPU requirements, size on disk, and memory

Please:

  • support fetching tokens from Managed Identity if a tool authenticates to Azure services
  • add basic tests to the test suite run by GitHub Actions
  • consume the tools from the Mariner package repo

In general we avoid:

  • alpha, beta, preview or unstable versions of software.
  • tools primarily useful for extensive software development, as opposed to DevOps. Consider Visual Studio Codespaces for that.

Cloud Shell Documentation

The Cloud Shell documentation can be found at https://learn.microsoft.com/azure/cloud-shell/overview. If you wish to contribute to The Cloud Shell documentation, see the Microsoft Learn Contributors Guide.

Legal

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, see https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

cloudshell's People

Contributors

annegeorge17 avatar badbart avatar bellali avatar cheneric95 avatar daeunyim avatar darrentu avatar dsajanice avatar edyoung avatar hima-gadupudi avatar hoisjp avatar maertendmsft avatar mbifeld avatar mgreenegit avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar mirdaki-ms avatar naioja avatar nimehta2010 avatar oliverlabs avatar paulshealy1 avatar priyaananthasankar avatar robins1212 avatar sidney-andrews avatar smaeda-ks avatar sozercan avatar surajssd avatar thejasonhelmick avatar tomgeske avatar xuzhang3 avatar yoyowang268 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudshell's Issues

Error when building using Azure Devops pipeline

To Reproduce

Commands you ran

ADO Pipeline to build image:

trigger:
- master

pool:
  vmImage: 'Ubuntu-latest'

variables:
  imageName: 'base_cloudshell'

steps:
- task: Docker@2
  displayName: Build an image
  inputs:
    repository: $(imageName)
    command: build
    Dockerfile: linux/base.Dockerfile

Observed Behavior

Build errors after 7 to 8 minutes

Error:

Step 21/64 : COPY ./linux/blobxfer /usr/local/bin
COPY failed: stat /var/lib/docker/tmp/docker-builder951648395/linux/blobxfer: no such file or directory
##[error]COPY failed: stat /var/lib/docker/tmp/docker-builder951648395/linux/blobxfer: no such file or directory
##[error]The process '/usr/bin/docker' failed with exit code 1

Expected behavior

Since i am able to build the docker images locally, i was expecting the ADO Agents to build the image using an ADO Pipeline

Is this specific to Cloud Shell?

Specific to ADO Pipeline builds. No issue building on my PC.

Additional context

Add any other context about the problem here.

[BUG] Reports of file system corruption in Cloud Shell

We have received some reports of issues observed in Azure Cloud Shell which have been traced to filesystem corruption in the user's home directory in Cloud Shell. We have not yet determined the exact root cause of the issue or a way to reproduce it. In the interim, this issue provides a location to report this incident occurring, and provides some workaround steps.

Symptoms

Operations which read or write to the home directory in Cloud Shell may produce errors, including

Structure needs cleaning
[Errno 5] Input/output error: '/home/<username>/.azure/commands/<filename>'

Cause

In Cloud Shell, your home directory is stored inside a file stored in the Azure File Share you specify when configuring Cloud Shell. This blog post has more details. Under some circumstances, it is possible for the filesystem structure inside that file to become corrupted, leading to these error messages.

Workaround

The simplest workaround is to delete and recreate your home directory.

  1. Back up any important files from the home directory to the cloud drive, for example cp ~/important.txt ~/clouddrive/important.txt. Alternatively you can download these files. All files under ~ except those under ~/clouddrive will be deleted.
  2. Open your Cloud Drive by clicking the cog wheel settings icon in the Cloud Shell toolbar and chooss 'Manage File Share' from the drop down menu.
  3. Run clouddrive unmount and choose Yes. You will be prompted to reconnect to cloud shell. Don't do that yet!
  4. Open the .cloudconsole directory in the File Share window. You should see a single file acc_myusername.img. Delete this file .
  5. Reconnect to Cloud Shell. The acc_myusername.img file containing your home directory will be automatically recreated.
  6. Restore any files desired into the home directory.

Reporting

We are actively trying to determine the root cause for this issue. If you observe it, please report it either to Microsoft Support via the Azure Portal, or by adding a comment to this issue. In either case, please include your PUID (unique id) so we can identify your records in the service logs. You can determine your PUID by running env | grep ACC_PUID.

Azure Cloud Shell Persist logs

HI,

It's not a bug , but I would like to understand if there is any way we can persist the cloud shell console logs to Azure blob storage account from which the cloud shell session is originated.

For example if we running some ARM templates through Azure cloud shell and what ever logs that are generated by the commands we want to pipe these console logs to Azure blob storage, so that even if the shell terminates, we can later visit the blob storage account and check the logs to verify what happened with the last run

Is this something feasible today ?

[BUG] Azure CloudShell not work in Microsoft learn when we merge 2 accounts.

To Reproduce

I have a email address and I was using Microsoft Learn sandbox. I merge and after merging I see the error like this

image

Commands you ran

Observed Behavior

Include error output here

Expected behavior

A clear description of what you expected to happen instead.

Is this specific to Cloud Shell?

Please verify if the same issue can be reproduced by running the same tool outside Cloud Shell - for example,
by installing it on your own computer. If so, it is likely to be a bug in that tool or in the Azure service it communicates with,
not in Cloud Shell. Please file the issue with the appropriate project.

Interface information

How are you accessing Cloud Shell - https://shell.azure.com, https://portal.azure.com, via Windows Terminal, or some other method?
If a browser, which Operating System and browser are you using? (ex. Edge on Windows 10)

Additional context

Add any other context about the problem here.

[BUG] Can't install azure-cli-ml extension

When trying to install it in tools.dockerfile, the install fails. From logs it appears to have new dependencies, including on Rust, which cause the install to fail. It has been temporarily removed from CLoud Shell while the issue is resolved.

[BUG] Support for Data Plane calls to APIs in Azure Quantum workspaces

To Reproduce

Using an Azure subscription where Azure Quantum workspaces have been created, query for the list of targets in one of them.

The command below is an example considering workspace ricardoe-portal-defprov in resource group aqua-testing-westus2 and location westus.

az quantum target list -g aqua-testing-westus2 -w ricardoe-portal-defprov -l westus -o table

Observed Behavior

The command fails to connect to MSI with the error output below:

Command group 'quantum' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
A Cloud Shell credential problem occurred. When you report the issue with the error below, please mention the hostname 'cc-28c304bc-6776f5474f-g2qs9'
Failed to connect to MSI. Please make sure MSI is configured correctly.
Get Token request returned: <Response [400]>

A more detailed debug output shows the issue in the ADAL token:

cli.azure.cli.core._profile: Retrieving token from ADAL for resource 'https://quantum.microsoft.com'
urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342
urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 400 714
msrestazure.azure_active_directory: MSI: Retrieving a token from http://localhost:50342/oauth2/token, with payload {'resource': 'https://quantum.microsoft.com'}
msrestazure.azure_active_directory: MSI: Failed to retrieve a token from 'http://localhost:50342/oauth2/token' with an error of '400 Client Error: Bad Request for url: http://localhost:50342/oauth2/token'. This could be caused by the MSI extension not yet fully provisioned.

Expected behavior

The command should succeed and return an object with the list of providers.

Is this specific to Cloud Shell?

Yes.

Interface information

How are you accessing Cloud Shell - https://shell.azure.com, https://portal.azure.com, via Windows Terminal, or some other method?
Using portal.azure.com, in multiple configurations and operating systems.

Additional context

N/A

[BUG] How to provide a private version of Cloud Shell interactive without the Portal

To Reproduce

I want to provide users a private version of an interactive shell without accessing the portal. I was able to build the image and deploy to my container registry

When i run the command

az acr run --registry --cmd '$Registry/sample/cloud-shell:v1 /bin/bash' /dev/null

I expect it to provide an interactive shell .

Observed Behavior

2020/10/02 00:46:34 Successfully executed container: acb_step_0 2020/10/02 00:46:34 Step ID: acb_step_0 marked as successful (elapsed time in seconds: 186.608901) Run ID: ca7 was successful after 3m10s

`

Expected behavior

I expected a interactive shell prompt to be used . Can you provide instructions on how do I run that

[BUG]

To Reproduce

  1. Open cloud shell.
  2. Set default subscription via az account set --subscription <'AzureAccountName2'>command.
  3. Run az group list -o table... to get a list of resource groups
  4. Run any command that requires a resource group (rg) name
  5. Observe cloud shell error stating that rg does not exist.
  6. Chuckle as you verify that the named rg is the same as one you chose from the list obtained via az group list command. You find it humorous that the rg is not found ... because you copied and pasted it in the command parameter list from the list obtained via az group list command.
  7. Notice then that cloud shell is not using the DEFAULT subscription set earlier via the az account set --subscription <'mySubscriptionName'> command.
  8. For a sanity check run the az account show command to verify the default subscription is set as intended.
  9. Note that the default subscription is set as expected.
  10. For next sanity check rerun command requiring a rg name parameter and add -Debug parameter to get more details
  11. Note that Azure cloud shell is running the command requiring a rg name in a NON-DEFAULT subscription.
  12. (Optional Step) Scratch head and wonder 1) is azure picking a random subscription and ... well ... 2) (become philosophic now) why is the shell ignoring the default subscription setting; 3) is Azure shell behavior expected or a bug; 4) if this is expected (get philosophic again) why allow a default to be set in Azure cloud shell with no warning or level setting message if it is expected behavior that cloud shell ignores the DEFAULT subscription setting....
    ...
    ...
    ...
    Commands you ran
1. az account list -o yaml

2. az account set --subscription 'POC Dev/Test Lab'

3. az account show -o yaml

4. az group list --query '[*].{Name:name, Location:location,Properties:properties,Type:type,ID:id }' -o yaml

5. $vnetgatewayHM = Get-AzVirtualNetworkGateway -Name vpn-palmtrio-prod-eastus-001 -resourcegroupname 'jenkins-prod-labs-rg' -debug

Observed Behavior

PS /home/david> az account list -o yaml
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-22df3abec8af
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName1>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-0f7c8441bba8
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName2>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-f9b8f78f8100
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName3>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-635c3a2a74eb
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName4>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-8ec6832d826b
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName5>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-79216babb462
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName6>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-11df18627a97
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName7>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-d54a84247f3b
  id: xx-xx-xx-xx-660c8cfa7c54
  isDefault: true
  managedByTenants: []
  name: <AzureAccountName8>
  state: Enabled
  tenantId: xx-xx-xx-xx-d54a84247f3b
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-16c0e4ee0163
  id: xx-xx-xx-xx-a51d92bee73e
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName9>
  state: Enabled
  tenantId: xx-xx-xx-xx-16c0e4ee0163
  user:
    name: <myEmailID>@hotmail.com
    type: user

az account set --subscription 'POC Dev/Test Lab'

az account show -o yaml
(NOTE: the default subscription is now ID  xx-xx-xx-0f7c8441bba8)
environmentName: AzureCloud
homeTenantId: xx-xx-xx-xx-801daa173b77
id: xx-xx-xx-0f7c8441bba8
isDefault: true
managedByTenants: []
name: <AzureAccountName7>
state: Enabled
tenantId: xx-xx-xx-xx-801daa173b77
user:
  name: <myEmailID>@hotmail.com
  type: user

az group list --query '[*].{Name:name, Location:location,Properties:properties,Type:type,ID:id }' -o yaml
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/r-d-test-lab-useast-001-galleryRg
  Location: eastus
  Name: r-d-test-lab-useast-001-galleryRg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/modernization-devtest-lab-eastus
  Location: eastus
  Name: modernization-devtest-lab-eastus
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/file-share-test-rg
  Location: eastus2
  Name: file-share-test-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/VstsRG-CoE-Azure-DevOps-Practice-2322
  Location: centralus
  Name: VstsRG-CoE-Azure-DevOps-Practice-2322
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/jenkins-prod-info-labs-rg
  Location: eastus
  Name: jenkins-prod-info-labs-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/auto-budget-alerts-rg
  Location: eastus
  Name: auto-budget-alerts-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/dev-visual-studio-online-eastus-rg
  Location: eastus
  Name: dev-visual-studio-online-eastus-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/vso-rg-80ed7da
  Location: eastus
  Name: vso-rg-80ed7da
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/NetworkWatcherRG
  Location: eastus
  Name: NetworkWatcherRG
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/dt-azure-ad-domain-services-rg
  Location: eastus
  Name: dt-azure-ad-domain-services-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/AzureBackupRG_eastus_1
  Location: eastus
  Name: AzureBackupRG_eastus_1
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/Default-ActivityLogAlerts
  Location: eastasia
  Name: Default-ActivityLogAlerts
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/dev-support-svcs-recovery-eastus2-rg
  Location: eastus2
  Name: dev-support-svcs-recovery-eastus2-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/dev-support-svcs-eastus2-rg
  Location: eastus2
  Name: dev-support-svcs-eastus2-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/DefaultResourceGroup-EUS2
  Location: eastus2
  Name: DefaultResourceGroup-EUS2
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/AzureBackupRG_eastus2_1
  Location: eastus2
  Name: AzureBackupRG_eastus2_1
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/file-share-test-pvt-endpoint-eastus2-prod-rg
  Location: eastus2
  Name: file-share-test-pvt-endpoint-eastus2-prod-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/DefaultResourceGroup-EUS
  Location: eastus
  Name: DefaultResourceGroup-EUS
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/prod-test-lab-useast-rg
  Location: eastus
  Name: prod-test-lab-useast-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/dev-support-svcs-eastus2-rg-asr
  Location: westus
  Name: dev-support-svcs-eastus2-rg-asr
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/cloud-shell-storage-westus
  Location: westus
  Name: cloud-shell-storage-westus
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups

~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
~*~*~*~*~*~*~*~*~*~*~*~*~*
ERROR CONDITION BELOW.
~*~*~*~*~*~*~*~*~*~*~*~*~*
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

PS /home/david> $vnetgatewayHM = Get-AzVirtualNetworkGateway -Name vpn-palmtrio-prod-eastus-001 -resourcegroupname 'jenkins-prod-labs-rg' -debug

DEBUG: 3:07:00 PM - GetAzureVirtualNetworkGatewayCommand begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 3:07:00 PM - using account id 'MSI@50342'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'MSI@50342', environment: 'AzureCloud', tenant: 'xx-xx-xx-xx-801daa173b77'
DEBUG: [HttpClientOperations]: Adding Header 'Metadata'
DEBUG: Checking Cache request http://localhost:50342/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01
DEBUG: Cache Hit
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/xx-xx-xx-xx-79216babb462/resourceGroups/jenkins-prod-labs-rg/providers/Microsoft.Network/virtualNetworkGateways/vpn-palmtrio-prod-eastus-001?api-version=2020-05-01

Headers:
x-ms-client-request-id        : c1260ac6-3772-436b-a43f-0aed880b6581
Accept-Language               : en-US

Body:



DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-failure-cause            : gateway
x-ms-request-id               : 12929bb6-eaa5-4101-880a-641e0c463e29
x-ms-correlation-request-id   : 12929bb6-eaa5-4101-880a-641e0c463e29
x-ms-routing-request-id       : WESTUS:20200904T150700Z:12929bb6-eaa5-4101-880a-641e0c463e29
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Fri, 04 Sep 2020 15:07:00 GMT

Body:
{
  "error": {
    "code": "ResourceGroupNotFound",
    "message": "Resource group 'jenkins-prod-labs-rg' could not be found."
  }
}


Get-AzVirtualNetworkGateway: Resource group 'jenkins-prod-labs-rg' could not be found.
StatusCode: 404
ReasonPhrase: Not Found
ErrorCode: ResourceGroupNotFound
ErrorMessage: Resource group 'jenkins-prod-labs-rg' could not be found.
OperationID : 12929bb6-eaa5-4101-880a-641e0c463e29
DEBUG: AzureQoSEvent: CommandName - Get-AzVirtualNetworkGateway; IsSuccess - False; Duration - 00:00:00.1722125;; Exception - Microsoft.Azure.Commands.Network.Common.NetworkCloudException: Resource group 'jenkins-prod-labs-rg' could not be found.
StatusCode: 404
ReasonPhrase: Not Found
ErrorCode: ResourceGroupNotFound
ErrorMessage: Resource group 'jenkins-prod-labs-rg' could not be found.
OperationID : 12929bb6-eaa5-4101-880a-641e0c463e29
 ---> Microsoft.Rest.Azure.CloudException: Resource group 'jenkins-prod-labs-rg' could not be found.
   at Microsoft.Azure.Management.Network.VirtualNetworkGatewaysOperations.GetWithHttpMessagesAsync(String resourceGroupName, String virtualNetworkGatewayName, Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Azure.Management.Network.VirtualNetworkGatewaysOperationsExtensions.GetAsync(IVirtualNetworkGatewaysOperations operations, String resourceGroupName, String virtualNetworkGatewayName, CancellationToken cancellationToken)
   at Microsoft.Azure.Management.Network.VirtualNetworkGatewaysOperationsExtensions.Get(IVirtualNetworkGatewaysOperations operations, String resourceGroupName, String virtualNetworkGatewayName)
   at Microsoft.Azure.Commands.Network.VirtualNetworkGatewayBaseCmdlet.GetVirtualNetworkGateway(String resourceGroupName, String name)
   at Microsoft.Azure.Commands.Network.GetAzureVirtualNetworkGatewayCommand.Execute()
   at Microsoft.Azure.Commands.Network.NetworkBaseCmdlet.ExecuteCmdlet()
   --- End of inner exception stack trace ---
   at Microsoft.Azure.Commands.Network.NetworkBaseCmdlet.ExecuteCmdlet()
   at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronouslyOrAsJob>b__3_0(T c)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 3:07:01 PM - GetAzureVirtualNetworkGatewayCommand end processing.

Expected behavior

Here is a clear description of what is expected to happen instead:

Hi my name is klawrawkz. I am fine, how are you?
When I set a default subscription using the azure cloud-shell (or any other azure tooling), I expect that the commands I issue will be run in the context of the DEFAULT subscription. 1) Create session in cloud-shell; 2) Run command to set AZURE DEFAULT subscription; 3) issue any command under the sun; 4) from this point onward all commands in the session will be executed in the context of the DEFAULT subscription established in step 2.

Is this specific to Cloud Shell?

Yes, specific to cloud shell.

Interface information

How are you accessing Cloud Shell -
https://portal.azure.com
Edge | Chrome | Opera | FireFox on Windows 10

Additional context

Here is additional context about the problem ==> *

We have set the 'default' subscription via cloud shell. When we execute: Get-AzVirtualNetworkGateway -Name vpn-palmtrio-prod-eastus-001 -resourcegroupname 'jenkins-prod-labs-rg' -debug this should or I expect to execute commands in the context of the DEFAULT subscription I.E. ID xx-xx-xx-0f7c8441bba8, .

- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-0f7c8441bba8
  isDefault: true
  managedByTenants: []
  name: <AzureAccountName2>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user

NOTE: The trace of the request shows the command is executed using a NON-DEFAULT subscription ID, E.G. xx-xx-xx-xx-79216babb462, .

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions**/xx-xx-xx-xx-79216babb462/**resourceGroups/jenkins-prod-labs-rg/providers/Microsoft.Network/virtualNetworkGateways/vpn-palmtrio-prod-eastus-001?api-version=2020-05-01

The command can never succeed because the subscription being queried for the RG is incorrect:

  • cloudName: AzureCloud
    homeTenantId: xx-xx-xx-xx-801daa173b77
    id: xx-xx-xx-xx-79216babb462
    isDefault: false
    managedByTenants: []
    name:
    state: Enabled
    tenantId: xx-xx-xx-xx-801daa173b77

Thanks for your help with this.
klawrawkz

Add support for NTLM to the Docker image

To Reproduce

apt show gss-ntlmssp

Observed Behavior

N: Unable to locate package gss-ntlmssp

Expected behavior

apt show gss-ntlmssp
Package: gss-ntlmssp
Version: 0.7.0-4build3
Priority: optional

It would be useful to have the NTLM package installed for use with PowerShell remoting from Cloud Shell to Windows machines over WSMan.

Additional context

See this issue where the same request was made to the PowerShell Docker image.

[BUG] Lint and optimize the docker files

To Reproduce

Run a linter on CloudShell/linux/base.Dockerfile

Using tools such as https://www.fromlatest.io/#/ will identify some issues with the docker files for stability (apt-get update missing -y) and Optimization. The dockerfiles in this repo may benefit from less RUN and COPY commands and multi-stage builds. Though this may increase the build times.

The apt cache could be removed if not being done.
https://gist.github.com/marvell/7c812736565928e602c4

Observed Behavior

Line 124: Missing parameter for `apt-get` (Possible Bug)
Line 184: Missing parameter for `apt-get` (Possible Bug)
Line 13: apt-get update with matching cache rm (Optimization)
Line 13: Consider `--no-install-recommends` (Optimization)
Line 72: apt-get update with matching cache rm (Optimization)
Line 72: Consider `--no-install-recommends` (Optimization)
Line 124: Consider `--no-install-recommends` (Optimization)
Line 130: apt-get update with matching cache rm (Optimization)
Line 130: Consider `--no-install-recommends` (Optimization)
Line 184: apt-get update with matching cache rm (Optimization)
Line 184: Consider `--no-install-recommends` (Optimization)
Line 257: Consider `--no-install-recommends` (Optimization)

Expected behavior

It would be beneficial to the community and MS that the image size remains as small as possible and well-optimized.

Is this specific to Cloud Shell?

N/A

Interface information

N/A

Additional context

Other possible tools to run in build:
https://github.com/projectatomic/dockerfile_lint
https://github.com/hadolint/hadolint

[BUG] Cloud Shell crashes when running Connect-ExoPSSession

To Reproduce

Connect-ExoPSSession

Observed Behavior

User is disconnected, with a misleading message about a timeout.

Expected behavior

Connection to Exchange Online should be established

Is this specific to Cloud Shell?

yes

Additional context

This issue was introduced because a workaround to fix remoting in the Linux environment was not applied to the PowerShell RC due to a different directory path. It is possible to work around the issue by explicitly running powershell 7:

edwin@Azure:~$ /opt/microsoft/powershell/7/pwsh
PowerShell 7.0.3
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/powershell
Type 'help' to get help.

PS /home/edwin> Connect-EXOPSSession

The full fix will be to upgrade to Powershell 7.2 RTM and ensure the workaround fix applies there.

[BUG] Font selection causes colors to be ignored in code editor on macOS

System

  • mac OS 10.15.17 (Catalina)
  • Edge Chromium 87.0.664.66 (Official build) (64-bit), Firefox, Chrome.
  • Segoe UI fonts installed, including Segoe UI Emoji

To Reproduce

  1. Set system to Dark Theme in macOS System Settings
  2. Open Edge browser to a Cloud Shell page, we found this on MS Learn but it likely happens on all usages.
  3. Activate the Cloud Shell environment.
  4. Type code to launch the code editor

Observed Behavior

The title bar and menu use dark grey background with black text.

bad-editor

The CSS is correct but not being applied:

color-css

Expected behavior

The title bar and menu should be using the set CSS colors

good-editor

Resolution

Removing the font declaration fixes the problem.

disable-font

The issue appears to be that the browser is selecting the "Segoe UI Emoji" font - this font is not respecting the color settings and is always rendered in black. Other font selections appear to render properly on Chromium/Firefox.

Is this specific to Cloud Shell?

Yes, this is coming from the CSS applied to the Cloud Shell:

https://ux.console.azure.com/css/style.css

UX improvement for CLI prompt on MS Learn

To Reproduce

Open a Learn module on MS Learn, like unit 5 here https://docs.microsoft.com/en-us/learn/modules/implement-message-workflows-with-service-bus/5-exercise-write-code-that-uses-service-bus-queues and then launch the cloud shell in the browser, in the same tab.

Observed Behavior

The problem is that the prompt is too long and takes the whole screen width, since it's displaying the whole PWD instead of just the current folder.

cloud_shell_prompt_better_PS1_2

Expected behavior

Have a shorter CLI prompt.

We could modify the PS1 variable in .bashrc when we see the modifier \w that displays the full path, we could have \W instead (uppercase W. see screenshot for the difference).

Context

Cloud Shell on Learn seems to use a .bashrc file similar to this one https://github.com/ams0/azure-cloudshell/blob/master/bashrc#L121 since there's that Azure modifier to PS1, but I couldn't find where that sits on this repo.

A quick solution could be during container boot, to have the docker file cat a PS1=${PS1//\\w/\\W} into $HOME/.bashrc

Tagging @johnpapa to the discussion, since he's on board for the change for Learn.

[BUG] Cloud Shell fails to run Terraform Azure AD 2.x (using MS Graph) due to MSI error

To Reproduce

system@Azure:~/cloudshell_msgraph$ cat main.tf
provider "azuread" {
}

data "azuread_client_config" "current" {}

resource "azuread_group" "example" {
  display_name     = "example"
  owners           = [data.azuread_client_config.current.object_id]
  security_enabled = true
}
system@Azure:~/cloudshell_msgraph$ terraform init

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/azuread...
- Installing hashicorp/azuread v2.6.0...
- Installed hashicorp/azuread v2.6.0 (signed by HashiCorp)

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
system@Azure:~/cloudshell_msgraph$ terraform apply
╷
│ Error: could not configure MSI Authorizer: NewMsiConfig: could not validate MSI endpoint: received HTTP status 404
│
│   with provider["registry.terraform.io/hashicorp/azuread"],
│   on main.tf line 1, in provider "azuread":
│    1: provider "azuread" {
│
╵

Observed Behavior

│ Error: could not configure MSI Authorizer: NewMsiConfig: could not validate MSI endpoint: received HTTP status 404

Expected behavior

I'm Global Admin, and I was able to use Terraform with AzureAD 1.x modules ( using the old Active Directory Graph API). According to the TF upgrade guide, no special actions must be taken when using Azure CLI authentication https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/guides/microsoft-graph

Is this specific to Cloud Shell?

Yes.
Azure CLI from a workstation works fine
Using Cloud shell, with default credentials, doesn't work with MS Graph API it seems

[BUG] - rsync is missing

To Reproduce

rsync

Observed Behavior

xavier@Azure:~$ rsync
bash: rsync: command not found

Expected behavior

rsync was working on Aug-10, and not anymore now

Is this specific to Cloud Shell?

yes

Interface information

How are you accessing Cloud Shell - https://shell.azure.com, https://portal.azure.com
If a browser, which Operating System and browser are you using? Edge on Windows 10

Requesting update to Terraform 1.1+

Hi team,
Terraform 1.1 introduces some new syntax (like NULL-able variables) that is very useful, and we've already adopted it at our org.
However our favourite way of applying Terraform is to do it via Cloud Shell, as it's nice and fast. But Cloud Shell is currently at Terraform 1.0.1.1 and there's no way for the user to update it.
Trying to install my own version of Terraform on the shell created a bunch of authentication errors for me.
Could I please ask that Terraform on Cloud Shell is updated to 1.1+?

Thank you!

[BUG] URLs followed by " in shell include the " when auto-formatted to be clickable.

Use the portal cloudshell and run the following command:

"az confluent terms list"

The command returns the following:
[
{
"id": "/subscriptions/eb4814af-a562-4d37-bb59-5314ae1d7926/providers/Microsoft.Confluent/agreements/marketplace",
"name": "marketplace",
"properties": {
"accepted": true,
"licenseTextLink": "https://azure.microsoft.com/en-us/support/legal/marketplace-terms/",
"plan": "Marketplace",
"privacyPolicyLink": "http://www.microsoft.com/privacy",
"product": "Marketplace",
"publisher": "Microsoft",
"retrieveDatetime": null,
"signature": ""
},
"type": "Microsoft.Confluent/agreements"
},
{
"id": "/subscriptions/eb4814af-a562-4d37-bb59-5314ae1d7926/providers/Microsoft.Confluent/agreements/default",
"name": "confluent",
"properties": {
"accepted": false,
"licenseTextLink": "https://www.confluent.io/marketplace-terms-of-service/",
"plan": "Confluent",
"privacyPolicyLink": "https://assets.confluent.io/m/1353b6c3146e5feb/original/20200911-Confluent_Privacy_Statement.pdf",
"product": "Marketplace",
"publisher": "Confluent",
"retrieveDatetime": null,
"signature": ""
},
"type": "Microsoft.Confluent/offertypes"
}
]

The licenseTextLink when clicked opens up the following URL:
https://azure.microsoft.com/en-us/support/legal/marketplace-terms/%22/
Instead of https://azure.microsoft.com/en-us/support/legal/marketplace-terms/
Which shows a 404 response.

This is specific to cloud shell as on normal powershell the command behaves as expected.
This is an issue of the cloud shell parsing clickable urls.

[Request] could you please add purview to cloud shell token allowlist?

To Reproduce

image

Observed Behavior

image

Expected behavior

can take cloud shell token

Is this specific to Cloud Shell?

Yes, it seems like cloud shell tokens cannot be provided for https://purview.azure.net.
Since many users want to use cloud shell token to authenticate purview, could you please add purview to the allowlist?

referenced this document:https://docs.microsoft.com/en-us/azure/cloud-shell/msi-authorization#limitations
image

Interface information

How are you accessing Cloud Shell - https://shell.azure.com, https://portal.azure.com, via Windows Terminal, or some other method?
If a browser, which Operating System and browser are you using? (ex. Edge on Windows 10)

Additional context

Add any other context about the problem here.

rsync and probably other tools not present in cbl-d image

To Reproduce

rsync

Observed Behavior

command not found

Expected behavior

Should be present

Additional context

Should create a list of all the executables on the path in existing shell, compare with list in new shell, and review discrepancies.

[BUG] Text in vi is very hard to see

To Reproduce

vi .bashrc

Observed Behavior

Text in vi is very hard to see. The color has very low contrast ratio compared to the background.

image

image

Expected behavior

Text in vi should have enough contrast ratio compared to the background.

Is this specific to Cloud Shell?

Yes.

Interface information

In https://portal.azure.com with Courier New font.

Additional context

This issue is originally reported at Azure/azure-cli#17325. Workarounds are provided at Azure/azure-cli#17325 (comment).

Container image size

What is the main reason for the large size for the Azure Cloud Shell image? Almost 10 GB is rather huge in terms of container images - especially when compared to a bare-bone PowerShell image for example.

docker images

REPOSITORY                                         TAG                               IMAGE ID       CREATED         SIZE
mcr.microsoft.com/azure-powershell                 5.7.0-alpine-3.10                 3c8c95fbf3a7   12 days ago     442MB
mcr.microsoft.com/azure-powershell                 5.7.0-ubuntu-18.04                20c638519b1f   12 days ago     529MB
mcr.microsoft.com/azure-cloudshell                 latest                            bcba34c6bdae   2 weeks ago     9.31GB

[BUG] The Docker Daemon

To Reproduce

dockerd

Observed Behavior

dockerd needs to be started with root. To see how to run dockerd in rootless mode with unprivileged user, see the documentation

Expected behavior

Is there a possible way for me to run the docker daemon in Cloud Shell? If not, should we remove the moby-engine command? Should we consider a rootless docker daemon? (https://medium.com/@tonistiigi/experimenting-with-rootless-docker-416c9ad8c0d6)

Is this specific to Cloud Shell?

Yes

Interface information

https://portal.azure.com and through my personal laptop
Operating system: Chrome

[BUG] .profile not being run at login -> $PATH not being set correctly with user's private bin dirs

To Reproduce

1. put an executable file in ~/.local/bin
2. try to run executable without full path -> it will fail as ~/.local/bin is not part of path

Expected behavior

Cloud shell includes a .profile file with the following lines to set the user's local bin dir:

# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"

But, it appears that .profile is not being run at login.

Requesting a Cloud Shell.Succeeded.
Connecting terminal...

hacker@Azure:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/linkerd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/istio-latest/bin:/usr/local/go/bin:/opt/mssql-tools/bin:~/bundle/bin:~/bundle/gems/bin
hacker@Azure:~$

I am presuming that this is intended to be supported, as the .local directory exists already:

hacker@Azure:~$ ls -l
total 0
lrwxrwxrwx 1 hacker hacker 22 Sep 11 12:52 clouddrive -> /usr/csuser/clouddrive
hacker@Azure:~$ ls -la
total 44
drwxr-xr-x 5 hacker hacker 4096 Sep 11 12:52 .
drwxrwxrwx 3 root   root   4096 Sep 11 12:51 ..
drwx------ 5 hacker hacker 4096 Sep  9 14:33 .azure
-rw------- 1 hacker hacker 2562 Sep 11 12:54 .bash_history
-rw-r--r-- 1 hacker hacker  220 Aug 31  2015 .bash_logout
-rw-r--r-- 1 hacker hacker 4006 Sep 11 12:53 .bashrc
lrwxrwxrwx 1 hacker hacker   22 Sep 11 12:52 clouddrive -> /usr/csuser/clouddrive
drwxr-x--- 4 hacker hacker 4096 Sep 10 21:22 .kube
drwxr-xr-x 3 hacker hacker 4096 Sep  9 14:34 .local
-rwxr-xr-x 1 hacker hacker  655 Jul 12  2019 .profile
-rw-r--r-- 1 hacker hacker   42 Sep  9 14:32 .tmux.conf
-rw-r--r-- 1 hacker hacker  167 Sep 10 21:32 .wget-hsts
hacker@Azure:~$ ls -l .local
total 4
drwxr-xr-x 2 hacker hacker 4096 Sep 10 21:32 bin
hacker@Azure:~$

Is this specific to Cloud Shell?

Might be specific to Cloud Shell as .profile is not being run at login. The .profile file says:

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

In the cloudshell environment, there is no .bash_profile nor a .bash_login, so I would assume that login would run .profile

Interface information

How are you accessing Cloud Shell - https://shell.azure.com, https://portal.azure.com, via Windows Terminal, or some other method?
If a browser, which Operating System and browser are you using? (ex. Edge on Windows 10)

Additional context

Add any other context about the problem here.

jq 1.6

The jq version is currently jq-1.5-1-a5b5cbe.

It would be great to update this to jq 1.6, which has support for the JQ_COLORS env var.

[BUG] Azure Databricks audience blocked in MSI

To Reproduce

curl http://localhost:50342/oauth2/token --data "resource=2ff814a6-3304-4ab8-85cb-cd0e6f879c1d" -H Metadata:true -s
curl http://localhost:50342/oauth2/token --data "resource=https://azuredatabricks.net/" -H Metadata:true -s

Observed Behavior

{"error":{"code":"AudienceNotSupported","message":"Audience 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d is not a supported MSI token audience. Supported audiences: https://management.core.windows.net/,https://management.azure.com/,https://graph.windows.net/,https://vault.azure.net,https://datalake.azure.net/,https://outlook.office365.com/,https://graph.microsoft.com/,https://batch.core.windows.net/,https://analysis.windows.net/powerbi/api,https://storage.azure.com/,https://rest.media.azure.net,https://api.loganalytics.io,https://ossrdbms-aad.database.windows.net,https://www.yammer.com,https://digitaltwins.azure.net,0b07f429-9f4b-4714-9392-cc5e8e80c8b0,822c8694-ad95-4735-9c55-256f7db2f9b4,https://dev.azuresynapse.net,https://database.windows.net,https://quantum.microsoft.com,https://iothubs.azure.net"}}

Expected behavior

Both commands should have returned an access token. I am guessing this is also the reason calling az account get-access-token trying to get an access token for Azure Databricks fails (while the same command ran on my dev machine succeeds):

matthieu@Azure:~$ az account get-access-token --resource https://azuredatabricks.net/
Failed to connect to MSI. Please make sure MSI is configured correctly.
Get Token request returned: <Response [400]>

Is this specific to Cloud Shell?

Yes. No MSI on my local dev machine, but az account get-access-token --resource https://azuredatabricks.net/ does fail in Cloud Shell and succeeds on my local machine.

Interface information

https://shell.azure.com from Chrome on Windows 10

Additional context

Improve Cloud Shell onboarding for advanced scenario with VNET isolation

When onboarding Cloud Shell with VNET isolation the user's experience could be improved by clarifying the documentation for advanced scenario and relaxing some requirements:

  • Expand the documentation at https://docs.microsoft.com/en-us/azure/cloud-shell/private-vnet with step by step installation guide, in particular the chapter "Deploy network resources". Currently it references two Quickstart ARM templates, but it takes additional time by investigating what needs to be done if some Azure resources are already in place, e.g. VNET with subnets.
  • Clarify a requirement about how many different subnets are required (three according to the Quickstart ARM templates) and what requirements each subnet has if any, e.g. service endpoints, delegations, etc. Are three (3) subnets required, or could Private Endpoints be created within already defined subnets?
  • Clarify requirements about RBAC permissions for different resources and service principals.
  • Allow the storage account, relay namespace, virtual network and private endpoints be defined in different resource groups. As an example, networking resources could be managed by different teams and stay in different resource groups.
  • Clarify best practices adopting Cloud Shell in multi-admin scenario. e.g., could one Storage Account with different File shares and RBAC access permissions be shared in multi-admin scenario? Are Relay namespace and Network profiles required to be created for each Cloud Shell user separately?

You did already a great job! Just an experience in higly governed and secured environment needs improvement.

[BUG] Unable to run AzureADPreview commands

To Reproduce

The issue is unable to run AzureADPreview commands in CloudShell even I have installed and imported AzureADPreview Module in CloudShell. But in on-prem environment, I can run these commands without issue.

Below screenshot, left is on-prem, right is Cloud Shell: (as you see, on-prem and CloudShell has installed AzureADPreview module)
image

But in CloudShell, if I run "Get-AzureADMSPrivilegedRoleDefinition", it said it's not recoginized as a name of a cmdlet, fuction, script file or executable program. On-prem environment runs without any issue:
image

Commands you ran

Get-AzureADMSPrivilegedRoleDefinition -ProviderId aadRoles -ResourceId 926d99e7-117c-4a6a-8031-0cc481e9da26
Reference document:
https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/powershell-for-azure-ad-roles

Include error output here


PS /home/yoyo> Import-Module AzureADPreview
Import-Module: Assembly with same name is already loaded
PS /home/yoyo> Get-AzureADMSPrivilegedRoleDefinition
Get-AzureADMSPrivilegedRoleDefinition: The term 'Get-AzureADMSPrivilegedRoleDefinition' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
PS /home/yoyo>


## Expected behavior
Able to run AzureADPreview in CloudShell.


## Is this specific to Cloud Shell?
Please verify if the same issue can be reproduced by running the same tool **outside Cloud Shell** - for example,
by installing it on your own computer. If so, it is likely to be a bug in that tool or in the Azure service it communicates with, 
not in Cloud Shell. Please file the issue with the appropriate project.

Yes, this is specific to Cloud Shell. On-prem PowerShell runs well

Azure Cloud Shell Ignores Default Subscription Setting [BUG]

Original bug report is #39; Updated to include descriptive title.

To Reproduce

  1. Open cloud shell.
  2. Set default subscription via az account set --subscription <'AzureAccountName2'>command $cntxt = Get-AzSubscription -SubscriptionId ' xx-xx-xx-xx-0f7c8441bba8' ... and Set-AzContext $cntxt ...
  3. Run az group list -o table... to get a list of resource groups
  4. Run any command that requires a resource group (rg) name
  5. Observe cloud shell error stating that rg does not exist.
  6. Chuckle as you verify that the named rg is the same as one you chose from the list obtained via az group list command. You find it humorous that the rg is not found ... because you copied and pasted it in the command parameter list from the list obtained via az group list command.
  7. Notice then that cloud shell is not using the DEFAULT subscription set earlier via the az account set --subscription <'mySubscriptionName'> command.
  8. For a sanity check run the az account show command to verify the default subscription is set as intended.
  9. Note that the default subscription is set as expected.
  10. For next sanity check rerun command requiring a rg name parameter and add -Debug parameter to get more details
  11. Note that Azure cloud shell is running the command requiring a rg name in a NON-DEFAULT subscription.
  12. (Optional Step) Scratch head and wonder 1) is azure picking a random subscription and ... well ... 2) (become philosophic now) why is the shell ignoring the default subscription setting; 3) is Azure shell behavior expected or a bug; 4) if this is expected (get philosophic again) why allow a default to be set in Azure cloud shell with no warning or level setting message if it is expected behavior that cloud shell ignores the DEFAULT subscription setting....
    ...
    ...
    ...
    Commands you ran
1. az account list -o yaml

2. az account set --subscription 'POC Dev/Test Lab'

3. az account show -o yaml

4. az group list --query '[*].{Name:name, Location:location,Properties:properties,Type:type,ID:id }' -o yaml

5. $vnetgatewayHM = Get-AzVirtualNetworkGateway -Name vpn-palmtrio-prod-eastus-001 -resourcegroupname 'jenkins-prod-labs-rg' -debug

Observed Behavior

PS /home/david> az account list -o yaml
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-22df3abec8af
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName1>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-0f7c8441bba8
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName2>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-f9b8f78f8100
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName3>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-635c3a2a74eb
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName4>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-8ec6832d826b
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName5>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-79216babb462
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName6>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-11df18627a97
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName7>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-d54a84247f3b
  id: xx-xx-xx-xx-660c8cfa7c54
  isDefault: true
  managedByTenants: []
  name: <AzureAccountName8>
  state: Enabled
  tenantId: xx-xx-xx-xx-d54a84247f3b
  user:
    name: <myEmailID>@hotmail.com
    type: user
- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-16c0e4ee0163
  id: xx-xx-xx-xx-a51d92bee73e
  isDefault: false
  managedByTenants: []
  name: <AzureAccountName9>
  state: Enabled
  tenantId: xx-xx-xx-xx-16c0e4ee0163
  user:
    name: <myEmailID>@hotmail.com
    type: user

az account set --subscription 'POC Dev/Test Lab'

az account show -o yaml
(NOTE: the default subscription is now ID  xx-xx-xx-0f7c8441bba8)
environmentName: AzureCloud
homeTenantId: xx-xx-xx-xx-801daa173b77
id: xx-xx-xx-0f7c8441bba8
isDefault: true
managedByTenants: []
name: <AzureAccountName7>
state: Enabled
tenantId: xx-xx-xx-xx-801daa173b77
user:
  name: <myEmailID>@hotmail.com
  type: user

az group list --query '[*].{Name:name, Location:location,Properties:properties,Type:type,ID:id }' -o yaml
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/r-d-test-lab-useast-001-galleryRg
  Location: eastus
  Name: r-d-test-lab-useast-001-galleryRg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/modernization-devtest-lab-eastus
  Location: eastus
  Name: modernization-devtest-lab-eastus
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/file-share-test-rg
  Location: eastus2
  Name: file-share-test-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/VstsRG-CoE-Azure-DevOps-Practice-2322
  Location: centralus
  Name: VstsRG-CoE-Azure-DevOps-Practice-2322
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/jenkins-prod-info-labs-rg
  Location: eastus
  Name: jenkins-prod-info-labs-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/auto-budget-alerts-rg
  Location: eastus
  Name: auto-budget-alerts-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/dev-visual-studio-online-eastus-rg
  Location: eastus
  Name: dev-visual-studio-online-eastus-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/vso-rg-80ed7da
  Location: eastus
  Name: vso-rg-80ed7da
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/NetworkWatcherRG
  Location: eastus
  Name: NetworkWatcherRG
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/dt-azure-ad-domain-services-rg
  Location: eastus
  Name: dt-azure-ad-domain-services-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/AzureBackupRG_eastus_1
  Location: eastus
  Name: AzureBackupRG_eastus_1
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/Default-ActivityLogAlerts
  Location: eastasia
  Name: Default-ActivityLogAlerts
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/dev-support-svcs-recovery-eastus2-rg
  Location: eastus2
  Name: dev-support-svcs-recovery-eastus2-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/dev-support-svcs-eastus2-rg
  Location: eastus2
  Name: dev-support-svcs-eastus2-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/DefaultResourceGroup-EUS2
  Location: eastus2
  Name: DefaultResourceGroup-EUS2
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/AzureBackupRG_eastus2_1
  Location: eastus2
  Name: AzureBackupRG_eastus2_1
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/file-share-test-pvt-endpoint-eastus2-prod-rg
  Location: eastus2
  Name: file-share-test-pvt-endpoint-eastus2-prod-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/DefaultResourceGroup-EUS
  Location: eastus
  Name: DefaultResourceGroup-EUS
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/prod-test-lab-useast-rg
  Location: eastus
  Name: prod-test-lab-useast-rg
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/dev-support-svcs-eastus2-rg-asr
  Location: westus
  Name: dev-support-svcs-eastus2-rg-asr
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups
- ID: /subscriptions/xx-xx-xx-0f7c8441bba8/resourceGroups/cloud-shell-storage-westus
  Location: westus
  Name: cloud-shell-storage-westus
  Properties:
    provisioningState: Succeeded
  Type: Microsoft.Resources/resourceGroups

~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
~*~*~*~*~*~*~*~*~*~*~*~*~*
ERROR CONDITION BELOW.
~*~*~*~*~*~*~*~*~*~*~*~*~*
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

PS /home/david> $vnetgatewayHM = Get-AzVirtualNetworkGateway -Name vpn-palmtrio-prod-eastus-001 -resourcegroupname 'jenkins-prod-labs-rg' -debug

DEBUG: 3:07:00 PM - GetAzureVirtualNetworkGatewayCommand begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 3:07:00 PM - using account id 'MSI@50342'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'MSI@50342', environment: 'AzureCloud', tenant: 'xx-xx-xx-xx-801daa173b77'
DEBUG: [HttpClientOperations]: Adding Header 'Metadata'
DEBUG: Checking Cache request http://localhost:50342/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01
DEBUG: Cache Hit
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/xx-xx-xx-xx-79216babb462/resourceGroups/jenkins-prod-labs-rg/providers/Microsoft.Network/virtualNetworkGateways/vpn-palmtrio-prod-eastus-001?api-version=2020-05-01

Headers:
x-ms-client-request-id        : c1260ac6-3772-436b-a43f-0aed880b6581
Accept-Language               : en-US

Body:



DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-failure-cause            : gateway
x-ms-request-id               : 12929bb6-eaa5-4101-880a-641e0c463e29
x-ms-correlation-request-id   : 12929bb6-eaa5-4101-880a-641e0c463e29
x-ms-routing-request-id       : WESTUS:20200904T150700Z:12929bb6-eaa5-4101-880a-641e0c463e29
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Fri, 04 Sep 2020 15:07:00 GMT

Body:
{
  "error": {
    "code": "ResourceGroupNotFound",
    "message": "Resource group 'jenkins-prod-labs-rg' could not be found."
  }
}


Get-AzVirtualNetworkGateway: Resource group 'jenkins-prod-labs-rg' could not be found.
StatusCode: 404
ReasonPhrase: Not Found
ErrorCode: ResourceGroupNotFound
ErrorMessage: Resource group 'jenkins-prod-labs-rg' could not be found.
OperationID : 12929bb6-eaa5-4101-880a-641e0c463e29
DEBUG: AzureQoSEvent: CommandName - Get-AzVirtualNetworkGateway; IsSuccess - False; Duration - 00:00:00.1722125;; Exception - Microsoft.Azure.Commands.Network.Common.NetworkCloudException: Resource group 'jenkins-prod-labs-rg' could not be found.
StatusCode: 404
ReasonPhrase: Not Found
ErrorCode: ResourceGroupNotFound
ErrorMessage: Resource group 'jenkins-prod-labs-rg' could not be found.
OperationID : 12929bb6-eaa5-4101-880a-641e0c463e29
 ---> Microsoft.Rest.Azure.CloudException: Resource group 'jenkins-prod-labs-rg' could not be found.
   at Microsoft.Azure.Management.Network.VirtualNetworkGatewaysOperations.GetWithHttpMessagesAsync(String resourceGroupName, String virtualNetworkGatewayName, Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Azure.Management.Network.VirtualNetworkGatewaysOperationsExtensions.GetAsync(IVirtualNetworkGatewaysOperations operations, String resourceGroupName, String virtualNetworkGatewayName, CancellationToken cancellationToken)
   at Microsoft.Azure.Management.Network.VirtualNetworkGatewaysOperationsExtensions.Get(IVirtualNetworkGatewaysOperations operations, String resourceGroupName, String virtualNetworkGatewayName)
   at Microsoft.Azure.Commands.Network.VirtualNetworkGatewayBaseCmdlet.GetVirtualNetworkGateway(String resourceGroupName, String name)
   at Microsoft.Azure.Commands.Network.GetAzureVirtualNetworkGatewayCommand.Execute()
   at Microsoft.Azure.Commands.Network.NetworkBaseCmdlet.ExecuteCmdlet()
   --- End of inner exception stack trace ---
   at Microsoft.Azure.Commands.Network.NetworkBaseCmdlet.ExecuteCmdlet()
   at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronouslyOrAsJob>b__3_0(T c)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 3:07:01 PM - GetAzureVirtualNetworkGatewayCommand end processing.

Expected behavior

Here is a clear description of what is expected to happen instead:

Hi my name is klawrawkz. I am fine, how are you?
When I set a default subscription using the azure cloud-shell (or any other azure tooling), I expect that the commands I issue will be run in the context of the DEFAULT subscription. 1) Create session in cloud-shell; 2) Run command to set AZURE DEFAULT subscription; 3) issue any command under the sun; 4) from this point onward all commands in the session will be executed in the context of the DEFAULT subscription established in step 2.

Is this specific to Cloud Shell?

Yes, specific to cloud shell.

Interface information

How are you accessing Cloud Shell -
https://portal.azure.com
Edge | Chrome | Opera | FireFox on Windows 10

Additional context

Here is additional context about the problem ==> *

We have set the 'default' subscription via cloud shell. When we execute: Get-AzVirtualNetworkGateway -Name vpn-palmtrio-prod-eastus-001 -resourcegroupname 'jenkins-prod-labs-rg' -debug this should or I expect to execute commands in the context of the DEFAULT subscription I.E. ID xx-xx-xx-0f7c8441bba8, .

- cloudName: AzureCloud
  homeTenantId: xx-xx-xx-xx-801daa173b77
  id: xx-xx-xx-xx-0f7c8441bba8
  isDefault: true
  managedByTenants: []
  name: <AzureAccountName2>
  state: Enabled
  tenantId: xx-xx-xx-xx-801daa173b77
  user:
    name: <myEmailID>@hotmail.com
    type: user

NOTE: The trace of the request shows the command is executed using a NON-DEFAULT subscription ID, E.G. xx-xx-xx-xx-79216babb462, .

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions**/xx-xx-xx-xx-79216babb462/**resourceGroups/jenkins-prod-labs-rg/providers/Microsoft.Network/virtualNetworkGateways/vpn-palmtrio-prod-eastus-001?api-version=2020-05-01

The command can never succeed because the subscription being queried for the RG is incorrect:

  • cloudName: AzureCloud
    homeTenantId: xx-xx-xx-xx-801daa173b77
    id: xx-xx-xx-xx-79216babb462
    isDefault: false
    managedByTenants: []
    name:
    state: Enabled
    tenantId: xx-xx-xx-xx-801daa173b77

Thanks for your help with this.
klawrawkz

CBL-D image doesn't work with PowerShell Remoting

To Reproduce

Build using cbl-d private branch. In resulting image run

Connect-ExoPSSession

Observed Behavior

pwsh crashes

Expected behavior

Successful remoting session

Is this specific to Cloud Shell?

Yes.

Additional context

PowerShell remoting relies on libmi.so. Libmi.so is compiled against openssl 1.0. The newer image comes with openssl 1.1 instead. Need to work out a way to break this dependency, probably by substituting in a different build of libmi which works with openssl 1.1.

Failed to import the required Python library (msrestazure) [BUG]

Can not get the Ansible Azure Modules to work.
I follow the -> https://docs.microsoft.com/en-us/azure/developer/ansible/getting-started-cloud-shell?tabs=ansible#test-ansible-installation

To Reproduce

$ cat create_rg.yml
---
- hosts: localhost
  connection: local
  tasks:
    - name: Creating resource group - "{{ name }}"
      azure_rm_resourcegroup:
        name: "{{ name }}"
        location: "{{ location }}"
      register: rg
    - debug:
        var: rg

$ ansible-playbook create_rg.yml --extra-vars "name=my_rg location=westeurope"

Observed Behavior

PLAY [localhost] *************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *******************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Creating resource group - "my_rg"] *************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'msrest'
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (msrestazure) on cc-ad1e3a99-69479cbb47-plm6f's Python /opt/ansible/bin/python. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}

PLAY RECAP *******************************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
ansible 2.10.2
  config file = None
  configured module search path = ['/home/petter/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/ansible/lib/python3.7/site-packages/ansible
  executable location = /opt/ansible/bin/ansible
  python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]

Remove Python 2

Since Python 2 is formally unsupported by the Python Software Foundation, and Python 3 has been available in Cloud Shell for a long time, we plan to remove Python 2 support in an upcoming update. The exact time for removal and process for warning users is TBD. Will update this issue with details as we progress.

Feature: Pulumi and .NET 5

Currently only .NET Core 3.1 SDK and the Terraform is installed within the shell. I want to adopt the .NET 5 SDK and the Pulumi for my workload.

[BUG] AzureAD cmdlets return error after Connect-AzureAD is successful using CloudShell in M365 Admin Center

To Reproduce

Created new CloudShell in Microsoft365 admin center. Do not launch Cloudshell via portal.azure.com! If you run Connect-AzureAD from portal.azure.com the issue is resolved unless you restart CloudShell in Microsoft365 admin center.

Connect-AzureAD
Get-AzureADUser
Get-AzureADGroup

Observed Behavior

AzureAD cmdlets like Get-AzureADUser or Get-AzureADGroup take a long time to process and return with a token missing or malformed error.
image

Code: Authentication_MissingOrMalformed
Message: Access Token missing or malformed.
HttpStatusCode: Unauthorized
HttpStatusDescription: Unauthorized
HttpResponseStatus: Completed

Expected behavior

cmdlets to return results

Is this specific to Cloud Shell?

No issue in standard PowerShell or if using the same CloudShell via https://portal.azure.com

Interface information

How are you accessing Cloud Shell - https://admin.microsoft.com/
If a browser, which Operating System and browser are you using? Edge on Windows 10

Additional context

Tried CloudShell in multiple tenants with same results when using from https://admin.microsoft.com.

Feature: JDK 11

Currently only JDK 8 is installed within the shell. Would love to see the current LTS JDK11 be available in the shell. Perhaps something like SDKMan to help switch between the versions?

AB#14479498

Connect-AzureAD command does not work inside CloudShell if it is in a .ps1 script

Whenever I run a powershell script with this in the first lines ( Refer [(a)] for code I am trying to save and run ), I keep seeing the following error:

PS /home/srijith> ./azureRapidOnboarding.ps1
InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:60
Line |
  60 |      & ($script:PSCloudShellUtilityModuleInfo){param([string]$Label, [ …
     |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script
     | block, or a CommandInfo object.

InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:167
Line |
 167 |          $azureADParameters = @{'Identity' = $true; 'TenantId' = $env: …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot index into a null array.

This is the code I am trying to run:
[(a)]

Connect-AzureAD

How do I proceed? This command works from Azure powershell command prompt, and the issue is when executing the command from a file. Here is a video recording of the same:

azure.mp4

az iot extention not working

Reproduce:
az dt model create --models '{ "@id": "dtmi:contosocom:DigitalTwins:Thermostat;1", "@type": "Interface", "@context": "dtmi:dtdl:context;2", "contents": [ { "@type": "Property", "name": "Temperature", "schema": "double" } ]}' -n teoadtdemo

Command results in a loop where the shell reports that 0.10.2 is required, attempts to install, and then reports that it's already installed. Here's the output from the shell.
The command requires the extension azure-iot. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): Y
Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt.
Extension 'azure-iot' 0.10.2 is already installed.
It will be updated if available.
No updates available for 'azure-iot'. Use --debug for more information.
The command requires the extension azure-iot. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): Y
Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt.
Extension 'azure-iot' 0.10.2 is already installed.
It will be updated if available.
No updates available for 'azure-iot'. Use --debug for more information.
The command requires the extension azure-iot. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n): Y
Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt.
Extension 'azure-iot' 0.10.2 is already installed.
It will be updated if available.
No updates available for 'azure-iot'. Use --debug for more information.

I've tried removing and adding the az iot extensions with no success.

NuGet Error on Azure Cloud Shell: NU3028, NU3037

Hey Team,

Not exactly sure if this is the right place to report this issue so please point me in the right direction if that is the case. I am going through the online learning tutorials Microsoft provides which allows you to use their Azure Cloud Shell environment.

After running this command: dotnet new webapi -o aspnet-learn/src/ContosoPets.Api

This command also produced the same error message below: dotnet restore

This was my result:

/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'System.Security.Cryptography.Cng 4.5.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'System.Security.Cryptography.Cng 4.5.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'System.Security.Cryptography.Cng 4.5.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.IdentityModel.JsonWebTokens 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'Microsoft.IdentityModel.JsonWebTokens 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.IdentityModel.JsonWebTokens 6.7.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'System.IdentityModel.Tokens.Jwt 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'System.IdentityModel.Tokens.Jwt 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'System.IdentityModel.Tokens.Jwt 6.7.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificatechain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.IdentityModel.Protocols.OpenIdConnect 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'Microsoft.IdentityModel.Protocols.OpenIdConnect 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.IdentityModel.Protocols.OpenIdConnect 6.7.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.IdentityModel.Protocols 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'Microsoft.IdentityModel.Protocols 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.IdentityModel.Protocols 6.7.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.CSharp 4.5.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'Microsoft.CSharp 4.5.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.CSharp 4.5.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.IdentityModel.Tokens 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'Microsoft.IdentityModel.Tokens 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.IdentityModel.Tokens 6.7.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.OpenApi 1.2.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'Microsoft.OpenApi 1.2.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validityperiod has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.OpenApi 1.2.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.IdentityModel.Logging 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'Microsoft.IdentityModel.Logging 6.7.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.IdentityModel.Logging 6.7.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificatechain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.Extensions.ApiDescription.Server 3.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'Microsoft.Extensions.ApiDescription.Server 3.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.Extensions.ApiDescription.Server 3.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.AspNetCore.Authentication.JwtBearer 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'Microsoft.AspNetCore.Authentication.JwtBearer 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.AspNetCore.Authentication.JwtBearer 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.AspNetCore.Authentication.OpenIdConnect 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificatein certificate chain
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3037: Package 'Microsoft.AspNetCore.Authentication.OpenIdConnect 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.
/home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj : error NU3028: Package 'Microsoft.AspNetCore.Authentication.OpenIdConnect 5.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain
  Failed to restore /home/t/aspnet-learn/src/ContosoPets.Api/ContosoPets.Api.csproj (in 2.02 sec).
Restore failed.
Post action failed.
Description: Restore NuGet packages required by this project.
Manual instructions: Run 'dotnet restore'

I expected that the image would leverage an ASP.NET Core project template, aliased as webapi, to scaffold a C#-based web API project. I believe this issue is specific to a NuGet package and not Azure Cloud Shell itself but I could be wrong. I am accessing the Cloud Shell via the Mozilla Firefox browser at https://docs.microsoft.com/en-us/learn/modules/build-web-api-aspnet-core/2-create-web-api on a Windows 10 OS.

Use a newer base OS image

Ok I'll start ;)

This issue is to track moving to a newer version of Ubuntu - 18.04 or 20.04.

I really want this specifically for Vim8.

Feature: Docker context ACI

Until now, Cloud Shell only contains the Docker CLI, not the daemon (which I think is good, due to issues with DinD). Now, with Context and ACI support the Docker CLI could default to the ACI integration to allow easy and simple run containers using Docker CLI.

[BUG] Can't Import - Module AIP Service

To Reproduce

Install-Module AIPService
Import-Module AIPService

Observed Behavior

Import-Module: Could not load file or assembly 'System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

Expected behavior

AIPService Module ready to be used

Is this specific to Cloud Shell?

Yes

Interface information

How are you accessing Cloud Shell - https://shell.azure.com, https://portal.azure.com, via Windows Terminal, or some other method?
If a browser, which Operating System and browser are you using? (ex. Edge on Windows 10)
Portal.azure.com
https://shell.azure.com

Additional context

Add any other context about the problem here.

[BUG] Loading the Microsoft 365 CLI in Azure Cloud Shell

To Reproduce

Start up the CLI in either Bash or PS

m365 -v

Observed Behavior

username@Azure:~$ m365 -v
/usr/local/lib/node_modules/@pnp/cli-microsoft365/node_modules/webidl-conversions/lib/index.js:357
    } catch {
            ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at Module.patchedRequire [as require] (/usr/local/lib/node_modules/@pnp/cli-microsoft365/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
    at require (internal/module.js:11:18)

Expected behavior

Returning the version of the Microsoft 365 CLI that is available in the Shell

Is this specific to Cloud Shell?

Not quite sure, the Microsoft 365 CLI is working on other platforms so it looks like it is related to the recent changes in the base image.

Interface information

How are you accessing Cloud Shell - https://shell.azure.com, https://portal.azure.com, via Windows Terminal, or some other method?
The error occurs in all scenarios (shell, portal and Windows terminal). Browser is Edge Dev latest release on Windows Version 10.0.19042. Windows Terminal Version: 1.4.3243.0

Additional context

N/a

kubectl need update, since some AKS features require version 1.18.1

To Reproduce

Create AKS with managed Azure AD feature;
https://docs.microsoft.com/en-us/azure/aks/managed-aad

kubectl can't login any more

Observed Behavior

kubectl can't login any more to most recent AKS

Expected behavior

An updated version of kubectl works fine.

Is this specific to Cloud Shell?

No, just the version is too old.

Interface information

All browsers are affected.

Additional context

see https://docs.microsoft.com/en-us/azure/aks/managed-aad -> Prerequisites

Invoke-PreparePowershell.ps1 is not being run

The script Invoke-PreparePowerShell.ps1 is supposed to be run when a container is started ahead of time and added to a container pool. It runs powershell and loads a few modules so that they are paged-in and load more quickly when the user actually connects. However due to an error in the dockerfile the file is being deleted again before the image build finishes to it is not present in the final image and is not run. The only effect is slower pwsh startup but we should fix it.

[BUG] .NET Core version is not up to date

To Reproduce

Open https://shell.azure.com (bash or PS) and run...

dotnet --list-sdks

Observed Behavior

Only up to version 2.2 is installed.

1.0.1 [/usr/share/dotnet/sdk]
2.2.402 [/usr/share/dotnet/sdk]

Expected behavior

The documentation here says, that .NET Core version 3.1.302 is supported in Azure Cloud Shell....which is not the case. When you start a shell, you can only use up to SDK version 2.2. Looking at the docker image, it only includes version 2.2:

dotnet-sdk-2.2 \

Is this specific to Cloud Shell?

Yes.

Interface information

https://shell.azure.com - but as described above, it's not a problem with UI/UX of the shell itself.

[BUG] Does the GitHub CI/CD normally take this long?

To Reproduce

I made a pull request with my code. I just made a small change to the README within the pull request.

Observed Behavior

No official errors (at least not as of yet)

Expected behavior

I was expecting my code to run and finish within the time slots of all the other PRs test runs.

Is this specific to Cloud Shell?

Not exactly - maybe? Did something happen with the CloudShell pipeline code?

Interface information

Additional context

#87

Screen Shot 2021-03-23 at 6 14 59 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.