Skip to content

Kill VM vSphere

January 26, 2017

find lock:

[root@esx01:~] vmkfstools -D /vmfs/volumes/Datastore/Server/Server.vmx
Lock [type 10c00001 offset 235544576 v 270, hb offset 3809280
gen 101, mode 1, owner 56f32abb-b98107ba-ba5c-ac1624ee27e8 mtime 5372
num 0 gblnum 0 gblgen 0 gblbrk 0]

mode 1 –  file is locked

ac1624ee27e8 – MAC address of the a physical NIC in the host, that owns the lock.

——————————–

To find the host i use RVTools to look for the MAC address in the vNIC tab, or us PowerCLI.

PowerCLI C:\> $vmhost = Get-VMHost | Get-VMHostNetworkAdapter | Where-Object {$_.Mac -eq "ac:16:24:ee:27:e8"}
PowerCLI C:\> $vmhost.vmhost

——————————–

[root@esx01:~] esxcli vm process list | grep Server -A 1 | grep -v “Display Name” | grep -v “Config File”
Server
World ID: 112261247

———————————-

[root@esx01:~] esxcli vm process kill -t hard -w 11226124

can try “force” instead

Thanks – https://www.virtual-allan.com/vm-operation-not-allowed-in-this-state/

 

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: