I've been troubleshooting XenServer a couple of times today, with problems after cancelling a new VM. What I encountered today is what you can call a Xen hosted VM that is stuck in a “Pending” state, typically a VM that was stuck with a pending Shutdown task.
Here is what you need to do to release it from this state. Also note that in the XenCenter, the VM is no responsive in a panic state and the Shutdown and Reboot buttons are greyed out.
A couple of potential causes for this condition include:
Here is what you need to do!
From the XenCenter connect to the XenServer console CLI
Please note that I also tried to use the xe vm-reboot or xe vm-shutdown commands do nothing but create more pending tasks. If xe-toolstack-restart and xe task-cancel uuid=<UUID> (without the force=true) had no effect.
Once the Pending tasks affecting the VM had been cancelled, the VM rebooted and worked normally, xe-toolstack-restart after cancelling the tasks was not necessary, but you may need to use it if the server is not responsive.
Please NOTE that if you need to run the xe-toolstack-restart command, be sure to turn off HA before you run the command in CLI!
PS.We take no responsibility for what might or might not happen!
![]()
Connect on Twitter