Avatar of Armitage318
Armitage318
 asked on

ESXi 6.7: cannot poweroff VM

Hi, I put one of my ESXi hosts in maintenance mode, but that task is currently in progress because one guest VM seems to have issues.
I am unable to edit anything on that VM, in vSphere console I noticed:
"the operations is not allowed in current state. The operation cannot be performaed because VM migration is in progress"
I tried to shut down affected VM through ESXi hosts (not vCenter).
it seems guest shutdown initiated (it is a very old XP vm!), but if I type:

vim-cmd vmsvc/power.getstate 131
Retrieved runtime info
Powered on

Open in new window


VM still results on.
I also tried with:

esxcli vm process kill -t=hard -w=2236513
esxcli vm process kill -t=force -w=2236513
esxcli vm process kill -t=soft -w=2236513

Open in new window


with no luck.
What else can I try to shutdown this VM?
Thank you!

Virtualization* eSXI 6.7VMware

Avatar of undefined
Last Comment
Armitage318

8/22/2022 - Mon
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

Can you find the task and kill the task process ?

Rather than trying to kill the VM ?

It would also be interesting yo find out what Task is running on the VM, e.g. stuck migration, or snapshot in place, or merge.
Bembi

The shutdown process is in work, but the OS is working oin something. Triggering it again will be denied, as it is already in progress...
..."The operation cannot be performaed because VM migration is in progress "
I'm not sure if it is a good idea to try to kill the VM, as i would expect, that the VM may crash if you just kill it.
So the better idea would be to wait...
May be you are still able to connect via the RDP window (VCenter) if you see any status.

Armitage318

ASKER
Unfortunately, I had to forcefully shutdown the entire ESXi host, on which only that VM was "running".
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Armitage318

ASKER
hi Bembi, I waited about 1 hour. Too much time. So in the end I rebootted the host.
Thank you
Armitage318

ASKER
hi Andrew, did you mean.. finding the task through vSphere web client or through cli?
in vSphere it seems I had no way to end migration process.
How could I narrow the process?
Thank you!

Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

yes troubleshooting is performed at the console or shell too late now a host reboot would do it as a last resort!!!
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Armitage318

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.