VM虛機無法重啓關機的強制處理辦法

有一臺虛機無法正常網絡連接,通過VSPHERE CLIENT連接到VC中,也無法對其進行重啓和關機操作,具體報錯截圖

wKiom1aWEX3w8ZGuAAGu41PLTb4935.jpg

查看事件日誌

wKioL1aWEgnxBIg1AAIz9J-q5W4974.jpg

原來是執行VMTOOLS安裝程序時出現的問題,詢問實施工程師,原來是要進行VMTOOLS的升級未成功出現的問題,虛機現在掛死無任何響應。

對其進行重啓和關機均無任何響應,這臺虛機掛有很多RDM裸盤,是存儲監控機。需要立即解決問題,刪除重建顯然來不及。

那麼有沒有別的辦法可以強制讓虛機關機或重啓呢?

下面介紹一種方法。

首先打開虛機所在ESXI主機的SSH連接功能。

wKioL1aWE4SwjyAJAAOJpVZfrq4047.jpg

然後連接到命令行

執行進程查看,可查看到每個虛機的進程

# esxcli vm process list|more

F9EMCSE01

   World ID: 40008824

   Process ID: 0

   VMX Cartel ID: 40008821

   UUID: 42 0a d0 01 38 68 b7 7d-61 5e 4c ab d5 5b f0 6c

   Display Name: F9EMCSE01

   Config File: /vmfs/volumes/55813f75-c661c1ac-dea8-6c0b8462a7e8/F9EMCSE01/F9EMCSE01.vmx


# esxcli vm process kill --type=

Error: Missing required parameter -w|--world-id


Usage: esxcli vm process kill [cmd options]


Description: 

  kill                  Used to forcibly kill Virtual Machines that are stuck

                        and not responding to normal stop operations.


Cmd options:

  -t|--type=<str>       The type of kill operation to attempt. There are three

                        types of VM kills that can be attempted:   [soft,

                        hard, force]. Users should always attempt 'soft' kills

                        first, which will give the VMX process a chance to

                        shutdown cleanly (like kill or kill -SIGTERM). If that

                        does not work move to 'hard' kills which will shutdown

                        the process immediately (like kill -9 or kill

                        -SIGKILL). 'force' should be used as a last resort

                        attempt to kill the VM. If all three fail then a

                        reboot is required. (required)

  -w|--world-id=<long>  The World ID of the Virtual Machine to kill. This can

                        be obtained from the 'vm process list' command

                        (required)

有三種類型,SOFT是殺死虛機進程。HARD是強制殺死,類似KILL -9. FORCE是殺死整個虛機。

執行語句

# esxcli vm process kill --type=hard --world-id=40008824

發現虛機已被強制關閉,再重啓就正常了,升級VMTOOLS成功。

本文出自 “滴水穿石孫杰” 博客,請務必保留此出處http://xjsunjie.blog.51cto.com/999372/1734698

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章