There are times when a XenServer VM gets stuck and multiple attempts of ToolStack Restart and Force Shutdown doesn’t work at all.
In that case, you need to destroy the Domain and then start the VM on any host.
First, log into the XenServer host through PuTTY and execute
list_domains command as shown below:
Here, I see a domain at bottom with the state as
Refer to below explanations about the states:
D – domain is dying
S – domain shutting down
B – blocked domain
C – domain crashed
P – domain paused
R – domain is actively running on one of the CPU
H – domain is HVM (Hardware Virtualized Machine) domain
So, as per my screenshot, the domain for my VM is
Now, I will destroy this domain using below commands:
Change to debug directory:
Run the destroy command:
./xenops destroy_domain -domid 208
Where 208 is my VM’s domain ID as shown in the screenshot.
Now, you will be able to execute commands through command-line or through mouse clicks and bring the VM up.