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 作業系統:Cmd-c 進行複製,Cmd-v 即可貼上。Mac OS: Cmd-c to copy and Cmd-v to paste.

針對指定的使用者,只能有一個殼層作用中For a given user, only one shell can be active

使用者一次只能啟動一種類型的 Shell:BashPowerShellUsers 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) 來建立新檔案時,檔案預設會儲存至 $HOME 資料夾。When 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: ,則可能是資料指標的設定不正確,而且先前的進度列會出現間距。If the user performs an action that displays a progress bar, such as 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