

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 強制停止停滯的Lightsail執行個體
<a name="amazon-lightsail-force-stop-instance"></a>

執行個體很少會卡在 `Stopping` 狀態。如果發生這種情況，則託管您 Amazon Lightsail 執行個體的基礎硬體可能發生問題。在本指南中，您將學習如何強制停止卡在 `stopping` 狀態的執行個體。如需執行個體狀態的詳細資訊，請參閱[開始、停止或重新啟動 Lightsail 執行個體](lightsail-how-to-start-stop-or-restart-your-instance-virtual-private-server.md) 

## 如何強制停止執行個體
<a name="force-stop"></a>

只有在執行個體為 `stopping` 狀態時，您才可以使用 Lightsail 主控台強制停止執行個體。或者，當執行個體處於 `shutting-down` 和 `terminated` 以外的任何狀態時，使用 AWS Command Line Interface (AWS CLI) 強制停止該執行個體。強制停止可能需要幾分鐘完成。如果執行個體在 10 分鐘後仍未停止，請再次強制停止。

強制停止執行個體時，其沒有機會排清檔案系統快取或檔案系統中繼資料。強制停止執行個體之後，您應該執行檔案系統檢查和修復程序。

下列程序說明強制停止 Lightsail 執行個體的不同方式。

**強制停止 Lightsail 主控台中的執行個體**

1. 登入 [Lightsail 主控台](https://lightsail.aws.amazon.com/)。

1. 選擇**執行個體**標籤。

1. 找出卡在 `Stopping` 狀態的執行個體。然後，選擇執行個體名稱旁邊顯示的動作功能表圖示 (⋮)。  
![\[Lightsail 執行個體動作功能表。\]](http://docs.aws.amazon.com/zh_tw/lightsail/latest/userguide/images/amazon-lightsail-force-stop-actions-menu.png)

1. 在出現的下拉式清單中選擇**強制停止**。  
![\[Lightsail 執行個體動作功能表強制停止選項。\]](http://docs.aws.amazon.com/zh_tw/lightsail/latest/userguide/images/amazon-lightsail-force-stop-choose-am-option.png)

   或者，您也可以選擇執行個體名稱來存取執行個體管理頁面。然後，選擇**強制停止**按鈕。  
![\[Lightsail 執行個體管理頁面強制停止按鈕。\]](http://docs.aws.amazon.com/zh_tw/lightsail/latest/userguide/images/amazon-lightsail-force-stop-button-instance.png)

1. 檢閱此操作的考量事項。若要繼續，請選擇**強制停止**。  
![\[Lightsail 執行個體管理頁面強制停止按鈕。\]](http://docs.aws.amazon.com/zh_tw/lightsail/latest/userguide/images/amazon-lightsail-force-stop-considerations-modal.png)

**使用 強制停止執行個體 AWS CLI**

1. 開始之前，需要安裝 AWS CLI。若要進一步了解，請參閱[安裝 AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html)。請務必在安裝之後[設定 AWS CLI](lightsail-how-to-set-up-and-configure-aws-cli.md)。

1. 如下所示使用 [stop-instance](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lightsail/stop-instance.html) 命令和 `--force` 參數：

   `aws lightsail stop-instance --instance-name Wordpress-1 --force`