您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure Cloud Shell 的限制Limitations of Azure Cloud Shell

Azure Cloud Shell 有以下已知限制:Azure Cloud Shell has the following known limitations:

一般限制General limitations

系统状态和持久性System state and persistence

提供 Cloud Shell 会话的计算机是暂时性的,在会话处于非活动状态 20 分钟后会被回收。The machine that provides your Cloud Shell session is temporary, and it is recycled after your session is inactive for 20 minutes. Cloud Shell 需要装载 Azure 文件共享。Cloud Shell requires an Azure file share to be mounted. 因此,订阅必须能够设置存储资源才能访问 Cloud Shell。As a result, your subscription must be able to set up storage resources to access Cloud Shell. 其他注意事项包括:Other considerations include:

  • 使用装载的存储时,仅持久保存 $Home 目录中的修改。With mounted storage, only modifications within the $Home directory are persisted.
  • 仅可从已分配区域内部装载 Azure 文件共享。Azure file shares can be mounted only from within your assigned region.
    • 在 Bash 中,运行 env 可以找到设置为 ACC_LOCATION 的区域。In Bash, run env to find your region set as ACC_LOCATION.

浏览器支持Browser support

Cloud Shell 支持最新版本的 Microsoft Edge、Microsoft Internet Explorer、Google Chrome、Mozilla Firefox 和 Apple Safari。Cloud Shell supports the latest versions of Microsoft Edge, Microsoft Internet Explorer, Google Chrome, Mozilla Firefox, and Apple Safari. 不支持专用模式下的 Safari。Safari in private mode is not supported.

复制和粘贴Copy and paste

  • Windows:支持使用 Ctrl-c 进行复制,但使用 Shift-insert 进行粘贴。Windows: Ctrl-c to copy is supported but use Shift-insert to paste.
    • FireFox/IE 可能不会正确支持剪贴板权限。FireFox/IE may not support clipboard permissions properly.
  • Mac OS:使用 Cmd-c 复制,使用 Cmd-v 粘贴。Mac OS: Cmd-c to copy and Cmd-v to paste.

对于一个给定的用户,只有一个 shell 可处于活动状态For a given user, only one shell can be active

不管是在 Bash 还是 PowerShell 中,用户每次只能启动一种类型的 shell。Users can only launch one type of shell at a time, either Bash or PowerShell. 但是,每次可以运行 Bash 或 PowerShell 的多个实例。However, you may have multiple instances of Bash or PowerShell running at one time. 使用菜单 Bash 或 PowerShell 之间切换会导致 Cloud Shell 重启,从而终止现有会话。Swapping between Bash or PowerShell by using the menu causes Cloud Shell to restart, which terminates existing sessions. 或者,可以通过键入运行 PowerShell 中的 bash bash,并可在 bash 运行 PowerShell,通过键入pwshAlternatively, you can run bash inside PowerShell by typing bash, and you can run PowerShell inside bash by typing pwsh.

使用限制Usage limits

Cloud Shell 适用于交互式用例。Cloud Shell is intended for interactive use cases. 因此,任何长时间运行的非交互式会话都会在没有预警的情况下终止。As a result, any long-running non-interactive sessions are ended without warning.

Bash 限制Bash limitations

用户权限User permissions

权限设置为普通用户,不具有 sudo 访问权限。Permissions are set as regular users without sudo access. 不会保留 $Home 目录外部的任何安装。Any installation outside your $Home directory is not persisted.

编辑.bashrc 或 $PROFILEEditing .bashrc or $PROFILE

编辑.bashrc 或 PowerShell 的 $PROFILE 文件,这样可以在 Cloud Shell 中导致意外的错误时要注意。Take caution when editing .bashrc or PowerShell's $PROFILE file, doing so can cause unexpected errors in Cloud Shell.

PowerShell 限制PowerShell limitations

AzureAD 模块名称AzureAD module name

AzureAD 模块名称当前为 AzureAD.Standard.Preview,该模块提供相同的功能。The AzureAD module name is currently AzureAD.Standard.Preview, the module provides the same functionality.

SqlServer 模块功能SqlServer module functionality

Cloud Shell 中包含的 SqlServer 模块仅具有对 PowerShell Core 的预发布版本支持。The SqlServer module included in Cloud Shell has only prerelease support for PowerShell Core. 具体而言,Invoke-SqlCmd 尚不可用。In particular, Invoke-SqlCmd is not available yet.

从 Azure 驱动器创建时的默认文件位置:Default file location when created from Azure drive:

使用 PowerShell cmdlet,用户可以创建在 Azure 下的文件: 驱动器。Using PowerShell cmdlets, users can not create files under the Azure: drive. 当用户使用其他工具(如 vim 或 nano)创建新文件时,文件将默认保存到 $HOMEWhen users create new files using other tools, such as vim or nano, the files are saved to the $HOME by default.

不支持 GUI 应用程序GUI applications are not supported

如果用户在运行命令将创建一个 Windows 对话框,其中一个如会看到一条错误消息: Unable to load DLL 'IEFRAME.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)If the user runs a command that would create a Windows dialog box, one sees an error message such as: Unable to load DLL 'IEFRAME.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E).

在显示进度栏后出现大间距型Large Gap after displaying progress bar

如果用户执行显示进度栏的操作(例如,在 Azure: 驱动器中的 tab 自动补全),则光标可能设置不正确,且在以前的进度栏处出现间距。If the user performs an action that displays a progress bar, such a tab completing while in the Azure: drive, then it is possible that the cursor is not set properly and a gap appears where the progress bar was previously.

后续步骤Next steps

Cloud Shell 故障排除Troubleshooting Cloud Shell
Bash 快速入门Quickstart for Bash
PowerShell 快速入门Quickstart for PowerShell