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

2021-09-03 06:18:39 字數 2033 閱讀 6878

有一台虛機無法正常網路連線,通過vsphere client連線到vc中,也無法對其進行重啟和關機操作,具體報錯截圖

檢視事件日誌

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

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

下面介紹一種方法。

首先開啟虛機所在esxi主機的ssh連線功能。

然後連線到命令列

執行程序檢視,可檢視到每個虛機的程序

# 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=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=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成功。

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

有一台虛機無法正常網路連線,通過vsphere client連線到vc中,也無法對其進行重啟和關機操作,具體報錯截圖 檢視事件日誌 原來是執行vmtools安裝程式時出現的問題,詢問實施工程師,原來是要進行vmtools的公升級未成功出現的問題,虛機現在掛死無任何響應。那麼有沒有別的辦法可以強制讓虛...

虛擬機器無法關閉 qemu虛擬機器的關機方式

qemu虛擬機器的關閉方式主要包括如下幾種方式 通過qemu monitor的system powerdown命令進行關閉,在libvirt對qemu進行管理的情況下,通過virsh shutdown命令進行關閉。在虛擬機器內使用guest os自帶的關機按鈕進行關閉。通過qemu monitor的...

VM虛擬機器網絡卡出現問題無法上網的解決

今天執行vmware中的linux虛擬機器 ubuntu 20.04 時,發現無法連線網路,無論使用橋接模式還是nat模式都無法連線。使用 ip a命令查詢,結果如下 錯誤資訊為ens33 mtu 1500 qdisc fq codel state down group default qlen 1...