azure - 创建 Azure Cloud Shell 存储时遇到问题
问题描述
尝试创建 Azure Cloud Shell 存储时,它似乎失败了,我无法将任何文件上传到 shell。以下是 Cloud Shell 窗口的输出:
Requesting a Cloud Shell.Succeeded.
Connecting terminal...
Import-Module: /opt/microsoft/powershell/7/profile.ps1:13
Line |
13 | Microsoft.PowerShell.Core\Import-Module -Name PSCloudShellUtility
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Could not get access to the shared lock file.
Az.Accounts\Enable-AzureRmAlias: /opt/microsoft/powershell/7/profile.ps1:26
Line |
26 | Az.Accounts\Enable-AzureRmAlias
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The term 'Az.Accounts\Enable-AzureRmAlias' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
| correct and try again.
InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:293
Line |
293 | & ($script:PSCloudShellUtilityModuleInfo){Get-CloudShellTip -ErrorAct …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 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.
VERBOSE: Authenticating to Azure ...
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.
Invoke-CloudShellTelemetry: /opt/microsoft/powershell/7/profile.ps1:91
Line |
91 | Invoke-CloudShellTelemetry -LogLabel "GETSUBSCRIPTIONID" -Sta …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 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: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: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: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.
VERBOSE: Building your Azure drive ...
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.
New-PSDrive: /opt/microsoft/powershell/7/profile.ps1:391
Line |
391 | $null = Microsoft.PowerShell.Management\New-PSDrive -Name Azure - …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Could not get access to the shared lock file.
WARNING: Something went wrong while creating Azure drive. You can still use this shell to run Azure PowerShell commands.
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:404
Line |
404 | & ($script:PSCloudShellUtilityModuleInfo){Set-CloudShellPSReadLineKey …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 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: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.
PS /home/james>
我根据 Azure 支持在 Twitter 上的要求发布了这个问题: https ://twitter.com/AzureSupport/status/1326180959843127298?s=20
解决方案
似乎这可能是一个与时间有关的问题。我最终删除了所有的云外壳资源并等待。花了几个小时,然后我又试了一次,它奏效了。我希望有一种方法可以监控资源的删除,从而有效地显示这是否会成为问题。
推荐阅读
- docker - 在 Docker Compose 上使用 SSL 的 Kong API 网关
- pandas - 如何创建 agg func 来处理 Pandas 中的除以 0?
- c# - ASP.NET MVC + ORACLE + Entity Framework 错误:无法生成显式迁移
- javascript - 在刀片中定义 vuejs 组件
- javascript - 将 JS 函数(外部 JS)携带到另一个 PHP 文件中“包含”的 PHP 文件
- powershell - 如何将命令行参数传递给腻子而不使它们在powershell / cmd中可见?
- android - 使用 SQlite 的 DB 浏览器查看 sqlite 数据库文件
- kubernetes - Kubernetes 崩溃循环错误,容器无法运行并且看不到日志
- java - Spring中使用注解的依赖注入
- python - 使用 Keras (Tensorflow) 训练模型时出现形状错误