Home / VMware / VMWARE ESXi 5 / Unable to Power off Virtual Machine on ESXi 5.5 host

Unable to Power off Virtual Machine on ESXi 5.5 host

In some rare scenarios where you can’t even power off the virtual machine on VMware ESXi. This happens if the virtual host lost the I/O path  or some issues related to I/O subsystems.In this situation,when you tried to power off the virtual machine,you will get error messages like “The operation can’t be allowed at the current time because the virtual machine has  a question pending”.

In my case what i have done is that , attached the ISO file to virtual machine from one of the datastore and unfortunately lost the SAN path to that. So the virtual machine which i connected to ISO datastore went to “question pending” state and i am not able to reset or power off the host after that.

Here we will see how we can fix this issue on VMware ESXi 5.5.

1.Open the browser and connect to VCenter web-client.

Question Pending - VM guest state
Question Pending – VM guest state

2.I tired to power off the virtual guest but getting below error.

Question Pending - Error Log
Question Pending – Error Log

3. Login to ESXi host where the virtual machine is running using ssh. In my case its

login as: root
Using keyboard-interactive authentication.
The time and date of this login have been sent to the system logs.

VMware offers supported, powerful system administration tools.  Please
see www.vmware.com/go/sysadmintools for details.

The ESXi Shell can be disabled by an administrative user. See the
vSphere Security documentation for more information.
~ #

4.List the specific virtual machine process using ps command.

~ # ps -s |grep vmx |grep Solaris11
44991 44991 vmx                  WAIT   UPOL   0,1  /bin/vmx
44998 44991 vmx-vthread-4:Oracle Solaris11 WAIT   UFUTEX 0,1  /bin/vmx
44999 44991 vmx-vthread-5:Oracle Solaris11 WAIT   UFUTEX 0,1  /bin/vmx
45000 44991 vmx-mks:Oracle Solaris11 WAIT   SEMA   0,1  /bin/vmx
45001 44991 vmx-svga:Oracle Solaris11 WAIT   SEMA   0,1  /bin/vmx
45002 44991 vmx-vcpu-0:Oracle Solaris11 WAIT   IDLE   0,1  /bin/vmx
~ #

5.Try to kill the vpcu process of the guest using kill command.

~ # kill 45002
~ #

Still if the process is live ,use -9 signal to kill it.

~ # kill -9 45002

6.Check whether vmx process is running for that impacted virtual guest.If there is no process ,we are good to proceed to next step.If any process is running for that guest,kill those process as well.

~ # ps -s |grep vmx |grep Solaris11
~ #

7.Go back to web-client and try to power of the virtual machine now.

Power of the virtual guest
Power of the virtual guest

You may get the below notification.Just ignore it.

Power of Notification-VMware
Power of Notification-VMware

8.Edit the virtual machine and remove if you attached any file from non-existing datastore. (Ex:ISO files)

9.Tradition VSphere Client can’t edit the virtual machine since newer version(10) of virtual machines are  only supported by VSphere web-client.You will get error like below one if you tried to edit from VSphere Client.

Unable to edit virtual machine -VMware
Unable to edit virtual machine -VMware

10.Now you can power on the virtual machine.

power on virtual machine -VMware
power on virtual machine -VMware

11.You can see virtual machine is powered on and its booting solaris11.

Solaris virtual guest on ESXi
Solaris virtual guest on ESXi

Hope this article may help you to fix the issue.

Do not forget to check out RVtools – VCenter Server Inventory free tool. It will make your job easier.

Thank you for visiting UnixArena.